]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
bootstrap: don't reset config-h.in timestamp newer than configure
authorMike Frysinger <vapier@gentoo.org>
Thu, 18 Jan 2024 05:19:05 +0000 (00:19 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 18 Jan 2024 06:38:08 +0000 (01:38 -0500)
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.

bootstrap.conf

index 808321a0897b380733f846df68e099c67f55fa8c..85ac3ee197485dcb97736cd1edb33f89ea5b6727 100644 (file)
@@ -269,12 +269,17 @@ func_add_hook func_fini libtool_readme_release_package_substitutions
 # 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