2 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Make sure aclocal does not overwrite aclocal.m4 needlessly.
22 # Also make sure automake --no-force does not overwrite Makefile.in needlessly.
28 cat >> configure.
in << 'END'
30 AC_CONFIG_FILES
([sub
/Makefile
])
36 cat >> Makefile.am
<< 'END'
44 echo 'AC_DEFUN([SOME_DEFS], [])' > m
4/somedefs.
m4
50 # Automake will take aclocal.m4 to be newer if it has the same timestamp
51 # as Makefile.in. Avoid the confusing by sleeping.
62 # aclocal.m4 and Makefile.in should not have been updated, so `foo'
64 test `ls -1t aclocal.m4 Makefile.in sub/Makefile.in foo | sed 1q` = foo
67 $ACLOCAL -I m4 --force
68 test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.
m4
69 # We still use --no-force for automake, but since aclocal.m4 has
70 # changed all Makefile.ins should be updated.
73 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
74 test `ls -1t sub/Makefile.in foo | sed 1q` = sub
/Makefile.
in
84 # aclocal.m4 should have been updated, although its contents haven't changed.
85 test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.
m4
86 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
87 test `ls -1t sub/Makefile.in foo | sed 1q` = sub
/Makefile.
in
95 # Only ./Makefile.in should change.
96 test `ls -1t aclocal.m4 foo | sed 1q` = foo
97 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
98 test `ls -1t sub/Makefile.in foo | sed 1q` = foo
100 grep README Makefile.
in && exit 1
107 # Even if no dependency change, the content changed.
108 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
109 test `ls -1t sub/Makefile.in foo | sed 1q` = foo
111 grep README Makefile.
in
119 # Only sub/Makefile.in should change.
120 test `ls -1t aclocal.m4 foo | sed 1q` = foo
121 test `ls -1t Makefile.in foo | sed 1q` = foo
122 test `ls -1t sub/Makefile.in foo | sed 1q` = sub
/Makefile.
in