1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1994-08-24 13:10:34 +00:00
|
|
|
#
|
|
|
|
# By default, flex will be configured to generate 8-bit scanners only if the
|
|
|
|
# -8 flag is given. If you want it to always generate 8-bit scanners, add
|
|
|
|
# "-DDEFAULT_CSIZE=256" to CFLAGS. Note that doing so will double the size
|
|
|
|
# of all uncompressed scanners.
|
|
|
|
#
|
|
|
|
# Bootstrapping of lex is handled automatically.
|
1994-08-27 09:52:32 +00:00
|
|
|
# Also note that flex.skel no longer gets installed.
|
1994-08-24 13:10:34 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
PROG= lex
|
1996-01-08 09:17:39 +00:00
|
|
|
LINKS+= ${BINDIR}/lex ${BINDIR}/lex++
|
|
|
|
LINKS+= ${BINDIR}/lex ${BINDIR}/flex
|
|
|
|
LINKS+= ${BINDIR}/lex ${BINDIR}/flex++
|
1994-08-24 13:10:34 +00:00
|
|
|
|
1998-05-04 19:10:20 +00:00
|
|
|
SRCS= scan.c ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
|
1994-08-24 13:10:34 +00:00
|
|
|
skel.c sym.c tblcmp.c yylex.c
|
|
|
|
LFLAGS+= -is
|
|
|
|
CFLAGS+= -I. -I${.CURDIR}
|
1996-06-19 20:48:06 +00:00
|
|
|
MAN1= lex.1
|
1996-01-08 09:17:39 +00:00
|
|
|
MLINKS+= lex.1 flex.1
|
|
|
|
MLINKS+= lex.1 flex++.1
|
|
|
|
MLINKS+= lex.1 lex++.1
|
1994-08-24 13:10:34 +00:00
|
|
|
|
1999-11-20 15:41:43 +00:00
|
|
|
CLEANFILES= scan.c skel.c
|
1994-08-24 13:10:34 +00:00
|
|
|
|
1996-08-07 13:25:59 +00:00
|
|
|
.if !defined(NOLIB)
|
1994-08-24 13:10:34 +00:00
|
|
|
SUBDIR= lib
|
1996-08-07 13:25:59 +00:00
|
|
|
.endif
|
1994-08-24 13:10:34 +00:00
|
|
|
|
1999-11-20 15:41:43 +00:00
|
|
|
skel.c: mkskel.sh flex.skl
|
|
|
|
sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c
|
|
|
|
|
1996-01-08 09:17:39 +00:00
|
|
|
beforeinstall:
|
1999-12-17 07:49:03 +00:00
|
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
1996-01-08 09:17:39 +00:00
|
|
|
${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++
|
|
|
|
|
1996-06-19 20:48:06 +00:00
|
|
|
bootstrap: initscan.c
|
1996-09-19 05:21:07 +00:00
|
|
|
@cmp -s ${.CURDIR}/initscan.c scan.c || { \
|
|
|
|
echo "Bootstrapping flex" ; \
|
|
|
|
rm -f scan.c ; \
|
|
|
|
cp -f ${.CURDIR}/initscan.c scan.c ; \
|
|
|
|
}
|
1996-06-19 20:48:06 +00:00
|
|
|
|
1994-08-24 13:10:34 +00:00
|
|
|
test: check
|
|
|
|
check: $(PROG)
|
|
|
|
./$(PROG) $(LFLAGS) -t $(COMPRESSION) $(.CURDIR)/scan.l \
|
|
|
|
| sed s,\"$(.CURDIR)/scan.l",\"scan.l", \
|
|
|
|
| diff $(.CURDIR)/initscan.c -
|
|
|
|
@echo "Check successful"
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|