2 # Copyright (C) 2002, 2003, 2004, 2006 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)
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 # Check subpackage handling.
26 cat >m
4/foo.
m4 <<'EOF'
33 cat >>configure.
in <<'END'
34 AC_CONFIG_SUBDIRS([lib])
38 cat >Makefile.am
<<'EOF'
40 # Yes, This program is named LDADD. So what?
42 LDADD_LDADD = lib/liblib.a
44 # It's ok to override distdir.
47 # Make sure $(distdir) and $(top_distdir) work as expected.
49 test -f $(distdir)/LDADD.c
50 test -f $(top_distdir)/LDADD.c
52 ACLOCAL_AMFLAGS = -I m4
68 cat >lib
/configure.ac
<<'EOF'
73 AC_CONFIG_HEADERS([config.h:config.hin])
74 AC_CONFIG_FILES([Makefile])
78 cat >lib
/Makefile.am
<<'EOF'
79 noinst_LIBRARIES = liblib.a
80 liblib_a_SOURCES = src/x.c foo.y
81 EXTRA_liblib_a_SOURCES = bar.y
84 test ! -f $(distdir)/LDADD.c
85 test -f $(top_distdir)/LDADD.c
86 test -f $(distdir)/src/x.c
87 test ! -f $(top_distdir)/src/x.c
90 ACLOCAL_AMFLAGS = -I ../m4
93 cat > lib
/foo.y
<< 'END'
95 int yylex
() {return 0;}
96 void yyerror
(char
*s
) {}
99 foobar
: 'f' 'o' 'o' 'b' 'a' 'r' {};
102 cp lib
/foo.y lib
/bar.y
104 cat >lib
/src
/x.c
<<'EOF'
114 $AUTOMAKE -Wno-override
118 $FGREP 'm4_include([../m4/foo.m4])' aclocal.
m4
121 $AUTOMAKE -Wno-override --add-missing
127 test ! -d subpack-1
# make sure distcheck cleans up after itself
128 test -f subpack-1.
tar.gz