tests: expose automake bug#14560
[platform/upstream/automake.git] / t / objc-basic.sh
1 #! /bin/sh
2 # Copyright (C) 2012-2013 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 # Basic tests on the Objective C support that don't actually
15 # require an Objective-C compiler.
16 # See also sister test 'objcxx-basic.sh'.
17
18 . test-init.sh
19
20 cat > Makefile.am <<'END'
21 bin_PROGRAMS = hello
22 hello_SOURCES = hello.m
23 END
24
25 $ACLOCAL
26 AUTOMAKE_fails
27 grep "'OBJC'.* undefined" stderr
28 grep "add .*'AC_PROG_OBJC'" stderr
29
30 rm -rf autom4te*.cache
31
32 echo AC_PROG_OBJC >> configure.ac
33
34 $ACLOCAL
35 $AUTOMAKE
36 $EGREP '^\.SUFFIXES:.* \.m( |$)' Makefile.in
37
38 :