freebsd-dev/usr.bin/lex/Makefile
Ruslan Ermilov c7b111cba8 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00

49 lines
1.2 KiB
Makefile

# $FreeBSD$
#
# 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.
# Also note that flex.skel no longer gets installed.
#
PROG= lex
LINKS+= ${BINDIR}/lex ${BINDIR}/lex++
LINKS+= ${BINDIR}/lex ${BINDIR}/flex
LINKS+= ${BINDIR}/lex ${BINDIR}/flex++
SRCS= scan.c ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
skel.c sym.c tblcmp.c yylex.c
LFLAGS+= -is
CFLAGS+= -I. -I${.CURDIR}
INCS= FlexLexer.h
INCSDIR= ${INCLUDEDIR}/g++
MLINKS+= lex.1 flex.1
MLINKS+= lex.1 flex++.1
MLINKS+= lex.1 lex++.1
CLEANFILES= scan.c skel.c
SUBDIR= lib
skel.c: mkskel.sh flex.skl
sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c
bootstrap: initscan.c
@cmp -s ${.CURDIR}/initscan.c scan.c || { \
echo "Bootstrapping flex" ; \
rm -f scan.c ; \
cp -f ${.CURDIR}/initscan.c scan.c ; \
}
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>