288 |
} |
} |
289 |
else |
else |
290 |
{ |
{ |
291 |
|
# Some filesystems have sub-second time stamps, and if so we may |
292 |
|
# run into trouble later, after we rerun autoconf and set the |
293 |
|
# time stamps of input files to be no greater than aclocal.m4, |
294 |
|
# because the time-stamp-setting operation (utime) has a |
295 |
|
# resolution of only 1 second. Work around the problem by |
296 |
|
# ensuring that there is at least a one-second window before the |
297 |
|
# time stamp of aclocal.m4t in which no file time stamps can |
298 |
|
# fall. |
299 |
|
sleep 1; |
300 |
|
|
301 |
xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t"); |
xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t"); |
302 |
# aclocal may produce no output. |
# aclocal may produce no output. |
303 |
update_file ('aclocal.m4t', 'aclocal.m4') |
update_file ('aclocal.m4t', 'aclocal.m4') |
459 |
# aclocal.m4. |
# aclocal.m4. |
460 |
# |
# |
461 |
# Why is not always the case? Because we already run |
# Why is not always the case? Because we already run |
462 |
# aclocal a first (before tracing), which, for instance, |
# aclocal at first (before tracing), which, for instance, |
463 |
# can find Gettext's macros in .../share/aclocal, so we |
# can find Gettext's macros in .../share/aclocal, so we |
464 |
# may have had the right aclocal.m4 already. Then |
# may have had the right aclocal.m4 already. Then |
465 |
# gettextize is run, and installs locally these M4 |
# gettextize is run, and installs locally these M4 |
467 |
# the _same_ aclocal.m4, and doesn't change its |
# the _same_ aclocal.m4, and doesn't change its |
468 |
# timestamp. But later, Automake's Makefile expresses |
# timestamp. But later, Automake's Makefile expresses |
469 |
# that aclocal.m4 depends on these local files, which |
# that aclocal.m4 depends on these local files, which |
470 |
# are younger, so it triggers aclocal again. |
# are newer, so it triggers aclocal again. |
471 |
# |
# |
472 |
# To make sure aclocal.m4 is younger, we change the |
# To make sure aclocal.m4 is no older, we change the |
473 |
# modification times of the local M4 files to be |
# modification times of the local M4 files to be |
474 |
# slightly older than it. |
# not newer than it. |
475 |
# |
# |
476 |
# First, where are the local files? |
# First, where are the local files? |
477 |
my $aclocal_local_dir = '.'; |
my $aclocal_local_dir = '.'; |
479 |
{ |
{ |
480 |
$aclocal_local_dir = $1; |
$aclocal_local_dir = $1; |
481 |
} |
} |
482 |
# All the local files younger than aclocal.m4 are to be |
# All the local files newer than aclocal.m4 are to be |
483 |
# grown older than it. |
# made not newer than it. |
484 |
my $aclocal_m4_mtime = mtime ('aclocal.m4'); |
my $aclocal_m4_mtime = mtime ('aclocal.m4'); |
485 |
for my $file (glob ("$aclocal_local_dir/*.m4"), 'acinclude.m4') |
for my $file (glob ("$aclocal_local_dir/*.m4"), 'acinclude.m4') |
486 |
{ |
{ |
487 |
if (mtime ($file) >= $aclocal_m4_mtime) |
if ($aclocal_m4_mtime < mtime ($file)) |
488 |
{ |
{ |
489 |
debug "making $file younger than aclocal.m4"; |
debug "aging $file to be not newer than aclocal.m4"; |
490 |
utime $aclocal_m4_mtime - 1, $aclocal_m4_mtime - 1, |
utime $aclocal_m4_mtime, $aclocal_m4_mtime, $file; |
|
$file; |
|
491 |
} |
} |
492 |
} |
} |
493 |
} |
} |