head	1.27;
access;
symbols
	netbsd-11-0-RC4:1.27
	netbsd-11-0-RC3:1.27
	netbsd-11-0-RC2:1.27
	netbsd-11-0-RC1:1.27
	perseant-exfatfs-base-20250801:1.27
	netbsd-11:1.27.0.6
	netbsd-11-base:1.27
	netbsd-10-1-RELEASE:1.27
	perseant-exfatfs-base-20240630:1.27
	perseant-exfatfs:1.27.0.4
	perseant-exfatfs-base:1.27
	netbsd-8-3-RELEASE:1.25
	netbsd-9-4-RELEASE:1.25
	netbsd-10-0-RELEASE:1.27
	netbsd-10-0-RC6:1.27
	netbsd-10-0-RC5:1.27
	netbsd-10-0-RC4:1.27
	netbsd-10-0-RC3:1.27
	netbsd-10-0-RC2:1.27
	netbsd-10-0-RC1:1.27
	netbsd-10:1.27.0.2
	netbsd-10-base:1.27
	netbsd-9-3-RELEASE:1.25
	cjep_sun2x-base1:1.26
	cjep_sun2x:1.26.0.6
	cjep_sun2x-base:1.26
	cjep_staticlib_x-base1:1.26
	netbsd-9-2-RELEASE:1.25
	cjep_staticlib_x:1.26.0.4
	cjep_staticlib_x-base:1.26
	netbsd-9-1-RELEASE:1.25
	phil-wifi-20200421:1.26
	phil-wifi-20200411:1.26
	is-mlppp:1.26.0.2
	is-mlppp-base:1.26
	phil-wifi-20200406:1.26
	netbsd-8-2-RELEASE:1.25
	netbsd-9-0-RELEASE:1.25
	netbsd-9-0-RC2:1.25
	netbsd-9-0-RC1:1.25
	phil-wifi-20191119:1.25
	netbsd-9:1.25.0.28
	netbsd-9-base:1.25
	phil-wifi-20190609:1.25
	netbsd-8-1-RELEASE:1.25
	netbsd-8-1-RC1:1.25
	pgoyette-compat-merge-20190127:1.25
	pgoyette-compat-20190127:1.25
	pgoyette-compat-20190118:1.25
	pgoyette-compat-1226:1.25
	pgoyette-compat-1126:1.25
	pgoyette-compat-1020:1.25
	pgoyette-compat-0930:1.25
	pgoyette-compat-0906:1.25
	netbsd-7-2-RELEASE:1.25
	pgoyette-compat-0728:1.25
	netbsd-8-0-RELEASE:1.25
	phil-wifi:1.25.0.26
	phil-wifi-base:1.25
	pgoyette-compat-0625:1.25
	netbsd-8-0-RC2:1.25
	pgoyette-compat-0521:1.25
	pgoyette-compat-0502:1.25
	pgoyette-compat-0422:1.25
	netbsd-8-0-RC1:1.25
	pgoyette-compat-0415:1.25
	pgoyette-compat-0407:1.25
	pgoyette-compat-0330:1.25
	pgoyette-compat-0322:1.25
	pgoyette-compat-0315:1.25
	netbsd-7-1-2-RELEASE:1.25
	pgoyette-compat:1.25.0.24
	pgoyette-compat-base:1.25
	netbsd-7-1-1-RELEASE:1.25
	matt-nb8-mediatek:1.25.0.22
	matt-nb8-mediatek-base:1.25
	perseant-stdc-iso10646:1.25.0.20
	perseant-stdc-iso10646-base:1.25
	netbsd-8:1.25.0.18
	netbsd-8-base:1.25
	prg-localcount2-base3:1.25
	prg-localcount2-base2:1.25
	prg-localcount2-base1:1.25
	prg-localcount2:1.25.0.16
	prg-localcount2-base:1.25
	pgoyette-localcount-20170426:1.25
	bouyer-socketcan-base1:1.25
	pgoyette-localcount-20170320:1.25
	netbsd-7-1:1.25.0.14
	netbsd-7-1-RELEASE:1.25
	netbsd-7-1-RC2:1.25
	netbsd-7-nhusb-base-20170116:1.25
	bouyer-socketcan:1.25.0.12
	bouyer-socketcan-base:1.25
	pgoyette-localcount-20170107:1.25
	netbsd-7-1-RC1:1.25
	pgoyette-localcount-20161104:1.25
	netbsd-7-0-2-RELEASE:1.25
	localcount-20160914:1.25
	netbsd-7-nhusb:1.25.0.10
	netbsd-7-nhusb-base:1.25
	pgoyette-localcount-20160806:1.25
	pgoyette-localcount-20160726:1.25
	pgoyette-localcount:1.25.0.8
	pgoyette-localcount-base:1.25
	netbsd-7-0-1-RELEASE:1.25
	netbsd-7-0:1.25.0.6
	netbsd-7-0-RELEASE:1.25
	netbsd-7-0-RC3:1.25
	netbsd-7-0-RC2:1.25
	netbsd-7-0-RC1:1.25
	netbsd-5-2-3-RELEASE:1.24
	netbsd-5-1-5-RELEASE:1.24
	netbsd-6-0-6-RELEASE:1.24
	netbsd-6-1-5-RELEASE:1.24
	netbsd-7:1.25.0.4
	netbsd-7-base:1.25
	yamt-pagecache-base9:1.25
	yamt-pagecache-tag8:1.24
	netbsd-6-1-4-RELEASE:1.24
	netbsd-6-0-5-RELEASE:1.24
	tls-earlyentropy:1.25.0.2
	tls-earlyentropy-base:1.25
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.25
	riastradh-drm2-base3:1.25
	netbsd-6-1-3-RELEASE:1.24
	netbsd-6-0-4-RELEASE:1.24
	netbsd-5-2-2-RELEASE:1.24
	netbsd-5-1-4-RELEASE:1.24
	netbsd-6-1-2-RELEASE:1.24
	netbsd-6-0-3-RELEASE:1.24
	netbsd-5-2-1-RELEASE:1.24
	netbsd-5-1-3-RELEASE:1.24
	netbsd-6-1-1-RELEASE:1.24
	riastradh-drm2-base2:1.24
	riastradh-drm2-base1:1.24
	riastradh-drm2:1.24.0.30
	riastradh-drm2-base:1.24
	netbsd-6-1:1.24.0.36
	netbsd-6-0-2-RELEASE:1.24
	netbsd-6-1-RELEASE:1.24
	khorben-n900:1.24.0.34
	netbsd-6-1-RC4:1.24
	netbsd-6-1-RC3:1.24
	agc-symver:1.24.0.32
	agc-symver-base:1.24
	netbsd-6-1-RC2:1.24
	netbsd-6-1-RC1:1.24
	yamt-pagecache-base8:1.24
	netbsd-5-2:1.24.0.28
	netbsd-6-0-1-RELEASE:1.24
	yamt-pagecache-base7:1.24
	netbsd-5-2-RELEASE:1.24
	netbsd-5-2-RC1:1.24
	matt-nb6-plus-nbase:1.24
	yamt-pagecache-base6:1.24
	netbsd-6-0:1.24.0.26
	netbsd-6-0-RELEASE:1.24
	netbsd-6-0-RC2:1.24
	tls-maxphys:1.24.0.24
	tls-maxphys-base:1.25
	matt-nb6-plus:1.24.0.22
	matt-nb6-plus-base:1.24
	netbsd-6-0-RC1:1.24
	yamt-pagecache-base5:1.24
	yamt-pagecache-base4:1.24
	netbsd-6:1.24.0.20
	netbsd-6-base:1.24
	netbsd-5-1-2-RELEASE:1.24
	netbsd-5-1-1-RELEASE:1.24
	yamt-pagecache-base3:1.24
	yamt-pagecache-base2:1.24
	yamt-pagecache:1.24.0.18
	yamt-pagecache-base:1.24
	cherry-xenmp:1.24.0.16
	cherry-xenmp-base:1.24
	bouyer-quota2-nbase:1.24
	bouyer-quota2:1.24.0.14
	bouyer-quota2-base:1.24
	matt-mips64-premerge-20101231:1.24
	matt-nb5-mips64-premerge-20101231:1.24
	matt-nb5-pq3:1.24.0.12
	matt-nb5-pq3-base:1.24
	netbsd-5-1:1.24.0.10
	netbsd-5-1-RELEASE:1.24
	netbsd-5-1-RC4:1.24
	matt-nb5-mips64-k15:1.24
	netbsd-5-1-RC3:1.24
	netbsd-5-1-RC2:1.24
	netbsd-5-1-RC1:1.24
	netbsd-5-0-2-RELEASE:1.24
	matt-nb5-mips64-premerge-20091211:1.24
	matt-premerge-20091211:1.24
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.24
	matt-nb4-mips64-k7-u2a-k9b:1.24
	matt-nb5-mips64-u1-k1-k5:1.24
	matt-nb5-mips64:1.24.0.8
	netbsd-5-0-1-RELEASE:1.24
	jym-xensuspend-nbase:1.24
	netbsd-5-0:1.24.0.6
	netbsd-5-0-RELEASE:1.24
	netbsd-5-0-RC4:1.24
	netbsd-5-0-RC3:1.24
	netbsd-5-0-RC2:1.24
	jym-xensuspend:1.24.0.4
	jym-xensuspend-base:1.24
	netbsd-5-0-RC1:1.24
	netbsd-5:1.24.0.2
	netbsd-5-base:1.24
	matt-mips64-base2:1.24
	matt-mips64:1.23.0.26
	netbsd-4-0-1-RELEASE:1.23
	wrstuden-revivesa-base-3:1.23
	wrstuden-revivesa-base-2:1.23
	wrstuden-fixsa-newbase:1.23
	wrstuden-revivesa-base-1:1.23
	yamt-pf42-base4:1.23
	yamt-pf42-base3:1.23
	hpcarm-cleanup-nbase:1.23
	yamt-pf42-baseX:1.23
	yamt-pf42-base2:1.23
	wrstuden-revivesa:1.23.0.24
	wrstuden-revivesa-base:1.23
	yamt-pf42:1.23.0.22
	yamt-pf42-base:1.23
	mjf-devfs2:1.23.0.20
	mjf-devfs2-base:1.23
	keiichi-mipv6:1.23.0.18
	keiichi-mipv6-base:1.23
	mjf-devfs:1.23.0.16
	mjf-devfs-base:1.23
	matt-armv6-nbase:1.23
	matt-armv6-prevmlocking:1.23
	wrstuden-fixsa-base-1:1.23
	netbsd-4-0:1.23.0.14
	netbsd-4-0-RELEASE:1.23
	cube-autoconf:1.23.0.12
	cube-autoconf-base:1.23
	netbsd-4-0-RC5:1.23
	netbsd-4-0-RC4:1.23
	netbsd-4-0-RC3:1.23
	netbsd-4-0-RC2:1.23
	netbsd-4-0-RC1:1.23
	matt-armv6:1.23.0.10
	matt-armv6-base:1.23
	matt-mips64-base:1.23
	hpcarm-cleanup:1.23.0.8
	hpcarm-cleanup-base:1.23
	netbsd-3-1-1-RELEASE:1.19
	netbsd-3-0-3-RELEASE:1.19
	wrstuden-fixsa:1.23.0.6
	wrstuden-fixsa-base:1.23
	abandoned-netbsd-4-base:1.23
	abandoned-netbsd-4:1.23.0.2
	netbsd-3-1:1.19.0.6
	netbsd-3-1-RELEASE:1.19
	netbsd-3-0-2-RELEASE:1.19
	netbsd-3-1-RC4:1.19
	netbsd-3-1-RC3:1.19
	netbsd-3-1-RC2:1.19
	netbsd-3-1-RC1:1.19
	netbsd-4:1.23.0.4
	netbsd-4-base:1.23
	netbsd-3-0-1-RELEASE:1.19
	netbsd-3-0:1.19.0.4
	netbsd-3-0-RELEASE:1.19
	netbsd-3-0-RC6:1.19
	netbsd-3-0-RC5:1.19
	netbsd-3-0-RC4:1.19
	netbsd-3-0-RC3:1.19
	netbsd-3-0-RC2:1.19
	netbsd-3-0-RC1:1.19
	netbsd-2-0-3-RELEASE:1.16
	netbsd-2-1:1.16.0.6
	netbsd-2-1-RELEASE:1.16
	netbsd-2-1-RC6:1.16
	netbsd-2-1-RC5:1.16
	netbsd-2-1-RC4:1.16
	netbsd-2-1-RC3:1.16
	netbsd-2-1-RC2:1.16
	netbsd-2-1-RC1:1.16
	netbsd-2-0-2-RELEASE:1.16
	netbsd-3:1.19.0.2
	netbsd-3-base:1.19
	netbsd-2-0-1-RELEASE:1.16
	netbsd-2:1.16.0.4
	netbsd-2-base:1.16
	netbsd-2-0-RELEASE:1.16
	netbsd-2-0-RC5:1.16
	netbsd-2-0-RC4:1.16
	netbsd-2-0-RC3:1.16
	netbsd-2-0-RC2:1.16
	netbsd-2-0-RC1:1.16
	netbsd-2-0:1.16.0.2
	netbsd-2-0-base:1.16
	netbsd-1-6-PATCH002-RELEASE:1.9.2.1
	netbsd-1-6-PATCH002:1.9.2.1
	netbsd-1-6-PATCH002-RC4:1.9.2.1
	netbsd-1-6-PATCH002-RC3:1.9.2.1
	netbsd-1-6-PATCH002-RC2:1.9.2.1
	netbsd-1-6-PATCH002-RC1:1.9.2.1
	netbsd-1-6-PATCH001:1.9.2.1
	netbsd-1-6-PATCH001-RELEASE:1.9.2.1
	netbsd-1-6-PATCH001-RC3:1.9.2.1
	netbsd-1-6-PATCH001-RC2:1.9.2.1
	netbsd-1-6-PATCH001-RC1:1.9.2.1
	fvdl_fs64_base:1.11
	netbsd-1-6-RELEASE:1.9.2.1
	netbsd-1-6-RC3:1.9.2.1
	netbsd-1-6-RC2:1.9.2.1
	netbsd-1-6-RC1:1.9.2.1
	netbsd-1-6:1.9.0.2
	netbsd-1-6-base:1.9;
