123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #! /bin/sh
- required='cc lex'
- . test-init.sh
- cat >> configure.ac << 'END'
- AC_PROG_CC
- dnl Sister test 'lex-pr204.sh' should use 'AC_PROG_LEX' instead.
- AM_PROG_LEX
- AC_OUTPUT
- END
- cat > Makefile.am << 'END'
- .PHONY: test-build test-dist
- test-build: all
- ls -l
- test -f lexer.l
- test -f lexer.c
- test-dist: distdir
- ls -l $(distdir)
- test ! -r $(distdir)/lexer.l
- test ! -r $(distdir)/lexer.c
- check-local: test-build test-dist
- lexer.l:
- rm -f $@ $@-t
- :; { : \
- && echo '%{' \
- && echo '#define YY_NO_UNISTD_H 1' \
- && echo '%}' \
- && echo '%%' \
- && echo '"GOOD" return EOF;' \
- && echo '.'; \
- } > $@-t
- chmod a-w $@-t && mv -f $@-t $@
- bin_PROGRAMS = prog
- prog_SOURCES = main.c
- nodist_prog_SOURCES = lexer.l
- prog_LDADD = $(LEXLIB)
- CLEANFILES = $(nodist_prog_SOURCES)
- END
- cat > main.c << 'END'
- int main ()
- {
- return yylex ();
- }
- /* Avoid possible link errors. */
- int yywrap (void)
- {
- return 1;
- }
- END
- $ACLOCAL
- $AUTOCONF
- $AUTOMAKE -a
- ./configure
- $MAKE
- $MAKE test-build
- $MAKE test-dist
- $MAKE distcheck
- :
|