bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib-tool: avoid unnecessary config.h remaking in testdirs


From: Bruno Haible
Subject: gnulib-tool: avoid unnecessary config.h remaking in testdirs
Date: Sun, 29 Oct 2017 16:57:01 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-97-generic; KDE/5.18.0; x86_64; ; )

Just saw this after creating a testdir:

$ cd testdir1
$ ./configure
$ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash 
/media/develdata/devel/GNULIB/gnulib-git/testdir1/build-aux/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
...

This shouldn't be the case. Once a testdir is created, it should not reference
the Autotools any more.

It's an 'autoheader' bug. Interestingly, I had a workaround against this bug
in GNU gettext, GNU libunistring, and GNU libsigsegv since 2009, but never
understood it well enough before today.


2017-10-29  Bruno Haible  <address@hidden>

        gnulib-tool: Avoid unnecessary config.h remaking in testdirs.
        * gnulib-tool (func_create_testdir): Use workaround against 'autoheader'
        bug reported at <https://savannah.gnu.org/support/index.php?109406>.

diff --git a/gnulib-tool b/gnulib-tool
index 3c4bce0..36493a9 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -6477,7 +6477,8 @@ func_create_testdir ()
      func_execute_command mkdir build-aux || func_exit 1
    fi
    func_execute_command ${AUTOCONF} || func_exit 1
-   func_execute_command ${AUTOHEADER} || func_exit 1
+   # Explicit 'touch config.h.in': see 
<https://savannah.gnu.org/support/index.php?109406>.
+   func_execute_command "${AUTOHEADER} && touch config.h.in" || func_exit 1
    func_execute_command ${AUTOMAKE} --add-missing --copy || func_exit 1
    rm -rf autom4te.cache
   ) || func_exit 1
@@ -6499,7 +6500,8 @@ func_create_testdir ()
        func_execute_command mkdir ../build-aux
      fi
      func_execute_command ${AUTOCONF} || func_exit 1
-     func_execute_command ${AUTOHEADER} || func_exit 1
+     # Explicit 'touch config.h.in': see 
<https://savannah.gnu.org/support/index.php?109406>.
+     func_execute_command "${AUTOHEADER} && touch config.h.in" || func_exit 1
      func_execute_command ${AUTOMAKE} --add-missing --copy || func_exit 1
      rm -rf autom4te.cache
     ) || func_exit 1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]