[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / usr.bin / lex

File: [local] / src / usr.bin / lex / Makefile (download)

Revision 1.9, Tue Dec 9 12:42:41 2003 UTC (20 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.8: +6 -1 lines

install lex PSD;
the actual doc has been updated regarding current implementation of lex.
I also replaced the tables with displays, for simplicity and because of
formatting errors (unsupported macros);

sanity check and ok mickey@

#	$OpenBSD: Makefile,v 1.9 2003/12/09 12:42:41 jmc Exp $
#
# 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.
# 
# If on your system you have trouble building flex due to 8-bit character
# problems, remove the -8 from FLEX_FLAGS and the "#define FLEX_8_BIT_CHARS"
# from the beginning of flexdef.h.
#
# To bootstrap lex, cp initscan.c to scan.c and run make.

PROG=	lex
CFLAGS+=-I. -I${.CURDIR}
SRCS=	ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c sym.c tblcmp.c \
	yylex.c
OBJS+=	scan.o skel.o
CLEANFILES+=parse.c parse.h scan.c skel.c y.tab.c y.tab.h
LDADD=	-ll
DPADD=	${LIBL}

MAN = flex.1

LINKS=	${BINDIR}/lex ${BINDIR}/flex \
	${BINDIR}/lex ${BINDIR}/flex++
MLINKS=	flex.1 lex.1 flex.1 flex++.1

# This just gets installed verbatim
.if make(install)
SUBDIR+= PSD.doc
.endif

parse.h parse.c: parse.y
	${YACC} -d ${.ALLSRC}
	mv y.tab.c parse.c
	mv y.tab.h parse.h

skel.c:	flex.skl mkskel.sh
	sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c

scan.c: scan.l
	flex -t -p ${.CURDIR}/scan.l > scan.c

scan.o: parse.c

includes:
	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
		${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++

.include <bsd.prog.mk>