2 # Copyright (C) 2002-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)
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 that ylwrap is installed properly, and $(YLWRAP) us defined
18 # properly, when a subpackage is involved.
23 cat >>configure.ac
<<'END'
25 AC_CONFIG_SUBDIRS([lib])
29 cat >Makefile.am
<<'EOF'
32 MU_LDADD = lib/liblib.a
33 # It's ok to override distdir.
35 # Remove a file created by rules in subdir lib.
36 CLEANFILES = lib-dist-hook-has-run
50 cat >lib
/configure.ac
<<'EOF'
55 dnl This comes after YACC and RANLIB checks, deliberately.
58 AC_CONFIG_HEADERS([config.h:config.hin])
59 AC_CONFIG_FILES([Makefile])
63 cat >lib
/Makefile.am
<<'EOF'
64 noinst_LIBRARIES = liblib.a
65 liblib_a_SOURCES = src/x.c foo.y
66 EXTRA_liblib_a_SOURCES = bar.y
69 test -d $(top_distdir)
71 find $(top_distdir) $(distdir) ;: For debugging.
72 test -f $(top_distdir)/MU.c
73 test ! -f $(distdir)/MU.c
75 for name in foo bar; do \
76 test -f $(distdir)/$$name.$$suf || exit 1; \
77 test ! -f $(top_distdir)/$$name.$$suf || exit 1; \
80 test -f $(distdir)/foo.y
81 test ! -f $(top_distdir)/foo.y
82 test -f $(distdir)/src/x.c
83 test ! -f $(top_distdir)/src/x.c
85 : > $(top_builddir)/../lib-dist-hook-has-run
88 cat > lib
/foo.y
<< 'END'
90 int yylex
(void
) { return 0; }
91 void yyerror
(char
*s
) {}
94 foobar
: 'f' 'o' 'o' 'b' 'a' 'r' {};
97 cp lib
/foo.y lib
/bar.y
99 cat >lib
/src
/x.c
<<'EOF'
109 $AUTOMAKE -Wno-override
115 $AUTOMAKE -Wno-override --add-missing
121 test -f lib-dist-hook-has-run
122 test -f subpack-1.
tar.gz
123 test ! -e subpack-1
# Make sure "dist" cleans up after itself.
125 rm -f lib-dist-hook-has-run subpack-1.
tar.gz