locks; strict;
comment	@# @;


1.27
date	2022.05.11.10.45.48;	author rin;	state Exp;
branches;
next	1.26;
commitid	nLFAuaQDURgxSCDD;

1.26
date	2019.12.29.18.26.16;	author christos;	state Exp;
branches;
next	1.25;
commitid	QaphWvAMkPXycDQB;

1.25
date	2014.02.01.21.05.54;	author matt;	state Exp;
branches
	1.25.26.1;
next	1.24;
commitid	LugkWMEvQOdfqrnx;

1.24
date	2008.10.19.22.05.19;	author apb;	state Exp;
branches
	1.24.18.1
	1.24.24.1;
next	1.23;

1.23
date	2005.11.10.21.29.37;	author dsl;	state Exp;
branches
	1.23.20.1;
next	1.22;

1.22
date	2005.11.07.22.19.34;	author dsl;	state Exp;
branches;
next	1.21;

1.21
date	2005.09.05.20.14.08;	author dsl;	state Exp;
branches;
next	1.20;

1.20
date	2005.09.04.19.00.40;	author dsl;	state Exp;
branches;
next	1.19;

1.19
date	2005.02.10.16.03.34;	author jmc;	state Exp;
branches;
next	1.18;

1.18
date	2005.01.19.01.18.59;	author lukem;	state Exp;
branches;
next	1.17;

