3 # By default, flex will be configured to generate 8-bit scanners only if the
4 # -8 flag is given. If you want it to always generate 8-bit scanners, add
5 # "-DDEFAULT_CSIZE=256" to CFLAGS. Note that doing so will double the size
6 # of all uncompressed scanners.
8 # Bootstrapping of lex is handled automatically.
9 # Also note that flex.skel no longer gets installed.
13 LINKS+= ${BINDIR}/lex ${BINDIR}/lex++
14 LINKS+= ${BINDIR}/lex ${BINDIR}/flex
15 LINKS+= ${BINDIR}/lex ${BINDIR}/flex++
17 SRCS= scan.c ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
18 skel.c sym.c tblcmp.c yylex.c
20 CFLAGS+= -I. -I${.CURDIR}
22 INCSDIR= ${INCLUDEDIR}
24 MLINKS+= lex.1 flex++.1
25 MLINKS+= lex.1 lex++.1
29 CLEANFILES= scan.c skel.c
33 skel.c: mkskel.sh flex.skl
34 sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c
37 @cmp -s ${.CURDIR}/initscan.c scan.c || { \
38 echo "Bootstrapping flex" ; \
40 cp -f ${.CURDIR}/initscan.c scan.c ; \
45 ./$(PROG) $(LFLAGS) -t $(COMPRESSION) $(.CURDIR)/scan.l \
46 | sed s,\"$(.CURDIR)/scan.l",\"scan.l", \
47 | diff -I '\$$FreeBS[D]:.*\$$' $(.CURDIR)/initscan.c -
48 @echo "Check successful"
50 .include <bsd.prog.mk>