doc: update Vala documentation
[automake.git] / t / colon6.sh
blob42f04eb38552b4cb30ebae3e64220bc272148a88
1 #! /bin/sh
2 # Copyright (C) 1998-2024 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)
7 # any later version.
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 <https://www.gnu.org/licenses/>.
17 # Yet another multi-":" test, this time from Ken Pizzini.
19 . test-init.sh
21 cat > configure.ac <<END
22 AC_INIT([$me], [1.0])
23 AM_INIT_AUTOMAKE
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])
27 AC_OUTPUT
28 END
30 mkdir demo
31 : > demo/version.gin
32 : > demo/Makefile.am
34 $ACLOCAL
35 $AUTOMAKE
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
43 $AUTOCONF
45 for vpath in : false; do
47 if $vpath; then
48 srcdir=..
49 mkdir build
50 cd build
51 else
52 srcdir=.
55 $srcdir/configure
57 test -f demo/version.good # Sanity check.
58 test ! -s demo/version.good # Likewise.
60 cd demo
62 $sleep
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
66 # Makefile.
67 touch Makefile
69 # version.good should depend on version.gin.
70 echo "Rebuilt (srcdir=$srcdir)" > ../$srcdir/demo/version.gin
71 $MAKE version.good
72 $FGREP "Rebuilt (srcdir=$srcdir)" version.good
74 # Makefile should not depend on version.good.
75 rm -f version.good
76 $MAKE Makefile
77 test ! -e version.good
79 # version.good should be rebuilt from version.gin.
80 $MAKE version.good
81 test -f version.good
83 # Makefile should not depend on version.gin.
84 rm -f ../$srcdir/demo/version.gin
85 $MAKE Makefile
86 test ! -e ../$srcdir/demo/version.gin # Sanity check.
88 # version.good should depend on version.gin.
89 rm -f version.good
90 run_make -M -e FAIL version.good
91 # Try to verify that we errored out for the right reason.
92 $FGREP version.gin output
94 cd .. # Back in top builddir.
95 cd $srcdir
97 # Re-create it for the next pass (if any).
98 : > demo/version.gin
100 done