Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / doc-parsing-buglets-tabs.test
1 #! /bin/sh
2 # Copyright (C) 2011 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 2, 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 # Check the documented limitation of the Automake's Makefile parser w.r.t.
18 # use of TAB characters; see Section "General Operation" in the Automake
19 # manual, and automake bug#8360.
20 # If you cause some parts of this test to fail, chances are that you've
21 # improved the Automake parser ;-)
22
23 . ./defs || Exit 1
24
25 set -e
26
27 cat > Makefile.am <<END
28 .PHONY: test
29 test: all check
30
31 fail:
32 ${tab}@echo "'\$@ recipe executed'"; exit 1
33
34 ## This won't be recognized as a target+recipe by Automake.
35 all-local${tab}:
36 ${tab}@exit 1
37
38 ## This won't be recognized as a target+rdependency by Automake.
39 all-local${tab}: fail
40
41 just_to_separate: dummy deps
42
43 ## This won't be recognized as a variable assignment by Automake.
44 ${tab}bin_PROGRAMS = foo
45 END
46
47 echo AC_OUTPUT >> configure.in
48
49 $ACLOCAL
50 $AUTOMAKE
51
52 $FGREP '$(EXEEEXT)' Makefile.in && Exit 1
53 grep 'all:.*all-local' Makefile.in && Exit 1
54 grep "^${tab}bin_PROGRAMS = foo" Makefile.in
55
56 $AUTOCONF
57 ./configure
58
59 $MAKE test
60
61 :