2 # Copyright (C) 1998, 2000, 2001, 2002, 2010, 2011 Free Software
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Yet another multi-":" test, this time from Ken Pizzini.
22 cat > configure.
in <<END
25 # With this, version.good should depend on version.gin, while
26 # Makefile should not depend on either of them.
27 AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
38 # These are older "grepping checks", kept mostly for backward-compatibility.
39 # They might (unlikely, but possibly) require updating when automake
40 # internals are changed. Just relax or remove if they become too fragile.
41 $EGREP 'Makefile:.*(demo|version)' demo
/Makefile.
in && Exit
1
42 grep 'version\.good:.*version\.gin' demo
/Makefile.
in
46 for vpath
in : false
; do
58 test -f demo
/version.good
# Sanity check.
59 test ! -s demo
/version.good
# Likewise.
64 # HP-UX make considers targets with exact time stamps as one of their
65 # prerequisites out of date. Ensure Makefile is newer than config.status to
66 # avoid triggering the am--refresh rule in the (here-nonexistent) toplevel
70 # version.good should depend on version.gin.
71 echo "Rebuilt (srcdir=$srcdir)" > ..
/$srcdir/demo
/version.gin
73 $FGREP "Rebuilt (srcdir=$srcdir)" version.good
75 # Makefile should not depend on version.good.
78 test ! -r version.good
80 # version.good should be rebuilt from version.gin.
84 # Makefile should not depend on version.gin.
85 rm -f ..
/$srcdir/demo
/version.gin
87 test ! -r ..
/$srcdir/demo
/version.gin
# Sanity check.
89 # version.good should depend on version.gin.
91 $MAKE version.good
>output
2>&1 && { cat output
; Exit
1; }
93 # Try to verify that we errored out for the right reason.
94 $FGREP version.gin output
96 cd ..
# Back in top builddir.
99 # Re-create it for the next pass (if any).