1.17
date	2005.01.18.12.30.21;	author lukem;	state Exp;
branches;
next	1.16;

1.16
date	2003.07.10.10.34.04;	author lukem;	state Exp;
branches;
next	1.15;

1.15
date	2003.05.18.11.25.33;	author lukem;	state Exp;
branches;
next	1.14;

1.14
date	2003.05.15.17.52.32;	author dsl;	state Exp;
branches;
next	1.13;

1.13
date	2003.05.09.12.20.04;	author dsl;	state Exp;
branches;
next	1.12;

1.12
date	2003.03.11.07.18.38;	author lukem;	state Exp;
branches;
next	1.11;

1.11
date	2002.10.17.02.05.36;	author lukem;	state Exp;
branches;
next	1.10;

1.10
date	2002.05.29.09.56.04;	author lukem;	state Exp;
branches;
next	1.9;

1.9
date	2002.05.02.13.16.46;	author lukem;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2002.04.26.15.50.27;	author lukem;	state Exp;
branches;
next	1.7;

1.7
date	2002.04.12.01.59.45;	author lukem;	state Exp;
branches;
next	1.6;

1.6
date	2002.04.02.05.36.23;	author lukem;	state Exp;
branches;
next	1.5;

1.5
date	2002.03.17.21.33.45;	author lukem;	state Exp;
branches;
next	1.4;

