tests: give few aclocal tests more significant names
[automake.git] / t / subobj5.sh
blobb056374c4db83c478cdc8fd27c5a73e445673f8e
1 #! /bin/sh
2 # Copyright (C) 2001-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 # Test of subdir make dist rules.
18 # From Robert Collins.
20 required=cc
21 . test-init.sh
23 cat >> configure.ac << 'END'
24 AC_CONFIG_FILES([generic/Makefile])
25 AC_PROG_CC
26 AM_PROG_CC_C_O
27 AC_OUTPUT
28 END
30 cat > Makefile.am << 'END'
31 AUTOMAKE_OPTIONS = subdir-objects
32 bin_PROGRAMS = wish
33 wish_SOURCES = generic/a.c
35 .PHONY: test-distdir test-build
36 test-distdir: distdir
37 ls -l $(distdir) $(distdir)/* ;: For debugging.
38 test ! -r $(distdir)/a.c
39 test -f $(distdir)/generic/a.c
40 test-build: all
41 ls -l . generic ;: For debugging.
42 test -f generic/a.$(OBJEXT)
43 test -f wish$(EXEEXT)
44 test ! -r a.$(OBJEXT)
45 test ! -r a$(EXEEXT)
46 test ! -r generic/wish$(EXEEXT)
47 test ! -r generic/a$(EXEEXT)
48 END
50 mkdir generic
51 : > generic/Makefile.am
53 cat > generic/a.c << 'END'
54 int main (void)
56 return 0;
58 END
60 $ACLOCAL
61 $AUTOCONF
62 $AUTOMAKE --include-deps --copy --add-missing
64 ./configure
66 $MAKE test-distdir
67 $MAKE dist
68 $MAKE test-build