[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.17, Sun Apr 30 20:30:39 2017 UTC (7 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, HEAD
Changes since 1.16: +2 -6 lines

Move FlexLexer.h from /usr/include/g++ to /usr/include.  It is not
a g++-specific header and this matches most other systems.  Needed
to use flex++ with clang.  OK espie@ kettenis@

#	$OpenBSD: Makefile,v 1.17 2017/04/30 20:30:39 millert 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} -DHAVE_CONFIG_H
SRCS= buf.c ccl.c dfa.c ecs.c filter.c gen.c main.c misc.c \
	  nfa.c options.c parse.y regex.c scan.l scanflags.c \
	  scanopt.c skel.c sym.c tables.c tables_shared.c \
	  tblcmp.c yylex.c

CLEANFILES+=skel.c parse.c parse.h
LDADD+=-lm

MAN = flex.1

LINKS=  ${BINDIR}/lex ${BINDIR}/flex \
		${BINDIR}/lex ${BINDIR}/flex++

VERSION="2.5.39"

parse.h parse.c: parse.y
	yacc -d -o parse.c ${.CURDIR}/parse.y

skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
	sed -e 's/m4_/m4postproc_/g' -e 's/m4preproc_/m4_/g' \
		${.CURDIR}/flex.skl | m4 -I${.CURDIR} -P \
		-DFLEX_MAJOR_VERSION=`echo ${VERSION} | cut -f 1 -d .` \
		-DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \
		-DFLEX_SUBMINOR_VERSION=`echo ${VERSION} | cut -f 3 -d .` | \
		sed -e 's/m4postproc_/m4_/g' | \
		sh ${.CURDIR}/mkskel.sh  > ${.TARGET}

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

.include <bsd.prog.mk>