Hash :
12aa5ba6
Author :
Date :
2003-05-06T12:07:22
* lib/Automake/General.pm (contents): New function. * aclocal.in (greatest_mtime, force_output): New globals. (scan_configure, add_file): Update $greatest_mtime. (parse_arguments): Parse --force. (write_aclocal): Do not overwrite $output_file unless needed. * automake.texi (aclocal options): Document --force. * tests/aclocal7.test: New file. * tests/Makefile.am (TESTS): Add aclocal7.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
#! /bin/sh
# Copyright (C) 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# GNU Automake is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Automake is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# Make sure aclocal does not overwrite aclocal.m4 needlessly.
. ./defs || exit 1
set -e
cat >> configure.in << 'END'
SOME_DEFS
END
mkdir m4
echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
$sleep
$ACLOCAL -I m4
$sleep
touch foo
$ACLOCAL -I m4
# aclocal.m4 should not have been updated, so `foo' should be younger
test `ls -1t aclocal.m4 foo | sed 1q` = foo
$sleep
$ACLOCAL -I m4 --force
test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.m4
touch m4/somedefs.m4
$sleep
touch foo
$sleep
$ACLOCAL -I m4
# aclocal.m4 should have been updated, although its contents haven't changed.
test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.m4