[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
25 Apr 2002 12:27:50 +0200
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)
| | > From: Akim Demaille <address@hidden>
| | > Date: 24 Apr 2002 12:53:18 +0200
| | >
| | > Autoreconf does (now) the following:
| | >
| | > 1. aclocal to make tracing faithful
| | > 2. autoconf --trace
| | > to see if libtool, automake, autoheader and gettext are used.
| | > 3. gettextize
| | > 4. libtoolize
| | > 5. aclocal (3 & 4 may have installed new local m4 files)
| | > 6. autoconf
| | > 7. autoheader
| | > 8. automake
| | >
| | > The problem is that at point 1., we already have the right aclocal.m4:
| | > the gettext macros are found in /usr/*/share/alocal/ by aclocal, which
| | > pastes them into aclocal.m4.
| | >
| | > Then, and point 5, autoreconf sees it is creating the same aclocal.m4
| | > again, so it keeps the old one, to avoid relaunching autoconf etc.
| | >
| | > But then, when automake is run, the Makefiles have dependencies for
| | > aclocal.m4 which point to the *local* copies of the gettext macros,
| | > now installed in m4/.
| | OK, how about if you insert the following step after step 5:
| | touch -m -r aclocal.m4 `ls -t aclocal.m4 m4/*.m4 | sed '/aclocal.m4/q'`
| | This is a bit of a hack, but it should prevent aclocal.m4 from
| | appearing to be older than its inputs.
| It does sound good to me. Thank you!
This is the corresponding patch. I hope it is sane. I'm not used to
send files in the past :(
from Akim Demaille <address@hidden>
* bin/autoreconf.in (autoreconf): Don't let aclocal.m4 be older
than some of the input files, hence, on the second run of aclocal,
if some of its input are younger, make them older.
Suggested by Paul Eggert.
RCS file: /cvsroot/autoconf/autoconf/bin/autoreconf.in,v
retrieving revision 1.95
diff -u -u -r1.95 autoreconf.in
--- bin/autoreconf.in 24 Apr 2002 16:28:40 -0000 1.95
+++ bin/autoreconf.in 25 Apr 2002 10:26:06 -0000
@@ -442,8 +442,46 @@
xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t");
# aclocal may produce no output.
- update_file ('aclocal.m4t', 'aclocal.m4')
- if -f 'aclocal.m4t';
+ if (-f 'aclocal.m4t')
+ update_file ('aclocal.m4t', 'aclocal.m4');
+ # Make sure that the local m4 files are older than
+ # aclocal.m4.
+ # Why is not always the case? Because we already run
+ # aclocal a first (before tracing), which, for instance,
+ # can find Gettext's macros in .../share/aclocal, so we
+ # may have had the right aclocal.m4 already. Then
+ # gettextize is run, and installs locally these M4
+ # files. Then autoreconf, via update_file, sees it is
+ # the _same_ aclocal.m4, and doesn't change its
+ # timestamp. But later, Automake's Makefile expresses
+ # that aclocal.m4 depends on these local files, which
+ # are younger, so it triggers aclocal again.
+ # To make sure aclocal.m4 is younger, we change the
+ # modification times of the local M4 files to be
+ # slightly older than it.
+ # First, where are the local files?
+ my $aclocal_local_dir = '.';
+ if ($aclocal_flags =~ /-I\s+(\S+)/)
+ $aclocal_local_dir = $1;
+ # All the local files younger than aclocal.m4 are to be
+ # grown older than it.
+ my $aclocal_m4_mtime = mtime ('aclocal.m4');
+ for my $file (glob ("$aclocal_local_dir/*.m4"), 'acinclude.m4')
+ if (mtime ($file) >= $aclocal_m4_mtime)
+ debug "making $file younger than aclocal.m4";
+ utime $aclocal_m4_mtime - 1, $aclocal_m4_mtime - 1,
- Re: YYSTYPE_IS_TRIVIAL,
Akim Demaille <=