1.4
date	2002.03.14.22.26.09;	author lukem;	state Exp;
branches;
next	1.3;

1.3
date	2002.02.07.11.39.17;	author lukem;	state Exp;
branches;
next	1.2;

1.2
date	2002.02.05.23.16.16;	author lukem;	state Exp;
branches;
next	1.1;

1.1
date	2002.02.03.15.24.43;	author lukem;	state Exp;
branches;
next	;

1.25.26.1
date	2020.04.08.14.03.44;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.24.18.1
date	2014.05.22.12.01.27;	author yamt;	state Exp;
branches;
next	;
commitid	yqlfOuaAhYmASwBx;

1.24.24.1
date	2014.08.19.23.45.38;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.23.20.1
date	2008.10.05.20.10.15;	author mjf;	state dead;
branches;
next	;

1.9.2.1
date	2002.05.29.09.59.04;	author lukem;	state Exp;
branches;
next	;


desc
@@


1.27
log
@Introduce NOIEEE80211 option, by which IEEE 802.11 support is dropped from
ifconfig(8) in crunched binaries. This saves ~9KB for, e.g., m68k.
@
text
@#	$NetBSD: Makefile.crunch,v 1.26 2019/12/29 18:26:16 christos Exp $
#
# Makefile snippet to build a crunchgen(1)ed binary from the provided lists
#
# Required variables:
#	NETBSDSRCDIR	top level of src tree (set by <bsd.own.mk>)
#	CRUNCHBIN	name of crunchgen(1)ed binary
#	LISTS		list file(s) to use
#
# Optional variables:
#	SMALLPROG	if != 0, add SMALLPROG=1 to CRUNCHENV.  [default: 1]
#	SMALLPROG_INET6	if != 0 and SMALLPROG != 0, and ${USE_INET6} != "no",
#			add SMALLPROG_INET6=1 to CRUNCHENV.  [default: 0]
#	CRUNCHENV	environment to pass to crunchgen(1) and when building
#			the crunched program with make(1) (as command line
#			variables, to override any user provided environment
#			or make(1) cmdline vars).
#	CRUNCHGEN_FLAGS	extra options to crunchgen(1)
#	DESTDIR		destination directory
#	PARSELISTENV	environment variables to set for parselist.awk
#
# Variables modified by this:
#	CRUNCHENV	may get SMALLPROG=1 or SMALLPROG_INET6=1 added
#

