head	1.17;
access;
symbols
	netbsd-9-5-RELEASE:1.13
	netbsd-11-0-RELEASE:1.17
	netbsd-11-0-RC7:1.17
	netbsd-11-0-RC6:1.17
	netbsd-11-0-RC5:1.17
	netbsd-11-0-RC4:1.17
	netbsd-11-0-RC3:1.17
	netbsd-11-0-RC2:1.17
	netbsd-11-0-RC1:1.17
	perseant-exfatfs-base-20250801:1.17
	netbsd-11:1.17.0.4
	netbsd-11-base:1.17
	netbsd-10-1-RELEASE:1.16
	perseant-exfatfs-base-20240630:1.17
	perseant-exfatfs:1.17.0.2
	perseant-exfatfs-base:1.17
	netbsd-8-3-RELEASE:1.11
	netbsd-9-4-RELEASE:1.13
	netbsd-10-0-RELEASE:1.16
	netbsd-10-0-RC6:1.16
	netbsd-10-0-RC5:1.16
	netbsd-10-0-RC4:1.16
	netbsd-10-0-RC3:1.16
	netbsd-10-0-RC2:1.16
	netbsd-10-0-RC1:1.16
	netbsd-10:1.16.0.6
	netbsd-10-base:1.16
	netbsd-9-3-RELEASE:1.13
	cjep_sun2x-base1:1.16
	cjep_sun2x:1.16.0.4
	cjep_sun2x-base:1.16
	cjep_staticlib_x-base1:1.16
	netbsd-9-2-RELEASE:1.13
	cjep_staticlib_x:1.16.0.2
	cjep_staticlib_x-base:1.16
	netbsd-9-1-RELEASE:1.13
	phil-wifi-20200421:1.15
	phil-wifi-20200411:1.15
	is-mlppp:1.15.0.2
	is-mlppp-base:1.15
	phil-wifi-20200406:1.15
	netbsd-8-2-RELEASE:1.11
	netbsd-9-0-RELEASE:1.13
	netbsd-9-0-RC2:1.13
	netbsd-9-0-RC1:1.13
	phil-wifi-20191119:1.15
	netbsd-9:1.13.0.2
	netbsd-9-base:1.13
	phil-wifi-20190609:1.13
	netbsd-8-1-RELEASE:1.11
	netbsd-8-1-RC1:1.11
	pgoyette-compat-merge-20190127:1.11.12.1
	pgoyette-compat-20190127:1.12
	pgoyette-compat-20190118:1.12
	pgoyette-compat-1226:1.12
	pgoyette-compat-1126:1.11
	pgoyette-compat-1020:1.11
	pgoyette-compat-0930:1.11
	pgoyette-compat-0906:1.11
	netbsd-7-2-RELEASE:1.9
	pgoyette-compat-0728:1.11
	netbsd-8-0-RELEASE:1.11
	phil-wifi:1.11.0.14
	phil-wifi-base:1.11
	pgoyette-compat-0625:1.11
	netbsd-8-0-RC2:1.11
	pgoyette-compat-0521:1.11
	pgoyette-compat-0502:1.11
	pgoyette-compat-0422:1.11
	netbsd-8-0-RC1:1.11
	pgoyette-compat-0415:1.11
	pgoyette-compat-0407:1.11
	pgoyette-compat-0330:1.11
	pgoyette-compat-0322:1.11
	pgoyette-compat-0315:1.11
	netbsd-7-1-2-RELEASE:1.9
	pgoyette-compat:1.11.0.12
	pgoyette-compat-base:1.11
	netbsd-7-1-1-RELEASE:1.9
	matt-nb8-mediatek:1.11.0.10
	matt-nb8-mediatek-base:1.11
	perseant-stdc-iso10646:1.11.0.8
	perseant-stdc-iso10646-base:1.11
	netbsd-8:1.11.0.6
	netbsd-8-base:1.11
	prg-localcount2-base3:1.11
	prg-localcount2-base2:1.11
	prg-localcount2-base1:1.11
	prg-localcount2:1.11.0.4
	prg-localcount2-base:1.11
	pgoyette-localcount-20170426:1.11
	bouyer-socketcan-base1:1.11
	pgoyette-localcount-20170320:1.11
	netbsd-7-1:1.9.0.32
	netbsd-7-1-RELEASE:1.9
	netbsd-7-1-RC2:1.9
	netbsd-7-nhusb-base-20170116:1.9
	bouyer-socketcan:1.11.0.2
	bouyer-socketcan-base:1.11
	pgoyette-localcount-20170107:1.11
	netbsd-7-1-RC1:1.9
	pgoyette-localcount-20161104:1.9
	netbsd-7-0-2-RELEASE:1.9
	localcount-20160914:1.9
	netbsd-7-nhusb:1.9.0.30
	netbsd-7-nhusb-base:1.9
	pgoyette-localcount-20160806:1.9
	pgoyette-localcount-20160726:1.9
	pgoyette-localcount:1.9.0.28
	pgoyette-localcount-base:1.9
	netbsd-7-0-1-RELEASE:1.9
	netbsd-7-0:1.9.0.26
	netbsd-7-0-RELEASE:1.9
	netbsd-7-0-RC3:1.9
	netbsd-7-0-RC2:1.9
	netbsd-7-0-RC1:1.9
	netbsd-6-0-6-RELEASE:1.9
	netbsd-6-1-5-RELEASE:1.9
	netbsd-7:1.9.0.24
	netbsd-7-base:1.9
	yamt-pagecache-base9:1.9
	yamt-pagecache-tag8:1.9
	netbsd-6-1-4-RELEASE:1.9
	netbsd-6-0-5-RELEASE:1.9
	tls-earlyentropy:1.9.0.22
	tls-earlyentropy-base:1.9
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.9
	riastradh-drm2-base3:1.9
	netbsd-6-1-3-RELEASE:1.9
	netbsd-6-0-4-RELEASE:1.9
	netbsd-6-1-2-RELEASE:1.9
	netbsd-6-0-3-RELEASE:1.9
	netbsd-6-1-1-RELEASE:1.9
	riastradh-drm2-base2:1.9
	riastradh-drm2-base1:1.9
	riastradh-drm2:1.9.0.14
	riastradh-drm2-base:1.9
	netbsd-6-1:1.9.0.20
	netbsd-6-0-2-RELEASE:1.9
	netbsd-6-1-RELEASE:1.9
	khorben-n900:1.9.0.18
	netbsd-6-1-RC4:1.9
	netbsd-6-1-RC3:1.9
	agc-symver:1.9.0.16
	agc-symver-base:1.9
	netbsd-6-1-RC2:1.9
	netbsd-6-1-RC1:1.9
	yamt-pagecache-base8:1.9
	netbsd-6-0-1-RELEASE:1.9
	yamt-pagecache-base7:1.9
	matt-nb6-plus-nbase:1.9
	yamt-pagecache-base6:1.9
	netbsd-6-0:1.9.0.12
	netbsd-6-0-RELEASE:1.9
	netbsd-6-0-RC2:1.9
	tls-maxphys:1.9.0.10
	tls-maxphys-base:1.9
	matt-nb6-plus:1.9.0.8
	matt-nb6-plus-base:1.9
	netbsd-6-0-RC1:1.9
	yamt-pagecache-base5:1.9
	yamt-pagecache-base4:1.9
	netbsd-6:1.9.0.6
	netbsd-6-base:1.9
	yamt-pagecache-base3:1.9
	yamt-pagecache-base2:1.9
	yamt-pagecache:1.9.0.4
	yamt-pagecache-base:1.9
	cherry-xenmp:1.9.0.2
	cherry-xenmp-base:1.9
	bouyer-quota2-nbase:1.8
	bouyer-quota2:1.8.0.2
	bouyer-quota2-base:1.8
	matt-mips64-premerge-20101231:1.8
	matt-premerge-20091211:1.6;
