History log of /netbsd-current/distrib/common/Makefile.crunch
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.27 11-May-2022 rin

Introduce NOIEEE80211 option, by which IEEE 802.11 support is dropped from
ifconfig(8) in crunched binaries. This saves ~9KB for, e.g., m68k.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.26 29-Dec-2019 christos

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)


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.25 01-Feb-2014 matt

branches: 1.25.26;
Pass DBG to crunchgen so it can get into the created mk file.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.24 19-Oct-2008 apb

branches: 1.24.18; 1.24.24;
Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base mjf-devfs-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.23 10-Nov-2005 dsl

branches: 1.23.20;
Stop make wingeing when the crunchgen binary can't be located.


# 1.22 07-Nov-2005 dsl

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


# 1.21 05-Sep-2005 dsl

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)


# 1.20 04-Sep-2005 dsl

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.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.19 10-Feb-2005 jmc

Make the crunchgen generated makefile regen on each run


# 1.18 19-Jan-2005 lukem

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.


# 1.17 18-Jan-2005 lukem

Only support SMALLPROG_INET6 if ${USE_INET6} != "no".
Part of PR 28994.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.16 10-Jul-2003 lukem

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.


# 1.15 18-May-2003 lukem

Don't force "make -j 1" any more, since David Laight appears to have
fixed the parallel-make issues in crunchgen generated Makefiles.


# 1.14 15-May-2003 dsl

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)


# 1.13 09-May-2003 dsl

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.


# 1.12 11-Mar-2003 lukem

add multiple-include protection.
clean up some comments.


Revision tags: fvdl_fs64_base
# 1.11 17-Oct-2002 lukem

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.


# 1.10 29-May-2002 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.


Revision tags: netbsd-1-6-base
# 1.9 02-May-2002 lukem

branches: 1.9.2;
support optional CRUNCHENV - environment variables to pass to
crunchgen(1) and the make -f ${CRUNCHBIN}.mk.
defaults to SMALLPROG=1


# 1.8 26-Apr-2002 lukem

replace _SRC_TOP_ with NETBSDSRCDIR, since the latter is the "public" version


# 1.7 12-Apr-2002 lukem

move default PARSELISTENV and related goop into separate Makefile.parselist,
and add DISTRIBDIR to PARSELISTENV.


# 1.6 02-Apr-2002 lukem

Add support for optional ${CRUNCHGEN_FLAGS}.
Per discussion with Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>


# 1.5 17-Mar-2002 lukem

add missing backslash. noted by Havard Eidnes


# 1.4 14-Mar-2002 lukem

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}


# 1.3 07-Feb-2002 lukem

- 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


# 1.2 05-Feb-2002 lukem

use CLEANFILES to remove cruft


# 1.1 03-Feb-2002 lukem

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


# 1.26 29-Dec-2019 christos

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)


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.25 01-Feb-2014 matt

Pass DBG to crunchgen so it can get into the created mk file.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.24 19-Oct-2008 apb

branches: 1.24.18; 1.24.24;
Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base mjf-devfs-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.23 10-Nov-2005 dsl

branches: 1.23.20;
Stop make wingeing when the crunchgen binary can't be located.


# 1.22 07-Nov-2005 dsl

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


# 1.21 05-Sep-2005 dsl

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)


# 1.20 04-Sep-2005 dsl

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.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.19 10-Feb-2005 jmc

Make the crunchgen generated makefile regen on each run


# 1.18 19-Jan-2005 lukem

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.


# 1.17 18-Jan-2005 lukem

Only support SMALLPROG_INET6 if ${USE_INET6} != "no".
Part of PR 28994.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.16 10-Jul-2003 lukem

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.


# 1.15 18-May-2003 lukem

Don't force "make -j 1" any more, since David Laight appears to have
fixed the parallel-make issues in crunchgen generated Makefiles.


# 1.14 15-May-2003 dsl

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)


# 1.13 09-May-2003 dsl

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.