.if !defined(_MAKEFILE_CRUNCH_)
_MAKEFILE_CRUNCH_=1

DBG?=-Os
CRUNCHGEN_FLAGS?=\
-V LDSTATIC=-static \
-V DBG="${DBG}" \
-V NOMAN= \
-V NOLIBCSANITIZER= \
-V NOSANITIZER= \
-V NOPIE= \
-V NOSSP= \
-V NOFORT=

CRUNCHENV+=		AWK=${TOOL_AWK:Q}

SMALLPROG?=		1
SMALLPROG_INET6?=	0
NOIEEE80211?=		0
.if ${SMALLPROG}				# {
CRUNCHENV+=		SMALLPROG=1
.if ${SMALLPROG_INET6} && (${USE_INET6} != "no")
CRUNCHENV+=		SMALLPROG_INET6=1
.endif
.if ${NOIEEE80211}
CRUNCHENV+=		NOIEEE80211=1
.endif
.endif						# }

.include "${DISTRIBDIR}/common/Makefile.parselist"

.PHONY:	${CRUNCHBIN}
${CRUNCHBIN}: ${CRUNCHBIN}.mk ${CRUNCHBIN}.cache ${CRUNCHBIN}.c
	${MAKE} ${CRUNCHENV} -f ${CRUNCHBIN}.mk ${CRUNCHBIN}.crunched

${CRUNCHBIN}.c: ${CRUNCHBIN}.mk
	[ ! -f ${.TARGET} ] || touch ${.TARGET}

${CRUNCHBIN}.cache: ${CRUNCHBIN}.mk
	[ ! -f ${.TARGET} ] || touch ${.TARGET}

CRUNCHGEN != command -v ${TOOL_CRUNCHGEN:[-1]} || echo

${CRUNCHBIN}.mk: ${CRUNCHBIN}.conf  ${CRUNCHGEN}
	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} \
	    -L ${DESTDIR}/usr/lib -q ${CRUNCHGEN_FLAGS} ${CRUNCHBIN}.conf

${CRUNCHBIN}.conf: ${LISTS} ${PARSELISTDEP}
	-rm -f ${.TARGET} ${.TARGET}.tmp
	${PARSELIST} -v mode=crunch ${LISTS} > ${.TARGET}.tmp \
	&& mv ${.TARGET}.tmp ${.TARGET}

CLEANFILES+=	${CRUNCHBIN} ${CRUNCHBIN}.conf ${CRUNCHBIN}.conf.tmp \
		${CRUNCHBIN}.cache *.o *.cro *.c

clean cleandir distclean: cleancrunchgen

.PHONY: cleancrunchgen

cleancrunchgen:
	if [ -f ${CRUNCHBIN}.mk ]; then \
		${MAKE} -f ${CRUNCHBIN}.mk clean; \
	fi
	rm -f ${CRUNCHBIN}.mk


.endif	# _MAKEFILE_CRUNCH_
@


1.26
log
@1. Remove all the special handling of variables (-d -p -P -s -S) that
   were dealing with DBG (-d) LDSTATIC/NOPIE (-p), and the rest with
   disabling/enabling sanitizers.
2. Use emalloc/estrdup for all the allocators instead of only some cases.
3. Add -V varspec which passes variables on the command line (as DBG
   and LDSTATIC used to be passed before) instead of appending them
   to the on-the-fly Makefile using -v varspec.
