tcsh: fix warning to keep compiling with WARNS=2
[dragonfly.git] / usr.bin / lex / Makefile
blob855ffcc5570f108b0cd3aa6284d0fc6529376389
1 # $FreeBSD: src/usr.bin/lex/Makefile,v 1.15.2.3 2002/07/22 14:21:52 ru Exp $
2 # $DragonFly: src/usr.bin/lex/Makefile,v 1.6 2007/08/27 16:50:55 pavalos Exp $
4 # By default, flex will be configured to generate 8-bit scanners only if the
5 # -8 flag is given. If you want it to always generate 8-bit scanners, add
6 # "-DDEFAULT_CSIZE=256" to CFLAGS. Note that doing so will double the size
7 # of all uncompressed scanners.
9 # Bootstrapping of lex is handled automatically.
10 # Also note that flex.skel no longer gets installed.
13 PROG= lex
14 LINKS+= ${BINDIR}/lex ${BINDIR}/lex++
15 LINKS+= ${BINDIR}/lex ${BINDIR}/flex
16 LINKS+= ${BINDIR}/lex ${BINDIR}/flex++
18 SRCS= scan.c ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
19 skel.c sym.c tblcmp.c yylex.c
20 LFLAGS+= -is
21 CFLAGS+= -I. -I${.CURDIR}
22 INCS= FlexLexer.h
23 INCSDIR= ${INCLUDEDIR}/c++
24 MLINKS+= lex.1 flex.1
25 MLINKS+= lex.1 flex++.1
26 MLINKS+= lex.1 lex++.1
28 CLEANFILES= scan.c skel.c
30 SUBDIR= lib
32 skel.c: mkskel.sh flex.skl
33 sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c
35 bootstrap: initscan.c
36 @cmp -s ${.CURDIR}/initscan.c scan.c || { \
37 echo "Bootstrapping flex" ; \
38 rm -f scan.c ; \
39 cp -f ${.CURDIR}/initscan.c scan.c ; \
42 test: check
43 check: $(PROG)
44 ./$(PROG) $(LFLAGS) -t $(COMPRESSION) $(.CURDIR)/scan.l \
45 | sed s,\"$(.CURDIR)/scan.l",\"scan.l", \
46 | diff $(.CURDIR)/initscan.c -
47 @echo "Check successful"
49 .include "Makefile.inc"
50 .include <bsd.prog.mk>