# 1.12 11-Mar-2003 lukem

add multiple-include protection.
clean up some comments.


Revision tags: fvdl_fs64_base
# 1.11 17-Oct-2002 lukem

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.


# 1.10 29-May-2002 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.


Revision tags: netbsd-1-6-base
# 1.9 02-May-2002 lukem

branches: 1.9.2;
support optional CRUNCHENV - environment variables to pass to
crunchgen(1) and the make -f ${CRUNCHBIN}.mk.
defaults to SMALLPROG=1


# 1.8 26-Apr-2002 lukem

replace _SRC_TOP_ with NETBSDSRCDIR, since the latter is the "public" version


# 1.7 12-Apr-2002 lukem

move default PARSELISTENV and related goop into separate Makefile.parselist,
and add DISTRIBDIR to PARSELISTENV.


# 1.6 02-Apr-2002 lukem

Add support for optional ${CRUNCHGEN_FLAGS}.
Per discussion with Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>


# 1.5 17-Mar-2002 lukem

add missing backslash. noted by Havard Eidnes


# 1.4 14-Mar-2002 lukem

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}


# 1.3 07-Feb-2002 lukem

- 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


# 1.2 05-Feb-2002 lukem

use CLEANFILES to remove cruft


# 1.1 03-Feb-2002 lukem

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


# 1.25 01-Feb-2014 matt

Pass DBG to crunchgen so it can get into the created mk file.


# 1.24 19-Oct-2008 apb

branches: 1.24.18; 1.24.24;
Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


# 1.23 10-Nov-2005 dsl

branches: 1.23.20;
Stop make wingeing when the crunchgen binary can't be located.


# 1.22 07-Nov-2005 dsl

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


# 1.21 05-Sep-2005 dsl

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)


# 1.20 04-Sep-2005 dsl

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.


# 1.19 10-Feb-2005 jmc

Make the crunchgen generated makefile regen on each run


# 1.18 18-Jan-2005 lukem

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.


# 1.17 18-Jan-2005 lukem

Only support SMALLPROG_INET6 if ${USE_INET6} != "no".
Part of PR 28994.


# 1.16 10-Jul-2003 lukem

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.


# 1.15 18-May-2003 lukem

Don't force "make -j 1" any more, since David Laight appears to have
fixed the parallel-make issues in crunchgen generated Makefiles.


# 1.14 15-May-2003 dsl

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)


# 1.13 09-May-2003 dsl

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.


# 1.12 11-Mar-2003 lukem

add multiple-include protection.
clean up some comments.


# 1.11 16-Oct-2002 lukem

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.


# 1.10 29-May-2002 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.


# 1.9 02-May-2002 lukem

branches: 1.9.2;
support optional CRUNCHENV - environment variables to pass to
crunchgen(1) and the make -f ${CRUNCHBIN}.mk.
defaults to SMALLPROG=1


# 1.8 26-Apr-2002 lukem

replace _SRC_TOP_ with NETBSDSRCDIR, since the latter is the "public" version


# 1.7 11-Apr-2002 lukem

move default PARSELISTENV and related goop into separate Makefile.parselist,
and add DISTRIBDIR to PARSELISTENV.


# 1.6 01-Apr-2002 lukem

Add support for optional ${CRUNCHGEN_FLAGS}.
Per discussion with Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>


# 1.5 17-Mar-2002 lukem

add missing backslash. noted by Havard Eidnes


# 1.4 14-Mar-2002 lukem

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}


# 1.3 07-Feb-2002 lukem

- 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


# 1.2 05-Feb-2002 lukem

use CLEANFILES to remove cruft


# 1.1 03-Feb-2002 lukem

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


# 1.9.2.1 29-May-2002 lukem

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.


# 1.23.20.1 05-Oct-2008 mjf

Sync with HEAD.


# 1.24.24.1 19-Aug-2014 tls

Rebase to HEAD as of a few days ago.


# 1.24.18.1 22-May-2014 yamt

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")