From patchwork Tue Sep 3 18:05:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 34378 Received: (qmail 3985 invoked by alias); 3 Sep 2019 18:05:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 3977 invoked by uid 89); 3 Sep 2019 18:05:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=upgrade, cd, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Sep 2019 18:05:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6B114117164; Tue, 3 Sep 2019 14:05:28 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iRQdJQEhTCh7; Tue, 3 Sep 2019 14:05:28 -0400 (EDT) Received: from murgatroyd.Home (71-218-73-27.hlrn.qwest.net [71.218.73.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 15EE111713C; Tue, 3 Sep 2019 14:05:28 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Fix creation of stamp-h by gdb's configure script Date: Tue, 3 Sep 2019 12:05:26 -0600 Message-Id: <20190903180526.22441-1-tromey@adacore.com> MIME-Version: 1.0 I happened to notice that "make" would always print: CONFIG_HEADERS=config.h:config.in \ CONFIG_COMMANDS="default depdir" \ CONFIG_FILES= \ CONFIG_LINKS= \ /bin/sh config.status config.status: creating config.h config.status: config.h is unchanged on every rebuild. This seems to have changed due to an autoconf upgrade at some point in the past. In the autoconf gdb uses now, it works to use AC_CONFIG_HEADERS and then create the stamp file via the "commands" argument. This patch also fixes up Makefile.in to use the new-style config.status invocation. It's no longer necessary to pass the output file names via environment variables. gdb/ChangeLog 2019-09-03 Tom Tromey * configure: Rebuild. * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not in AC_CONFIG_FILES invocation. * Makefile.in (Makefile, data-directory/Makefile, stamp-h): Use new-style config.status invocation. gdb/gdbserver/ChangeLog 2019-09-03 Tom Tromey * configure: Rebuild. * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not in AC_CONFIG_FILES invocation. * Makefile.in (stamp-h, Makefile): Use new-style config.status invocation. --- gdb/ChangeLog | 8 ++++++++ gdb/Makefile.in | 18 +++--------------- gdb/configure | 31 +------------------------------ gdb/configure.ac | 10 ++-------- gdb/gdbserver/ChangeLog | 8 ++++++++ gdb/gdbserver/Makefile.in | 4 ++-- gdb/gdbserver/configure | 6 +----- gdb/gdbserver/configure.ac | 9 ++------- 8 files changed, 27 insertions(+), 67 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index e7e26a44a0c..9c910fc44e9 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1998,18 +1998,10 @@ subdir_do: force done Makefile: Makefile.in config.status - # Regenerate the Makefile and the tm.h / nm.h links. - CONFIG_FILES="Makefile" \ - CONFIG_COMMANDS= \ - CONFIG_HEADERS= \ - $(SHELL) config.status + $(SHELL) config.status $@ data-directory/Makefile: data-directory/Makefile.in config.status - CONFIG_FILES="data-directory/Makefile" \ - CONFIG_COMMANDS="depfiles" \ - CONFIG_HEADERS= \ - CONFIG_LINKS= \ - $(SHELL) config.status + $(SHELL) config.status $@ .PHONY: run run: Makefile @@ -2029,11 +2021,7 @@ gdb-gdb.gdb: $(srcdir)/gdb-gdb.gdb.in config.h: stamp-h ; @true stamp-h: $(srcdir)/config.in config.status - CONFIG_HEADERS=config.h:config.in \ - CONFIG_COMMANDS="default depdir" \ - CONFIG_FILES= \ - CONFIG_LINKS= \ - $(SHELL) config.status + $(SHELL) config.status config.h config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh $(SHELL) config.status --recheck diff --git a/gdb/configure b/gdb/configure index 22a5f6051d4..70ce52fa1e8 100755 --- a/gdb/configure +++ b/gdb/configure @@ -19051,38 +19051,9 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in + "config.h":H) echo > stamp-h ;; "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; "gcore":F) chmod +x gcore ;; - "Makefile":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; - "gdb-gdb.gdb":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; - "gdb-gdb.py":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; - "doc/Makefile":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; - "data-directory/Makefile":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; esac done # for ac_tag diff --git a/gdb/configure.ac b/gdb/configure.ac index 9da8818fb5c..c4e0dbf9952 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -19,7 +19,7 @@ dnl along with this program. If not, see . dnl Process this file with autoconf to produce a configure script. AC_INIT(main.c) -AC_CONFIG_HEADER(config.h:config.in) +AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h]) AM_MAINTAINER_MODE # Set the 'development' global. @@ -2262,12 +2262,6 @@ GDB_AC_SELFTEST([ GDB_AC_TRANSFORM([gdb], [GDB_TRANSFORM_NAME]) GDB_AC_TRANSFORM([gcore], [GCORE_TRANSFORM_NAME]) AC_CONFIG_FILES([gcore], [chmod +x gcore]) -AC_CONFIG_FILES([Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile], -[ -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac -]) +AC_CONFIG_FILES([Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile]) AC_OUTPUT diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index ca0a4cbd10f..c7a38c7b992 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -497,10 +497,10 @@ subdir_do: force config.h: stamp-h ; @true stamp-h: config.in config.status - CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status + $(SHELL) ./config.status config.h Makefile: Makefile.in config.status - CONFIG_HEADERS="" $(SHELL) ./config.status + $(SHELL) ./config.status $@ $(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../../gnulib/Makefile.in config.status @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \ diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 692cb0f3082..5c84eeb7794 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -9806,17 +9806,13 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in + "config.h":H) echo > stamp-h ;; "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; "gdbdepdir":C) for subdir in ${CONFIG_SRC_SUBDIR} do $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR done ;; - "Makefile":F) case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; esac done # for ac_tag diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 0009aac9f20..7ebc9c3cf15 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -19,7 +19,7 @@ dnl along with this program. If not, see . dnl Process this file with autoconf to produce a configure script. AC_INIT(server.c) -AC_CONFIG_HEADER(config.h:config.in) +AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h]) AM_MAINTAINER_MODE @@ -484,11 +484,6 @@ if test x"$STDINT_H" != x; then fi AC_SUBST(GNULIB_STDINT_H) -AC_CONFIG_FILES([Makefile], -[case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac -]) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT