2 # Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation,
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Check that ylwrap is installed properly, and $(YLWRAP) us defined
19 # properly, when a subpackage is involved.
26 cat >>configure.in <<'END'
28 AC_CONFIG_SUBDIRS([lib])
32 cat >Makefile.am <<'EOF'
35 MU_LDADD = lib/liblib.a
36 # It's ok to override distdir.
38 # Remove a file created by rules in subdir lib.
39 CLEANFILES = lib-dist-hook-has-run
53 cat >lib/configure.ac <<'EOF'
58 dnl This comes after YACC and RANLIB checks, deliberately.
60 AC_CONFIG_HEADERS([config.h:config.hin])
61 AC_CONFIG_FILES([Makefile])
65 cat >lib/Makefile.am <<'EOF'
66 noinst_LIBRARIES = liblib.a
67 liblib_a_SOURCES = src/x.c foo.y
68 EXTRA_liblib_a_SOURCES = bar.y
71 test -d $(top_distdir)
73 find $(top_distdir) $(distdir) ;: For debugging.
74 test -f $(top_distdir)/MU.c
75 test ! -f $(distdir)/MU.c
77 for name in foo bar; do \
78 test -f $(distdir)/$$name.$$suf || exit 1; \
79 test ! -f $(top_distdir)/$$name.$$suf || exit 1; \
82 test -f $(distdir)/foo.y
83 test ! -f $(top_distdir)/foo.y
84 test -f $(distdir)/src/x.c
85 test ! -f $(top_distdir)/src/x.c
87 : > $(top_builddir)/../lib-dist-hook-has-run
90 cat > lib/foo.y << 'END'
92 int yylex (void) { return 0; }
93 void yyerror (char *s) {}
96 foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
99 cp lib/foo.y lib/bar.y
101 cat >lib/src/x.c <<'EOF'
111 $AUTOMAKE -Wno-override
117 $AUTOMAKE -Wno-override --add-missing
120 # Some checks here are slightly more tricky than we'd like, but we cannot
121 # simply use "make distcheck", to avoid triggering a spurious failure due
122 # to issues with FreeBSD make and VPATH builds (see automake bug#7884).
127 test -f lib-dist-hook-has-run
128 test -f subpack-1.tar.gz
129 test ! -d subpack-1 # Make sure "dist" cleans up after itself.
133 gzip -c -d ../subpack-1.tar.gz | tar xf -
137 ../subpack-1/configure
140 test -f lib-dist-hook-has-run
141 test -f subpack-1.tar.gz
142 test ! -d subpack-1 # Make sure "dist" cleans up after itself.
144 # Don't trust non-GNU makes to do distcheck with a Yacc-using
145 # package (see bug referenced above).
147 $MAKE distcheck || Exit 1