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 files derived from non-distributed .l sources.
18 # The test `lex-pr204.test' does similar check with AM_MAINTAINER_MODE
20 # The tests 'yacc-nodist.test' and 'yacc-pr204.test' does similar checks
21 # for yacc-generated .c and .h files.
28 cat >> configure.
in << 'END'
30 dnl Sister
test 'lex-pr204.test' should use
'AC_PROG_LEX' instead.
35 cat > Makefile.am
<< 'END'
36 .PHONY
: test-build test-dist
43 test ! -r $
(distdir
)/lexer.l
44 test ! -r $
(distdir
)/lexer.c
45 check-local
: test-build test-dist
51 && echo '"GOOD" return EOF;' \
54 chmod a-w $@
-t && mv -f $@
-t $@
58 nodist_prog_SOURCES
= lexer.l
59 prog_LDADD
= $
(LEXLIB
)
60 CLEANFILES
= $
(nodist_prog_SOURCES
)
69 /* Avoid possible link errors.
*/
85 # But the distribution must work correctly, assuming the user has
86 # the proper tools to process yacc files.