882c39dc270b1f2585ade6d144513167a7a8c64f
[platform/upstream/automake.git] / tests / canon5.test
1 #! /bin/sh
2 # Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
3 #
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 3, or (at your option)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Test to make sure that we allow variable names starting in
18 # non-letters.  Whatever that might mean.
19
20 . ./defs || Exit 1
21
22 set -e
23
24 echo AC_PROG_CC >> configure.in
25
26 cat > Makefile.am << 'END'
27 bin_PROGRAMS = 123test
28 123test_SOURCES = 123.c
29 END
30
31 $ACLOCAL
32 $AUTOMAKE || Exit 1
33
34 cat > Makefile.am << 'END'
35 bin_PROGRAMS = _foo
36 _foo_SOURCES = foo.c
37 END
38
39 $AUTOMAKE
40
41 cat > Makefile.am << 'END'
42 bin_PROGRAMS = ,foo
43 ,foo_SOURCES = foo.c
44 END
45
46 AUTOMAKE_fails
47 grep 'Makefile.am:2:.*_foo_SOURCES' stderr
48
49 cat > Makefile.am << 'END'
50 bin_PROGRAMS = ,foo
51 _foo_SOURCES = foo.c
52 END
53
54 $AUTOMAKE -Wno-portability