Annotation of src/usr.bin/lex/Makefile, Revision 1.16
1.16 ! jmc 1: # $OpenBSD: Makefile,v 1.15 2015/11/20 18:57:18 tedu Exp $
1.1 deraadt 2: #
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.
1.11 robert 7: #
1.1 deraadt 8: # If on your system you have trouble building flex due to 8-bit character
9: # problems, remove the -8 from FLEX_FLAGS and the "#define FLEX_8_BIT_CHARS"
10: # from the beginning of flexdef.h.
11: #
12: # To bootstrap lex, cp initscan.c to scan.c and run make.
13:
1.12 tedu 14: PROG= lex
15: CFLAGS+=-I. -I${.CURDIR} -DHAVE_CONFIG_H
16: SRCS= buf.c ccl.c dfa.c ecs.c filter.c gen.c main.c misc.c \
17: nfa.c options.c parse.y regex.c scan.l scanflags.c \
18: scanopt.c skel.c sym.c tables.c tables_shared.c \
19: tblcmp.c yylex.c
20:
1.15 tedu 21: CLEANFILES+=skel.c parse.c parse.h
1.12 tedu 22: LDADD+=-lm
1.1 deraadt 23:
24: MAN = flex.1
25:
1.12 tedu 26: LINKS= ${BINDIR}/lex ${BINDIR}/flex \
27: ${BINDIR}/lex ${BINDIR}/flex++
28:
29: VERSION="2.5.39"
1.1 deraadt 30:
1.15 tedu 31: parse.h parse.c: parse.y
32: yacc -d -o parse.c ${.CURDIR}/parse.y
1.1 deraadt 33:
1.12 tedu 34: skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
35: sed -e 's/m4_/m4postproc_/g' -e 's/m4preproc_/m4_/g' \
36: ${.CURDIR}/flex.skl | m4 -I${.CURDIR} -P \
37: -DFLEX_MAJOR_VERSION=`echo ${VERSION} | cut -f 1 -d .` \
38: -DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \
39: -DFLEX_SUBMINOR_VERSION=`echo ${VERSION} | cut -f 3 -d .` | \
40: sed -e 's/m4postproc_/m4_/g' | \
41: sh ${.CURDIR}/mkskel.sh > ${.TARGET}
1.1 deraadt 42:
1.8 espie 43: includes:
1.11 robert 44: .if !exists(${DESTDIR}/usr/include/g++)
45: ${INSTALL} -d -o root -g bin -m 755 \
46: ${DESTDIR}/usr/include/g++
47: .endif
1.4 millert 48: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
1.11 robert 49: ${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++/
1.1 deraadt 50:
51: .include <bsd.prog.mk>