locks; strict;
comment	@# @;


1.17
date	2023.06.03.09.09.03;	author lukem;	state Exp;
branches;
next	1.16;
commitid	aBaIRnuykonRStrE;

1.16
date	2021.04.12.02.54.07;	author mrg;	state Exp;
branches;
next	1.15;
commitid	BwuEQxep98zmWWOC;

1.15
date	2019.10.13.07.28.06;	author mrg;	state Exp;
branches;
next	1.14;
commitid	vRNwN94v7NgB2GGB;

1.14
date	2019.09.29.23.44.58;	author mrg;	state Exp;
branches;
next	1.13;
commitid	xrLFk44PaFrGTXEB;

1.13
date	2019.02.05.07.47.15;	author mrg;	state Exp;
branches;
next	1.12;
commitid	MI1DuWX8f5BlbyaB;

1.12
date	2018.12.23.16.27.17;	author christos;	state Exp;
branches;
next	1.11;
commitid	0VRc5IncIzZztW4B;

1.11
date	2017.01.02.18.33.22;	author christos;	state Exp;
branches
	1.11.12.1
	1.11.14.1;
next	1.10;
commitid	2VD52JxOkLUOjqAz;

1.10
date	2017.01.02.17.45.26;	author christos;	state Exp;
branches;
next	1.9;
commitid	2mZGuFOo9yjf3qAz;

