Annotation of src/usr.bin/lex/Makefile, Revision 1.13
1.13 ! tedu 1: # $OpenBSD: Makefile,v 1.12 2015/11/19 19:43:40 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:
21: CLEANFILES+=skel.c parse.h
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++
1.13 ! tedu 28: MLINKS= flex.1 lex.1 flex.1 flex++.1
1.12 tedu 29:
30: VERSION="2.5.39"
1.1 deraadt 31:
1.12 tedu 32: # Our yacc is too old to compile parse.y; use bootstrapped parse.c instead
1.1 deraadt 33: parse.h parse.c: parse.y
1.12 tedu 34: cp ${.CURDIR}/initparse.c parse.c
35: cp ${.CURDIR}/initparse.h parse.h
1.1 deraadt 36:
1.12 tedu 37: skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
38: sed -e 's/m4_/m4postproc_/g' -e 's/m4preproc_/m4_/g' \
39: ${.CURDIR}/flex.skl | m4 -I${.CURDIR} -P \
40: -DFLEX_MAJOR_VERSION=`echo ${VERSION} | cut -f 1 -d .` \
41: -DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \
42: -DFLEX_SUBMINOR_VERSION=`echo ${VERSION} | cut -f 3 -d .` | \
43: sed -e 's/m4postproc_/m4_/g' | \
44: sh ${.CURDIR}/mkskel.sh > ${.TARGET}
1.1 deraadt 45:
1.8 espie 46: includes:
1.11 robert 47: .if !exists(${DESTDIR}/usr/include/g++)
48: ${INSTALL} -d -o root -g bin -m 755 \
49: ${DESTDIR}/usr/include/g++
50: .endif
1.4 millert 51: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
1.11 robert 52: ${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++/
1.1 deraadt 53:
54: .include <bsd.prog.mk>