2 # Copyright (C) 1998-2012 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 # Yet another multi-":" test, this time from Ken Pizzini.
21 cat > configure.ac
<<END
24 # With this, version.good should depend on version.gin, while
25 # Makefile should not depend on either of them.
26 AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
37 # These are older "grepping checks", kept mostly for backward-compatibility.
38 # They might (unlikely, but possibly) require updating when automake
39 # internals are changed. Just relax or remove if they become too fragile.
40 $EGREP 'Makefile:.*(demo|version)' demo
/Makefile.
in && exit 1
41 grep 'version\.good:.*version\.gin' demo
/Makefile.
in
45 for vpath
in : false
; do
57 test -f demo
/version.good
# Sanity check.
58 test ! -s demo
/version.good
# Likewise.
63 # HP-UX make considers targets with exact time stamps as one of their
64 # prerequisites out of date. Ensure Makefile is newer than config.status to
65 # avoid triggering the am--refresh rule in the (here-nonexistent) toplevel
69 # version.good should depend on version.gin.
70 echo "Rebuilt (srcdir=$srcdir)" > ..
/$srcdir/demo
/version.gin
72 $FGREP "Rebuilt (srcdir=$srcdir)" version.good
74 # Makefile should not depend on version.good.
77 test ! -e version.good
79 # version.good should be rebuilt from version.gin.
83 # Makefile should not depend on version.gin.
84 rm -f ..
/$srcdir/demo
/version.gin
86 test ! -e ..
/$srcdir/demo
/version.gin
# Sanity check.
88 # version.good should depend on version.gin.
90 $MAKE version.good
>output
2>&1 && { cat output
; exit 1; }
92 # Try to verify that we errored out for the right reason.
93 $FGREP version.gin output
95 cd ..
# Back in top builddir.
98 # Re-create it for the next pass (if any).