1.9
date	2011.03.08.19.25.32;	author plunky;	state Exp;
branches
	1.9.28.1;
next	1.8;

1.8
date	2010.04.07.16.14.35;	author christos;	state Exp;
branches;
next	1.7;

1.7
date	2010.04.07.08.56.49;	author tron;	state Exp;
branches;
next	1.6;

1.6
date	2009.10.31.23.36.29;	author joerg;	state Exp;
branches;
next	1.5;

1.5
date	2009.10.29.17.17.33;	author christos;	state Exp;
branches;
next	1.4;

1.4
date	2009.10.29.13.03.09;	author christos;	state Exp;
branches;
next	1.3;

1.3
date	2009.10.26.18.32.39;	author christos;	state Exp;
branches;
next	1.2;

1.2
date	2009.10.26.11.19.47;	author christos;	state Exp;
branches;
next	1.1;

1.1
date	2009.10.26.00.49.04;	author christos;	state Exp;
branches;
next	;

1.11.12.1
date	2018.12.26.14.01.15;	author pgoyette;	state Exp;
branches;
next	;
commitid	xUhK8IAeBM1azj5B;

1.11.14.1
date	2019.06.10.21.44.48;	author christos;	state Exp;
branches;
next	1.11.14.2;
commitid	jtc8rnCzWiEEHGqB;

1.11.14.2
date	2020.04.13.07.46.00;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.9.28.1
date	2017.01.07.08.53.48;	author pgoyette;	state Exp;
branches;
next	;
commitid	uEL0C1YuiJrlV0Bz;


desc
@@


1.17
log
@bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@#	from: @@(#)Makefile	5.4 (Berkeley) 6/24/90
#	$NetBSD: Makefile,v 1.16 2021/04/12 02:54:07 mrg 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 CPPFLAGS.  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.

.include <bsd.init.mk>

PROG=	lex
CPPFLAGS+=-I. -I${.CURDIR} -DVERSION=\"${VERSION}\"
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

YHEADER=1
CLEANFILES+=skel.c
INCS	=FlexLexer.h
INCSDIR=/usr/include/g++
LDADD+=-lm
.ifndef HOSTPROG
DPADD+=${LIBM}
.endif

MAN = flex.1

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

skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
	${TOOL_SED} -e 's/4_/a4_/g; s/m4preproc_/m4_/g' \
	    ${IDIST}/flex.skl | ${TOOL_M4} -I${IDIST} -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 .` | \
	    ${TOOL_SED} -e 's/m4postproc_/m4_/g' | \
	    ${HOST_SH} ${IDIST}/mkskel.sh ${IDIST} ${TOOL_M4} ${VERSION} > ${.TARGET}

.ifndef HOSTPROG
scan.c: scan.l
	${_MKTARGET_LEX}
	${LEX} -t -p ${.ALLSRC} >${.TARGET}
.endif

scan.o yylex.o: parse.h

# Ugh. Generates too large offsets with -O2.
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
. if ${MACHINE_CPU} == "m68k" && empty(CFLAGS:M-O0)
COPTS.scan.c+=        -O1
. endif
.endif

COPTS.filter.c+=	${CC_WNO_FORMAT_TRUNCATION}
COPTS.misc.c+=		${CC_WNO_FORMAT_TRUNCATION}
COPTS.parse.c+=		${CC_WNO_FORMAT_TRUNCATION}

.include <bsd.prog.mk>
@


1.16
log
@add some new uses of existing GCC_NO_* variables for warning issues.
remove an no longer relevant for gcc7 workaround (works fine in both
gcc9 and gcc 10.)
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.15 2019/10/13 07:28:06 mrg Exp $
d81 3
a83 3
COPTS.filter.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.misc.c+=		${GCC_NO_FORMAT_TRUNCATION}
COPTS.parse.c+=		${GCC_NO_FORMAT_TRUNCATION}
@


1.15
log
@introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.14 2019/09/29 23:44:58 mrg Exp $
d83 1
@


1.14
log
@convert HAVE_GCC == 7 to HAVE_GCC >= 7.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.13 2019/02/05 07:47:15 mrg Exp $
d81 3
@


1.13
log
@force -O1 (unless -O0 already present) on m68k with GCC 7.  avoids a
"too-far" reference in scan.c.  was already close with GCC 6.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.12 2018/12/23 16:27:17 christos Exp $
d75 1
a75 1
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
@


1.12
log
@merge conflicts
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.11 2017/01/02 18:33:22 christos Exp $
d74 7
@


1.11
log
@fix the scanner build and regen
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.10 2017/01/02 17:45:26 christos Exp $
d64 1
a64 1
	    ${HOST_SH} ${IDIST}/mkskel.sh  > ${.TARGET}
@


1.11.14.1
log
@Sync with HEAD
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.13 2019/02/05 07:47:15 mrg Exp $
d64 1
a64 1
	    ${HOST_SH} ${IDIST}/mkskel.sh ${IDIST} ${TOOL_M4} ${VERSION} > ${.TARGET}
a73 7
# Ugh. Generates too large offsets with -O2.
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
. if ${MACHINE_CPU} == "m68k" && empty(CFLAGS:M-O0)
COPTS.scan.c+=        -O1
. endif
.endif

@


1.11.14.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d2 1
a2 1
#	$NetBSD$
d75 1
a75 1
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
a80 3
COPTS.filter.c+=	${GCC_NO_FORMAT_TRUNCATION}
COPTS.misc.c+=		${GCC_NO_FORMAT_TRUNCATION}

@


1.11.12.1
log
@Sync with HEAD, resolve a few conflicts
@
text
@d2 1
a2 1
#	$NetBSD$
d64 1
a64 1
	    ${HOST_SH} ${IDIST}/mkskel.sh ${IDIST} ${TOOL_M4} ${VERSION} > ${.TARGET}
@


1.10
log
@Merge conflicts
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.9 2011/03/08 19:25:32 plunky Exp $
d58 1
a58 1
	${TOOL_SED} -e 's/m4_/m4postproc_/g' -e 's/m4preproc_/m4_/g' \
@


1.9
log
@source files are scan.l and parse.y

in particular, parse.y was being processed twice.. with one
process leaving a y.tab.h file behind

no need to explicitly add scan.c, parse.c and parse.h to CLEANFILES,
the framework knows they are generated and will remove them
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.8 2010/04/07 16:14:35 christos Exp $
d15 2
d18 1
a18 1
CPPFLAGS+=-I. -I${.CURDIR}
@


1.9.28.1
log
@Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.11 2017/01/02 18:33:22 christos Exp $
a14 2
.include <bsd.init.mk>

d16 1
a16 1
CPPFLAGS+=-I. -I${.CURDIR} -DVERSION=\"${VERSION}\"
d56 1
a56 1
	${TOOL_SED} -e 's/4_/a4_/g; s/m4preproc_/m4_/g' \
@


1.8
log
@previous workaround not needed.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.7 2010/04/07 08:56:49 tron Exp $
d28 1
a28 1
parse.c \
d30 1
a30 1
scan.c \
d41 1
a41 1
CLEANFILES+=scan.c skel.c parse.c parse.h
@


1.7
log
@Ignore the unused label "find_rule" in the generated file "scan.c"
to fix the build.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.6 2009/10/31 23:36:29 joerg Exp $
a48 2
COPTS.scan.c+=	-Wno-unused-label

@


1.6
log
@Do not depend on the existance of /usr/lib/libm.a for the host tool case.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.5 2009/10/29 17:17:33 christos Exp $
d49 2
@


1.5
log
@We can rebuild our yacc generated files now
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.4 2009/10/29 13:03:09 christos Exp $
d45 1
d47 1
@


1.4
log
@oops forgot to remove the PKG m4.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.3 2009/10/26 18:32:39 christos Exp $
a39 4
# Don't frob yacc files until we have a good bison
.y.c .y.h:
	@@true

@


1.3
log
@Now it works, but it needs gm4...
Problem was that our bison cannot deal with it, so we don't regenerate
parse.c and parse.h from parse.y.
So we need:
	1. Fix m4
	2. Get new byacc/bison
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.2 2009/10/26 11:19:47 christos Exp $
a49 2
# XXX: Fix m4.
TOOL_M4=/usr/pkg/bin/gm4
@


1.2
log
@it is more complicated to rebuild the skel now.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.1 2009/10/26 00:49:04 christos Exp $
d28 1
a28 1
parse.y \
d40 4
d45 1
a45 1
CLEANFILES+=scan.c skel.c
d50 2
d61 1
a61 1
	    ${IDIST}/flex.skl | ${TOOL_M4} -P \
@


1.1
log
@Add build glue and old manual page, since the new one is content free.
@
text
@d2 1
a2 1
#	$NetBSD: Makefile,v 1.29 2009/04/14 22:15:22 lukem Exp $
d53 8
a60 3
skel.c:	mkskel.sh flex.skl
	${_MKTARGET_CREATE}
	${HOST_SH} ${.ALLSRC} >${.TARGET}
@

