tests: never source test-defs.sh directly, source test-lib.sh instead
[automake.git] / t / colon5.sh
blobc600679bdadb033ce469f8ef014635ca39af4253
1 #! /bin/sh
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)
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 <http://www.gnu.org/licenses/>.
17 # Another multi-":" test, this time from Doug Evans.
19 . ./defs || exit 1
21 cat > configure.ac <<END
22 AC_INIT([$me], [1.0])
23 AM_INIT_AUTOMAKE
24 AC_CONFIG_FILES([Makefile:Makefile.in:Makefile.dep])
25 AC_OUTPUT
26 END
28 : > Makefile.dep
30 cat > Makefile.am <<'END'
31 .PHONY: test-fs-layout test-grep test-distcommon test-distdir
32 check-local: test-fs-layout test-grep test-distcommon test-distdir
33 test-fs-layout:
34 test x'$(srcdir)' = '.' || test ! -r Makefile.dep
35 test-grep:
36 ## The use of $(empty) prevents spurious matches.
37 grep '=GrEp$(empty)Me_am=' $(srcdir)/Makefile.in
38 grep '=GrEp$(empty)Me_dep=' $(srcdir)/Makefile.dep
39 grep '=GrEp$(empty)Me_am=' Makefile
40 grep '=GrEp$(empty)Me_dep=' Makefile
41 test-distcommon:
42 echo ' ' $(DIST_COMMON) ' ' | grep '[ /]Makefile.dep '
43 test-distdir: distdir
44 test -f $(distdir)/Makefile.dep
45 END
47 $ACLOCAL
48 $AUTOCONF
49 $AUTOMAKE
51 ./configure
53 grep '=GrEpMe_am=' Makefile && exit 1 # Sanity check.
54 grep '=GrEpMe_dep=' Makefile && exit 1 # Likewise.
56 $MAKE test-distcommon
57 $MAKE test-distdir
59 $sleep
61 echo '# =GrEpMe_am=' >> Makefile.am
62 echo '# =GrEpMe_dep=' >> Makefile.dep
64 $MAKE Makefile # For non-GNU make.
65 $MAKE test-grep
66 $MAKE test-distcommon
67 $MAKE test-distdir
69 $MAKE distcheck