2 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Make sure aclocal does not overwrite aclocal.m4 needlessly.
18 # Also make sure automake --no-force does not overwrite Makefile.in needlessly.
24 cat >> configure.
in << 'END'
26 AC_CONFIG_FILES
([sub
/Makefile
])
32 cat >> Makefile.am
<< 'END'
40 echo 'AC_DEFUN([SOME_DEFS], [])' > m
4/somedefs.
m4
46 # Automake will take aclocal.m4 to be newer if it has the same timestamp
47 # as Makefile.in. Avoid the confusing by sleeping.
58 # aclocal.m4 and Makefile.in should not have been updated, so `foo'
60 test `ls -1t aclocal.m4 Makefile.in sub/Makefile.in foo | sed 1q` = foo
63 $ACLOCAL -I m4 --force
64 test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.
m4
65 # We still use --no-force for automake, but since aclocal.m4 has
66 # changed all Makefile.ins should be updated.
69 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
70 test `ls -1t sub/Makefile.in foo | sed 1q` = sub
/Makefile.
in
80 # aclocal.m4 should have been updated, although its contents haven't changed.
81 test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.
m4
82 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
83 test `ls -1t sub/Makefile.in foo | sed 1q` = sub
/Makefile.
in
91 # Only ./Makefile.in should change.
92 test `ls -1t aclocal.m4 foo | sed 1q` = foo
93 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
94 test `ls -1t sub/Makefile.in foo | sed 1q` = foo
96 grep README Makefile.
in && Exit
1
103 # Even if no dependency change, the content changed.
104 test `ls -1t Makefile.in foo | sed 1q` = Makefile.
in
105 test `ls -1t sub/Makefile.in foo | sed 1q` = foo
107 grep README Makefile.
in
115 # Only sub/Makefile.in should change.
116 test `ls -1t aclocal.m4 foo | sed 1q` = foo
117 test `ls -1t Makefile.in foo | sed 1q` = foo
118 test `ls -1t sub/Makefile.in foo | sed 1q` = sub
/Makefile.
in