Fix creation of stamp-h by gdb's configure script
authorTom Tromey <tromey@adacore.com>
Thu, 29 Aug 2019 14:39:57 +0000 (10:39 -0400)
committerTom Tromey <tromey@adacore.com>
Thu, 17 Oct 2019 19:21:24 +0000 (13:21 -0600)
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-10-17  Tom Tromey  <tromey@adacore.com>

* 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-10-17  Tom Tromey  <tromey@adacore.com>

* 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.

Change-Id: Ia0530d1c5b9756812d29ddb8dc1062326155e61e

gdb/ChangeLog
gdb/Makefile.in
gdb/configure
gdb/configure.ac
gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in
gdb/gdbserver/configure
gdb/gdbserver/configure.ac

index e70e40eecb417762b53f85e4872ba86e30043ca0..826278f4492912a457133feabee09c34551358c1 100644 (file)
@@ -1,3 +1,11 @@
+2019-10-17  Tom Tromey  <tromey@adacore.com>
+
+       * 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.
+
 2019-10-17  Tom de Vries  <tdevries@suse.de>
 
        * arm-nbsd-nat.c: Fix typos in comments.
index 8fec099a1b4257b996740d8cb6f723a780b45603..9d07ac0d97429696fe47b31826619337888ac3ed 100644 (file)
@@ -1996,18 +1996,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
@@ -2027,11 +2019,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
index 22a5f6051d47ba83d192fcc5c2644baf318cbb91..70ce52fa1e835e4ce385f84652075251d075a9d2 100755 (executable)
@@ -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
index 9da8818fb5ce9513c31ed8e6cb6afdc9620448f8..c4e0dbf9952160434bdeab799a95a248a1914270 100644 (file)
@@ -19,7 +19,7 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 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
index b2213cffcfb742241fb59cca9a979eefa9d90b4f..fa78ebab71c51dd859159c900c743bd82f15865d 100644 (file)
@@ -1,3 +1,11 @@
+2019-10-17  Tom Tromey  <tromey@adacore.com>
+
+       * 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.
+
 2019-10-16  Christian Biesinger  <cbiesinger@google.com>
 
        * server.c: Include xml-builtin.h.
index 34d8060c256899e0b5311639c5ef1bf8d3676fbe..b9b5b894a55e2eef2925456b674eda229c301f74 100644 (file)
@@ -496,10 +496,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" \
index 692cb0f30828916589db3171b0d7f3e4fb8f227d..5c84eeb779463a0ea20dcb5d830bf495ec84d05b 100755 (executable)
@@ -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
index 0009aac9f207197a685330c6bf643d682f8121b4..7ebc9c3cf15b8385870ae913f94cff3f1a3c13b6 100644 (file)
@@ -19,7 +19,7 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 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