Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / colon6.test
1 #! /bin/sh
2 # Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
3 # Inc.
4 #
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)
8 # any later version.
9 #
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.
14 #
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/>.
17
18 # Yet another multi-":" test, this time from Ken Pizzini.
19
20 . ./defs || Exit 1
21
22 set -e
23
24 cat > configure.in <<END
25 AC_INIT([$me], [1.0])
26 AM_INIT_AUTOMAKE
27 AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
28 AC_OUTPUT
29 END
30
31 mkdir demo
32
33 : > demo/version.gin
34
35 cat > demo/Makefile.am <<'END'
36 .PHONY: test
37 test:
38         case ' $(DIST_COMMON) ' in \
39           *' $(srcdir)/version.gin '*) exit 0;; \
40           *) exit 1;; \
41         esac
42 END
43
44 $ACLOCAL
45 $AUTOMAKE
46
47 $EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
48 grep 'version\.good:.*version\.gin' demo/Makefile.in
49
50 sed -e '/@SET_MAKE@/d' -e "s!@SHELL@!$SHELL!g" <demo/Makefile.in >Makefile.sed
51 $MAKE -f Makefile.sed SHELL=$SHELL test
52
53 :