4. Change the distrib and rescue Makefiles to use -V instead of the removed
   flags.

The motivation of this is to make variable handling consistent, less magical,
and remove the need for changing crunchgen each time we want to add disabling
an option by default.

(as proposed in tech-toolchain)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.25 2014/02/01 21:05:54 matt Exp $
d44 1
d50 3
@


1.25
log
@Pass DBG to crunchgen so it can get into the created mk file.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.24 2008/10/19 22:05:19 apb Exp $
d29 11
d66 1
a66 1
	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} -d ${DBG:Q} \
@


1.25.26.1
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
a28 11
DBG?=-Os
CRUNCHGEN_FLAGS?=\
-V LDSTATIC=-static \
-V DBG="${DBG}" \
-V NOMAN= \
-V NOLIBCSANITIZER= \
-V NOSANITIZER= \
-V NOPIE= \
-V NOSSP= \
-V NOFORT=

d55 1
a55 1
	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} \
@


1.24
log
@Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.23 2005/11/10 21:29:37 dsl Exp $
d55 1
a55 1
	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} \
@


1.24.24.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d55 1
a55 1
	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} -d ${DBG:Q} \
@


1.24.18.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.24 2008/10/19 22:05:19 apb Exp $
d55 1
a55 1
	${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} -d ${DBG:Q} \
@


1.23
log
@Stop make wingeing when the crunchgen binary can't be located.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.22 2005/11/07 22:19:34 dsl Exp $
d29 1
@


1.23.20.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.23 2005/11/10 21:29:37 dsl Exp $
@


1.22
log
@We need the absolute path of the crunchgen binary in order to make the
generated makefile depend on the binary.
Needed for USE_TOOLS=no builds
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.21 2005/09/05 20:14:08 dsl Exp $
d51 1
a51 1
CRUNCHGEN != command -v ${TOOL_CRUNCHGEN:[-1]}
@


1.21
log
@Fix breakage from yesterday!
Don't pass crunchgen the name of its own binary as an extra argument.
(make must have silently done this when the extra argument was .PHONY)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.20 2005/09/04 19:00:40 dsl Exp $
d51 3
a53 1
${CRUNCHBIN}.mk: ${CRUNCHBIN}.conf  ${TOOL_CRUNCHGEN:[-1]}
@


1.20
log
@Make ${CRUNCHBIN}.mk depend on  ${TOOL_CRUNCHGEN:[-1]} instead of .PHONY.
Recreating the makefile when the crunchgen program has changed is probably
adequate, and it allows a lot of later optimisations to still apply.
In particular:
- the final link for ramdiskbin
- the create of the embedded filesystem
- the inclusion of the ramdisk into the kernel
- compressing the kernel
Unless something else actually requires one of the above.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.19 2005/02/10 16:03:34 jmc Exp $
d53 1
a53 1
	    -L ${DESTDIR}/usr/lib -q ${CRUNCHGEN_FLAGS} ${.ALLSRC}
@


1.19
log
@Make the crunchgen generated makefile regen on each run
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.18 2005/01/19 01:18:59 lukem Exp $
d51 1
a51 1
${CRUNCHBIN}.mk: ${CRUNCHBIN}.conf .PHONY
@


1.18
log
@Use
	${MAKE} ${CRUNCHENV} ...
instead of
	${CRUNCHENV} ${MAKE} ...
so that CRUNCHENV overrides any user-provided command-line make(1) variables.

This fixes /rescue build problems for people who pass settings such
as MKKERBEROS=yes in via the make(1) command-line.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.17 2005/01/18 12:30:21 lukem Exp $
d51 1
a51 1
${CRUNCHBIN}.mk: ${CRUNCHBIN}.conf
@


1.17
log
@Only support SMALLPROG_INET6 if ${USE_INET6} != "no".
Part of PR 28994.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.16 2003/07/10 10:34:04 lukem Exp $
d15 3
a17 1
#			the crunched program.
d43 1
a43 1
	${CRUNCHENV} ${MAKE} -f ${CRUNCHBIN}.mk ${CRUNCHBIN}.crunched
@


1.16
log
@Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.15 2003/05/18 11:25:33 lukem Exp $
d12 2
a13 2
#	SMALLPROG_INET6	if != 0 and SMALLPROG != 0, add SMALLPROG_INET6=1
#			to CRUNCHENV.  [default: 0]
d32 1
a32 1
.if ${SMALLPROG_INET6}
@


