Discussion:
gnulib-tool: avoid unnecessary config.h remaking in testdirs
Bruno Haible
2017-10-29 15:57:01 UTC
Permalink
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 <***@clisp.org>

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

Loading...