Various autotools rules will compare the timestamps of config-h.in
and configure, and if config-h.in is newer than configure, attempt
to regenerate it. This breaks `make distcheck` which we need to
produce new releases. So update config-h.in timestamp, but only
up to the configure file.
The breakage is caught because distcheck makes source dirs read-only
before running.
$ make distcheck
...
make[3]: Entering directory '.../libtool-2.4.7.62-7132f/_build/sub'
GEN ../../libltdl/configure
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-7132f/libltdl: Permission denied
make[3]: *** [Makefile:2411: ../../libltdl/configure] Error 1
* bootstrap.conf (libtool_fudge_timestamps): Set config-h.in timestamp
to configure.
# are updated. Unfortunately config-h.in depends on aclocal.m4, which
# *is* updated, so running 'libtoolize --ltdl=. && configure && make'
# causes autoheader to be called... undesirable for users that do not
-# have it! Fudge the timestamp to prevent that:
+# have it! Fudge the timestamp to prevent that. But only fudge it as
+# much as configure since configure depends on config-h.in and we don't
+# want to require autoconf either.
libtool_fudge_timestamps ()
{
$debug_cmd
- sleep 2 && touch libltdl/config-h.in
+ (
+ cd libltdl
+ touch -r configure config-h.in
+ )
}
func_add_hook func_fini libtool_fudge_timestamps