1.15
log
@Don't force "make -j 1" any more, since David Laight appears to have
fixed the parallel-make issues in crunchgen generated Makefiles.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.14 2003/05/15 17:52:32 dsl Exp $
d50 2
a51 2
	${CRUNCHENV} ${CRUNCHGEN} -f -D ${NETBSDSRCDIR} -L ${DESTDIR}/usr/lib \
	    -q ${CRUNCHGEN_FLAGS} ${.ALLSRC}
@


1.14
log
@Avoid building the xxx.mk file (etc) multiple times in a parralel build.
Change name of target build from xxx.mk from 'all' to xxx.crunched to avoid
picking up baggage from bsd.own.mk and bsd.prog.mk.
Fixes toolchain/21563 (with new crunchgen binary)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.13 2003/05/09 12:20:04 dsl Exp $
d41 1
a41 1
	${CRUNCHENV} ${MAKE} -j 1 -f ${CRUNCHBIN}.mk ${CRUNCHBIN}.crunched
d67 1
a67 1
		${MAKE} -j 1 -f ${CRUNCHBIN}.mk clean; \
@


1.13
log
@Force ramdiskbin.mk to be run to update the crunched binary.
Explicitly check times on built targets so to stop make rebuilding
the later targets.
nbmake in src/distrib/i386/floppies/ramdisk-big (etc) will now
pick up changes to source files that make the crunched binary.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.12 2003/03/11 07:18:38 lukem Exp $
d41 1
a41 1
	${CRUNCHENV} ${MAKE} -j 1 -f ${CRUNCHBIN}.mk all
d43 7
a49 1
${CRUNCHBIN}.mk ${CRUNCHBIN}.cache ${CRUNCHBIN}.c: ${CRUNCHBIN}.conf
@


1.12
log
@add multiple-include protection.
clean up some comments.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.11 2002/10/17 02:05:36 lukem Exp $
d39 1
@


1.11
log
@Rework how SMALLPROG was being used and how INET6 support was enabled.
There's two variables added to Makefile.crunch:

    SMALLPROG		If 1, add SMALLPROG=1 to CRUNCHENV.  [default: 1]
			This can be used by various Makefiles to
			determine if a `small' version of the program
			is required.

    SMALLPROG_INET6	If 1 and SMALLPROG == 1, add SMALLPROG_INET6=1
			to CRUNCHENV.  [default: 0]
			This can be used by various Makefiles to
			determine if the `small' version has INET6
			support enabled.

Only enable SMALLPROG_INET6 for programs on the ramdisks that have INET6 in
the appropriate kernel, and cleanup INET6 setting.
(Note: this means that sysinst won't get INET6 support if the kernel
it's running on doesn't have it).

This change saves a fair bit of space on various install images
(including i386 ramdisk-{ps2,small,tiny}) that didn't have INET6 in
the kernel but were unconditionally getting INET6 support in their tools.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.10 2002/05/29 09:56:04 lukem Exp $
a4 2

#
d24 4
d63 3
@


1.10
log
@- build crunchgen(1)-created Makefiles with -j 1, as they're not
  parallel build safe at this time.
- invoke crunchgen with -q, as the verbose output looks ugly with "make -j N"
  and in build logs.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.9 2002/05/02 13:16:46 lukem Exp $
d13 3
d17 1
a17 1
#			the crunched program.  [default: SMALLPROG=1]
d23 2
d26 8
a33 1
CRUNCHENV?=	SMALLPROG=1
@


1.9
log
@support optional CRUNCHENV - environment variables to pass to
crunchgen(1) and the make -f ${CRUNCHBIN}.mk.
defaults to SMALLPROG=1
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.8 2002/04/26 15:50:27 lukem Exp $
d26 1
a26 1
	${CRUNCHENV} ${MAKE} -f ${CRUNCHBIN}.mk all
d30 1
a30 1
	    ${CRUNCHGEN_FLAGS} ${.ALLSRC}
d46 1
a46 1
		${MAKE} -f ${CRUNCHBIN}.mk clean; \
@


1.9.2.1
log
@Pull up revision 1.10 (requested by lukem):
- build crunchgen(1)-created Makefiles with -j 1, as they're not
  parallel build safe at this time.
- invoke crunchgen with -q, as the verbose output looks ugly with "make -j N"
  and in build logs.
@
text
@d1 1
a1 1
#	$NetBSD$
d26 1
a26 1
	${CRUNCHENV} ${MAKE} -j 1 -f ${CRUNCHBIN}.mk all
d30 1
a30 1
	    -q ${CRUNCHGEN_FLAGS} ${.ALLSRC}
d46 1
a46 1
		${MAKE} -j 1 -f ${CRUNCHBIN}.mk clean; \
@


