2 # Copyright (C) 2011 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 # Checks for .c and .h files derived from non-distributed .y sources.
22 cat >> configure.
in << 'END'
25 AC_CONFIG_FILES
([sub
1/Makefile sub
2/Makefile
])
29 cat > Makefile.am
<< 'END'
40 ls -l $
(distdir
) $
(distdir
)/sub1 $
(distdir
)/sub2
41 test ! -r $
(distdir
)/sub
1/parse.y
42 test ! -r $
(distdir
)/sub
1/parse.c
43 test ! -r $
(distdir
)/sub
1/parse.h
44 test ! -r $
(distdir
)/sub
2/parse.y
45 test ! -r $
(distdir
)/sub
2/parse.c
46 test ! -r $
(distdir
)/sub
2/parse.h
47 check-local
: test-build test-dist
52 cat > sub
1/Makefile.am
<< 'END'
57 && echo "int yylex () { return 0; }" \
58 && echo "void yyerror (char *s) {}" \
61 && echo "maude : 'm' 'a' 'u' 'd' 'e' {}"; \
67 nodist_prog_SOURCES
= parse.y
68 CLEANFILES
= $
(nodist_prog_SOURCES
)
71 cat sub
1/Makefile.am
- > sub
2/Makefile.am
<< 'END'
73 BUILT_SOURCES
= parse.h
76 cat > sub
1/main.c
<< 'END'
82 cat - sub
1/main.c
> sub
2/main.c
<< 'END'
95 # But the distribution must work correctly, assuming the user has
96 # the proper tools to process yacc files.