2 # Copyright (C) 2011-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 # 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.
26 cat >> configure.ac << 'END'
28 dnl Sister test 'lex-pr204.test' should use 'AC_PROG_LEX' instead.
33 cat > Makefile.am << 'END'
34 .PHONY: test-build test-dist
41 test ! -r $(distdir)/lexer.l
42 test ! -r $(distdir)/lexer.c
43 check-local: test-build test-dist
49 && echo '#define YY_NO_UNISTD_H 1' \
52 && echo '"GOOD" return EOF;' \
55 chmod a-w $@-t && mv -f $@-t $@
59 nodist_prog_SOURCES = lexer.l
60 prog_LDADD = $(LEXLIB)
61 CLEANFILES = $(nodist_prog_SOURCES)
70 /* Avoid possible link errors. */
86 # But the distribution must work correctly, assuming the user has
87 # the proper tools to process yacc files.