1.8
log
@replace _SRC_TOP_ with NETBSDSRCDIR, since the latter is the "public" version
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.7 2002/04/12 01:59:45 lukem Exp $
d13 2
d19 3
d26 1
a26 1
	env SMALLPROG=1 ${MAKE} -f ${CRUNCHBIN}.mk all
d29 2
a30 3
	env SMALLPROG=1 \
	    ${CRUNCHGEN} -f -D ${NETBSDSRCDIR} -L ${DESTDIR}/usr/lib \
			${CRUNCHGEN_FLAGS} ${.ALLSRC}
@


1.7
log
@move default PARSELISTENV and related goop into separate Makefile.parselist,
and add DISTRIBDIR to PARSELISTENV.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.6 2002/04/02 05:36:23 lukem Exp $
d8 1
a8 1
#	_SRC_TOP_	top level of src tree (set by <bsd.own.mk>)
d25 1
a25 1
	    ${CRUNCHGEN} -f -D ${_SRC_TOP_} -L ${DESTDIR}/usr/lib \
@


1.6
log
@Add support for optional ${CRUNCHGEN_FLAGS}.
Per discussion with Izumi Tsutsui <tsutsui@@ceres.dti.ne.jp>
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.5 2002/03/17 21:33:45 lukem Exp $
d18 1
a18 9
PARSELISTENV+=	_SRC_TOP_=${_SRC_TOP_:Q} \
		CRUNCHBIN=${CRUNCHBIN:Q} \
		CURDIR=${.CURDIR:Q} \
		DESTDIR=${DESTDIR:Q} \
		MACHINE=${MACHINE:Q} \
		MACHINE_ARCH=${MACHINE_ARCH:Q} \
		OBJDIR=${.OBJDIR:Q}

_PARSELIST=	${_SRC_TOP_}/distrib/common/parselist.awk
d28 1
a28 1
${CRUNCHBIN}.conf: ${LISTS} ${_PARSELIST}
d30 1
a30 2
	${PARSELISTENV} awk -f ${_PARSELIST} -v mode=crunch \
	    ${LISTS} > ${.TARGET}.tmp \
@


1.5
log
@add missing backslash.  noted by Havard Eidnes
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.4 2002/03/14 22:26:09 lukem Exp $
d13 1
d33 2
a34 1
	    ${CRUNCHGEN} -f -D ${_SRC_TOP_} -L ${DESTDIR}/usr/lib ${.ALLSRC}
@


1.4
log
@parselist.awk
- improve comments
- provide a general purpose variable replacement; replace contents of ${FOO}
  with ENVIRON["FOO"].
- deprecate @@MACHINE@@ and @@MACHINE_ARCH@@ in favour of using ${MACHINE}
  and ${MACHINE_ARCH} instead
- add errx() function; like err(), but doesn't print the line number
- invoke this script with various variables defined via PARSELISTENV

*/Makefile*
- use PARSELISTENV instead of POPULATEENV, and add variables like DESTDIR
- other minor tweaks

*/list*
- replace @@MACHINE@@ with ${MACHINE}
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.3 2002/02/07 11:39:17 lukem Exp $
d37 1
a37 1
	    ${LISTS} > ${.TARGET}.tmp
@


1.3
log
@- improve error checking
- add support for passing variables to parselist.awk that are used to replace
  text in each line of the lists.  currently supported strings:
	text		variable
	----		--------
	@@MACHINE_ARCH@@	MACHINE_ARCH
	@@MACHINE@@	MACHINE
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.2 2002/02/05 23:16:16 lukem Exp $
d12 12
d36 1
a36 2
	awk -f ${_PARSELIST} -v mode=crunch \
	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} \
@


1.2
log
@use CLEANFILES to remove cruft
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.crunch,v 1.1 2002/02/03 15:24:43 lukem Exp $
d24 3
a26 1
	awk -f ${_PARSELIST} -v mode=crunch ${LISTS} > ${.TARGET}.tmp
@


1.1
log
@distrib/common - shared files for building distribution media, initially
comprising of:

    Makefile.crunch
	build a crunchgen(1)ed binary from the provided lists

    Makefile.image
	build a tree from the provided lists, and
	build an ffs file system image from that tree using makefs(8),
	without requiring root privileges

    parselist.awk
	parse list files generating different output:
		crunchgen config
		mtree specfile
		sh commands to populate a tree
@
text
@d1 1
a1 1
#	$NetBSD$
d27 2
d38 1
a38 2
	rm -f ${CRUNCHBIN} ${CRUNCHBIN}.mk ${CRUNCHBIN}.cache \
	    ${CRUNCHBIN}.conf* *.o *.cro *.c
@

