History log of /src/share/mk/
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.52 18-May-2020 jmcneill

Separate devicetree .dts -> .dtb building from kernel builds. They are now
part of a separate set, "dtb.tgz", and only built when MKDTB=yes. This
defaults to yes for earmv[67]* and aarch64, and no everywhere else.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
1.51 27-Aug-2019 kamil

Enhance the support of LLVM sanitizers

Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.

Add bsd.sanitizer.mk to share common code used by programs and libraries.

Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.


Revision tags: netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
1.50 28-May-2018 christos

branches: 1.50.2; 1.50.4;
install bsd.hostinit.mk


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE 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.49 16-Jan-2014 christos

branches: 1.49.24;
eliminate use of bsd.sys.mk from Makefiles


1.48 14-Jan-2014 christos

use bsd.syscall.mk


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
1.47 15-Nov-2012 joerg

Move the build_install logic from lib/Makefile into share/mk and re-use
it for tools. The existing logic broke for the LLVM build with the
recent .ORDER changes in make.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.46 07-Oct-2011 plunky

branches: 1.46.2; 1.46.8;
install bsd.lua.mk into DESTDIR


1.45 11-Sep-2011 mbalmer

Install new shiny bsd.clean.mk


1.44 27-Aug-2011 joerg

Add new "analyze" command to run clang's static analyzer in a directory
on all C/C++ files.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.43 07-Aug-2010 christos

don't forget to install bsd.ioconf.mk


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
1.42 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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-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 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base mjf-devfs2-base
1.41 02-May-2008 ad

- Add a bsd.kmodule.mk to build new style modules.
- Set the file suffix to .kmod


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base pc532-eol-2008 matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
1.40 12-Nov-2007 jmmv

branches: 1.40.6; 1.40.8;
Add the bsd.test.mk file

This file simplifies the build of test programs, either written in C++
or in sh. It hides the internals of atf, e.g. by silently linking
against -latf or calling atf-compile.

It also takes care of installing an Atffile for each new test directory.


Revision tags: matt-armv6-prevmlocking matt-mips64-base
1.39 05-Aug-2007 pooka

branches: 1.39.2; 1.39.4;
install bsd.klinks.mk


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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-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-3-base 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.38 12-Sep-2003 lukem

<bsd.x11.mk>: infrastructure to support reach-over builds of xsrc


1.37 31-May-2003 thorpej

If EXTERNAL_TOOLCHAIN is defined, allow the compiler to define the
location of crt{begin,end}{,S}.o and libgcc.a. Encapsulate all of
this logic into the new bsd.gcc.mk, and use it in bsd.prog.mk and
bsd.lib.mk.


1.36 05-Jan-2003 sommerfeld

Add bsd.rpc.mk to FILES


Revision tags: fvdl_fs64_base
1.35 27-Sep-2002 thorpej

Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.


1.34 30-May-2002 itojun

have bsd.endian.mk, which detects target endian.
generate *.db in target endian. (see tech-userlevel for discussions)


Revision tags: netbsd-1-6-base
1.33 14-Dec-2001 explorer

branches: 1.33.2;
install bsd.hostlib.mk, since bsd.hostprog.mk is and things in /usr/src/tools wants it.


1.32 12-Dec-2001 lukem

Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .


1.31 12-Dec-2001 tv

MKfoo=no -> NOfoo


1.30 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.29 20-Jun-2000 thorpej

branches: 1.29.2;
Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.


Revision tags: minoura-xpg4dl-base
1.28 02-May-2000 sjg

branches: 1.28.2;
Added bsd.kernobj.mk to centralize the magic for the location
of kernel configs and compiles. Relies on BSDSRCDIR being set
which is now handled by src/Makefile.inc if need be.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.27 14-Sep-1999 perry

Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.26 14-Jul-1999 wrstuden

Add bsd.hostprog.mk, a makefile for making programs used during
the build which will run on the build machine.


1.25 12-Jul-1999 thorpej

Install bsd.crypto.mk.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.24 13-Feb-1999 lukem

convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.


1.23 11-Feb-1999 tv

Create <bsd.info.mk> for Info documentation, and avoid the nasty install
stuff duplication by expressing it in terms of <bsd.files.mk>. Allow for
multiple inclusion of <bsd.files.mk> by clearing ${FILES} at the end, and
using FILES+= rather than FILES= in <bsd.info.mk>.


1.22 27-Sep-1998 lukem

don't build/install nls files if NOSHARE defined


1.21 12-Jun-1998 cgd

add bsd.kinc.mk, a template to support the new kernel include file
installation mechanism.


1.20 14-Apr-1998 agc

Move bsd.port.mk and bsd.port.subdir.mk into pkgsrc/mk (by CVS
repository copy), which is a much better place for them. Update the
Makefile to reflect these changes.


Revision tags: netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.19 09-Sep-1997 agc

branches: 1.19.2;
Install bsd.port.mk and bsd.port.subdir.mk.
This is part of the FreeBSD ports system.


1.18 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.17 27-Mar-1997 christos

Add bsd.files.mk


1.16 25-Mar-1997 christos

Add the bsd.links.mk and bsd.inc.mk


1.15 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.14 18-Oct-1996 thorpej

Use ${INSTALL}.


1.13 23-Aug-1996 mrg

make lkm's work. still need to worry about options defines...


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.12 22-Oct-1995 christos

Added include file <bsd.sys.mk> that contains lex and yacc "parallel aware"
rules. These rules are not turned on by default; they are enabled by setting
the PARALLEL variable.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.11 26-Apr-1995 jtc

install bsd.nls.mk


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
1.10 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.9 02-Jun-1994 jtc

Change BINOWN -> BINGRP where appropriate.


1.8 09-Feb-1994 cgd

kill install -d's.


1.7 15-Aug-1993 mycroft

Get rid of empty targets; the defaults are now correct.


1.6 15-Aug-1993 mycroft

Makefile: Use `install -d' to create directory.
bsd.dep.mk: Add defaults for `beforedepend' and `afterdepend'.
sys.mk: 8 tabs --> space


1.5 15-Aug-1993 mycroft

Install bsd.dep.mk and bsd.obj.mk.


1.4 31-Jul-1993 mycroft

Add RCS indentifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base netbsd-0-8 netbsd-alpha-1
1.3 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


1.2 08-Apr-1993 cgd

try to do the right thing, in terms making directories before we
install into them, and get the manpage cleans _OUT_ of "clean".
they don't belong there, only in cleandir, WFJ be damned.


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


1.457 16-Dec-2025 riastradh

Add logic for /usr/lib/private libraries.

New variables for makefiles to define:

<bsd.lib.mk> LIBSUBDIR -- If nonempty, install library into
${LIBDIR}/${LIBSUBDIR} instead of ${LIBDIR}. Typically set
either to empty or to `private'.

<bsd.lib.mk> LIBDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking library. Note: Should only be used inside
private libraries, not inside public libraries to link against
private libraries, which can't work -- see comment.

<bsd.prog.mk> PROGDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking program.

(XXX bsd.lib.mk/bsd.prog.mk should figure LIBDPSUBDIRS/PROGDPSUBDIRS
out automatically by LIBDPLIBS/PROGDPLIBS, but for now we don't have
that mechanism -- TBD in subsequent work.)

Libraries that we want to install because we use them in binaries we
ship, but that we want to keep private from applications so we don't
have to worry about ABI breakage or leakage into pkgsrc builds,
should generally set:

LIBSUBDIR= private # Install into /usr/lib/private.
NOCOMPAT= # defined # Don't build compat lib.
NOLINKLIB= # defined # Don't install .so link or .a lib.

(XXX Maybe we should have a `LIBISPRIVATE= installed' or something
for this combination of options, but for now I'm putting in the
minimal mechanism to implement this and we can condense a common
pattern later.)

Programs using the library will also have to set

PROGDPSUBDIRS+= private

so that they will get the rpath /usr/lib/private.

PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib


1.456 30-Sep-2025 gutteridge

bsd.README: .man.8 is also a target

It was added with the xdm(8) move a year ago.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.455 27-Jun-2025 andvar

Grammar and spelling fixes, mainly in comments. A few in documentation,
logging, test description, and SCSI ASC/ASCQ assignment descriptions.


1.454 28-Jan-2025 christos

no more libbind9


1.453 02-Nov-2024 christos

make zstd a private library (for now)


1.452 31-Oct-2024 christos

Add zstd


1.451 23-Oct-2024 kalvisd

Add mopcopy as a build tool for the VAX port.

OK rin@


1.450 24-Sep-2024 christos

Add some new X libraries, sort again. There are more missing...
(run ./compare-lib-lists after you install the .mk files)


Revision tags: perseant-exfatfs-base-20240630
1.449 28-Jun-2024 riastradh

bsd.lib.mk: Resolve VERSION_MAP like a target prerequisite.

Not sure what I did before to make ${${VERSION_MAP}:P} fail to work;
can't reproduce it any more!

PR lib/58376


1.448 28-Jun-2024 riastradh

bsd.lib.mk: New variable VERSION_MAP.

This updates LDFLAGS with the right -Wl,--version-script=... argument
as well as DPADD so that changing the version script causes the
library to be rebuilt.

Name chosen to match FreeBSD.

PR lib/58376


Revision tags: perseant-exfatfs-base
1.447 05-Apr-2024 christos

branches: 1.447.2;
- Create 3 new variables:
MAKELINKLIB that follows MKLINKLIB but can be overwritten by Makefiles
MAKESTATICLIB that follows MKSTATICLIB but can be overwritten by Makefiles
LINKINSTALL that follows MAKELINKLIB but can be overwritten by Makefiles
These give enough control to the module Makefiles so that they don't need
to override the default library install rules which break the debug sets.
- Remove /usr/libexec/named which duplicated /usr/lib/named


1.446 23-Mar-2024 riastradh

bsd.lib.mk: Tidy up expected symbols check a little.

Add some documentation in bsd.README.


1.445 22-Jul-2023 lukem

bsd.README: sync with mk.conf(5), deduping entries

Remove most duplication of variables already documented in mk.conf(5).
Add lists of supported and obsolete mk.conf(5) variables
so that searches in this document at least find them
(as per BUILDING).

Sync text from mk.conf(5) for entries that remain.
Explicitly document DESTDIR and RELEASEDIR.

Replace MKMAN=no antipattern with NOMAN=.

Consistently use "option" versus "flag"; option is more generic,
and may include a flag with an argument.


1.444 05-Jun-2023 lukem

bsd.README: update to reality, sync from mk.conf(5)

Sync user variables from mk.conf(5), sorted.
(Arguably this could just refer to mk.conf(5)
or share/man/man5/mk.conf.5 and remove the copypasta.)

Document NOxxx overrides in own subsection.

Unexpand tabs, tweak after.


1.443 24-May-2023 lukem

deprecate SHAREDSTRINGS build option

Hasn't worked for at least 20 years (and never in the cross-build environment,
nor did it work with parallel make), and has never been needed in NetBSD as we
don't have the older BSD programs (pascal, pre-nvi ex) that needed mkstr/xstr
on PDP-11.

PR toolchain/35964


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.442 01-Oct-2022 rillig

fix documentation for MKLINT

Since share/mk/bsd.own.mk 1.749 from 2013-08-26, MKLINT defaults to no.


1.441 21-Aug-2022 lukem

Deprecate extsrc/, EXTSRCSRCDIR, MKEXTSRC

Remove support for building extsrc/:
1. Makefile: remove do-extsrc target.
2. build.sh: remove options -y and -Y extsrcdir.
3. distrib/sets: remove support for extsrc in various tools
including the options -L ext and -y, and the extsrc sets.
4. doc/BUILDING.mdoc: remove docs for extsrc/, EXTSRCSRCDIR, MKEXTSRC (etc)
5. bsd.own.mk and various Makefiles: remove support for extsrc/,
EXTSRCSRCDIR, MKEXTSRC.

As proposed on tech-kern and tech-userlevel on 2022-01-07
and followed up on 2022-08-21.


1.440 14-Jul-2022 mrg

add libxcvt.


1.439 06-Jun-2022 nia

build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.


1.438 29-May-2022 nia

mk: Add MKTIMED and MKMOUSED flags for compiling NetBSD without timed
and moused


1.437 29-May-2022 nia

mk: Add a MKPPP flag to exclude pppd(8) and related utilities from
the build


1.436 28-May-2022 nia

mk: Add MKFINGER, MKTALK flags for not building
talk, talkd, finger, fingerd.


1.435 28-May-2022 nia

mk: Add MKNTP, MKTCPDUMP knobs.


1.434 27-May-2022 nia

mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.


1.433 26-May-2022 nia

mk: Document that some options were enabled by default on aarch64


1.432 25-May-2022 nia

mk: Rename the MKMBONE option to MKMROUTING for greater accuracy and
to match the related kernel config option.


1.431 25-May-2022 nia

mk: Allow setting MKDHCPD=no to build base without the ISC DHCP server,
useful for embedded images that don't need to act as one.


1.430 25-May-2022 nia

mk: Allow building base without the MBONE applications by setting
MKMBONE=no in mk.conf


1.429 20-May-2022 andvar

s/appropiate/appropriate/ in comments and readme file.


1.428 23-Dec-2021 christos

remove extra C in OBJCOPTS (from Anon Ymous)


1.427 20-Dec-2021 christos

Rename:
MKKDEBUG -> MKDEBUGKERNEL
MKTOOLSDEBUG -> MKDEBUGTOOLS
while keeping compatibility with the old names. Add missing documentation.
Now all debugging tunables are prefixed with MKDEBUG.


1.426 20-Dec-2021 christos

PR/55557: Andreas Gustafsson" Introduce a new variable MKDEBUGKERNEL which
as the name implies, includes a netbsd.gdb inside each kernel set:
$ tar -tzvf kern-GENERIC.tgz
-rwxr-xr-x 0 root wheel 29398264 Dec 19 12:50 ./netbsd
-rwxr-xr-x 0 root wheel 208125880 Dec 19 12:50 ./netbsd.gdb


1.425 05-Dec-2021 msaitoh

s/specificed/specified/ in comment.


1.424 05-Dec-2021 msaitoh

s/from from/from/ in comment.


1.423 28-Nov-2021 christos

For private and module libraries, build lint but do not install the lint
libraries. We want to lint the private library code and we want to be able
to link against the lint libraries, for example llib-largon2 from cgdconfig
which is accessed via PROGDPLIBS.


1.422 01-Nov-2021 nia

mk: Add support for conditional compilation of parts of the tree with
partial RELRO when MKRELRO=full is set.

Currently the X server needs to be compiled with only partial RELRO
due to the way certain (but not all - it seems wsfb works with full
RELRO) graphics driver modules are loaded.


1.421 27-Oct-2021 ryo

revert previous: http://mail-index.netbsd.org/source-changes/2021/10/25/msg133295.html

going to add __always_inline to the functions called from _mcount()
discussed on http://mail-index.netbsd.org/source-changes-d/2021/10/25/msg013480.html


1.420 25-Oct-2021 ryo

In some arch, _mcount() would be called recursively when built with COPTS=-O0.

Normally, functions called from mcount.c are expected to be expanded inline,
so _mcount() will never be called recursively. But when build with COPTS=-O0,
`static inline' functions aren't inlined, and _mcount() will be called
recursively.

Even if _mcount() has `__attribute__((__no_ instrument_function__))',
it has no effect on the calling external (no-inlined) function.

To avoid this, PROF.<fn> is added can be set the profiling flag of any file.
"PROF.mcount.c" is set to blank by default, mcount.c itself is compiled
without -pg.


1.419 14-Oct-2021 nia

mk: Enable MKARGON2 now that this stuff works.


1.418 26-Sep-2021 maya

Restore MKNOUVEAUFIRMWARE and MKRADEONFIRMWARE and make gpufw set unconditional

Simplifies logic.
(Second commit - first one was partial)

Restoring MK* requested by mrg on tech-kern discussion
https://mail-index.netbsd.org/tech-kern/2021/09/25/msg027695.html


1.417 25-Sep-2021 maya

Move DRM-driver firmware from base to its own set, gpufw

This set is only installed on amd64,i386,evbarm.
This set is installed on minimal installs and on install media, in
case someone needs it for basic driver functionality.

Comments:
Switched to a single MK tunable for it - that is probably unneeded.

An upcoming DRM update will include even fatter firmware, and we'd
like to minimize the impact of it.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.416 24-Mar-2021 simonb

Add aarch64 and sparc64 to MKZFS yes.
Sort the machine names for the "Default: yes on ..." lines.


1.415 10-Nov-2020 kamil

Reintroduce the support of MKCATPAGES

Requested by <mrg>


1.414 08-Nov-2020 kamil

Stop mentioning the support for cat pages


1.413 08-Nov-2020 kamil

Remove the support for MKCATPAGES

It was optional since 1999 and disabled by default since 2012.

Proposed on tech-userlevel@.


1.412 16-Oct-2020 nia

share/mk: Define some missing X11 libraries.


1.411 26-Jul-2020 rillig

share/mk/bsd.README: fix typo


1.410 13-Jul-2020 mrg

MKLLVMRT is automatically enabled on x86 and arm64, not mesa18+.


1.409 02-Jul-2020 jmcneill

Document OBJMACHINE_ARCH


1.408 21-Jun-2020 lukem

document PROGS and PROGS_CXX, and default c++ SRCS


1.407 15-Jun-2020 christos

Rename blacklist -> blocklist


1.406 01-Jun-2020 christos

1. if ${LIBISPRIVATE} == "pic", create _pic.a so that we can embed the library
to another shared object
2. Don't compare ${LIBISPRIVATE} to "yes", because there are 3 places in
Makefiles which set it to empty (this was a bug)
3. For private libraries, don't create .so* files


1.405 30-May-2020 christos

Make libuv private, requested by joerg@


1.404 24-May-2020 christos

Add libuv


1.403 18-May-2020 jmcneill

Separate devicetree .dts -> .dtb building from kernel builds. They are now
part of a separate set, "dtb.tgz", and only built when MKDTB=yes. This
defaults to yes for earmv[67]* and aarch64, and no everywhere else.


1.402 02-May-2020 christos

document MKCOMPATMODULES


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
1.401 04-Apr-2020 christos

Document and set a default for KERNEL_DIR


1.400 04-Apr-2020 christos

Add libgnuctf


1.399 24-Mar-2020 mrg

note that MKLLVMRT affects more than amdgpu.


1.398 03-Mar-2020 christos

Add fido and cbor


Revision tags: is-mlppp-base
1.397 22-Nov-2019 martin

Document NETBSD_OFFICIAL_RELEASE and add it to /etc/release - it is
important information when trying to reproduce a build.


Revision tags: phil-wifi-20191119
1.396 18-Nov-2019 christos

Improve the script to check for installed libraries, and fix the wrong
names and obsolete libraries it found.


1.395 31-Oct-2019 martin

PR misc/54657: let RELEASEMACHINEDIR default to ${MACHINE}-${MACHINE_ARCH}
for evb{arm,mips,sh3}*.


1.394 10-Aug-2019 christos

Make the X11 library lists consistent again.


Revision tags: netbsd-9-base
1.393 24-Jul-2019 roy

branches: 1.393.2;
MKBSDTAR now defaults to yes

Starting to see some modern archives not opening, it's time to make them
work!

OK joerg@ agc@


1.392 20-Jul-2019 wiz

Install the nouveau gm206 firmware as used by my graphics card.

Also add the other gm20x nouveau firmwares to the source tree
to make it easier to add them for someone who can test them.

Installed if MKNOUVEAUFIRMWARE is set to 'yes'.
This defaults to no except on amd64 and i386 (like for radeon).


Revision tags: phil-wifi-20190609
1.391 19-Apr-2019 kamil

Fix typo cost -> host


1.390 07-Apr-2019 christos

Add -r so that we get the location of redefinitions


1.389 03-Apr-2019 joerg

Use and enable MKLLVMRT for HAVE_MESA_VER=18.


1.388 03-Apr-2019 joerg

Document MKLLVM.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118
1.387 01-Jan-2019 christos

document the elf2foo tools.
The bsd.sys.mk tools are un-prefixed, since the "right" version is installed
for the platform, as opposed to the tools ones which should be able to
co-exist.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126
1.386 15-Nov-2018 martin

Explicitly document the incompatibility between USE_PIGZGZIP
and USE_XZ_SETS. Disable the latter if the former is enabled.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
1.385 29-Sep-2018 martin

Add defaults and documentation for USE_XZ_SETS - a new variable
controlling whether an architecture will use .tgz or tar.xz
sets.


1.384 16-Sep-2018 christos

add what {PROG,LIB}DPLIBS are useful for


1.383 16-Sep-2018 christos

document PROGDPLIBS


Revision tags: pgoyette-compat-0906
1.382 12-Aug-2018 christos

fix broken library variable definitions (inconsistencies between
bsd.README and bsd.prog.mk)


Revision tags: pgoyette-compat-0728
1.381 25-Jul-2018 kamil

Document MKLIBCSANITIZER in bsd.README

It's a special kind of a sanitizer inside libc.


1.380 25-Jul-2018 kamil

Document the default value of MKSANITIZER in bsd.README

This value is set to "no".


1.379 12-Jul-2018 joerg

Update MKSTATICPIE entry to actually do something.


1.378 12-Jul-2018 maxv

Retire libpmc. It uses the legacy PMC interface in the kernel, which has
support for only one ARM CPU. It used to have x86 support, but it was broken
and I removed it. The legacy PMC interface will be removed from the kernel
too. Sent on tech-kern@ yesterday, thorpej was fine.


Revision tags: phil-wifi-base
1.377 25-Jun-2018 kamil

branches: 1.377.2;
Rephrase the documentation of MKSANITIZER

Based on the feedback from <f8l> and <pgoyette>.


Revision tags: pgoyette-compat-0625
1.376 24-Jun-2018 kamil

Enhance the documentation of MKSANITIZER in bsd.README

Note that the list of sanitizer features is just a selection, not a
complete list. Include there LSan and Scudo. Missing: hwmsan, esan,
ubsan_minimal etc.

Explain that USE_SANITIZER is an argument passed to -fsanitize= and it can
contain multiple options.

Mention SANITIZERFLAGS to pass even more sanitizer arguments.

Stop tracking in this file what compiler compiles what features. Just note
that the selection of supported features depends on a compiler version and
target CPU architecture.


1.375 03-Jun-2018 wiz

Fix MKFIRMWARE description.


1.374 03-Jun-2018 wiz

Fix MKSANITIZER default in description.


1.373 02-Jun-2018 christos

Add build glue to build all the code with sanitizers: MKSANITIZE.


1.372 31-May-2018 mrg

introduce MKFIRMWARE that controls where (most) of the contents
of /libdata/firmware and /usr/libdata/firmware are not installed
if set to "no". from the bsd.README:

MKFIRMWARE If "no", install the /libdata/firmware directory,
which is necessary for several drivers: athn(4), bwfm(4),
ipw(4), iwi(4), iwm(4), iwn(4), otus(4), rtwn(4), urtwn(4),
wpi(4), ral(4), rum(4), run(4), zyd(4), bcm43xx(4), and
the Tegra 124 SoC.
Default: yes on amd64, cobalt, evbarm evbmips, evbppc, hpcarm,
hppa, i386, mac68k, macppc, sandpoint, and sparc64, no elsewhere.

convert MKRADEONFIRMWARE and MKTEGRAFIRMWARE into FOO.arch lists,
and move their defaults above the general defaults setting.

saves about 12MB in a normal installation for other platforms.


Revision tags: pgoyette-compat-0521
1.371 09-May-2018 joerg

Document that EXTERNAL_TOOLCHAIN should be used together with HAVE_GCC
or HAVE_LLVM.


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
1.370 01-Apr-2018 ryo

Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)


Revision tags: pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
1.369 11-Mar-2018 mrg

define LIBXFONT2.


1.368 11-Mar-2018 mrg

stop building libXfontcache as it is obsolete for a decade.


Revision tags: pgoyette-compat-base
1.367 01-Mar-2018 snj

branches: 1.367.2;
remove mention of /usr/X11R6


1.366 07-Jan-2018 jmcneill

Import NVIDIA Tegra XUSB firmware for Tegra124 and Tegra210. Installation
of this firmware is controlled by the MKTEGRAFIRMWARE option, which
defaults to yes on evbarm and evbarm64 and no everywhere else.


1.365 25-Nov-2017 jmcneill

Add LIBREFUSE define for DPADD


1.364 01-Nov-2017 khorben

Typo


1.363 08-Oct-2017 christos

Add variables for static PIE


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base
1.362 21-May-2017 riastradh

Remove MKCRYPTO option.

Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export. The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated. I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet... That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.


1.361 21-May-2017 riastradh

Remove some vestiges of MKCRYPTO_IDEA/MKCRYPTO_MDC2.


1.360 21-May-2017 riastradh

Remove MKCRYPTO_RC5. Unconditionally include RC5 in libcrypto.so.

This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate. The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at
<https://www.uspto.gov/patent/laws-and-regulations/patent-term-calculator#heading-5>
(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number filing date
5,724,428 1995-11-01
5,835,600 1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html


Revision tags: prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
1.359 20-Apr-2017 ozaki-r

Introduce MKSTRIPSYM build option

If it's yes, all local symbols of shared libraries are stripped
(default). If it's no, only temporary local symbols are stripped;
for example, symbols of static functions are kept. Keeping such
symbols is useful on using DTrace for userland libraries and
getting a backtrace from a rump server loading modules (shared
libraries).

Proposed and discussed on tech-kern and tech-toolchain


Revision tags: pgoyette-localcount-20170320
1.358 08-Feb-2017 kamil

libpthread_dbg(3) deletion from the base distribution

libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>


Revision tags: bouyer-socketcan-base
1.357 07-Jan-2017 christos

branches: 1.357.2;
add nsd


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
1.356 20-Aug-2016 christos

mention the default for MKUNBOUND


1.355 20-Aug-2016 christos

unbound additions


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.354 14-Jun-2016 christos

branches: 1.354.2;
Add and document MKRELRO and set x86 to partial by default.


1.353 13-Mar-2016 christos

Add NO{SSP,FORTIFY}


1.352 21-Feb-2016 christos

Add NODEBUG


1.351 20-Feb-2016 christos

Provide a variable MKTOOLSDEBUG to build debugging versions of tools.


1.350 07-Feb-2016 christos

fix pasto


1.349 01-Feb-2016 christos

Document NOCTF, NOPIE.


1.348 22-Nov-2015 kamil

Add new predefined value for DPADD: LIBPANEL


1.347 07-Nov-2015 christos

LIBEXECINFO


1.346 23-Jul-2015 mrg

remove the xfree86 reachover makefiles and the vast majority of
the support in the rest of the source tree.

X11 sets could use some cleaning up perhaps (just deletion, as
we've never really marked the old X11R6 as obsolete for native
xorg using platforms so far either.)


1.345 27-Jun-2015 matt

Add MKCOMPATX11 knob for making X11 compat libraries.


1.344 19-Jun-2015 matt

Add MKCOMPATTESTS knob to enable building and installing the NetBSD test
suite as part of doing MKCOMPAT


1.343 18-Jun-2015 pooka

add READELF and STRINGS


1.342 28-May-2015 rjs

Build both xf86-video-radeon drivers for amd64 and i386, just build the
old one for other ports.


1.341 26-Apr-2015 mrg

two changes to radeon drm firmware:
- only install it by default on x86, set new MKRADEONFIRMWARE variable
- install in /libdata, so that separate /usr systems work

(this still doesn't solve PR#49811, which possibly could be handled by
having them being a kernel module loaded by /boot.)


1.340 22-Apr-2015 pooka

Build ZFS by default only for amd64, not i386.

If we build i386 for 486 (i.e. no 64bit atomic ops) and as a substitute
for the modern hardware that the code was designed to run on use solid
workarounds like external/cddl/osnet/lib/libzpool/atomic.c, there's not
much point in anything.


1.339 17-Mar-2015 mrg

fix the description of MKX11RADEONKMS, as pointed out in PR#49753.


1.338 01-Mar-2015 mrg

add build framework to choose between xf86-video-ati 6.x (UMS/KMS)
and 7.x (KMS only), and switch x86 to the latest (KMS only) version.

(if someone can make x86 install both radeon_drv.so.[67] and leave
the default symlink to .7, that would be nice. renaming it so that
it's easier to choose via xorg.conf is a little more tricky..)


1.337 30-Nov-2014 uebayasi

Add a new build make variable, CONFIGOPTS, which is passed to config(1)
when building kernels. Revert "mkernel=*" and "mkernels" in favor of
this option.

Diff posted on source-changes-d@, approved by (null).


1.336 06-Sep-2014 christos

Add WARNS=6


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
1.335 05-Aug-2014 apb

branches: 1.335.2;
Provide and document GZIP_N_FLAG and TOOL_GZIP_N.
These may be used to pass "-nT" instead of just "-n"
when the gzip program is actually pigz.


1.334 06-Jul-2014 dholland

Add MKGROFFHTMLDOC and make it default to no. It seems that sometimes
when generating html groff runs netpbm behind your back. Needless to
say we don't have netpbm in base, so this fails on a clean install; so
for now disable generating html for /usr/share/doc by default.
Workaround for PR 48970.

It seems that all available document preparation toolchains are made
of fail.


1.333 05-Jul-2014 dholland

Remove HTMLDOCDIR; it is no longer used (and doesn't fit the docs
scheme) and it was never honored anyway except in a couple places.


Revision tags: yamt-pagecache-base9
1.332 08-May-2014 phx

Use TOOL_NCDCS to turn an ibmnws kernel automatically into a valid NCD
firmware image for netbooting. This is still a valid ELF kernel, but with
a patched CRC checksum and image size included.


1.331 05-May-2014 martin

As discussed on tech-toolchain, offer a new make variable MKKDEBUG - if
set to "yes", kernel builds will gain debug info and a netbsd.gdb will
be created (same as adding "makeoptions DEBUG=-g" to the config file).


1.330 18-Apr-2014 christos

Add -g (gnu) so lint recognizes __attribute__


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
1.329 25-Mar-2014 ozaki-r

branches: 1.329.2;
Add MKCTF

This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.


Revision tags: riastradh-drm2-base3
1.328 24-Feb-2014 skrll

Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.


1.327 27-Jan-2014 apb

Document TOOL_GZIP.


1.326 16-Jan-2014 christos

- Add a new bsd.host.mk that contains all the HOST_ variables extracted from
bsd.sys.mk and bsd.own.mk
- Add protection requiring that:
1. bsd.sys.mk is not include from other Makefiles directly
2. bsd.own.mk must be included before bsd.sys.mk since it
sets variables that bsd.sys.mk uses as conditionals.

This is step 1 of removing all variable settings from bsd.sys.mk and
leaving behind only rules. This way, the structure of a standard Makefile
is:
variable overrides

optionally include bsd.own.mk
optionally include bsd.endian.mk

variable settings that use variables defined in bsd.own.mk

include a one or more rule .mk files (such as bsd.prog.mk etc)


1.325 14-Jan-2014 christos

use bsd.syscall.mk


1.324 14-Jan-2014 apb

Document new default for MKARZERO.


1.323 06-Dec-2013 matt

Describe MACHINES.${MACHINE_CPU}. <fixme>
Add sparc64 to MACHINES.sparc since sparc64 can be build as sparc.


1.322 11-Nov-2013 joerg

Relink binaries if crti.o changes.


1.321 28-Oct-2013 mrg

add MKDEPCXX, that is used for C++ files depend creation. also
add some missing ${COPTS.${.IMPSRC:T}} and ${CPUFLAGS.${.IMPSRC:T}}
to the dependancy rules.

this makes it possible to have C++ files .d files created with the
C++ compiler, and with the normal options for this file, which
means that we can build libstdc++-v3 from gcc 4.8.


1.320 29-Sep-2013 christos

Add libxcb


1.319 03-Aug-2013 adam

Fixed a typo


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
1.318 02-Jun-2013 mbalmer

New variable MKX11MOTIF to enable building libGLw with Motif support.
Defaults to 'no'.


1.317 31-May-2013 mrg

add LIBX11_XCB; unfortunately since the library is named with a -
in it, we have to use an ugly hard coded assignment for now.
(could be cleaned up with more make variable magic i'm sure.)


1.316 28-Apr-2013 joerg

MKLIBCXX and MKLIBSTDCXX


1.315 11-Apr-2013 christos

add new libevent2 libraries.


Revision tags: agc-symver-base
1.314 05-Mar-2013 christos

MKDEPINCLUDES support.


1.313 16-Feb-2013 jmmv

Hook Lutok into the build. This is all protected by the MKKYUA guard.


1.312 15-Feb-2013 jmmv

Add the MKKYUA knob.

MKKYUA defaults to no and will remain as such until the import is complete
and validated.

This knob does not currently have any effects on the build as nothing relies
on it yet. Upcoming imports and changes in this area will all be guarded by
this flag.


1.311 10-Feb-2013 jmcneill

add TOOL_MKNOD


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
1.310 02-Dec-2012 apb

Document MAKEDIRTARGETENV


1.309 24-Nov-2012 alnsn

Document MKSLJIT variable.


1.308 19-Nov-2012 apb

On second thoughts, don't run "rm -rf" in bsd.clean.mk. Instead,
document that CLEANFILES and CLEANDIRFILES must not contain
directory names.


1.307 13-Nov-2012 pooka

Make it easier build binaries against the host's libs, e.g.
libpthread which might be in /lib/x86_64-linux-gnu/libpthread.so.0
or some other unholy place.


1.306 04-Nov-2012 christos

add MKTPM, default to no


1.305 04-Nov-2012 apb

Add _NETBSD_VERSION_DEPENDS in bsd.own.mk. Targets that need
to be re-generated when the NetBSD version numberchanges,
or when any build-related variables change, may depend on
${_NETBSD_VERSION_DEPENDS}.


Revision tags: yamt-pagecache-base6
1.304 02-Oct-2012 jkoshy

Document the MKKMOD build knob.


1.303 30-Sep-2012 jkoshy

Note that the MKCOMPAT build knob is supported on mips64-based
architectures.


1.302 29-Sep-2012 jkoshy

Document the MKDTRACE build knob.

Reviewed by: apb


1.301 20-Sep-2012 abs

strip trailing whitespace - noted by Snader_LB on IRC


1.300 23-Aug-2012 joerg

branches: 1.300.2;
Revert last, it breaks the tricks xsrc uses.


1.299 23-Aug-2012 joerg

Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if
SHLIBDIR differs from /usr/lib.


1.298 08-Aug-2012 christos

add MKRUMP by popular demand.


1.297 14-Jul-2012 spz

more MKCRYPTO_IDEA and MKCRYPTO_MDC2 removal (resp, adjustment to IDEA and
MBC2 now always being included)
MKCRYPTO_RC5 now builds shared libs, add the missing files to sets


1.296 19-Jun-2012 plunky

since we seem to have grown a WARNS=5, list it here


1.295 25-May-2012 wiz

Document MKREPRO here as well.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
1.294 29-Feb-2012 tron

Move "libexpat" from X11 into base which fixes PR lib/40346.
This change was approved by the Core Group.


1.293 17-Feb-2012 joerg

Derive MANINSTALL from MKCATPAGES and MKHTML.


Revision tags: netbsd-6-base
1.292 07-Feb-2012 joerg

branches: 1.292.2;
Sync with reality for MKCATPAGES and MKMANDOC.


1.291 28-Jan-2012 christos

Provide a way to override the default objcopy flags for library modules.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2
1.290 05-Nov-2011 christos

Add libtre


Revision tags: yamt-pagecache-base
1.289 16-Oct-2011 christos

branches: 1.289.2;
rump not rum


1.288 16-Oct-2011 christos

fix list of libraries to reflect reality.


1.287 05-Oct-2011 apb

Add MKCLEANSRC and MKCLEANVERIFY variables, defaulting to "yes".
You may set them to "no" to get the old behaviour of "make clean"
and "make cleandir".


1.286 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.285 09-Sep-2011 apb

Document the FILESBUILD variable, which was added in
bsd.files.mk revision 1.41 dated 2010-02-03.


1.284 30-Jun-2011 matt

Replace gzip with ${TOOL_GZIP} in manual compression.
Modify the description of USE_PIGZGZIP.


Revision tags: cherry-xenmp-base
1.283 30-May-2011 joerg

Add an alternative to NOGCCERROR for clang.


1.282 20-May-2011 plunky

simplify PCC inclusion; MKPCCDMDS is not really required


1.281 19-May-2011 joerg

Add fine-grained compiler selection, including clang support.


1.280 24-Mar-2011 bouyer

Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)


Revision tags: bouyer-quota2-nbase
1.279 20-Feb-2011 jmmv

Define LIBATF_C and LIBATF_CXX to point to their corresponding .a files and
use these to properly set DPADD for test programs.


Revision tags: bouyer-quota2-base
1.278 12-Jan-2011 joerg

branches: 1.278.2;
USETBL no longer disables mandoc processing.


Revision tags: matt-mips64-premerge-20101231
1.277 31-Oct-2010 mbalmer

Link Lua to the build and add the resulting files to the distribution sets.
Document the addition of Lua and the change we made to the default settings.


1.276 25-Aug-2010 reed

For MLINKS description, remove sentence saying they
are soft-linked (as it is not accurate).


1.275 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


1.274 15-Aug-2010 mrg

add new option to build/use tools/pigz for compressing sets. for now
USE_PIGZGZIP defaults to "no". (it depends upon local <pthread.h> and -lz.)

you can set it to "yes" on most modern platforms just fine.


1.273 20-Jun-2010 mrg

- note that if MKINET6 is "no", MK11 must also be "no". we don't support
building X11 without inet6 support. the support to maintain patches to
generated files and other files is too great. PR#42856
- add TOOL_PIGZ, which defaults to the (not yet default) built tools/pigz.


1.272 19-Jun-2010 mrg

- always install pigz. hooary!
- kill MKPIGZ.
- add MKPIGZGZIP. if it is "no", then only install pigz as pigz. if it is
not "no", don't install mrgzip, install pigz as gzip.

in all cases, the z* scripts.


i don't like the name MKPIGZGZIP so if anyone has a better name, feel free
to replace it. i don't care enough since killing the ugly name is just
more incentive to get pigz doing .bz2, .Z and .z.


1.271 17-Jun-2010 mrg

default MKPIGZ to "no", for now.


1.270 08-Jun-2010 riz

Note that MKZFS is actually "yes" on i386/amd64.


1.269 04-Jun-2010 jmmv

Simplify build of shell-based test cases: atf-compile is gone.


1.268 26-May-2010 njoly

Small typo.


1.267 26-May-2010 uwe

bsd.subdir.mk - don't mention "make subdir" where subdir is any
directory listed in ${SUBDIR} as ${dir}: all-${dir} alias was removed
from 11 years ago (revision 1.31)

PR bin/43356


1.266 23-Apr-2010 joerg

Add MKBSDTAR, defaulting to no. It switching cpio and tar to the
libarchive based frontends.


1.265 22-Feb-2010 njoly

Change shared object file extension from .so to .pico, to avoid
conflicts with shared libaries names libXX.so; as recently seen with
MKUPDATE=yes builds for libelf and libnvpair.

All now stalled regular .so files need to be manually removed from
object directories.


1.264 03-Feb-2010 roy

Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@


1.263 30-Dec-2009 abs

Add note on SHLIB_{MAJOR,MINOR,TEENY}


1.262 23-Dec-2009 tron

LVM gets built by default these days.


1.261 23-Dec-2009 tron

Fix typo.


Revision tags: matt-premerge-20091211
1.260 30-Nov-2009 uebayasi

Support "extsrc", externally added programs and libraries. Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org. (These sets are not included as TNF releases.)


1.259 15-Nov-2009 pgoyette

Add a period at the end of a sentence.


1.258 12-Nov-2009 tron

Remove "USE_SSP_DEFAULT".


1.257 12-Nov-2009 tron

Invent a new flag "USE_SSP_DEFAULT" which defines whether we want to use
SSP for building the whole source tree. Set this to "yes" for
NetBSD/amd64 and NetBSD/i386. It is now possible to get the old
behavior (build libs and certain programs with SSP) by setting
"USE_SSP_DEFAULT" to "no".


1.256 23-Oct-2009 joerg

Add MKMANDOC option to trigger building cat pages and HTML pages with
mdocml. Add a lintmanpages target for developers to check man pages
with the strictest settings of mandoc.


1.255 10-Oct-2009 apb

If ${NETBDSRCDIR}/../xsrc exists, then use it as the default value
of X11SRCDIR. If it doesn't exist, then use /usr/xsrc as before.

OK mrg


1.254 05-Oct-2009 haad

Add zfs sets and needed veriables to hook zfs into the build. ZFS on i386
need still one fix othervise it should be ready for testing.


1.253 29-Sep-2009 tsarna

Multicast DNS ("Bonjour") support, based on Apple's mDNSResponder.


1.252 08-Sep-2009 skrll

Rename MKBFD to MKBINUTILS and support HAVE_BINUTILS for set lists. This
makes {MK,HAVE_}BINUTILS consistent with {MK,HAVE_}{GCC,GDB}.

Allow MKBFD to defines MKBINUTILS as a backwards compatibility hook.

Update the sets lists and add conditionals for lib{bfd,opcodes}.


1.251 18-Jun-2009 mrg

implement MKX11FONTS for Xorg.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.250 12-May-2009 plunky

remove libsdp as improved functionality has been enabled in libbluetooth.


1.249 10-Apr-2009 apb

Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links. They have no effect except when using a
metalog, in which case the information is added to the metalog. In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg. This should fix PR 24457 and PR 41155.


1.248 13-Mar-2009 perry

Add a MKARZERO flag, which invokes ar(1) with the new D flag when it
is set to "yes" -- defaults to "no" except for build.sh builds. This
results in a deterministic .a file rather than one that reflects
timestamps and permissions on the source files.

Also, clean up the ar flags we're using, and remove a redundant use of
ranlib that on a modern POSIX ar can be done with the "s" flag.

Discussed on tech-toolchain


1.247 25-Feb-2009 sketch

Make grep a host tool.


1.246 22-Jan-2009 christos

branches: 1.246.2;
Document USE_FORT.


1.245 23-Dec-2008 agc

Explain what the MKLVM switch does


1.244 06-Dec-2008 mrg

add LIBISCXX. if it is != "no", use ${CXX} instead of ${CC} to link
shared libraries. use it for the one c++ library we have.

fixes PR#39936.


1.243 05-Dec-2008 cube

Implement FILESBUILD_<file> to allow a FILES element to be built through a
target.


1.242 15-Nov-2008 mrg

revert sparc back to default of XFree86 at the request of macallan.


1.241 13-Nov-2008 apb

Add support for new MAKEVERBOSE levels 3 and 4. The complete list is now:

0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command
3 Ignore the effect of the "@" prefix in make commands
4 Trace shell commands using the shell's -x flag

The default remains MAKEVERBOSE=2.


1.240 12-Nov-2008 pooka

Now that MKPUFFS is default, kill it as advertised.
While there, give puffs and refuse files sensible syspkg entries.


1.239 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


1.238 09-Nov-2008 mrg

fix a couple of minor errors picked up by he@. thanks!


1.237 09-Nov-2008 mrg

- retire MKXORG from public use
- introduce X11FLAVOUR to choose src/x11 vs src/external/mit/xorg
for the X11 to build if MKX11=yes is set. it takes the values
of either Xorg or XFree86.
- default to Xorg on alpha, i386, macppc, shark, sparc and sparc64
- remove MKXORG_WITH_XSRC_XSERVER, unused and never useful


Revision tags: netbsd-5-base
1.236 26-Oct-2008 apb

branches: 1.236.2;
Always define TOOL_* variables in bsd.own.mk, not in bsd.sys.mk.

Previously, they were defined in bsd.own.mk if USETOOLS=yes, but in
bsd.sys.mk if USETOOLS!=yes. This caused makefiles that did this:

.include <bsd.own.mk>
FOO != ${TOOL_BAR} args...

to work in the USETOOLS=yes case but not in the USETOOLS!=yes case.


1.235 26-Oct-2008 apb

Set HOST_SH?=/bin/sh unconditionally. Previously, it was conditionally
set to /usr/bin/bash if HOST_CYGWIN was defined, but now build.sh
tries to set HOST_SH appropriately.

Remove the HOST_CYGWIN variable, which was not used for any other purpose.

Document that HOST_SH should be an absolute path.

THis was proposed in tech-toolchain.


1.234 26-Oct-2008 mrg

add MKCOMPAT, to build 32 bit libs. default to no for now for everyone.


1.233 25-Oct-2008 apb

Add a NOSUBDIR variable for bsd.subdir.mk. If NOSUBDIR is defined
then SUBDIR is ignored.


Revision tags: matt-mips64-base2
1.232 19-Oct-2008 apb

Define TOOL_AWK.


1.231 17-Oct-2008 apb

Document the HOST_xxx and TOOL_xxx variable naming convention.


1.230 13-Oct-2008 apb

Add missing TOOL_* variables to bsd.sys.mk and document them in
bsd.README. Previously, several of these variables were present in
bsd.own.mk but not in bsd.sys.mk or bsd.README.


1.229 13-Oct-2008 apb

In bsd.sys.mk and bsd.own.mk, sort lists of TOOL_* variables.
In bsd.README, document all TOOL_* variables that are set in bsd.sys.mk.

There are several TOOL_* variables that are set in bsd.own.mk, but not
set in bsd.sys.mk and not documented in bsd.README.


1.228 05-Oct-2008 apb

Document TOOL_SED, which has been defined in bsd.sys.mk for more than
two years.


Revision tags: mjf-devfs2-base
1.227 02-Oct-2008 joerg

Hook up libfetch and pkg_install update.


1.226 26-Sep-2008 apb

Build strfile both as a host tool and as an installed program:
* in games/fortune/strfile/Makefile, build strfile as a
regular program instead of as a host tool;
* add tools/strfile directory to build strfile as a host tool;
* in tools/Makefile, add strfile to SUBDIR list;
* in BSD.*.mk, define TOOL_STRFILE variable;
* in games/fortune/datfiles/Makefile, use TOOL_STRFILE when creating
databases at build time;
* in distrib/sets/lists/games/mi, mention usr/games/strfile.


Revision tags: wrstuden-revivesa-base-3
1.225 09-Sep-2008 joerg

Add MKSTRIPIDENT to remove the RCS IDs from binary programs and shared
libraries for space-constraint systems. The description is based on the
feedback of hubertf@, the logic on input from lukem@

This obsoletes the removal of LIBC_SCCS and SYSLIBC_SCCS for libc builds.


Revision tags: wrstuden-revivesa-base-2
1.224 05-Sep-2008 lukem

refer to mk.conf(5) in a couple of places


1.223 31-Aug-2008 christos

remove NVI; it is the default now.


1.222 31-Aug-2008 lukem

Enable MKHTML by default; we now install the HTML version of the man
pages as well as the source & catman versions.
Add "htmlinstall" to default MANINSTALL, so MKHTML will operate correctly.


1.221 28-Aug-2008 mrg

add a bunch of more variable documentation wrt xorg


1.220 28-Aug-2008 lukem

Improve support for MKXORG!=no to enable builds into external/mit/xorg.
This will be mutually exclusive to MKX11!=no.


1.219 27-Aug-2008 lukem

expand on the behaviour of MKDEBUGLIB


1.218 10-Aug-2008 lukem

Implement LIBISMODULE:
If not "no", install as ${LIB}.so (without the "lib" prefix),
and act as "MKDEBUGLIB=no MKLINT=no MKPICINSTALL=no
MKPROFILE=no MKSTATICLIB=no".
Default: no


1.217 04-Aug-2008 joerg

When compiling C++ sources and BUILDSEED is set, pass down
-frandom-seed with a reduced version of .ALLSRC and .TARGET
as argument. This allows bit-identical builds of C++ files.


1.216 29-Jul-2008 mrg

begin to add support for cross-built Xorg:

- add MKXORG
- default to DRI-on for Xorg
- add paths for 192 Xorg packages that will exist in
xsrc/external/mit/<package>/dist
- add some more X11FLAGS.* variables if MKXORG.

this is somewhat based on the xorg work rtr@ did a couple of years ago.

XXX: seriously need to fix the XORG_RELEASE value, it is still set to
XXX: 6.8.1 from when rtr was working on this.


1.215 22-Jul-2008 dyoung

Document MKNVI.


1.214 22-Jul-2008 wiz

Consistent spelling.


1.213 21-Jul-2008 lukem

Rewrite the introduction.
NOGCCERROR also prevents -Wa,--fatal-warnings.


1.212 21-Jul-2008 lukem

Document NOGCCERROR.
Improve PAXCTL_FLAGS & WARNS.


1.211 21-Jul-2008 lukem

AFLAGS is actually options to ${CC} (not ${AS}) when compiling .s/.S files.
(For gcc, this means that flags to as(1) need to be passed as -Wa,flag)


1.210 12-Jul-2008 gmcgarry

Add and document knobs to turn off building ATF and libm complex support.
Also add knobs for PCC which parallel GCC ones.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
1.209 28-May-2008 lukem

add LIBLDAR_R (for completeness)


1.208 22-May-2008 lukem

Add MKLDAP, USE_LDAP, LIBLBER, LIBLDAP


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
1.207 03-May-2008 lukem

branches: 1.207.2;
Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)


1.206 02-May-2008 lukem

Explicitly set MKLINT=no if MKLINKLIB==no, rather than just acting that way.


1.205 30-Apr-2008 garbled

Convert prep to use the new unified mkbootimage rather than it's own. This
mkbootimage can be shared by prep, rs6000, and bebox.

TODO: Convert bebox to use this. Needs someone to test.


Revision tags: yamt-pf42-baseX yamt-pf42-base
1.204 31-Mar-2008 lukem

branches: 1.204.2; 1.204.4;
Change USE_SKEY default to "no"; we have had USE_PAM=yes as the default
for a long time, and there's no point having custom S/Key support in the
applications given that pam_skey.so is now in /etc/pam.d/*


1.203 28-Mar-2008 dholland

Correct documentation of default value of FILESMODE.
PR bin/38059 from Aleksey Cheusov.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
1.202 11-Mar-2008 uwe

Use angle brackets in UUDECODE_FILES_RENAME_<fn> as we do for other
file-specific variables. Start description on new line.

While here correct s/<fn>>/<fn>./ typo in a nearby item.


Revision tags: hpcarm-cleanup-base
1.201 27-Feb-2008 lukem

Use "GCC" instead of "gcc".
Highlight that MKGCCCMDS still does build the GCC libraries.
Suggested by Lloyd Parkes on tech-toolchain@


1.200 09-Feb-2008 jmmv

branches: 1.200.2;
Add a MKMODULAR build-time option, defaulting to no, to enable the new
kernel modules framework.


1.199 09-Jan-2008 simonb

Remove support for NetBSD/pc532.


Revision tags: pc532-eol-2008 matt-armv6-base
1.198 28-Dec-2007 christos

add MKPIE


Revision tags: cube-autoconf-base
1.197 06-Oct-2007 ad

Add USE_JEMALLOC.


Revision tags: matt-mips64-base
1.196 29-Jul-2007 joerg

branches: 1.196.4; 1.196.6;
Add build glue for libarchive and update the various sets.


1.195 06-Jun-2007 rillig

Explained the word "new" in the first paragraph.


1.194 24-Feb-2007 pooka

update and fix description of MKPUFFS


1.193 25-Jan-2007 perry

Before I completely forget the issue, convert "PROG_PAX" to the
better-named "PAXCTL_FLAGS".


1.192 14-Jan-2007 apb

Define TOOL_JOIN.


1.191 30-Dec-2006 rumble

Fix a typo, tweak wording, and maintain consistency.


1.190 29-Dec-2006 pooka

if MKPUFFS=yes is given, build & install mount_psshfs (default: no)


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
1.189 12-Nov-2006 christos

more uucp removal.


1.188 10-Nov-2006 christos

if ${PROG_PAX} is defined, run paxctl on the binary after linking with
the value of the variable. This way, if you set:

PROG_PAX=+M

in /etc/mk.conf, you get what you deserve.


1.187 09-Nov-2006 christos

Add ssp glue.


1.186 09-Oct-2006 mrg

- clean up some comments to reality.
- retire LIBDCK, LIBG2C and (long broken) USE_LIBSTDCXX
- in bsd.hostprog.mk's LIBSTDCPP -> LIBSTDCC
- add LIBSUPCXX
- don't default USE_LIBSTDCXX or USE_GCC4 since they are
not used in the tree any where
- same with USE_XF86_4; retire it
- remove _SUPCXX handling in bsd.prog.mk

inspired by PR#26714.


1.185 08-Oct-2006 elad

PR/28368: Peter Postma: unrecognized option `-Wnetbsd-format-audit'

Apply patch from rivo nurges in #NetBSD-code, thanks!


Revision tags: abandoned-netbsd-4-base
1.184 23-Jul-2006 lukem

Implement MKDEBUG:
If "no", don't build and install separate debugging symbols
into /usr/libdata/debug.
Default: no


1.183 22-Jul-2006 lukem

Rename MKDEBUG to MKDEBUGLIB.


1.182 14-Jul-2006 peter

MKPAM default is "yes".


1.181 24-Jun-2006 mrg

add support for MKISCSI=no.


1.180 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


1.179 30-May-2006 christos

Remove sendmail.


1.178 12-May-2006 lukem

LDFLAGS is for CC not LD.


1.177 11-May-2006 mrg

add support for ${OBJCOPTS} and ${OBJCOPTS}.<lib|prog|fn>.


1.176 09-Apr-2006 christos

Add MKDEBUG and the ability to build debugging versions of the libraries.


1.175 20-Mar-2006 christos

more Kerberos4 cleanup.


1.174 20-Mar-2006 christos

Goodbye KerberosIV


1.173 25-Dec-2005 perry

add "S" to LINTFLAGS so that "inline" is accepted by lint


1.172 22-Dec-2005 hubertf

Back out previous attempt at cleaning up the mess,
let someone else resolve this.

Requested by uwe.


1.171 21-Dec-2005 hubertf

At least try to be consistent about where to document (most...)
user-settable MKxxx and USE_xxx variables, and put them into mk.conf(5).
Sort alphabetically.

OK: christos, lukem


1.170 27-Jun-2005 peter

Remove (pf)spamd. Its right to exist in NetBSD has been questioned since it
appeared and whether it's really part of pf or not is still unclear. Looking
at the other *BSDs it seems that they have left out spamd when importing pf,
and now we do that too. Also, the name conflicted with another more popular
used tool, after the rename to pfspamd it was left with completely unusable
documentation which apparently no-one wanted to fix.

A port of the latest spamd will be imported into pkgsrc soon.

Suggested by several people, no objections on last proposal on tech-userlevel.


1.169 31-May-2005 thorpej

Describe TOOL_GENASSYM.


1.168 23-May-2005 riz

Provide a default definition of OBJDUMP - bsd.kmod.mk expects it.
Approved by heas.


1.167 15-Apr-2005 lukem

document MKINET6 and USE_INET6


1.166 22-Mar-2005 rtr

+ document SCRIPTSDIR and SCRIPTSDIR_<script>


Revision tags: netbsd-3-base
1.165 22-Feb-2005 peter

branches: 1.165.2;
Add MKIPFILTER; if set to no, don't build and install the ipf(4) programs,
headers and LKM.

Add MKPF; if set to no, don't build and install the pf(4) programs,
headers, LKM and spamd.

Both options default to yes, so nothing changed in the default build.

Reviewed by lukem.


1.164 20-Feb-2005 matt

Add support for WARNS=4 (-std=c99)


1.163 20-Feb-2005 christos

Add libradius


1.162 07-Feb-2005 wiz

MKHTML defaults to no; fix documentation (which claimed it defaults to yes).


1.161 10-Jan-2005 manu

Disable PAM by default until it gets properly integrated.
Now have MKPAM=yes in /etc/mk.conf if you want to experiment with PAM.


1.160 10-Jan-2005 he

Don't build libpam and associated bits if the target platform doesn't
support shared libraries (sun2 and evbsh5 at it would seem), or if the
user has specified MKPIC=no. Also introduce a new tag to the set lists
("pam"), so that the non-shlib ports can once again complete a release
build.

Discussed with christos and lukem.


1.159 08-Jan-2005 lukem

Implement <bsd.prog.mk> vars:
LIBASN1 LIBBSDMALLOC LIBG2C LIBPAM LIBSSH


1.158 06-Jan-2005 lukem

Provide MKPAM and USE_PAM


1.157 29-Dec-2004 lukem

document LIBDPLIBS


1.156 19-Sep-2004 tron

Update commt about "OBJECT_FMT": only ns32k uses "a.out" these days.


1.155 13-Jun-2004 jmc

Note default for MANINSTALL


1.154 23-May-2004 lukem

* Add MKPRIVATELIB; if not "no", act as "MKPROFILE=no MKPIC=no MKLINT=no"
and don't install the (.a) library.
This is useful for "build only" helper libraries.
* Add some #{ [...] #} comments around large conditional statements.


1.153 22-May-2004 lukem

Document: CONFIGFILES CONFIGLINKS CONFIGSYMLINKS
Correct the documentation for FILES*_<fn>.


1.152 12-May-2004 cl

``build.sh -m xen-i386 release'' now builds a release for NetBSD/xen
for i386. The resulting release consists of:
- NetBSD/xen for i386 kernel, loader and docuemntation
- NetBSD/i386 userland sets


1.151 18-Apr-2004 lukem

document AS and AFLAGS. document default for CPUFLAGS


1.150 13-Apr-2004 lukem

Add MAKEDIRPREFIX shell macro to <bsd.own.mk>.
Usage: ${MAKEDIRTARGET} dir target [params]
Runs "cd $${dir} && ${MAKE} [params] $${target}",
displaying a "pretty" message whilst doing so.

Use MAKEDIRPREFIX to implement the __recurse .USE macro in <bsd.subdir.mk>


Revision tags: netbsd-2-0-base
1.149 18-Mar-2004 jmc

branches: 1.149.2;
Add UUDECODE_FILES_RENAME_fn so the output from a uudecode can be renamed
potentially (usually when the .uue has a pathname contained within it)


1.148 18-Mar-2004 jmc

Add a central method to deal with uuencoded files in the source tree.
Files will be stored as .uue and the name sans .uue will be added to
UUDECODE_FILES to extract them.


1.147 09-Mar-2004 skrll

Correct the "Default:" text for MKPIC


1.146 13-Feb-2004 lukem

Change STRIPFLAG from "-s" to ""; we now don't strip binaries with install(1).

The benefits of having the symbol table available by default (easier
debugging of core dumps, etc) outweigh the minor (3%) increase in
the size of the distribution, and end-users can always strip(1) their
systems if they're concerned about that 3% of disk space.


1.145 06-Feb-2004 jwise

Document LPREFIX variable, as adding -P${DESIRED_PREFIX} to LFLAGS does not
do the expected.


1.144 07-Jan-2004 lukem

Add MKX11 to control if src/x11 is traversed during the build. (default: no)

Document <bsd.x11.mk>.


1.143 03-Jan-2004 lukem

document MKCVS MKGCCCMDS MKPOSTFIX MKSENDMAIL MKUUCP


1.142 02-Jan-2004 lukem

Consistently test all variables that support a "yes"/"no" value with
${VAR} == "no"
or
${VAR} != "no"
(instead of against "yes"). Variables affected:
TOOLCHAIN_MISSING
HAVE_GCC3
USE_TOOLS_TOOLCHAIN
NEED_OWN_INSTALL_TARGET
USE_SHLIBDIR

Improve the documentation.


1.141 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.140 29-Sep-2003 lukem

Add LIBSTDCXX (for usr/lib/libstdc++.a).
Sync LIB* documentation with reality.


1.139 20-Sep-2003 lukem

Change `LNFILES' to `BUILDSYMLINKS', to more accurately describe its purpose.
Per discussion with Simon Gerraty.


1.138 13-Sep-2003 lukem

implement MKSTATICLIB, which defaults to "yes". if "no" (which NOSTATICLIB
also sets, a la the other variables), prevents build and installation
of the "normal" static *.a libraries.


1.137 13-Sep-2003 simonb

Fix a tyop, wrap some long lines.


1.136 13-Sep-2003 erh

Create a way to add additional flags to COPTS, CPPFLAGS, CXXFLAGS and LDADD
for particular libraries or programs by specifying the additions in mk.conf
instead of needing to go edit individual Makefiles.


1.135 03-Sep-2003 lukem

Implement LNFILES: a list of two word items:
lnsrc lntgt
For each lnsrc item, create a symlink named lntgt.
The lntgt symlinks are removed by the cleandir target.


1.134 03-Aug-2003 lukem

Add INCSYMLINKS to <bsd.inc.mk> and <bsd.kinc.mk>, and use that instead of
SYMLINKS to install symlinked header files. INCSYMLINKS are installed with
'make includes'. This avoids using SYMLINKS and hacks with the 'linkinstall'
target in <bsd.links.mk>, as linksinstall occurs in 'make install' and hacks
to get it to occur in 'make includes' weren't robust, as seen in lib/libdes.

Yet more improvements to bsd.README.


1.133 02-Aug-2003 lukem

Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS

Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".

Update documentation for some other make variables


1.132 31-Jul-2003 lukem

bsd.dep.mk: add a dependency for *.d on ${SRCS} ${DPSRCS}. this should fix
some build problems where DPSRCS contains .h files that need to exist to
build the .d file.

document that bsd.dep.mk should be included after anything that might
update SRCS or DPSRCS so that the above works correctly, and actually
ensure this is the case.


1.131 29-Jul-2003 lukem

add bsd.dep.mk


1.130 28-Jul-2003 lukem

replace MKCXXSUPCXX(!=no) with USE_LIBSTDCXX(==no)


1.129 28-Jul-2003 lukem

Change defined(CXX_SUPCXX) to MKCXXSUPCXX != "no".

Clarify that command-line overrides of the MKxxx variables should be
done via the environment rather than make(1) command-line variable
assignment, since the latter doesn't actually work as intended.


1.128 26-Jul-2003 mrg

add a new bsd.own.mk variable: CXX_SUPCXX. from bsd.README:
+ CXX_SUPCXX If defined, the support libraries needed for this C++ program
+ are set to `-lsupc++ -lm', rather than `-lstdc++ -lm'.


1.127 23-Jul-2003 lukem

update MKCRYPTO comment


1.126 23-Jul-2003 itojun

split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)


1.125 22-Jul-2003 lukem

Add source-file-specific variables in <bsd.lib.mk> and <bsd.prog.mk>:

COPTS.<fn> Additional flags to the compiler when creating the C objects
for <fn>.

CPUFLAGS.<fn> Additional flags to the compiler/assembler for <fn>.

CPPFLAGS.<fn> Additional flags to the C pre-processor for <fn>.


(For <fn>.[ly], "<fn>.c" must be used.)


1.124 22-Jul-2003 lukem

improve documentation for bsd.files.mk and bsd.kernobj.mk


1.123 20-Jul-2003 lukem

add TOOL_STAT for stat(1)


1.122 20-Jul-2003 lukem

more reordering


1.121 18-Jul-2003 lukem

move MKCATPAGES info. add MKHOSTOBJ info


1.120 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.119 18-Jul-2003 lukem

Add MKMANZ; if not set to "no", compress the manual pages at installation time.
This replaces the previous .if defined (MANZ) behaviour, although the latter
will set MKMANZ=yes for compatibility purposes.

Don't bother with -P-bou in TOOL_ROFF_HTML; it doesn't appear to be
necessary with groff 1.19.

Fix NOHTML implementation to be consistent with other NOxxx / MKxxx
variables, and expose the user-tweakable MKHTML.


1.118 18-Jul-2003 lukem

reorder to be a bit more useable (imho)


1.117 16-Jul-2003 itojun

stop installing install libtelnet. build under lib/libtelnet and reference
it from usr.bin/telnet and libexec/telnetd.
(reason for separate build: compiler flags)


1.116 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.115 26-Jun-2003 tshiozak

Citrus iconv support(3)
add host tools : mkcsmapper and mkesdb
mkcsmapper - coded character set mapping table compiler
mkesdb - encoding scheme database compiler


1.114 12-Jun-2003 provos

add LIBEVENT


1.113 31-May-2003 thorpej

If EXTERNAL_TOOLCHAIN is defined, allow the compiler to define the
location of crt{begin,end}{,S}.o and libgcc.a. Encapsulate all of
this logic into the new bsd.gcc.mk, and use it in bsd.prog.mk and
bsd.lib.mk.


1.112 30-May-2003 thorpej

Add a CPUFLAGS variable which can be set by the user's mk.conf or in
the environment:

CPUFLAGS Additional flags to the compiler/assembler to select
CPU instruction set options, CPU tuning options, etc.

Since CPUFLAGS is not implicitly set by any part of the make infrastructure,
it is safe to set in mk.conf, unlike COPTS or DBG.


1.111 11-Apr-2003 thorpej

Provide the MKPICLIB value in bsd.own.mk, rather than bsd.lib.mk. It
is sometimes necessary for non-library Makefiles to determine if _pic
libraries are being built.

Problem pointed out by Havard Eidnes.


1.110 24-Jan-2003 thorpej

Add LIBPTHREAD, LIBPTHREAD_DB, and LIBRT.


1.109 05-Jan-2003 sommerfeld

Common makefile fragment for invoking rpcgen. See bsd.README for
documentation on the parameters which control this fragment's behavior.


Revision tags: fvdl_fs64_base
1.108 20-Dec-2002 jwise

Add a brief description of DPSRCS, whose discovery recently shortened two
Makefiles of mine by a few lines. :-)


1.107 26-Nov-2002 lukem

Deprecate SYS_INCLUDE and the optional SYS_INCLUDE=symlinks functionality,
and only support the "copies" default.
Per discussion on tech-userlevel@.


1.106 27-Sep-2002 thorpej

Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.


1.105 26-Sep-2002 itojun

MDC2 is a patented algorithm; don't ship it in default libcrypto.
MKCRYPTO_MDC2 will build a separate library, libcrypto_mdc2.


1.104 22-Sep-2002 lukem

Enable MKDYNAMICROOT=yes by default.
This means that:
+ /bin and /sbin (and the few programs in /usr/* which were statically
linked) are now dynamically linked.
+ The shared libraries that are needed by the /bin and /sbin programs
are now installed into /lib (with compatability symlinks from
/usr/lib). These are:
c crypt edit ipsec kvm m m387 termcap termlib util z
+ The shared linker is now in /libexec/ld.elf_so, and
/usr/libexec/ld.elf_so is a symlink to the former.

If you want the prior behaviour of "some applications statically linked,
the rest dynamically linked", set MKDYNAMICROOT=no in your mk.conf(5).

If you have a philosophical objection to dynamic libraries, continue
to set LDSTATIC=-static in your mk.conf(5), and please don't waste any
more time in trying to convince us why dynamic libraries are 3v1l.


1.103 17-Sep-2002 thorpej

* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.

If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.

If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.


1.102 08-Sep-2002 thorpej

Build a .gdbinit in the objdir when building a program. The .gdbinit
file sets the shared library prefix to ${DESTDIR}, and adds "sources"
directives for each file listed in the GDBINIT Makefile variable.


1.101 19-Aug-2002 lukem

Explicitly note that if NOxxx and USE_SHLIBDIR are set by a Makefile,
it must be before <bsd.own.mk> is included.


1.100 09-Aug-2002 thorpej

Add LIBPMC.


1.99 09-Jun-2002 itojun

sync LIBxx with bsd.prog.mk
XXX bsd.prog.mk and bsd.hostprog.mk defines very similar thing
- can we unify them? at least the definition?


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.98 26-Apr-2002 lukem

branches: 1.98.2;
Implement NETBSDSRCDIR, which is the top level of the NetBSD source tree.
Defaults to the directory determined by the _SRC_TOP_ logic (if != ""),
and the BSDSRCDIR.

NETBSDSRCDIR has been provided for use by the various NetBSD source
Makefiles to find the top of the NetBSD source tree, and isn't
affected by the inheritance properties of _SRC_TOP_, nor does it
have the magic BSDOBJDIR baggage that BSDSRCDIR is stuck with.


1.97 19-Apr-2002 itojun

document MKxxx/NOxxx naming rule.


1.96 16-Apr-2002 itojun

NOCRYPTO is no longer used and has no effect, so remove documentation


1.95 10-Apr-2002 lukem

replace BSDSRCDIR with _SRC_TOP_, since the latter is more likely to
be "accurate". document _SRC_TOP_.


1.94 22-Mar-2002 thorpej

Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)

* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.

As discussed on tech-toolchain.


1.93 14-Mar-2002 thorpej

Add a BUILDID variable, which further qualifies object directories.


1.92 27-Jan-2002 ross

Drink ALL the Kool-Aid.

(Move -mieee from lib/ to bsd.*.mk; new var MKIEEEFP defaults to yes.)


1.91 04-Jan-2002 thorpej

For PROG_CXX DESTDIR builds, pull in -lstdc++ and -lm regardless
of GCC version.


1.90 02-Jan-2002 thorpej

Remove the "MKLINT=no if HAVE_GCC3" hack; a patch to support lint
comments has been submitted to the GCC maintainers, so if you're
using a GCC 3.x that doesn't support lint, set MKLINT=no in mk.conf.


1.89 01-Jan-2002 thorpej

If HAVE_GCC3 is set, force MKLINT to "no", since GCC 3.x's C pre-processor
does not yet support our lint(1).


1.88 01-Jan-2002 thorpej

Per a suggestion from matthew green, PROG_CXX takes the place of
PROG for C++ programs.


1.87 01-Jan-2002 thorpej

Document PROG_CXX and HAVE_GCC3.


1.86 31-Dec-2001 thorpej

Document MKBFD, MKGDB, MKGCC.


1.85 28-Dec-2001 lukem

* Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".

- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.

- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so

2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so

3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed


1.84 19-Nov-2001 kleink

NLS is commonly expanded to Native Language Support, not National Language
Support.


1.83 19-Nov-2001 perry

document/rename UNPRIVED


1.82 01-Nov-2001 lukem

Move -Wcast-qual from WARNS=2 to WARNS=3 (a new level), because it
generates too many false positives that require gross amounts of
workaround, and the other WARNS=2 stuff is quite useful. Per discussion
with simonb & christos.


1.81 30-Oct-2001 wiz

Add support for INCSNAME and INCSNAME_<file> to bsd.inc.mk.
Same syntax as FILESNAME and FILESNAME_<file>, allows to install
includes under a different name.
Okay'd by christos.


1.80 13-Oct-2001 jmc

Add MTREE var definition to list for sys.mk


1.79 19-Jun-2001 wiz

`existent', not `existant'


1.78 18-Jun-2001 simonb

Add a new make variable "MKSOFTFLOAT". If not set to "no", it adds
"-msoft-float" to COPTS and FOPTS, and possibly builds soft-float
library support (port specific).
Defaults to "no".


1.77 31-May-2001 simonb

Update a comment about OBJECT_FMT - some m68k machines are ELF too.


1.76 10-Mar-2001 fair

Add the following text to answer PR 10650:

LDSTATIC Control program linking; if set blank, link everything
dynamically. If set to "-static", link everything statically.
If not set, programs link according to their makefile.


1.75 01-Feb-2001 agc

+ clean up the English in one sentence
+ sync with reality, and document "MKMAN= no" in preference to "NOMAN= noman"
+ get in quick before the 80-column police notice what we were doing
+ spell "existence" correctly


1.74 24-Jan-2001 itojun

note that MKNLS controls build of /usr/share/locale too


1.73 05-Jan-2001 blymn

Added libform.


1.72 30-Dec-2000 sommerfeld

Correct typos (SUBDIR, not SUBDIRS).
Document use of .WAIT in SUBDIR


1.71 30-Dec-2000 itojun

document host build tools (like rpcgen) in bsd.README. PR 11839


1.70 31-Oct-2000 itojun

add ${LIBINTL} for use with DPADD.


1.69 04-Oct-2000 sommerfeld

If FORMAT_AUDIT is set, and WFORMAT is set and > 1, turn on
-Wnetbsd-format-audit for extra-stringent format checking.
WFORMAT belongs in individual makefiles and/or Makefile.inc files.
FORMAT_AUDIT should go in mk.conf if you're doing format-string auditing.
(set WFORMAT=1 in individual makefiles if a program is
not security critical and is doing bizarre things with
format strings which would be even uglier if rewritten)
FORMAT_AUDIT may go away in time (i.e., default to on)


1.68 30-Sep-2000 itojun

remove obsoleted crypto-related variables.


1.67 30-Sep-2000 itojun

always compile RSA into libcrypto.
MKCRYPTO disables the whole crypto tree, and in that case,
we will not have RSA (nor libcrypto) with us.


1.66 30-Sep-2000 itojun

repair openssl (libcrypto) for non-32bit architecture.
don't use unsigned long where 32bit unsigned variable is asked for.
use u_int32_t. (not sure if uint32_t is better or not, but anyway,
u_int32_t <-> uint32_t should not raise binary compatibility issue)
PR10921.

TODO: have arch-dependent Makefiles where we supply -DFOO for optimization.
(do not change size of variable though)

XXX: we should actually nuke all other #ifdef in /usr/include/openssl/*.h,
however, that needs a lot of work and will make future openssl upgrade harder.

remove RC5 and IDEA by default. build them separately as
libcrypto_{rc5,idea}.a. put dummy function, which is "warning to stderr
and exit(1)". NOCRYPTO_{RC5,IDEA} are obsoleted.
PR10883.


1.65 10-Sep-2000 jlam

Correct description of when "NOPIC" is set.


1.64 23-Jun-2000 thorpej

Remove the bsd.crypto.mk section, and describe the new MK... switches
related to system crypto support.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
1.63 07-May-2000 sjg

branches: 1.63.4;
Document bsd.kernobj.mk


1.62 02-May-2000 simonb

Add HTMLDOCDIR pointing to /usr/share/doc/html.


1.61 07-Mar-2000 veego

Remove unused libahdi.
It will be replaced in the future with a more generic libdisklabel.


1.60 05-Feb-2000 jdc

Add libahdi entries.


1.59 17-Jan-2000 jlam

bsd.prog.mk doesn't define/use STRIP anymore -- it's now STRIPFLAG


1.58 08-Jan-2000 sommerfeld

improve text describing BSDSRCDIR/BSDOBJDIR


1.57 06-Jan-2000 drochner

correct confusing example, closes PR misc/9135 by Andreas Gustafsson


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.56 01-Dec-1999 sommerfeld

Attempt to document what bsd.obj.mk does.


1.55 30-Nov-1999 sommerfeld

Add MKOBJDIRS make variable to bsd.own.mk, defaulting to "no" but
overrideable in mk.conf

Document in bsd.README; this is distinct from "MKOBJ", which controls
whether "make obj" does anything.

In the top-level makefile, if MKOBJDIRS != "no", do a "make obj" at an
appropriate point during a "make build".


1.54 28-Nov-1999 simonb

Add a MKPICLIB variable. If set to "no", don't build an _pic.a library
and build shared objects from the .a library. A symlink is installed
in /usr/lib so that the name "libfoo_pic.a" still exists for third party
software that explicitly wants an _pic.a library.


1.53 23-Nov-1999 blymn

Added libmenu library.


Revision tags: comdex-fall-1999-base
1.52 21-Aug-1999 simonb

branches: 1.52.4;
Document the UNPRIVILEGED make variable.


1.51 26-Jul-1999 mrg

branches: 1.51.2;
update CRYPTO example to use ".sinclude"


1.50 13-Jul-1999 thorpej

Document bsd.crypto.mk, and update the OBJECT_FMT entry.


1.49 01-Jul-1999 itojun

add LIBIPSEC for use from DPADD.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.48 13-Feb-1999 lukem

don't bother supporting NOINFO (since it's a new thing); just support MKINFO=no
fix description of MKSHARE=no


1.47 12-Feb-1999 tv

Add doc for bsd.info.mk, and move the description of MKLINKLIB to the
bsd.lib.mk section (it should NEVER be set by mk.conf).


1.46 12-Feb-1999 lukem

for MKSHARE=no, set MKDOC=no MKMAN=no MKNLS=no, and for MKMAN=no, set
MKCATPAGES=no. this simplifies various tests.


1.45 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.44 07-Nov-1998 erh

Add a checkver target to bsd.lib.mk. This target executes the checkver script to find installed shared libraries with major/minor versions that are too big. The realinstall target now depends upon this target so this check is done whenever a library is installed. The check may be disabled by setting NOCHECKVER.


1.43 15-Sep-1998 agc

Remove out of date explanations of <bsd.port.mk> and <bsd.port.subdir.mk>,
which are now in the pkgsrc collection as bsd.pkg.mk and bsd.pkg.subdir.mk.


1.42 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.41 27-Jul-1998 tv

- Add MACHINE_GNU_ARCH entries for mipseb and mipsel. Temporarily remap
mips to mipsel.
- Remove the unused definition of NOSHLIB for powerpc. NOPIC is being
used for this purpose.


1.40 22-Jul-1998 perry

Remove obsolete note that NOLINT is set by default.


1.39 12-Jun-1998 cgd

add bsd.kinc.mk, a template to support the new kernel include file
installation mechanism.


1.38 13-May-1998 simonb

Fix typo (s/OBJECT_FMAT/OBJECT_FMT/)


1.37 05-May-1998 tv

Fix definition for SRCS: "If PROG is not defined" -> "If SRCS is not
defined" as noticed by prlw1@cam.ac.uk


1.36 03-May-1998 ross

English.


1.35 13-Apr-1998 lukem

only read /etc/mk.conf once (stops += variables getting double assignments)


1.34 26-Feb-1998 lukem

change default ownership from bin:bin to root:wheel


1.33 23-Feb-1998 jonathan

More table-driven changes for different toolchains:
* new bsd.own.mk variable OBJECT_FMT with values "a.out" or "ELF".
* use OBJECT_FMT in Makefile tests that depend on toolchain.
* Add new bsd.own.mk variable NOSHLIB that, if set indicates a given
port doesnt yet do shared libraries. Set on powerpc.
* Document new feature-test variables in src/share/mk/bsd.README.
Tested on i386, mips, fakedup Alpha environment.


1.32 04-Feb-1998 mikel

STRIP -> STRIPFLAG; from Jim Bernard in PR pkg/4884


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.31 30-Sep-1997 hubertf

branches: 1.31.2;
/usr/pkg/src -> /usr/pkgsrc


1.30 20-Aug-1997 agc

Document the import of FreeBSD's <bsd.port.mk> and <bsd.port.subdir.mk>,
as used in their `ports' system.


1.29 31-May-1997 cjs

Back out BUILDDIR and NOINSTALL changes.


1.28 29-May-1997 mikel

branches: 1.28.2;
fix typo


1.27 26-May-1997 cjs

These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.


1.26 18-May-1997 kleink

Add libposix.


1.25 18-Apr-1997 christos

Add ${LIBNTP}


1.24 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.23 27-Mar-1997 christos

Put the FILES generated rules in a separate .mk file since both bsd.prog.mk
and bsd.lib.mk use them.


1.22 27-Mar-1997 mycroft

Remove knowledge of HIDEGAME from here.


1.21 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.20 22-Mar-1997 perry

Fix SYMLINKS not to include DESTDIR in the link itself


1.19 13-Mar-1997 perry

add SYMLINKS, by analogy to LINKS. Vetted by Christos.


1.18 13-Jan-1997 mark

The arm32 architecture also needs to set NOPIC.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.17 13-Apr-1996 thorpej

Add the ability to override defaults in bsd.own.mk more easily, by
looking for "${MAKECONF}", or failing that, "/etc/mk.conf" and including
the first one it finds, if it exists. From Chris Demetriou <cgd@netbsd.org>,
PR #1970.


1.16 04-Apr-1996 jtc

Added new standard target "includes" (used to install header files) to
bsd.subdir.mk. Added some documentation to bsd.README.


1.15 22-Jan-1996 cgd

clean up bits that state which man page section numbers are allowed (section
9 now exists). Document that variables in bsd.own.mk that were not previously
documented.


1.14 13-Dec-1995 cgd

add "CFLAGS += -Werror" to bsd.sys.mk, and update various bits of
documentation to explain bsd.sys.mk's purpose more clearly.


1.13 22-Oct-1995 christos

Added include file <bsd.sys.mk> that contains lex and yacc "parallel aware"
rules. These rules are not turned on by default; they are enabled by setting
the PARALLEL variable.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.12 24-Sep-1995 christos

- In preparation for parallel makes fix the library rules so that they
don't use a.out as intermediate output.
- Note in the README file that we cannot fix the xstr stuff.
We still need to fix lex and yacc.
- Allow overriding of the variables in sys.mk


1.11 13-Jan-1995 jtc

Removed sentance that stated that each *.mk file had a cooresponding
*.rd file. All the documentation is in bsd.README. Fixes PR #681.


1.10 02-Jan-1995 cgd

add info about LIB, as pointed out by jhawk@MIT.EDU


1.9 22-Dec-1994 cgd

oops; fix a bogon.


1.8 22-Dec-1994 cgd

specify man pages differently, and document how.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
1.7 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.6 28-Jan-1994 cgd

add LIBKVM


1.5 29-Dec-1993 jtc

Fixed documentation for DPADD and LDADD.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
1.4 26-May-1993 cgd

change libraries to use ${RANLIB} rather than "ranlib" explicitly,
also, ranlib them when they're made, so /usr/obj can be read-only


1.3 26-Apr-1993 cgd

added definition for DPADD library variable LIBCRYPT.


Revision tags: netbsd-0-8 netbsd-alpha-1
1.2 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


1.3 25-Aug-2025 riastradh

bsd.buildinstall.mk: Count in decimal, not in unary.

Let's make the error messages a liiiiiittle less cryptic with unary
numbers everywhere, and leave unary numbers to the complexity
theorists.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.2 25-May-2025 rillig

bsd.buildinstall.mk: fix parallel build


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 tls-maxphys-base
1.1 15-Nov-2012 joerg

branches: 1.1.2; 1.1.4; 1.1.46;
Move the build_install logic from lib/Makefile into share/mk and re-use
it for tools. The existing logic broke for the LLVM build with the
recent .ORDER changes in make.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base yamt-pagecache-base5 yamt-pagecache-base4
1.3 04-Apr-2012 joerg

Make it easier to specify the list of checkers to enable for the static
analyzer.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.2 01-Sep-2011 joerg

branches: 1.2.2;
Simplify, --analyze gives the same settings as default


1.1 27-Aug-2011 joerg

Add new "analyze" command to run clang's static analyzer in a directory
on all C/C++ files.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.10 03-Jun-2023 lukem

bsd.*.mk: move MKCLEAN* to bsd.own.mk

Move the defaults for MKCLEANSRC and MKCLEANVERIFY
from bsd.clean.mk to bsd.own.mk _MKVARS.yes.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.9 07-Dec-2021 rillig

bsd.clean.mk: fix typo in comment


Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 tls-maxphys-base
1.8 19-Nov-2012 apb

On second thoughts, don't run "rm -rf" in bsd.clean.mk. Instead,
document that CLEANFILES and CLEANDIRFILES must not contain
directory names.


1.7 19-Nov-2012 apb

Use "rm -rf" instead of "rm -f" in bsd.clean.mk. This will
allow CLEANFILES or CLEANDIRFILES to contain directory names.


1.6 18-Nov-2012 apb

Under "Failed to remove the following files from ${_d}:",
print one file name per line, indented to make the list more visible.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE 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
1.5 22-Nov-2011 apb

branches: 1.5.6;
Use :Q to deal with the case that CLEANFILES or CLEANDIRFILES
contains quoted substrings (such as file names with spaces).
Problem reported by Joseph Koshy, who also provided the
important part of the fix.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.4 05-Oct-2011 apb

branches: 1.4.2;
Add MKCLEANSRC and MKCLEANVERIFY variables, defaulting to "yes".
You may set them to "no" to get the old behaviour of "make clean"
and "make cleandir".


1.3 23-Sep-2011 apb

* use a :M* modifier when testing whether the expanded list of
files is empty. Sometimes the variable contains one or more spaces,
and testing against "" gave the wrong result, but applying the
:M* modifier discards the spaces. This should fix PR 45396.
* Instead of using "-" to ignore the exit status from the rm command,
use ||true. This should work around the bug in PR 45356, but that
bug is not fixed.
* Suppress the ${MKMSG} command with .if 0. People who build with
MAKEVERBOSE=1 don't want to see the message, and people who build
with MAKEVERBOSE=2 or higher will see the actual rm command. The
message may be useful for debugging this makefile itself, so it's
only disabled, not deleted.


1.2 10-Sep-2011 apb

Don't automatically load ".depend" files during "make clean"
or "make cleandir".


1.1 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406 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 pgoyette-compat-0728 pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE agc-symver-base tls-maxphys-base yamt-pagecache-base8 yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base bouyer-quota2-nbase bouyer-quota2-base matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE 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 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base mjf-devfs2-base keiichi-mipv6-nbase keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
1.2 20-Jun-2000 thorpej

Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.


Revision tags: minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.1 11-Jul-1999 thorpej

branches: 1.1.8;
Makefile fragment used to determine the path to crypto code in the
source tree. Allows CRYPTOBASE to be set in mk.conf or environment.
If it's not set, it searches for: crypto-us, crypto-intl in that order.

Setting CRYPTOBASE to none forces a no-crypto build. EXPORTABLE_SYSTEM
is supported for backwards-compatibility.

Will be used in a forthcoming mega-commit which significantly improves
the build process when building a crypto-enabled system, and allows
for the international crypto sub-tree to be seamlessly integrated into
the build process.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.89 03-Jun-2023 lukem

bsd.dep.mk: move MKDEPINCLUDES to bsd.own.mk

Add default for MKDEPINCLUDES=no to to bsd.own.mk _MKVARS.no.
Simplify bsd.dep.mk check.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.88 14-Dec-2021 christos

Pass W with IDU for lint and deps.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.87 01-Jul-2020 lukem

bsd.dep.mk: fix "make tags" (again)

[repeat revision 1.85]

Fix "make tags" to actually build a tags file:
- Use !commands() instead of !target(), so that the rule actually works
- Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET}
isn't sufficient).
- Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures
because of ${targ}: subdir-${targ} in bsd.subdir.mk.

Thanks to uwe@ for assistance.


1.86 22-Jun-2020 lukem

bsd.dep.mk: revert 1.85 (for now)

Revert my recent 1.85 revision that fixed "make tags". It causes too
much build breakage elsewhere in the tree that needs to be resolved first.

Issues include:
- Directories using TESTS_CXX with .cpp and .cxx extension instead of the
default .cc extension (see bsd.prog.mk). Most of these have been fixed.
- external/gpl3/gcc build of .cc files. (No idea what's wrong there).


1.85 21-Jun-2020 lukem

bsd.dep.mk: fix "make tags"

Fix "make tags" to actually build a tags file:
- Use !commands() instead of !target(), so that the rule actually works
- Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET}
isn't sufficient).
- Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures
because of ${targ}: subdir-${targ} in bsd.subdir.mk.

Thanks to uwe@ for assistance.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
1.84 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107
1.83 21-Dec-2016 christos

branches: 1.83.12; 1.83.14;
Don't remap mkdep, otherwise we add dependencies for /usr/include instead
of ${DESTDIR}/usr/include and things go south.


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.82 01-Dec-2014 erh

branches: 1.82.2;
PR toolchain/9618: add ".d" to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-earlyentropy-base tls-maxphys-base
1.81 19-Jul-2014 plunky

when calling mkdep, pass any -std=* flags for C and C++ source files
to ensure that any definitions this implies are set


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.80 05-Dec-2013 matt

branches: 1.80.2;
add ${MKTARGET_CREATE} for tags


1.79 31-Oct-2013 mrg

create mkdep output with a temporary file so that failures in
complation during .d creation don't leave an empty (stale) .d
file around to break future builds.

(hmm, probably could use .PRECIOUS here.)


1.78 28-Oct-2013 mrg

add MKDEPCXX, that is used for C++ files depend creation. also
add some missing ${COPTS.${.IMPSRC:T}} and ${CPUFLAGS.${.IMPSRC:T}}
to the dependancy rules.

this makes it possible to have C++ files .d files created with the
C++ compiler, and with the normal options for this file, which
means that we can build libstdc++-v3 from gcc 4.8.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base
1.77 05-Mar-2013 christos

Add a rule to rebuild dependency files that contain stale entries automatically.


1.76 05-Mar-2013 christos

MKDEPINCLUDES support.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
1.75 18-Nov-2012 apb

Change some .if defined(SRCS) to .if defined(SRCS) && !empty(SRCS)


Revision tags: yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
1.74 19-Feb-2012 matt

branches: 1.74.2;
Add support for --combine with gcc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.73 10-Sep-2011 apb

branches: 1.73.2;
Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


Revision tags: cherry-xenmp-base
1.72 10-Apr-2011 joerg

For USETOOLS=yes, use the --sysroot support of the compiler to cut down
the number of hard-coded pathes and magic invocations.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
1.71 06-Feb-2011 joerg

Allow HOSTLIB to use C++ by not specifying -nostdinc++.


1.70 12-Jan-2011 joerg

branches: 1.70.2;
Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk. Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.


Revision tags: matt-mips64-premerge-20101231
1.69 25-Jan-2010 christos

PR/42658: Geoff Wing: Quote directory variables to deal with spaces in the
source pathname.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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
1.68 25-Oct-2008 apb

Use ${TOOL_SED} instead if plain sed in Makefiles.


Revision tags: matt-mips64-base2 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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.67 18-Apr-2004 lukem

remove AINC support; it is now unnecessary


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.66 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.65 27-Jan-2004 lukem

Replace
:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)


1.64 11-Nov-2003 dsl

Use -- to separate mkdep options from cc ones.
Avoids problems when the cc options start with -fpic.


1.63 10-Nov-2003 dsl

Use modified mkdep(1) (not cat) to merge '*.d' into '.depend'.
Allows some of the postprocessing to be done there instead of a separate
sed script called from 'afterdepend'.


1.62 28-Oct-2003 mrg

fix a typo in previous pointed out by lukem


1.61 27-Oct-2003 mrg

allow -traditional-cpp to be overridden when making dependancies


1.60 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.59 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.58 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.57 11-Aug-2003 lukem

order .SUFFIXES similar to other *.mk files


1.56 06-Aug-2003 martin

Handle empty __DPSRCS.d, avoiding executing commands like "cat > .depend"
in directories where only non-C/C++ files are in SRCS (e.g.: the forth
code for sparc bootblocks).

Patch from Luke.


1.55 01-Aug-2003 lukem

Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".


1.54 01-Aug-2003 lukem

tweak ${DEPENDSRCS.d} target so that ${SRCS} isn't there. this fixes the
"make: out of memory" problem when make dependencies in lib/libc.

XXX: this is a temporary workaround. i'm working on cleaning up how
the DPSRCS stuff is used throughout the tree...


1.53 31-Jul-2003 lukem

bsd.dep.mk: add a dependency for *.d on ${SRCS} ${DPSRCS}. this should fix
some build problems where DPSRCS contains .h files that need to exist to
build the .d file.

document that bsd.dep.mk should be included after anything that might
update SRCS or DPSRCS so that the above works correctly, and actually
ensure this is the case.


1.52 29-Jul-2003 lukem

Set .NOPATH for all ${DEPENDSRCS} and not just .depend.
Should fix build problem noted by Geoff Wing on current-users@


1.51 28-Jul-2003 lukem

Use the more "standard" `foo.d' instead of `foo.SUFFIX.dep'; the rules
are simpler and would have helped prevent the previous fubar.
Don't bother using -a with ${MKDEP} to build the individual .d files.


1.50 28-Jul-2003 matt

Make all the suffix rules with .c .c.dep (e.g not .cc .cc.cc.dep)


1.49 28-Jul-2003 lukem

Simplify .*.dep generation by using suffix transforms.
This also fixes a problem in the previous where the .ALLSRC would contain
any other dependencies that .depend had, thus breaking the mkdep invocation.

Provide DEPENDSRCS which effectively contains ".depend *.dep", to be
used in other Makefiles that want to add dependencies for .depend.


1.48 28-Jul-2003 lukem

Always use the "per source file".dep method to build the .depend file
(that was formerly only used for HOST_CYGWIN.).
Clean up implementation to minimise unnecessary variable munging.
Ensure all .dep files are deleted in cleandepend:.

This allows us to correctly support CPPFLAGS.<file> in make depend, and
whilst this method is marginally slower in the "no existing .depend file"
case, it should be faster in the "rebuilding depend for a subset of
source files" case.


1.47 27-Jul-2003 mrg

introduce a new $CPPFLAG_ISYSTEMXX that is used to reference c++ system
includes. for GCC3, set this to -I instead of -isystem.

XXX this should really be either not required or a -isystem-cxx, but for
now this is required to build libstdc++-v3, which otherwise complains
heavily about STL headers not being C code(!)


1.46 18-Jul-2003 lukem

whitespace cleanup


1.45 11-Jun-2003 wiz

Add missing } for rev. 1.43.


1.44 11-Jun-2003 wiz

Also recognize cpp files as C++ files for CYGWIN case.


1.43 11-Jun-2003 christos

recognize .cpp as c++ files.


1.42 27-May-2003 wiz

Back this out until I know why it does not work.


1.41 27-May-2003 wiz

Add .cpp dependency rules.


1.40 08-May-2003 christos

Fix _HOST_CYGWIN lossage.


1.39 08-May-2003 christos

Hacks for limited command and environment space (John Gordon)


Revision tags: fvdl_fs64_base
1.38 26-Nov-2002 thorpej

The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.


1.37 10-Nov-2002 thorpej

Oops, AINC actually is still used; put it back.


1.36 10-Nov-2002 thorpej

The MIPS toolchain now defines __ABICALLS__ when abicalls are in use,
and the sources now use that define, so there is no need for us to define
ABICALLS. Since that was the only use for the AINC variable, garbage-collect
it.


1.35 04-Jun-2002 thorpej

Don't use -traditional-cpp if HAVE_GCC3.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.34 28-Nov-2001 tv

If DESTDIR is set, do a similar nostdinc dance for the standard C++ include
directory.


1.33 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.32 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.31 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.30 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.29 16-Nov-1999 tron

Add missing "\" in two line shell command.


1.28 16-Nov-1999 minoura

Pass -traditional-cpp to mkdep for assembler files,
as in the actual compilation (${COMPILE.S} rule in sys.mk).


Revision tags: comdex-fall-1999-base
1.27 11-Aug-1999 sommerfeld

branches: 1.27.4;
correct previous fix:
- add CLEANDEPEND variable for stuff which should be cleaned out
in "cleandepend" phase.
- add it to the files removed during the cleandepend phase.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.26 24-Feb-1999 simonb

Change CFLAGS to AFLAGS for mkdep of .S/.s files. Fixes "make depend"
on pmax kernels (and doesn't break "make depend" on entire tree).


1.25 07-Feb-1999 tv

Use :Q to quote arguments to "echo" so that quote marks don't fall out of
the printed mkdep command.


1.24 03-Feb-1999 tv

Our make can't actually turn off implicit rules per-target, and the
"depend:" rule had no actual commands to execute, so it used the implicit
".c:" rule in gas.new (which has a depend.c). Add a command here -- just
"true" -- that prevents use of implicit rules. This may need a new
.-option in make(1) to be done Right.


1.23 18-Aug-1998 tv

Kill spaces in the $$files check introduced by borrowing the C++ rule for
ObjC.


1.22 18-Aug-1998 tv

Add dependency rule for Objective-C files.


1.21 09-Aug-1998 lukem

add distclean as a synonym for cleandir


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.20 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.19 09-May-1997 mycroft

Remove cruft.


1.18 08-May-1997 gwr

Set the .NOPATH flag for the .depend target.


1.17 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.16 07-May-1997 mycroft

Always define cleandepend. Don't use a .depend target if SRCS is empty.


1.15 07-May-1997 mycroft

Shuffle some .PHONYs around, to work better with `-t'.


1.14 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.13 07-Mar-1997 gwr

Allow mkdep to exist as a different name (fixes PR#3302)


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.12 27-Sep-1995 christos

- make sure the afterdepend rule fires `after' .depend gets created.
[fixed for parallel make]
- make depend prettier printing.


1.11 13-Dec-1994 mycroft

Remove `-+' arg to mkdep.


1.10 13-Dec-1994 mycroft

Add CPPFLAGS to mkdep lines, for cross-compilation.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
1.9 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.8 30-Jun-1994 cgd

don't be careless with _SUBDIRUSE


1.7 27-Feb-1994 cgd

cleandepend should happen on 'cleandir' not 'clean', from michaelv@iastate.edu


1.6 05-Dec-1993 cgd

do .S files, too


1.5 05-Sep-1993 mycroft

Depend .s files.


1.4 15-Aug-1993 mycroft

Don't do tags and cleandepend if no SRCS.


1.3 15-Aug-1993 mycroft

Makefile: Use `install -d' to create directory.
bsd.dep.mk: Add defaults for `beforedepend' and `afterdepend'.
sys.mk: 8 tabs --> space


1.2 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


1.1 15-Aug-1993 mycroft

Abstract out dependency stuff, and add RCS identifiers.


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406 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 pgoyette-compat-0728 pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE agc-symver-base tls-maxphys-base yamt-pagecache-base8 yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base bouyer-quota2-nbase bouyer-quota2-base matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE 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 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base mjf-devfs2-base keiichi-mipv6-nbase keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
1.4 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.3 14-May-2001 sommerfeld

Mark "dependall" rule with .MAKE since it invokes a sub-make.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.2 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.1 14-Sep-1999 perry

Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.69 11-Apr-2025 rillig

bsd.doc.mk: clean up

Remove the redundant location information from the .error directives, as
the .error directive provides the location by itself.

Fix typos in the print and spell targets, make the PRINTER variable
optional. The spell target still doesn't work due to the missing
spell.ok file. No idea where this file is supposed to come from.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.68 04-Aug-2015 dholland

branches: 1.68.28;
Remove CreationDate from the header of output postscript. Also, feed -n
to gzip when compressing so it doesn't store the timestamp in the file
header. For MKREPRO, but unconditional as the information omitted isn't
particularly useful. PR 50116.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-earlyentropy-base tls-maxphys-base
1.67 06-Jul-2014 dholland

Add MKGROFFHTMLDOC and make it default to no. It seems that sometimes
when generating html groff runs netpbm behind your back. Needless to
say we don't have netpbm in base, so this fails on a clean install; so
for now disable generating html for /usr/share/doc by default.
Workaround for PR 48970.

It seems that all available document preparation toolchains are made
of fail.


1.66 06-Jul-2014 dholland

Don't install EXTRAHTMLFILES if MKHTML is "no".


1.65 05-Jul-2014 dholland

Rework /usr/share/doc.

Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
- explicit use of soelim
- refer
- tbl
- pic
- eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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.64 16-Mar-2006 jwise

branches: 1.64.48; 1.64.60;
Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


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-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-3-base 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.63 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.62 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.61 19-Oct-2003 lukem

support MAKEVERBOSE


1.60 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.59 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.


Revision tags: fvdl_fs64_base
1.58 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.57 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.56 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.55 18-Nov-2001 bjh21

Need bsd.sys.mk for the GROFF definition in the non-USETOOLS case.


1.54 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


1.53 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.52 14-Aug-2001 tv

Change ROFF?= to be more like other utility macros; make this "groff -Tps"
by default.


1.51 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.50 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.49 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.48 06-Jun-2000 mycroft

Abuse .USE some more.


1.47 06-Jun-2000 mycroft

Minor rearrangement.


1.46 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base
1.45 28-Apr-2000 tron

branches: 1.45.2;
Add "dependall" target.


1.44 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.43 04-Sep-1999 fredb

Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.


1.42 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.41 12-Feb-1999 lukem

branches: 1.41.2; 1.41.4;
* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.40 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.39 29-Sep-1998 christos

Missed a few preserve flags.


1.38 27-Sep-1998 lukem

don't build/install man pages or docs if NOSHARE defined


1.37 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.36 21-Dec-1997 christos

Add bsd.obj.mk and fix the rules to work with obj dirs.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.35 11-Oct-1997 mycroft

Don't include bsd.obj.mk in these two files.


1.34 11-Oct-1997 mycroft

Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)


1.33 28-Jun-1997 christos

PR/3801: NAKAJIMA Yoshihiro: some documents are installed as executable


1.32 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.31 07-May-1997 mycroft

Add some dummy targets.


1.30 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.29 07-May-1997 mycroft

Introduce a separate cleandoc target.


1.28 07-May-1997 mycroft

Various simplifications.


1.27 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.26 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.25 15-Apr-1997 christos

Make the `obj' target `.PHONY', so that does not get affected by .PATH/VPATH
This is not hurting things right now, and it will help things when path
searching for target nodes is enabled for make.


1.24 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.23 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.22 17-Jan-1997 perry

add NODOC -- if set, prevents installation of doc files
contributed by Brian de Alwis <bsdealwi@undergrad.math.uwaterloo.ca>
closes pr-2290 (per thorpej)


1.21 18-Oct-1996 thorpej

Use ${INSTALL} rather than "install".
From Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.20 26-Jul-1994 mycroft

Move the inclusion of bsd.own.mk to a better place.


Revision tags: netbsd-1-0-base
1.19 30-Jun-1994 cgd

branches: 1.19.2;
RCSID frobbing, and minor sanity adjustments.


1.18 19-Jun-1994 cgd

Lite doc macros


1.17 09-Feb-1994 cgd

kill install -d's.


1.16 24-Jan-1994 cgd

change "PRINTER" to "PRINTER_TYPE" because people setenv PRINTER


1.15 23-Aug-1993 mycroft

Add empty `depend', `tags', and `lint' targets.


1.14 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


1.13 15-Aug-1993 mycroft

Abstract out dependency stuff, and add RCS identifiers.


1.12 15-Aug-1993 mycroft

Create target directories with `install -d', and move `obj' targets into one
file.


1.11 03-Aug-1993 mycroft

Don't remove obj dir (or link) when doing `make cleandir'.


1.10 29-Jul-1993 mycroft

Don't print the `making ...' message if an obj dir already exists.
Also, a minor cleanup.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
1.9 04-Jul-1993 cgd

allow docs to make an obj dir and build properly with it.


1.8 09-Jun-1993 cgd

make documentation build into ps files. this works, mostly...


Revision tags: netbsd-0-8 netbsd-alpha-1
1.7 10-Apr-1993 cgd

get rid of damned "d"foo


1.6 09-Apr-1993 cgd

oops; got rid of obj target -- that wasn't sensible!


1.5 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


1.4 08-Apr-1993 cgd

try to do the right thing, in terms making directories before we
install into them, and get the manpage cleans _OUT_ of "clean".
they don't belong there, only in cleandir, WFJ be damned.


1.3 27-Mar-1993 nate

Fixed the doc macros to call troff, eqn,and tbl instead of ditroff,
deqn, and dtbl.
Fixed make clean to remove the man pages (Bill fixed this in the distribution,
but not in the original source)
Changed install to leave the original file around, by using 'cp' instead of
'mv'. "install -c ..."


1.2 23-Mar-1993 cgd

added obj target so that docs make (well, actually don't make) obj dirs


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


1.5 15-Oct-2025 skrll

whitespace. spaces to tab.


1.4 15-Oct-2025 skrll

No need to include bsd.own.mk after bsd.init.mk - bsd.init.mk has already
done it.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base
1.3 02-Jun-2021 jmcneill

Add support for installing a copy of dtb files to the base dtb directory
when DTBSUBDIR is defined.


Revision tags: cjep_staticlib_x-base1 cjep_staticlib_x-base
1.2 19-May-2020 rin

Fix dtblist; our echo(1) does not interpret \t.


1.1 18-May-2020 jmcneill

Separate devicetree .dts -> .dtb building from kernel builds. They are now
part of a separate set, "dtb.tgz", and only built when MKDTB=yes. This
defaults to yes for earmv[67]* and aarch64, and no everywhere else.


1.24 20-Oct-2025 nat

New port: mac68ksf - Macintosh 68k softfloat.

This commit is all the Makefile glue for the new port which is the mac68k
port with MKSOFTFLOAT set to "yes".

As posted here:
https://mail-index.netbsd.org/port-mac68k/2025/10/14/msg001037.html


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.23 02-Sep-2020 jakllsch

Teach bsd.endian.mk about aarch64eb


Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.22 19-Sep-2014 matt

Add RISCV-V support.


1.21 03-Sep-2014 matt

Change to support OR1K


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-maxphys-base
1.20 10-Aug-2014 matt

Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only. While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.


Revision tags: yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.19 05-Aug-2013 matt

Simplify the earm tests


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
1.18 18-Jul-2013 matt

Test BSD makefile about coldfire.
XXX still hate m68k--netbsdelf-coldfire


Revision tags: riastradh-drm2-base agc-symver-base
1.17 03-Feb-2013 matt

branches: 1.17.2;
add earmhf


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
1.16 05-Aug-2012 matt

branches: 1.16.2;
Add the new MACHINE_ARCH of earm and earmeb (arm EABI(AAPCS-LINUX)).


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE 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 netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase 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 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 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-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
1.15 09-Jan-2008 simonb

branches: 1.15.16; 1.15.26;
Remove support for NetBSD/pc532.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase pc532-eol-2008 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 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
1.14 30-Jun-2006 mrg

branches: 1.14.10;
powerpc64 is big endian.


1.13 17-Aug-2005 skrll

Initial pass at an in-tree ia64 toolchain. From PR 29141 with some fixes
from me.


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-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-3-base 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.12 17-Mar-2004 matt

Make the assumption that all MACHINE_ARCH'es ending in 'el' are little
endian and all ending in 'eb' are big endian.


1.11 17-Mar-2004 he

Add sh3el and sh3eb MACHINE_ARCHs.


1.10 16-Mar-2004 he

Add m68000 MACHINE_ARCH (for sun2) to big-endian list.


1.9 14-Mar-2004 soren

Wow, I was more confused still. The former bsd.endian.mk wasn't actually
using the little/big values.
I wonder how this happened to work..


1.8 13-Mar-2004 skrll

Fix another silly error.


1.7 13-Mar-2004 christos

What happened to testing trivial changes?
Fix extra || at the end of the elif


1.6 12-Mar-2004 soren

Replace the <sys/endian.h> hack with a table based on MACHINE_ARCH.
This makes src/x11 build without USETOOLS.


1.5 27-Jul-2003 lukem

Ensure the first word of ${CC} exists before attempting to invoke ${CC}
to determine TARGET_ENDIANNESS.

This should fix problem reported privately by Matt Green <mrg@>.

This uses exists(${CC:ts::C/:.*$//}) as we don't expect the command name to
contain `:'. (The ":ts" trick is from a discussion with Simon Gerraty <sjg@>.)


1.4 18-May-2003 lukem

Only determine TARGET_ENDIANNESS if it's not already defined.


Revision tags: fvdl_fs64_base
1.3 05-Jun-2002 thorpej

Don't -I${DESTDIR}/usr/include without -nostdinc'ing, first. Some
versions of GCC are unhappy with that.


1.2 30-May-2002 itojun

branches: 1.2.2;
comment


1.1 30-May-2002 itojun

have bsd.endian.mk, which detects target endian.
generate *.db in target endian. (see tech-userlevel for discussions)


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base tls-maxphys-base
1.43 06-Apr-2013 uebayasi

Fix dependency handling of UUDECODE_FILES (e.g. libexec/ld.aout_so on i386).

The .uue rule is defined to make "foo.xxx.uue" -> "foo.xxx". When
UUDECODE_FILES_RENAME_* is also applied, the .uue rule tries to make "foo",
not "foo.xxx". This results in that "foo.xxx" is never made and always
"foo.xxx.uue" -> "foo" is made.

Define dependency for intermediate files.

Avoid unnecessary rebuild and reinstall. (Consume 70K in obj directory.)


Revision tags: 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-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE 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 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.42 10-Sep-2011 apb

branches: 1.42.2; 1.42.8;
Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.41 03-Feb-2010 roy

Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
1.40 05-Dec-2008 cube

Implement FILESBUILD_<file> to allow a FILES element to be built through a
target.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 mjf-devfs2-base
1.39 25-Aug-2008 lukem

branches: 1.39.2;
Change the message when creating BUILDSYMLINKS from "create" to "symlink".
(Arguably more meaningful)


Revision tags: 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 keiichi-mipv6-nbase keiichi-mipv6-base pc532-eol-2008 matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
1.38 11-Dec-2007 lukem

branches: 1.38.6; 1.38.10;
It's "its" for possessive, not "it's".


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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.37 17-May-2004 lukem

branches: 1.37.16;
In UUDECODE_FILES, always use -p to a temporary file and then rename
appropriately. This simplifies the rule (IMHO), and removes the use
of :? which is buggy on older makes...


1.36 13-May-2004 lukem

Add CONFIGFILES & CONFIGSYMLINKS; similar semantics to FILES & SYMLINKS
yet installed by 'configinstall' not 'install'.
(CONFIGFILES uses FILES{DIR,MODE,OWN,GRP,NAME}{,_*} as per FILES)


1.35 29-Mar-2004 jmc

Also pull in bsd.obj.mk for something which is just using files to install a
uuencoded file


1.34 29-Mar-2004 christos

include <bsd.sys.mk> because uue files need TOOL_UUDECODE and in the
USETOOLS=no case this never gets defined.


Revision tags: netbsd-2-0-base
1.33 19-Mar-2004 jmc

branches: 1.33.2;
Make sure clean rules pick up all uudecode output


1.32 18-Mar-2004 jmc

If performing a rename with uudecode, touch the expected output so make tracks
the dependency.


1.31 18-Mar-2004 jmc

Add UUDECODE_FILES_RENAME_fn so the output from a uudecode can be renamed
potentially (usually when the .uue has a pathname contained within it)


1.30 18-Mar-2004 jmc

Add a central method to deal with uuencoded files in the source tree.
Files will be stored as .uue and the name sans .uue will be added to
UUDECODE_FILES to extract them.


1.29 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.28 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.27 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.26 18-Oct-2003 lukem

implement MAKEVERBOSE for filesinstall


1.25 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.24 20-Sep-2003 lukem

Change `LNFILES' to `BUILDSYMLINKS', to more accurately describe its purpose.
Per discussion with Simon Gerraty.


1.23 03-Sep-2003 lukem

.PHONY cleanlnfiles


1.22 03-Sep-2003 lukem

Implement LNFILES: a list of two word items:
lnsrc lntgt
For each lnsrc item, create a symlink named lntgt.
The lntgt symlinks are removed by the cleandir target.


1.21 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


Revision tags: fvdl_fs64_base
1.20 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.19 24-Apr-2002 lukem

- in <bsd.files.mk>, don't clear FILES after using it, as that prevents
make -V FILES
from being useful (and given that every other variable can be
extracted using make -V, the behaviour was unusually inconsistent
given that the original reason for clearing it doesn't seem to be
relevant anymore)
- use <bsd.prog.mk> instead of directly including <bsd.files.mk>
(and possibly <bsd.man.mk> or <bsd.own.mk>)
- remove obsolete NOPROG


1.18 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.17 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.16 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.15 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.14 10-Jun-2000 mycroft

Use ${.ALLSRC:T} when doing the generated variable name lookups, so that it
DTRT for generated files in and obj directory (or accessed via .PATH).


1.13 06-Jun-2000 mycroft

Abuse .USE some more.


1.12 06-Jun-2000 mycroft

Minor rearrangement.


1.11 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.10 04-Sep-1999 fredb

branches: 1.10.6;
Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.


1.9 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.8 11-Feb-1999 tv

branches: 1.8.2; 1.8.4;
Create <bsd.info.mk> for Info documentation, and avoid the nasty install
stuff duplication by expressing it in terms of <bsd.files.mk>. Allow for
multiple inclusion of <bsd.files.mk> by clearing ${FILES} at the end, and
using FILES+= rather than FILES= in <bsd.info.mk>.


1.7 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.6 28-Sep-1998 christos

Use preserve flag in install.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.5 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.4 07-May-1997 mycroft

Various simplifications.


1.3 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.2 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.1 27-Mar-1997 christos

Put the FILES generated rules in a separate .mk file since both bsd.prog.mk
and bsd.lib.mk use them.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
1.12 09-May-2018 joerg

Drop checks for EXTERNAL_TOOLCHAIN for crt*.o. We've been using our own
versions for a long time and haven't relied on external files as such.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.11 07-Jun-2015 matt

branches: 1.11.14;
Make LIBCRT* depend on the right files if MLIBDIR from MKCOMPAT is defined.


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 tls-maxphys-base
1.10 10-Dec-2012 pooka

branches: 1.10.8;
Add more external dependencies for crtstuff


1.9 10-Dec-2012 pooka

Revert poor change


1.8 10-Dec-2012 pooka

Deal with crti and crtn not present in some EXTERNAL_TOOLCHAIN's. Also,
handle "missing" crtstuff internally instead of depending on external
intervention.


1.7 21-Nov-2012 pooka

unrevert previous. i can't figure out how to make the build break with
the change anymore, so assume it was a sunspot.


1.6 21-Nov-2012 pooka

revert previous, seems to upset the build in a creative way


1.5 21-Nov-2012 pooka

Allow user override of _GCC_CRT{BEGIN,END}S.


Revision tags: yamt-pagecache-base6
1.4 19-Jul-2012 christos

branches: 1.4.2;
From pooka: Fix EXTERNAL_TOOLCHAIN compilation where crti/crtn are not in the
same directory as crtbegin


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE 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 netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase 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
1.3 25-Oct-2008 mrg

branches: 1.3.18;
allow _GCC_*CRT* defines to be overridden in the in-tree toolchain case.


Revision tags: matt-mips64-base2 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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-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-3-base 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.2 27-Jun-2003 drochner

provide a variable pointing to the directory where
the gcc provided crt*.o are located


1.1 31-May-2003 thorpej

If EXTERNAL_TOOLCHAIN is defined, allow the compiler to define the
location of crt{begin,end}{,S}.o and libgcc.a. Encapsulate all of
this logic into the new bsd.gcc.mk, and use it in bsd.prog.mk and
bsd.lib.mk.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.6 20-Dec-2021 christos

Rename:
MKKDEBUG -> MKDEBUGKERNEL
MKTOOLSDEBUG -> MKDEBUGTOOLS
while keeping compatibility with the old names. Add missing documentation.
Now all debugging tunables are prefixed with MKDEBUG.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.5 09-Aug-2020 christos

Expose 64 bit fileystems API's on Linux and make the default FS API 64 bits
Should unbreak newfs's of fs's, using the tool version of newfs.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 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 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
1.4 25-Feb-2018 chs

add DTRACE_OPTS and HOST_DTRACE_OPTS to allow disabling various optimizations
that interfere with using dtrace. use them when MKDTRACE=yes.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.3 20-Feb-2016 christos

Provide a variable MKTOOLSDEBUG to build debugging versions of tools.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 tls-maxphys-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base
1.2 10-Apr-2014 plunky

branches: 1.2.2; 1.2.6;
the value of HOST_MKDEP previously depended on USETOOLS;
make it do so again, and centralise the USETOOLS=no case
into bsd.host.mk


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.1 16-Jan-2014 christos

branches: 1.1.2;
- Add a new bsd.host.mk that contains all the HOST_ variables extracted from
bsd.sys.mk and bsd.own.mk
- Add protection requiring that:
1. bsd.sys.mk is not include from other Makefiles directly
2. bsd.own.mk must be included before bsd.sys.mk since it
sets variables that bsd.sys.mk uses as conditionals.

This is step 1 of removing all variable settings from bsd.sys.mk and
leaving behind only rules. This way, the structure of a standard Makefile
is:
variable overrides

optionally include bsd.own.mk
optionally include bsd.endian.mk

variable settings that use variables defined in bsd.own.mk

include a one or more rule .mk files (such as bsd.prog.mk etc)


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502
1.1 01-May-2018 christos

branches: 1.1.2;
Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.21 12-Apr-2024 jakllsch

Filter out -Wp,-iremap,* from CPPFLAGS as is done in hostprog.mk

Seems to fix build of libnbcompat in reproducible mode on host toolchains w/o -iremap


Revision tags: netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
1.20 04-May-2018 christos

branches: 1.20.12;
include bsd.hostinit.mk instead of bsd.init.mk


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.19 01-Dec-2014 erh

branches: 1.19.14;
PR toolchain/9618: add ".d" to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-maxphys-base
1.18 10-Apr-2014 plunky

the value of HOST_MKDEP previously depended on USETOOLS;
make it do so again, and centralise the USETOOLS=no case
into bsd.host.mk


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.17 29-Oct-2013 joerg

branches: 1.17.2;
Unbreak src/tools usage of C++.


Revision tags: 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-6-1-2-RELEASE netbsd-6-0-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 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.16 10-Sep-2011 apb

branches: 1.16.2; 1.16.8;
Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.15 05-Aug-2011 plunky

NOPATH the lib we are making, rather than HOSTPROG which is irrelevant


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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.14 10-Jun-2004 lukem

Be consistent in handling YHEADER, similar to Christos' fix in bsd.lib.mk 1.253


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.13 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.12 02-Jan-2004 lukem

Consistently test all variables that support a "yes"/"no" value with
${VAR} == "no"
or
${VAR} != "no"
(instead of against "yes"). Variables affected:
TOOLCHAIN_MISSING
HAVE_GCC3
USE_TOOLS_TOOLCHAIN
NEED_OWN_INSTALL_TARGET
USE_SHLIBDIR

Improve the documentation.


1.11 11-Nov-2003 dsl

Set MKDEP_SUFFIXES to get additional targets in .depend instead of using
sed in .afterdepend. I don't think .afterdepend is used anywhere any more.


1.10 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.9 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.8 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.7 01-Aug-2003 lukem

Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".


1.6 31-Jul-2003 lukem

bsd.dep.mk: add a dependency for *.d on ${SRCS} ${DPSRCS}. this should fix
some build problems where DPSRCS contains .h files that need to exist to
build the .d file.

document that bsd.dep.mk should be included after anything that might
update SRCS or DPSRCS so that the above works correctly, and actually
ensure this is the case.


1.5 28-Jul-2003 lukem

be consistent when adding *.y and *.l to DPSRCS


1.4 11-Jun-2003 msaitoh

catch signal 1,2,3,13 and 15 to clean /tmp/_dependXXX


Revision tags: fvdl_fs64_base
1.3 17-Sep-2002 thorpej

* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.

If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.

If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.2 03-Jan-2002 tv

Add more tolerant script-based implementation of mkdep for host tool
compiles. Based loosely on mkdep.old.compiler (so CSRG license copied),
but now uses just one rewrite (awk) process per cpp invocation and
determines the proper way to run cpp and awk via a "configure" script.

Use HOST_MKDEP in bsd.hostlib/hostprog.mk (defaulting to the old override
value of MKDEP), and give it a TOOLDIR equivalent in bsd.own.mk.


1.1 28-Nov-2001 tv

Add <bsd.hostlib.mk>, for use when building a host-specific library
(to be used with src/tools/compat).


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.86 02-Nov-2024 christos

make zstd a private library (for now)


1.85 31-Oct-2024 christos

Add zstd


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.84 27-Mar-2021 simonb

branches: 1.84.8;
Make columns nicely aligned.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
1.83 04-Apr-2020 christos

Add libgnuctf


Revision tags: is-mlppp-base phil-wifi-20191119
1.82 28-Oct-2019 maxv

Add nvmmctl, with two commands for now.


Revision tags: netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
1.81 21-Jan-2019 christos

branches: 1.81.2;
Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
1.80 04-May-2018 christos

branches: 1.80.2;
include bsd.hostinit.mk instead of bsd.init.mk


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
1.79 25-Nov-2017 jmcneill

branches: 1.79.2;
Add LIBREFUSE define for DPADD


1.78 10-Oct-2017 christos

add the rump resolver library.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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
1.77 08-Feb-2017 kamil

libpthread_dbg(3) deletion from the base distribution

libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.76 01-Jan-2016 christos

branches: 1.76.2; 1.76.4;
Add the pthread libraries, documented already in bsd.README; sort


1.75 22-Nov-2015 kamil

Add new predefined value for DPADD: LIBPANEL


1.74 01-Dec-2014 erh

PR toolchain/9618: add ".d" to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-maxphys-base
1.73 10-Apr-2014 plunky

the value of HOST_MKDEP previously depended on USETOOLS;
make it do so again, and centralise the USETOOLS=no case
into bsd.host.mk


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.72 29-Oct-2013 joerg

branches: 1.72.2;
Unbreak src/tools usage of C++.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
1.71 14-Jun-2013 tsutsui

Invoke tools/binstall/mkmanifest for Cygwin via ${HOST_SH}.
Fixes builds using source sets that drop executable bits.


1.70 11-Apr-2013 christos

add new libevent2 libraries.


Revision tags: agc-symver-base
1.69 17-Feb-2013 christos

Add a hook to create a manifest file if needed under cygwin


1.68 16-Feb-2013 jmmv

Hook Lutok into the build. This is all protected by the MKKYUA guard.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
1.67 29-Feb-2012 tron

branches: 1.67.2;
Move "libexpat" from X11 into base which fixes PR lib/40346.
This change was approved by the Core Group.


Revision tags: netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.66 13-Oct-2011 joerg

branches: 1.66.2; 1.66.4;
Hook up SQLite into the build


1.65 07-Oct-2011 mrg

obsolete libgcc_pic and friends. all libgcc's are supposed to be pic
for platforms with shlibs already (and are.)

this obsoletes our hacks for the libgcc specs to use libgcc_pic, and
fixes a couple of other issues reported to me directly.


1.64 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.63 05-Jun-2011 christos

add libgcc_pic dependency.


Revision tags: cherry-xenmp-base
1.62 24-Mar-2011 bouyer

branches: 1.62.2;
Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)


Revision tags: bouyer-quota2-nbase
1.61 20-Feb-2011 jmmv

Define LIBATF_C and LIBATF_CXX to point to their corresponding .a files and
use these to properly set DPADD for test programs.


Revision tags: bouyer-quota2-base matt-mips64-premerge-20101231
1.60 25-Dec-2010 joerg

branches: 1.60.2;
If MKREPRO, transform ${NETBSDSRCDIR} to /usr/src and ${DESTDIR} to /
for the purpose of the C preprocessor. This avoids leaking the source
path into the final binaries.


1.59 22-Nov-2010 pooka

add LIBRUMPCLIENT


1.58 02-Nov-2010 joerg

Add LIBLZMA.


1.57 03-Feb-2010 roy

Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
1.56 12-May-2009 plunky

remove libsdp as improved functionality has been enabled in libbluetooth.


1.55 10-Apr-2009 apb

Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links. They have no effect except when using a
metalog, in which case the information is added to the metalog. In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg. This should fix PR 24457 and PR 41155.


1.54 19-Nov-2008 pooka

branches: 1.54.2;
Split vfs out of rumpkern into rumpvfs. Non-fs rumps no longer
include the file system code. File system rumps explicitly need
to include rumpvfs from now on.


Revision tags: netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base
1.53 02-Oct-2008 joerg

branches: 1.53.2; 1.53.4;
Hook up libfetch and pkg_install update.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
1.52 29-Jul-2008 pooka

Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
1.51 26-Apr-2008 christos

branches: 1.51.2;
make all shared libraries depend on libc.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-4-base
1.50 09-Nov-2006 christos

branches: 1.50.16; 1.50.18;
Add ssp glue.


1.49 22-Oct-2006 pooka

libpuffs


1.48 09-Oct-2006 mrg

- clean up some comments to reality.
- retire LIBDCK, LIBG2C and (long broken) USE_LIBSTDCXX
- in bsd.hostprog.mk's LIBSTDCPP -> LIBSTDCC
- add LIBSUPCXX
- don't default USE_LIBSTDCXX or USE_GCC4 since they are
not used in the tree any where
- same with USE_XF86_4; retire it
- remove _SUPCXX handling in bsd.prog.mk

inspired by PR#26714.


Revision tags: abandoned-netbsd-4-base
1.47 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


1.46 20-Mar-2006 christos

remove KRB4 libraries (Jukka Salmi)


1.45 02-Sep-2005 jwise

Add proper support for using bsd.hostprog.mk to build c++-based host
programs -- doesn't affect current host tools build (groff is built the
Makefile.gnuhost way).

Provides {.cc,.cpp,.cxx,.C}.lo rule, associated variables, and HOSTPROG_CXX
support (mirroring PROG_CXX in bsd.prog.mk).

Tested with from-scratch `build.sh tools' and full system build.


Revision tags: netbsd-3-base
1.44 20-Jun-2004 jmc

branches: 1.44.2;
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944


1.43 10-Jun-2004 lukem

Be consistent in handling YHEADER, similar to Christos' fix in bsd.lib.mk 1.253


1.42 21-May-2004 ross

If you add a library, you need to define its DPADD symbol here.

Add LIBMAGIC.


Revision tags: netbsd-2-0-base
1.41 29-Jan-2004 lukem

branches: 1.41.2;
Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.40 27-Jan-2004 lukem

Replace
:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)


1.39 02-Jan-2004 lukem

Consistently test all variables that support a "yes"/"no" value with
${VAR} == "no"
or
${VAR} != "no"
(instead of against "yes"). Variables affected:
TOOLCHAIN_MISSING
HAVE_GCC3
USE_TOOLS_TOOLCHAIN
NEED_OWN_INSTALL_TARGET
USE_SHLIBDIR

Improve the documentation.


1.38 26-Dec-2003 christos

Add libstdc++


1.37 16-Nov-2003 lukem

simplify with _MKTARGET_LINK


1.36 11-Nov-2003 dsl

Set MKDEP_SUFFIXES to get additional targets in .depend instead of using
sed in .afterdepend. I don't think .afterdepend is used anywhere any more.


1.35 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.34 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.33 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.32 01-Aug-2003 lukem

Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".


1.31 28-Jul-2003 lukem

be consistent when adding *.y and *.l to DPSRCS


1.30 18-Jul-2003 lukem

whitespace cleanup


1.29 16-Jul-2003 itojun

stop installing install libtelnet. build under lib/libtelnet and reference
it from usr.bin/telnet and libexec/telnetd.
(reason for separate build: compiler flags)


1.28 12-Jun-2003 provos

add LIBEVENT


1.27 11-Jun-2003 msaitoh

catch signal 1,2,3,13 and 15 to clean /tmp/_dependXXX


1.26 14-May-2003 dbj

remove dependencies on ${LIBC} ${LIBM} and ${LIBTERMCAP} static libraries
from host tool targets. Commits fix from PR toolchain/21495


Revision tags: fvdl_fs64_base
1.25 17-Sep-2002 thorpej

* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.

If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.

If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.24 29-Mar-2002 tv

COPTS is for target objects, not host objects.


1.23 03-Jan-2002 tv

Add more tolerant script-based implementation of mkdep for host tool
compiles. Based loosely on mkdep.old.compiler (so CSRG license copied),
but now uses just one rewrite (awk) process per cpp invocation and
determines the proper way to run cpp and awk via a "configure" script.

Use HOST_MKDEP in bsd.hostlib/hostprog.mk (defaulting to the old override
value of MKDEP), and give it a TOOLDIR equivalent in bsd.own.mk.


1.22 14-Nov-2001 tv

C/..$/.c/ -> C/\..$/.c/


1.21 14-Nov-2001 tv

Remove SHAREDSTRINGS logic for host programs; this is unnecessary here.


1.20 13-Nov-2001 tv

Move host program overrides of INSTALL and MKDEP to <bsd.hostprog.mk>.


1.19 12-Nov-2001 tv

Set CFLAGS and CPPFLAGS for the benefit of <bsd.dep.mk>, and move the
inclusion of <bsd.sys.mk> to the top to get defaults. (Dependency handling
needs a cleanup, and will get one soon....)


1.18 11-Nov-2001 tv

Affix the ${HOST_OSTYPE} info to the end of the objdir name if OBJMACHINE
is set (and MAKEOBJDIR[PREFIX] is not in use). This permits multiple hosts
to compile hostprogs (not just src/tools) for a given target without
colliding with each other.

Currently restricted only to new toolchain builds, as this requires a new
make(1) in order to function properly.


1.17 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.16 25-Oct-2001 thorpej

Sigh, back out previous -- it is necessary inorder for the depend
(and dependall) targets to work properly.

XXX THIS IS BROKEN. It's highly questionalble that we should be applying
our .depend-generating rules to a host system -- the mkdep we currently
use assumes GCC.


1.15 25-Oct-2001 thorpej

Remove an unnecessary "CPPFLAGS=${HOST_CPPFLAGS}" -- the host tool
targets use HOST_CPPFLAGS exclusively, and keeping this assignment
can get us into some unfortuante recursion trouble.


1.14 19-Oct-2001 tv

Add .NOPATH for all files generated from .l or .y files in SRCS. Fixes PRs
bin/14187 and lib/14239.

Also simplify the handling of these transforms to .c and .h files a bit by
leveraging make's builtin macro operators.


1.13 25-Sep-2001 tv

Set .NOPATH on program to build to make sure it goes in .OBJDIR.
Problem noted by <seebs@plethora.net>.


1.12 13-Sep-2001 thorpej

Add LIBPCI.


1.11 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.10 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.9 04-Jan-2001 garbled

Add LIBCDK and LIBFORM definitions


1.8 31-Oct-2000 itojun

add ${LIBINTL} for use with DPADD.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.7 07-Mar-2000 veego

Remove unused libahdi.
It will be replaced in the future with a more generic libdisklabel.


1.6 05-Feb-2000 jdc

Add libahdi entries.


1.5 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.4 23-Nov-1999 blymn

Added libmenu library.


Revision tags: comdex-fall-1999-base
1.3 24-Sep-1999 wrstuden

Zap proginstall and scriptinstall - they don't make sense for hostprog.


1.2 14-Sep-1999 perry

branches: 1.2.2;
Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.1 14-Jul-1999 wrstuden

Add bsd.hostprog.mk, a makefile for making programs used during
the build which will run on the build machine.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.34 29-Mar-2022 christos

get rid of old style `` command substitution in shell and use $() instead.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118
1.33 26-Dec-2018 christos

Remove extra -c. -c has been the default behavior since 2003, and
the comment why it is needed was introduced in 2001. We don't want
to duplicate -c which is set in ${COPY} because someone might want
to override that.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 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-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 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 tls-maxphys-base 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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.32 16-Mar-2006 jwise

branches: 1.32.82; 1.32.84;
Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


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.31 06-Jul-2004 mycroft

Add a missing .PHONY.


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.30 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.29 27-Jan-2004 lukem

There's no need to use :N-c with ${INSTALL_FILE}.


1.28 07-Nov-2003 lukem

Support MAKEVERBOSE more effectively.


1.27 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.26 18-Oct-2003 lukem

implement MAKEVERBOSE for rules which are of the form:
@cmp -s ${.ALLSRC} ${.TARGET} || ( echo cmd && cmd )


1.25 03-Aug-2003 lukem

Add INCSYMLINKS to <bsd.inc.mk> and <bsd.kinc.mk>, and use that instead of
SYMLINKS to install symlinked header files. INCSYMLINKS are installed with
'make includes'. This avoids using SYMLINKS and hacks with the 'linkinstall'
target in <bsd.links.mk>, as linksinstall occurs in 'make install' and hacks
to get it to occur in 'make includes' weren't robust, as seen in lib/libdes.

Yet more improvements to bsd.README.


1.24 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


Revision tags: fvdl_fs64_base
1.23 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.22 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.21 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.20 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.19 31-Oct-2001 tv

Revert previous. src/include depends on the ability of <bsd.inc.mk> to
provide things to INCS with / in them. Since nothing in-tree yet uses
INCS{DIR,NAME}_filename, this is not a loss at the moment.


1.18 30-Oct-2001 wiz

Add support for INCSNAME and INCSNAME_<file> to bsd.inc.mk.
Same syntax as FILESNAME and FILESNAME_<file>, allows to install
includes under a different name.
Okay'd by christos.


1.17 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.16 06-Jun-2000 mycroft

Abuse .USE some more.


1.15 06-Jun-2000 mycroft

Minor rearrangement.


1.14 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.13 21-Aug-1999 simonb

branches: 1.13.6;
Add ${INSTPRIV} to ${INSTALL} commands.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.12 04-Feb-1999 christos

branches: 1.12.4;
PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.11 29-Sep-1998 christos

Missed a few preserve flags.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.10 03-Jun-1997 cgd

declare ${DESTDIR}${INCSDIR}/$I .PHONY if UPDATE isn't defined, so that
headers will be installed properly in the !UPDATE case. From Christos.


1.9 31-May-1997 cjs

Back out BUILDDIR and NOINSTALL changes.


1.8 26-May-1997 cjs

branches: 1.8.2;
These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.


1.7 09-May-1997 mycroft

Oops; rearrange dependencies to get things built early enough.


1.6 09-May-1997 mycroft

Make sure INCS and SRCS are built if necessary.


1.5 07-May-1997 mycroft

Various simplifications.


1.4 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.3 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.2 27-Mar-1997 christos

Don't generate an include target if we don't have INCS set, because SUBDIRS
can make one too. This will break on Makefiles that have both INCS and SUBDIRS,
so then we'll need to change includes: to includes::, but we don't have any
yet.


1.1 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.46 18-Aug-2024 rin

bsd.info.mk: Install INFOFILES as is, if TEXINFO is empty

This allows us to install pre-generated info files. NFCI otherwise.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.45 16-Jun-2024 hgutch

branches: 1.45.2;
Simplify test for 0 byte file size

pointed out by kre@


1.44 16-Jun-2024 hgutch

Unbreak generation of share/info/dir

install-info refuses to operate on 0 byte files. When __infoinstall
is run the first time in a build, an empty ${INFODIRFILE} is created
via touch. As install-info leaves this file untouched, we are left
with a 0 byte file at the end. For subsequent __infostall runs the
only difference is that ${INFODIRFILE} already exists as a 0 byte
file, so no new one is created.

Fix by deleting ${INFODIRFILE} in the loop (with the lock held) if it
is a 0 byte file. In this case also don't bother with calling
install-info -r.


1.43 01-May-2023 christos

Create the INFODIRFILE if it does not exist, so that we can take a lock
on it. Hopefully fixes a race condition where two parallel makes attempt
to create the file at the same time.


Revision tags: netbsd-10-1-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
1.42 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.41 18-Dec-2015 christos

branches: 1.41.14; 1.41.16;
Sort texinfo dir file for MKREPRO


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-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 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.40 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
1.39 28-Feb-2009 joerg

When processing texinfo sources, use --no-version-header to make the
build reproducable.


Revision tags: netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 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-nbase keiichi-mipv6-base pc532-eol-2008 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.38 16-Mar-2006 jwise

branches: 1.38.26; 1.38.28;
Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


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-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-3-base 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.37 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.36 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.35 19-Oct-2003 lukem

support MAKEVERBOSE for .txi.info .texi.info .texinfo.info


1.34 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.33 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.32 27-Jul-2003 lukem

be consistent about using ${.TARGET} for $@ and ${.IMPSRC} for $<


1.31 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.30 14-Jul-2003 lukem

Pull in <bsd.sys.mk> to provide the defaults for TOOL_* when USETOOLS=never


1.29 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.28 24-Jun-2003 tron

Fix "clean" rule to honor "CLEANFILES" variable.


Revision tags: fvdl_fs64_base
1.27 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


Revision tags: netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.26 01-Mar-2002 pk

branches: 1.26.2;
Serialize access to $INFODIR/dir; multiple instances of `install-info'
would trash that file.


1.25 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.24 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.23 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.22 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.21 02-Aug-2001 enami

Now that the makeinfo is quiet by default, don't suppress commmand line echo.


1.20 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.19 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.18 10-Jun-2000 mycroft

Use ${.ALLSRC:T} when doing the generated variable name lookups, so that it
DTRT for generated files in and obj directory (or accessed via .PATH).


1.17 10-Jun-2000 mycroft

Do `install-info --remove' after installing the info file.


1.16 08-Jun-2000 mycroft

Rearrange slightly to get rid of unneeded conditionals (and make this
*slightly* less painful to trace through, though not much).


1.15 08-Jun-2000 mycroft

Rework to not use the `files' crap. It requires far too much klugery to
actually get the semantics right. As a bonus, the info directory is not
reordered when using UPDATE any more, if files are not actually reinstalled.


1.14 08-Jun-2000 mycroft

The previous commit was *definitely* wrong. It indicates an out of date
make(1).


1.13 07-Jun-2000 matt

Don't know if this is a side effect of the recent makes changes but
set FILESDIR_${F} for info files.


1.12 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base
1.11 19-Feb-2000 erh

branches: 1.11.2;
Add NOPATH to prevent files in the serach path from interfering with what we're building.


1.10 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.9 14-Sep-1999 perry

Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.8 22-Apr-1999 billc

Fix thinko to make MKINFO=no work again. Closes PRs 7342 and 7411.


Revision tags: netbsd-1-4-base
1.7 12-Feb-1999 tv

branches: 1.7.2;
Add {MK,NO}INFO, and use that to control generation/installation of Info
documentation. MKINFO=no is implied by MKSHARE=no.


1.6 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.5 11-Feb-1999 tv

I wish they'd settle on a file extension. Build Info files for any of
.txi, .texi, or .texinfo.


1.4 11-Feb-1999 tv

Clean on "cleandir" and "distclean", not "realclean".
XXX those clean targets should be unified and depend on a common name,
including that "distclean" should invoke "realclean".


1.3 11-Feb-1999 tv

Add an INFOFLAGS that contains -I's to pass to makeinfo.


1.2 11-Feb-1999 tv

makeinfo produces its own `making...' message, so make the command itself
silent.


1.1 11-Feb-1999 tv

Create <bsd.info.mk> for Info documentation, and avoid the nasty install
stuff duplication by expressing it in terms of <bsd.files.mk>. Allow for
multiple inclusion of <bsd.files.mk> by clearing ${FILES} at the end, and
using FILES+= rather than FILES= in <bsd.info.mk>.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 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 tls-maxphys-base 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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-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-3-base 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.2 28-Jul-2003 lukem

Be consistent how "multiple include protection" is implemented. I.e,

.if !defined(_BSD_foo_MK_)
_BSD_foo_MK_=1

# ...

.endif # !defined(_BSD_foo_MK_)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.1 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.5 30-Nov-2014 uebayasi

Add a new build make variable, CONFIGOPTS, which is passed to config(1)
when building kernels. Revert "mkernel=*" and "mkernels" in favor of
this option.

Diff posted on source-changes-d@, approved by (null).


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.4 20-Sep-2013 pooka

Make it possible to specify a directory for the .ioconf file.
Still default to .CURDIR


Revision tags: 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-6-1-2-RELEASE netbsd-6-0-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 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.3 25-Mar-2010 pooka

branches: 1.3.6; 1.3.12;
Depend ioconf.c on config (if doing a USETOOLS==yes build).

While this is not strictly sensible, it keeps UPDATE=1 builds
rolling if I change some aspect of config (such as adding the
cfdriver/cfattach lists now). This is going away eventually.


1.2 22-Mar-2010 pooka

deal with ioconf.h


1.1 21-Mar-2010 pooka

Move make snippets for use with config(1) ioconf functionality from
rump into share/mk. This is to make it useful for all kernel
builders.

Note: we have waaay too many weird and wonderful ways of making
kernel code (monolithic kernel, modules, rump). There should be
only one way to build kernel code instead of a maze of twisty little
.mk files, all not quite alike. When that is fixed, this snippet can go
into the more generic .mk file.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base tls-maxphys-base
1.14 03-Jun-2013 mrg

update to xorg-server 1.10.6.


Revision tags: 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-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE 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 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.13 25-Jan-2010 christos

branches: 1.13.6; 1.13.12;
PR/42658: Geoff Wing: Quote directory variables to deal with spaces in the
source pathname.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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-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-3-base 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.12 11-Oct-2003 lukem

Only try to KERNOBJDIR!= if the required directory exists.


1.11 18-Jul-2003 lukem

whitespace cleanup


1.10 06-Jan-2003 lukem

Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile. Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.9 26-Apr-2002 lukem

Implement NETBSDSRCDIR, which is the top level of the NetBSD source tree.
Defaults to the directory determined by the _SRC_TOP_ logic (if != ""),
and the BSDSRCDIR.

NETBSDSRCDIR has been provided for use by the various NetBSD source
Makefiles to find the top of the NetBSD source tree, and isn't
affected by the inheritance properties of _SRC_TOP_, nor does it
have the magic BSDOBJDIR baggage that BSDSRCDIR is stuck with.


1.8 10-Apr-2002 lukem

replace BSDSRCDIR with _SRC_TOP_, since the latter is more likely to
be "accurate". document _SRC_TOP_.


1.7 27-Nov-2001 jmc

Ok, take 2 on redoing KERNOBJDIR logic.

Use the old setup for MAKEOBJDIRPREFIX but also add a new check for
_SRC_TOP_OBJ_ and use that if it's set. This allows a make release using
build.sh (which uses MAKEOBJDIR patterns) to function correctly on r/o
source tree's.


1.6 27-Nov-2001 jmc

Back out last. Typo'd some things I need to test again


1.5 27-Nov-2001 jmc

Change logic around for kernel objdir handling.

Use MAKEOBJDIRPREFIX as before if it's set

otherwise if _SRC_TOP_OBJ_ is set and isn't "" use it as the base for the
obj dir


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.4 07-May-2000 sjg

correct description of KERNSRCDIR and others


1.3 06-May-2000 sjg

if make(obj) then use MAKEOBJDIRPREFIX regardless


1.2 03-May-2000 sjg

remove/change missleading comments


1.1 02-May-2000 sjg

Added bsd.kernobj.mk to centralize the magic for the location
of kernel configs and compiles. Relies on BSDSRCDIR being set
which is now handled by src/Makefile.inc if need be.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.38 29-Mar-2022 christos

get rid of old style `` command substitution in shell and use $() instead.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118
1.37 26-Dec-2018 christos

Remove extra -c. -c has been the default behavior since 2003, and
the comment why it is needed was introduced in 2001. We don't want
to duplicate -c which is set in ${COPY} because someone might want
to override that.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 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-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 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 tls-maxphys-base 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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.36 16-Mar-2006 jwise

branches: 1.36.82; 1.36.84;
Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


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-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-3-base 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.35 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.34 27-Jan-2004 lukem

There's no need to use :N-c with ${INSTALL_FILE}.


1.33 07-Nov-2003 lukem

Support MAKEVERBOSE more effectively.


1.32 20-Oct-2003 chs

fix parallel-make race.


1.31 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.30 18-Oct-2003 lukem

implement MAKEVERBOSE for rules which are of the form:
@cmp -s ${.ALLSRC} ${.TARGET} || ( echo cmd && cmd )


1.29 03-Aug-2003 lukem

Add INCSYMLINKS to <bsd.inc.mk> and <bsd.kinc.mk>, and use that instead of
SYMLINKS to install symlinked header files. INCSYMLINKS are installed with
'make includes'. This avoids using SYMLINKS and hacks with the 'linkinstall'
target in <bsd.links.mk>, as linksinstall occurs in 'make install' and hacks
to get it to occur in 'make includes' weren't robust, as seen in lib/libdes.

Yet more improvements to bsd.README.


1.28 28-Jul-2003 lukem

Pull in <bsd.sys.mk> as well, for the TOOL_ variables in the
USETOOLS=never case.
Found & fixed by Anders Hjalmarsson in PR misc/22283.


1.27 20-Jul-2003 lukem

Use ltarg=`stat -qf '%Y' $l` to read a symlink's target (and rely upon
a non-zero exit value to indicate a missing file or non-symlink),
instead of test -h $l && ltarg=`ls -ld $l | awk '{print $NF}'`
since the former is quicker and more concise.


1.26 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


Revision tags: fvdl_fs64_base
1.25 26-Nov-2002 lukem

Deprecate SYS_INCLUDE and the optional SYS_INCLUDE=symlinks functionality,
and only support the "copies" default.
Per discussion on tech-userlevel@.


1.24 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


1.23 24-Aug-2002 lukem

don't bother with "rm -f $$t" before ${INSTALL_LINK} or ${INSTALL_SYMLINK},
as they default to using install(1) -r.
the rm can cause problems in certain situations, such as moving a library or
shared linker that install(1) depends upon to another location and replacing
it with a (sym)link.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.22 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.21 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.20 19-Nov-2001 perry

replace instances of ln with ${INSTALL_LINK} and ${INSTALL_SYMLINK}


1.19 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.18 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


1.17 07-Jul-2000 cgd

test -h, not test -L.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.16 06-Jun-2000 mycroft

Abuse .USE some more.


1.15 06-Jun-2000 mycroft

Minor rearrangement.


1.14 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base
1.13 24-Apr-2000 simonb

branches: 1.13.2;
White space bogons (double spaces, spaces instead of tabs).


1.12 23-Apr-2000 simonb

Change SYMLINKS so that the link isn't recreated if it already points
to the right place (much the same as bsd.obj.mk already does).


1.11 26-Feb-2000 mycroft

Make sure the `rm' and `ln' for a link are in the same shell command.
(The reason for this is obscure...)


1.10 10-Feb-2000 drochner

fix link creation:
-put "echo"s for the daughter Makefile into a subshell to get them all
into the Makefile (instead of stdout - should fix PR misc/9336 by
Bernd Ernesti)
-change operator for "realall" back to ":" - rules are supposed to
accumulate, and "::" clashes with the definition in <bsd.own.mk>
-call sub-make with the "all" target to make sure we don't get just
the first rule


1.9 24-Jan-2000 mycroft

Fix a bogon that caused some symlinks to not be installed.


1.8 22-Jan-2000 mycroft

Adjust symlink crap for all/realall changes.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.7 22-Aug-1999 kleink

When test(1)ing for a symlink, use the -h primitive instead of -L. Although
the latter is supported in our test(1), the former is more portable, and is
defined in 1003.2bD3 and SVID4. Addresses PR kern/8225 from Andrew Cagney.


1.6 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.5 04-Feb-1999 christos

branches: 1.5.4;
PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.4 15-Jan-1999 castor

allow generated kernel includes and support mips pubassym.cf mechanism


1.3 31-Dec-1998 castor

Change make to ${MAKE} to allow standard make to be overridden.


1.2 29-Sep-1998 christos

Missed a few preserve flags.


1.1 12-Jun-1998 cgd

add bsd.kinc.mk, a template to support the new kernel include file
installation mechanism.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.15 25-Apr-2020 bouyer

Add /usr/include/xen/intrdefs.h to sets
Add xen to KLINKFILES for amd64/i386


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 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 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
1.14 06-Dec-2017 christos

remove multiple copies of the same logic.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 netbsd-7-1-2-RELEASE 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 tls-maxphys-base
1.13 10-Aug-2014 matt

Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only. While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.


Revision tags: yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.12 22-Jan-2014 christos

For now, ignore errors from creating klinks. This is racy and you can get
it to trigger in 1/4 of the builds with -j 40 on a 24 processor box. Typical
error is:

ln: machine/include: File exists
*** Failed target: .BEGIN
*** Failed command: rm -f machine && ln -s /p/netbsd/cvsroot/src/sys/arch/vax/include machine
*** Error code 1
Stop.

Another approach to fixing this is to create a lockfile or adding other flags
to ln to change its behavior.


1.11 21-Aug-2013 matt

Change rule for x86 link to not be x86 dependent


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
1.10 02-May-2013 matt

Allow use of a different by using KLINK_MACHINE instead.
If it's not set, KLINK_MACHINE is set to ${MACHINE}


Revision tags: 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-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE 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 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.9 10-Jul-2011 matt

branches: 1.9.2; 1.9.8;
Add more links for evbmips
Add ${MACHINE} link


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
1.8 20-Feb-2011 jmcneill

add 'i386' to CLEANFILES on amd64, thanks mrg!


Revision tags: bouyer-quota2-base matt-mips64-premerge-20101231
1.7 13-Mar-2010 christos

branches: 1.7.2;
don't make links to directories that don't exist


Revision tags: matt-premerge-20091211
1.6 27-Nov-2009 pooka

Move -mcmodel=kernel CFLAGS from bsd.klinks.mk to amd64/include/Makefile.inc
to avoid having the kernel toolchain flags split over a billion different
files.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.5 15-Mar-2009 tsutsui

Include <bsd.own.mk> for ${NETBSDSRCDIR}, ${MACHINE}, ${MACHINE_CPU} and
${MACHINE_ARCH} variables.


1.4 15-Mar-2009 tsutsui

Create symlinks in !make(obj) && !make(clean) && !make(cleandir) case
as most Makefiles for standalone programs do.


1.3 08-Dec-2008 pooka

branches: 1.3.2;
create i386 link for amd64. per discussion with mrg.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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-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 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 mjf-devfs2-base
1.2 29-Jul-2008 pooka

Prevent amd64 compiler flag -mcmodel=kernel for rump kernel code.
This allows to compile rump libraries as shared libraries also on mad64.

Problem spotted by Greg Oster. I guess his build broke or something ...


Revision tags: 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 keiichi-mipv6-nbase keiichi-mipv6-base pc532-eol-2008 matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base hpcarm-cleanup-base matt-armv6-base matt-mips64-base
1.1 05-Aug-2007 pooka

branches: 1.1.8; 1.1.12; 1.1.14;
Split the part of bsd.kmod.mk which creates links to kernel header
directories into a separate module, bsd.klinks.mk.


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406 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 pgoyette-compat-0728 pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base yamt-pagecache-base9 yamt-pagecache-tag8 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 agc-symver-base tls-maxphys-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base bouyer-quota2-nbase bouyer-quota2-base jym-xensuspend-nbase jym-xensuspend-base
1.90 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
1.89 19-Oct-2008 apb

branches: 1.89.6;
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: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 mjf-devfs2-base
1.88 24-Aug-2008 gmcgarry

Honour HAVE_PCC


Revision tags: 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 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
1.87 01-Mar-2008 skrll

branches: 1.87.2; 1.87.6;
Add hppa to the list of platforms that need help with branches.

Sort the list while I'm here.


Revision tags: hpcarm-cleanup-base
1.86 16-Jan-2008 ad

branches: 1.86.2;
Pull in my modules code for review/test/hacking.


Revision tags: pc532-eol-2008 matt-armv6-base
1.85 04-Jan-2008 ad

Record LKM entry point in the ELF file header.


Revision tags: matt-armv6-prevmlocking cube-autoconf-base matt-mips64-base
1.84 05-Aug-2007 pooka

branches: 1.84.2; 1.84.6;
Split the part of bsd.kmod.mk which creates links to kernel header
directories into a separate module, bsd.klinks.mk.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
1.83 26-Jun-2006 lukem

Don't invoke LD with LDFLAGS, since the latter is for CC.

If we need similar support for LD, we can implement another variable.
I couldn't find any obvious need for LDFLAGS by users of <bsd.kmod.mk>.


1.82 25-Jun-2006 lukem

support MAKEVERBOSE


1.81 11-May-2006 mrg

turn on -Wno-pointer-sign for all kernel code.


1.80 11-May-2006 mrg

for now, turn on -fno-strict-aliasing for GCC4.


1.79 06-May-2006 groo

Add common/include to include path.

HI JASON!


1.78 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


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.77 10-Jun-2004 lukem

Be consistent in handling YHEADER, similar to Christos' fix in bsd.lib.mk 1.253


1.76 14-May-2004 cl

use relative links: using $S fails if $S is relative to another dir
than the one where it's used


1.75 12-May-2004 cl

``build.sh -m xen-i386 release'' now builds a release for NetBSD/xen
for i386. The resulting release consists of:
- NetBSD/xen for i386 kernel, loader and docuemntation
- NetBSD/i386 userland sets


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.74 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.73 27-Jan-2004 lukem

Replace
:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)


1.72 16-Jan-2004 matt

Export the symbols in addition to the relocation records when making LKMs.


1.71 04-Nov-2003 scw

Use MACHINE_CPU instead of MACHINE_ARCH to select the appropriate
architecture directory under sys/lkm/arch. This permits a single
directory to be used for bi-endian architectures.


1.70 11-Oct-2003 jdolecek

if S is not already defined, use ${NETBSDSRCDIR}/sys or ${BSDSRCDIR}/sys to set
top of kernel source tree


1.69 04-Sep-2003 lukem

revert previous; there's too much hairy crap in sys/lkm/compat involving
the order that Makefile.inc is pulled in to get this to work.

this stuff needs a rototill (for another day). for example, having every
sys/lkm/** directory make their own machine ${MACHINE_CPU} and possibly
${SHARED_MACHINE_CPU} (e.g, x86 for i386/x86_64) is not the most optimal
situation ...


1.68 04-Sep-2003 lukem

simplify include symlink creation with LNFILES


1.67 01-Aug-2003 lukem

Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".


1.66 31-Jul-2003 lukem

bsd.dep.mk: add a dependency for *.d on ${SRCS} ${DPSRCS}. this should fix
some build problems where DPSRCS contains .h files that need to exist to
build the .d file.

document that bsd.dep.mk should be included after anything that might
update SRCS or DPSRCS so that the above works correctly, and actually
ensure this is the case.


1.65 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.64 18-Jul-2003 lukem

whitespace cleanup


1.63 07-May-2003 fvdl

Add -mcmodel=kernel to CFLAGS for amd64.


1.62 26-Apr-2003 fvdl

another x86_64 -> amd64


1.61 26-Apr-2003 fvdl

x86_64 -> amd64


1.60 23-Apr-2003 matt

The __wrap_* symbols need to become local symbols. If you have module
x which is dependent y but they both have __wrap_foo, if the __wrap_foo
is not localized, you will get linker truncation messages.


1.59 27-Mar-2003 christos

add x86 to the cleanfiles for i386 and x86_64 (Hi Frank!)


1.58 27-Feb-2003 fvdl

Add more special cases to create include directory symlinks, for archs
that take include files from a subdir != ${MACHINE_ARCH} (ew).


1.57 19-Feb-2003 matt

When making a LKM for powerpc, add function trampolines to undefined
functions. This makes LKMs functional for powerpc.


Revision tags: fvdl_fs64_base
1.56 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


1.55 29-Jul-2002 jdolecek

add 'sun68k' to CLEANFILES for sun2/sun3
add 'sparc' to CLEANFILES for sparc64


1.54 20-Jul-2002 mrg

be sure to link "sparc" dir as well, for sparc64


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.53 09-Apr-2002 jdolecek

Only attempt to make the machine links for targets 'depend', 'all',
'dependall'.
This fixes misc/16227 by Stoned Elipot.

XXX this solution is not ideal


1.52 06-Apr-2002 jdolecek

Do what rev. 1.50 intented using .BEGIN, g/c target 'machine-links'.

Making ${OBJS} and ${DPSRC} depend on target which is always out of date is
_really_ bad idea.


1.51 26-Mar-2002 fredette

In the machine-links target, the sun2 also needs a sun68k symlink.
Plan ahead and make it on the sun3 also.


1.50 21-Mar-2002 pk

Target dependencies again: `machine-links' must be made before $DPSRCS.
We now have
all => $PROG => $OBJS => $DPSRCS (if present) => machine-links


1.49 28-Feb-2002 pk

Fix target order: the machine links must be present before compiling object
files.


1.48 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.47 28-Dec-2001 thorpej

Don't put CPP flags in CFLAGS.


1.46 28-Dec-2001 thorpej

Add -ffreestanding to CFLAGS.


1.45 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.44 14-Nov-2001 tv

Put -Is in CPPFLAGS, not CFLAGS; change -I to -isystem as appropriate.


1.43 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.42 05-Oct-2001 simonb

Use ${MACHINE_CPU} instead of ${MACHINE_ARCH} in the machine-links
target; needed for MIPS and probably arm ports.
.include the full path name of machine/Makefile.inc so that this works
if the machine-links target hasn't been run yet.
.include ${MACHINE_CPU}/include/Makefile.inc too.


1.41 29-Sep-2001 jdolecek

don't include explicit -e for modload in 'load' target - it's redundant
This addresses bin/4701 by Hauke Fath, but does opposite thing than
suggested there.


1.40 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.39 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.38 06-Jun-2000 mycroft

Abuse .USE some more.


1.37 06-Jun-2000 mycroft

Minor rearrangement.


Revision tags: minoura-xpg4dl-base
1.36 22-Jan-2000 mycroft

branches: 1.36.2;
Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.35 02-Nov-1999 jdolecek

don't depend on ${PROG} for ``unload'' target - we don't need the lkm compiled
to do the unload


1.34 22-Sep-1999 wrstuden

branches: 1.34.2;
Add KMOD_LOADFLAGS to the load target. With this, lkm's in /sys/lkm/... can
more readily depend on each other.

An lkm which depends on another lkm now only needs to set

KMOD_LOADFLAGS= -A../../path/to/other/lkm's/${KMOD}

and the lkm will link against the other lkm's symbols. Obviously the other
lkm had better be loaded. ;-) Note: the -A option to modload was pre-
existing. This change makes it possible for users of this file to take
advantage of it.


1.33 14-Sep-1999 perry

Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.32 04-Sep-1999 fredb

Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.


1.31 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.30 10-Mar-1999 ross

branches: 1.30.2; 1.30.4;
If it exists, include machine/Makefile.inc


1.29 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.28 28-Sep-1998 christos

Use preserve flag in install.


1.27 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.26 09-Apr-1998 tv

.y.c <sys.mk> rule fixes. Don't create a y.tab.h file unless asked for,
and use smarter creation of the header file.


1.25 01-Apr-1998 tv

Revert. This broke too much in the build tree, and a better solution
needs to be created. (The existing situation breaks a lot too.)


1.24 01-Apr-1998 tv

Fix .y rules to DTRT with possibly generated .h files. See mail on
tech-toolchain for a very detailed explanation of this. In short, add
a .y.h rule identical to the .y.c rule and make the .y.c rule rename
the .h file; also, clean the .h file in CLEANFILES.


1.23 03-Nov-1997 cgd

echo the lint command line when making 'lint'.


Revision tags: netbsd-1-3-base
1.22 11-Oct-1997 mycroft

branches: 1.22.2;
Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)


1.21 17-May-1997 mycroft

Remove unneeded .SUFFIXES lines, and move .s and .S closer to .o to give the
right preferences.


1.20 09-May-1997 mycroft

Fix typo in previous.


1.19 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.18 09-May-1997 mycroft

Remove cruft.


1.17 07-May-1997 mycroft

Fix the MACHINE and MACHINE_ARCH links.


1.16 07-May-1997 mycroft

Make $S default to /sys.


1.15 07-May-1997 mycroft

Fix typo.


1.14 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.13 07-May-1997 mycroft

Various simplifications.


1.12 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.11 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.10 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.9 22-Mar-1997 perry

Fix SYMLINKS not to include DESTDIR in the link itself


1.8 13-Mar-1997 perry

add SYMLINKS, by analogy to LINKS. Vetted by Christos.


1.7 22-Jan-1997 cgd

if 'clean' is not already defined, rather than simply defining it with
a bunch of rules, define a clean{kmod,lib,prog} target with the rules,
and have both clean and cleandir depend on that. That eliminates a bug
where 'cleandir' in a directory which included e.g. bsd.prog.mk but which
also had subdirs would 'make clean' all the subdirs and then 'make cleandir'
all ofthe subdirs. It also allows Makefiles to add more dependencies
to 'clean' after inclusion of the make template.

If 'clean' is already defined, the behaviour is the same as it used to be.


1.6 22-Oct-1996 explorer

Update to make the sys/lkm tree compile on i386 and most likely others


1.5 18-Oct-1996 thorpej

Use ${INSTALL} rather than "install".
From Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.


1.4 27-Aug-1996 explorer

Do the symlinks added by mrg correctly


1.3 27-Aug-1996 explorer

Fix a missing dollar sign, and move paths and modes
to bsd.own.mk for KMOD* vars


1.2 23-Aug-1996 mrg

make lkm's work. still need to worry about options defines...


1.1 22-Aug-1996 explorer

Add a file needed for the lkm stuff I committed


1.88 18-Dec-2025 riastradh

bsd.*.mk: Use objcopy without -p to strip debug data.

No need to preserve the date with -p/--preserve-dates -- the only
meaningful effect it has is to cause make(1) to rerun it every time,
because make(1) treats exactly the same date as out-of-date.

Followup after:

PR toolchain/57241: mips64el--netbsd-install core dumps randomly


1.87 17-Dec-2025 riastradh

bsd.kmodule.mk: Fix parallelism in debug data generation recipes.

In the recipe for foo.kmod.debug, don't overwrite foo.kmod in place.
Instead, generate foo.kmod.link with debug data included, and then
derive foo.kmod (no debug data) and foo.kmod.debug (only debug data)
from it in separate recipes.

Same issue as we had with bsd.lib.mk and bsd.prog.mk in the past.

PR toolchain/57241: mips64el--netbsd-install core dumps randomly


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.86 16-Jun-2024 pgoyette

Import AFLAGS to allow processing of assembler files in modules.
Prerequisite for kern/583346.


1.85 06-May-2024 mrg

use objcopy's --compress-debug-sections when creating debug files.

this reduces the size of the installed files by over half in most cases,
though the debug set size doesn't really change much (which looks like
close to 1GB of space on amd64 with xdebug installed, similar on arm64,
and about 600MB without xdebug.)

tested by running GDB on a few things, seems just as functional, on amd64,
arm64, and slightly on riscv64.

(first attempt for this feature used "gcc -gz=zlib", but that ends up
making CTF unhappy, but fortunately this works in binutils to create
the .debug files separate to any ctf usage of the main file.)


1.84 03-Jun-2023 lukem

adapt to ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

Simplify CWARNFLAGS to use ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
which works for both clang and gcc, and remove compiler-specific
equivalents.


1.83 03-Jun-2023 lukem

bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
CLANG_NO_ADDR_OF_PACKED_MEMBER
CC_NO_ADDR_OF_PACKED_MEMBER
GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.


1.82 07-May-2023 skrll

RISC-V support that works on QEMU with a single hart.

Thanks for Simon Burge for plic(4).


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.81 07-Aug-2022 riastradh

branches: 1.81.2;
bsd.kmodule.mk: Build modules with KDTRACE_HOOKS if MKDTRACE=yes.


1.80 03-Aug-2022 riastradh

sys: Build kernel with -Wno-type-limits.

The type-limits warning is actively harmful because it discourages
writing safe portable overflow detection logic which happens, on some
architectures, to be dead code.


1.79 17-Jul-2022 riastradh

bsd.kmodule.mk: Also sync no-address-of-packed-member.

This is not actually a good idea to disable -- it can lead to real
problems -- but let's just make it the same for the kernel build and
module builds.


1.78 17-Jul-2022 riastradh

bsd.kmodule.mk: Use -Wno-attributes like conf/Makefie.kern.inc.


1.77 29-Mar-2022 christos

get rid of old style `` command substitution in shell and use $() instead.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.76 29-Mar-2021 simonb

On MIPS if we compile C files as N64, compile assembly with the same ABI.


1.75 23-Mar-2021 simonb

Work in progress for MIPS modules. Only tested on mipseb64, not yet
enabled anywhere.


1.74 07-Mar-2021 rin

Build modules for PPC_OEA64 on evbppc64.


1.73 07-Mar-2021 rin

whitespace --> tab. No functional changes.


1.72 18-Oct-2020 christos

Handle the no-addr-of-packed-member only for the files that need it, not
globally.


1.71 10-Sep-2020 rin

Turn off -mpltseq for kernel modules on powerpc for GCC >= 9.

Otherwise, object files compiled with -mlongcall contain relocation types
referring PLT, which our in-kernel linker cannot handle.

This ends up with failure in kernel module load with
``kobj_reloc: unexpected relocation type 31'' (31 == R_PPC_PLT16_HA here).

See descriptions for -mlongcall in gcc(1) of GCC9 for more details.


1.70 06-Sep-2020 mrg

add support for new GCC 9 warnings that may be too much to fix
right now. new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree. mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it. (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.) clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.


1.69 27-Jul-2020 skrll

Don't define _LKM. LKMs are dead. Long live modules.


1.68 11-May-2020 skrll

Update the list of hppa options to build working kernel modules.


1.67 02-May-2020 rin

Fix previous; add missing <module>.kmod.debug to realall.


1.66 01-May-2020 christos

Install <module>.kmod.debug files for kernel crash debugging.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
1.65 04-Apr-2020 christos

make sure _OSRELEASE is defined where it is needed.


1.64 04-Apr-2020 christos

Infrastructure for putting kernel+modules in /netbsd/kernel and
/netbsd/modules respectively instead of /netbsd and
/stand/<arch>/<version>/modules. This is only supported for x86,
and is turned off by default. To try it, add KERNEL_DIR=yes in your
/mk.conf and install a system from that build.


Revision tags: is-mlppp-base
1.63 01-Dec-2019 jmcneill

Build aarch64 modules without fp or simd instructions.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
1.62 05-Jul-2019 hannken

branches: 1.62.2;
When building a module keep symbols if built with "MKCTF" and "COPTS=-g".


Revision tags: phil-wifi-20190609
1.61 09-May-2019 maya

G/C unused code.
gcc -combine is no longer a thing, so this entire block isn't usable.


Revision tags: pgoyette-compat-20190127
1.60 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 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 pgoyette-compat-base 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 bouyer-socketcan-base
1.59 11-Jan-2017 joerg

branches: 1.59.12; 1.59.14;
Disable a couple of warnings until further investigation.


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.58 02-Feb-2016 christos

branches: 1.58.2;
Add the missing CTFMERGE step.


1.57 30-Jan-2016 christos

Make ctfconvert remove the debugging symbols after it is done converting them.


1.56 30-Jan-2016 christos

If we are building CTF, keep debugging symbols.


1.55 09-Jul-2015 matt

Add _MKTARGET_LINK


1.54 24-Jun-2015 matt

Don't add anything to CFLAGS/LDFLAGS on mips64 is BSD_MK_COMPAT_FILE is set.


1.53 02-May-2015 matt

For mips64, build kmodules using N64 ABI


1.52 13-Nov-2014 christos

do the dependencies in a simpler way using a separate target


1.51 13-Nov-2014 uebayasi

If mkldscript.sh is used to build ${PROG}, depend on it.


1.50 12-Nov-2014 christos

sync both instances of the ldscript.


1.49 12-Nov-2014 christos

add -t to mkldscript


1.48 12-Nov-2014 christos

use ${HOST_SH}


1.47 12-Nov-2014 christos

Enable dynamic link script generation to handle __{start,stop}_link_set_*
via a variable; perhaps delete the variable and always do it?


1.46 06-Nov-2014 uebayasi

Leave .map when linking .kmod.


1.45 19-Sep-2014 matt

Add RISCV-V support.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-maxphys-base
1.44 10-Aug-2014 joerg

Put GCC/GAS specific options under ACTIVE_CC == "gcc".


Revision tags: yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.43 10-Mar-2014 nakayama

-mcmodel option is CPU specific not machine specific.


1.42 21-Feb-2014 joerg

Use small code model for LLVM on SPARC64, it should be equivalent to
GCC's medlow.


1.41 09-Nov-2013 jmcneill

use -fno-unwind-tables when building arm modules


1.40 18-Sep-2013 martin

When compiling kernel modules on sparc64 force the same memory model as
we force for the kernel (i.e. do not rely on compiler defaults here)


1.39 07-Aug-2013 matt

Add support for generating tramponlines in the module at link time.
This is done using some awk scripts and KMODTRAMPOLINE in <machine/asm.h>
It's not as efficient as having the kloader do it but it is a lot simpler.


1.38 06-Aug-2013 skrll

Add -mlong-calls to hppa module builds.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
1.37 10-Aug-2012 joerg

branches: 1.37.2;
Remove effectively tautological condition.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
1.36 15-Mar-2012 joerg

Decouple HAVE_LLVM from HAVE_GCC. For GCC, add -Wno-format-zero-length
when -Wformat is used.


1.35 19-Feb-2012 matt

Add support for --combine with gcc.


1.34 16-Feb-2012 christos

use osrelease -k to avoid that the path is 6.0_BETA


Revision tags: netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.33 11-Sep-2011 mbalmer

branches: 1.33.2; 1.33.4;
Move SYSCTL_USE_DESCR to a better place.


1.32 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.31 14-Jul-2011 matt

VAX kernel modules need to be built with -fno-pic


1.30 20-Jun-2011 mrg

remove most of the remaining HAVE_GCC tests that are always true in
the modern world.


Revision tags: cherry-xenmp-base
1.29 17-May-2011 christos

branches: 1.29.2;
Enable c99 mode by default.

This has the side effect of complaining for missing prototypes
implicit type declarations and missing return statements.

NB: I've only ran a build on amd64, so other platforms MI code might break.
If you can't wait for me to fix them, revert this commit.


1.28 17-Apr-2011 mrg

prepare for evbppc modules, and allow overriding the ${MACHINE} for
installed modules.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
1.27 02-Jan-2011 matt

Kernels modules are c99 (gnu99) just like the kernel.
Add(move) -std=gnu99 to CPPFLAGS (from COPTS).


Revision tags: matt-mips64-premerge-20101231
1.26 11-Dec-2010 martin

Revert last, gcc(1) checks explicitly for -r on some platforms to disable
passing down --relax as well.


1.25 08-Dec-2010 joerg

gcc passes down -r directly to ld, so make it explicitly a linker option.


1.24 18-Jan-2010 jmmv

Generate long calls in modules for arm32 and powerpc to avoid unsupported
relocations by the module loader in the kernel. This makes modules work
in, at least, shark and macppc respectively.

This is obviously a workaround that results in slower code, but at least
makes modules work. I'm adding a comment detailing what the real solution
would be so that the whole thing can be revisited in the future. (Read:
I don't have time now to dig the details of how to implement trampoline
generation.)

(Based on the old bsd.kmod.mk file, I understand that hppa needs this
workaround too, but I can't check this platform.)


1.23 14-Dec-2009 mrg

use "${CC} -r" not "${CC} -Wl,-r" as the latter fools GCC on some targets
and it ends up passing "-r -relax" to ld, which causes ld to barf.


1.22 14-Dec-2009 matt

Merge from matt-nb5-mips64


Revision tags: matt-premerge-20091211
1.21 10-Nov-2009 skrll

Move the kmodule linker script source into sys/modules/xldscripts. It is
not part of binutils and definitely not GPL v3.

Discussed with mrg.


1.20 08-Nov-2009 skrll

Update for new binutils location.

XXX Why is kmodule under binutils anyway?


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.19 10-Apr-2009 apb

Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links. They have no effect except when using a
metalog, in which case the information is added to the metalog. In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg. This should fix PR 24457 and PR 41155.


1.18 24-Jan-2009 rmind

branches: 1.18.2;
Revert path of modules back to "/stand".


1.17 24-Jan-2009 rmind

Change path to kernel modules from "/stand" to "/kernel".
Needs to go in before 5.0. Proposed on <tech-kern>.


1.16 30-Nov-2008 hubertf

Work around a bug in Solaris' shs (both /bin and /usr/xpg4/bin)
where "for d in ; ..." results in a syntax error.

Suggested by apb@


1.15 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


1.14 05-Nov-2008 elad

Don't build kernel modules with PIE.

Discussed with and okay christos@.


Revision tags: netbsd-5-base matt-mips64-base2
1.13 14-Oct-2008 mrg

branches: 1.13.2;
find the kmodule ldscript in the source tree again.

should fix a build issue reported by jmcneill.


1.12 12-Oct-2008 mrg

- install ldscripts on sparc64
- move ldscripts to /usr/libdata/ldscripts


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 mjf-devfs2-base
1.11 24-Aug-2008 gmcgarry

Honour HAVE_PCC


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
1.10 31-May-2008 dyoung

branches: 1.10.2;
Fix two bugs to make MKMODULAR=yes builds will work again, for the
first time.

share/mk/bsd.kmodule.mk: only set _INST_DIRS if KMODULEDIR is not
set. That we we avoid installing some bogus directories in
the DESTDIR and in $DESTDIR/METALOG.

tests/modules/k_helper/Makefile: add missing .include <bsd.own.mk>,
and set the KMODULEDIR that the author seems to have intended.


1.9 21-May-2008 he

Do ${INSTALL_DIR} on all the intermediate directory levels from
the top of the tree down to where the kernel modules are installed,
so that unprivileged builds have a chance at working again.

Note, to use this fix in a tree where you've already hit on this
problem, you need to manually remove the kernel modules in
$DESTDIR/stand/<arch/, and then reinstall them from sys/modules/.


1.8 21-May-2008 jmcneill

Don't echo 'hello sh' when installing modules :-)


1.7 20-May-2008 ad

Install kernel modules into the proper locations, taking machine and
kernel version into account.


Revision tags: hpcarm-cleanup-nbase
1.6 20-May-2008 ad

fno-zero-initialized-in-bss no longer required.


1.5 20-May-2008 ad

Use an ldscript to merge kernel modules' .bss sections into .data. Passing
-fno-common -fno-zero-initialized-in-bss to gcc does not work, and objcopy
refuses to expand the bss section.


1.4 20-May-2008 ad

Kill the tramp stuff, since it can be handled with lkm_map.


Revision tags: yamt-pf42-base2 yamt-pf42-base
1.3 03-May-2008 ad

branches: 1.3.2; 1.3.4;
Pass -d to the linker, to assign space to common objects up front. The kernel
linker isn't smart enough to do that...


1.2 02-May-2008 ad

Build and install modules into /kernel/modules. Each module gets a
directory for properties, blobs, etc. It's not fixed in stone and
can easily be changed if there are issues with the location/layout.


1.1 02-May-2008 ad

- Add a bsd.kmodule.mk to build new style modules.
- Set the file suffix to .kmod


1.425 19-Dec-2025 christos

PR/58648: Fix MKDEBUG=yes build:
1. if NOLINKLIB is set don't install libfoo_g.a and libfoo_p.a libraries.
libfoo.a, libfoo_p.a were not being installed already, just make the
testing consistent
2. Move .a libraries from shl.mi to mi where they belong.
3. Make stray libfoo_g.a libraries that were install accidentally before
obsolete.


1.424 18-Dec-2025 riastradh

bsd.*.mk: Use objcopy without -p to strip debug data.

No need to preserve the date with -p/--preserve-dates -- the only
meaningful effect it has is to cause make(1) to rerun it every time,
because make(1) treats exactly the same date as out-of-date.

Followup after:

PR toolchain/57241: mips64el--netbsd-install core dumps randomly


1.423 16-Dec-2025 riastradh

Add logic for /usr/lib/private libraries.

New variables for makefiles to define:

<bsd.lib.mk> LIBSUBDIR -- If nonempty, install library into
${LIBDIR}/${LIBSUBDIR} instead of ${LIBDIR}. Typically set
either to empty or to `private'.

<bsd.lib.mk> LIBDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking library. Note: Should only be used inside
private libraries, not inside public libraries to link against
private libraries, which can't work -- see comment.

<bsd.prog.mk> PROGDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking program.

(XXX bsd.lib.mk/bsd.prog.mk should figure LIBDPSUBDIRS/PROGDPSUBDIRS
out automatically by LIBDPLIBS/PROGDPLIBS, but for now we don't have
that mechanism -- TBD in subsequent work.)

Libraries that we want to install because we use them in binaries we
ship, but that we want to keep private from applications so we don't
have to worry about ABI breakage or leakage into pkgsrc builds,
should generally set:

LIBSUBDIR= private # Install into /usr/lib/private.
NOCOMPAT= # defined # Don't build compat lib.
NOLINKLIB= # defined # Don't install .so link or .a lib.

(XXX Maybe we should have a `LIBISPRIVATE= installed' or something
for this combination of options, but for now I'm putting in the
minimal mechanism to implement this and we can condense a common
pattern later.)

Programs using the library will also have to set

PROGDPSUBDIRS+= private

so that they will get the rpath /usr/lib/private.

PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib


1.422 29-Nov-2025 martin

Hide the shell code used to compare symbols for shared libraries with
the expected set from make output, to make it easier to search for
real "error: " in the log files.


1.421 19-Sep-2025 mrg

fix the libstdc++ build for GCC 14.

some parts of the libstdc++ build have different flags for different
files *only* for the shared library version of the build. netbsd
share/mk has no current method of doing this, so introduce support
for having "CSHLIBFLAGS.$file" like we do for other options, and use
it to add -D_GLIBCXX_SHARED to *most* but not all files.

XXX: see if similar should really be applied to prior updates.


1.420 16-Sep-2025 mrg

fix sanitizer flags for private libraries in executables.

update the comment to explain why we don't do -g for normal archives,
but why we do them for private archives (they are linked into the
executables, and the debug info is in the debug file for that.)

while i still don't know why dhcpd is crashing on arm64eb for me,
at least now ASAN reports don't have missing info for the various
private libraries.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.419 13-Apr-2025 riastradh

branches: 1.419.2;
bsd.lib.mk: Redo rev. 1.418 more selectively.

Previously, in rev. 1.418, I had changed:

.if ${LIBISPRIVATE} != "no"
...
. if defined(NOSTATICLIB) && ${MKPICLIB} != "no"
MAKESTATICLIB?= no
. elif ${LIBISPRIVATE} != "pic"
MKPIC:= no
. endif
...
.endif
...
-.if ${LIBISPRIVATE} == "pic"
+.if ${MKPIC} != "no"
CFLAGS+= -fPIC
AFLAGS+= -fPIC
.endif

This was an attempt to obviate the need for grody conditionals in
private shared libraries like libuv:

.if ${MACHINE} == "sun2"
LIBISPRIVATE=yes
.else
LIBISPRIVATE=pic
.endif

This is wrong, after all, because you can also do MKPIC=no on
non-sun2 platforms if you really want a static build, and it's a mess
to have to write it out in every case.

My theory in making that change was that:

(a) on MKPIC=yes platforms in makefiles without LIBISPRIVATE=yes,
we're building with -fPIC anyway, so ${MKPIC} != no is right;

(b) on MKPIC=yes platforms in makefiles with LIBISPRIVATE=yes, we
shouldn't build with -fPIC and the conditional above sets
MKPIC=no in that case, so ${MKPIC} != no is right;

(c) on MKPIC=no platforms (mainly sun2), no matter what LIBISPRIVATE
is set to, we shouldn't build with -fPIC, so ${MKPIC} != no is
right.

But (a) is wrong, because we use the same makefile to build .pico and
.o objects from which we link (PIC) .so and (non-PIC) .a libraries,
and the distinction is made not in CFLAGS/AFLAGS but in PICFLAGS and
CSHLIBFLAGS.

So, to obviate the need for the .if sun2 conditionals around
LIBISPRIVATE=pic, but avoid breaking everything _other_ than
LIBISPRIVATE=pic, let's make the addition of -fPIC to CFLAGS/AFLAGS
conditional on _both_ LIBISPRIVATE=pic _and_ MKPIC=yes.

PR port-mips/59064: jemalloc switch to 5.3 broke userland


1.418 14-Jan-2025 riastradh

bsd.lib.mk: Don't pass -fPIC if MKPIC=no, even if LIBISPRIVATE=pic.

Saves the trouble of having to conditionalize LIBISPRIVATE=pic on
non-shlib platforms (i.e., sun2, and anyone else trying to build a
static-only NetBSD).


1.417 14-Jan-2025 riastradh

bsd.lib.mk: Indent LIBDPLIBS logic for clarity.

No functional change intended.


1.416 23-Nov-2024 riastradh

bsd.lib.mk: Make update-symbols resolve ${LIB_EXPSYM} via .PATH.

By doing this instead of using ${.CURDIR}, we can have update-symbols
automatically copy it to the right place even if the .expsym file is
in a subdirectory, like libarch/i386/i386.expsym.


1.415 23-Nov-2024 riastradh

bsd.lib.mk: Switch back from TOOL_GREP to grep for now.

Apparently TOOL_GREP is just broken:

$ { echo __bss_start__; echo __bss_end__; echo hello; } \
> | nbgrep -Fvx -e _end -e _fini -e _init -e __bss_end__ -e __bss_start__ -e __end__ -e _bss_end__
__bss_end__
hello

And the options -F, -v, -x, and -e are all standard in POSIX, so it's
not really too much to ask of the host environment for now until we
figure out whatever is wrong with TOOL_GREP.


1.414 22-Nov-2024 riastradh

bsd.lib.mk: Use TOOL_GREP, not grep.


1.413 22-Nov-2024 riastradh

bsd.lib.mk: Make update-symbols target say what bump is needed.

This way whenever you update a library you get a reminder. It's not
perfect -- if a symbol's semantics changes it won't help -- but it's
better than what we have right now!


1.412 21-Nov-2024 riastradh

bsd.lib.mk: Exclude MD linker-generated crud from expected symbols.

Not entirely sure why these symbols like _init/_fini/_end on x86 or
__bss_start__/__bss_end__ on aarch64 or _GLOBAL_OFFSET_TABLE_ on hppa
are exported at all, but it's something the linker is doing
automatically -- and unnecessarily, since libraries with explicit
version scripts don't export these -- and I'm not sure there's any way
to suppress it.

This way, most *.expsym lists can be machine-independent, which will
help keep maintenance burden much lower.

Currently we have only one *.expsym file for a library that _doesn't_
use a version script, libm -- fix that up to reduce the crud. (That
one already happens to have a lot of machine-dependent exports
because of differences in floating-point ABIs so the linker-generated
MD symbol crud wasn't much more of a maintenance burden in this case,
but this maintenance burden is why I haven't aggressively gone around
creating *.expsym files for other libraries.)


1.411 02-Nov-2024 christos

spello


1.410 01-Nov-2024 christos

We need -fPIC too otherwise we end up with R_X86_64_PLT32 and not
R_X86_64_REX_GOTPCRELX and we can't build .so objects. I think we can
remove the -fPIE and use only -fPIC but this works for now.


1.409 31-Oct-2024 rillig

bsd.lib.mk: in 'lint' target, don't list defined but unused symbols

When building a library, it is common that there are many symbols that
are defined but not used, as that's exactly the point of a library.

When running the 'lint' target manually, don't complain about these
symbols, by creating a "dummy" library. That dummy library is not
installed anywhere.

For libxcb, the output shrinks from more than 3000 lines down to 5.


1.408 31-Oct-2024 riastradh

bsd.lib.mk: Let update-symbols know about ro vs rw source trees.

The update-symbols target is a tool for developers to update the
foo.expsym files from the actual list of exported symbols.

But if you have

/home/dev/netbsd/src

as a read-only null-mount of your real read/write source tree

/home/dev/netbsd/src.hg

as I do (in order to detect accidental writes to the srcdir which
should have gone to the objdir), `make update-symbols' doesnt work
because it tries to write to the read-only null mount.

With this change,

make update-symbols NETBSDSRCDIR_RW=/home/dev/netbsd/src.hg

will write instead to the read/write source tree.


Revision tags: perseant-exfatfs-base-20240630
1.407 28-Jun-2024 riastradh

bsd.lib.mk: Resolve VERSION_MAP like a target prerequisite.

Not sure what I did before to make ${${VERSION_MAP}:P} fail to work;
can't reproduce it any more!

PR lib/58376


1.406 28-Jun-2024 riastradh

bsd.lib.mk: New variable VERSION_MAP.

This updates LDFLAGS with the right -Wl,--version-script=... argument
as well as DPADD so that changing the version script causes the
library to be rebuilt.

Name chosen to match FreeBSD.

PR lib/58376


Revision tags: perseant-exfatfs-base
1.405 08-May-2024 riastradh

branches: 1.405.2;
bsd.lib.mk: Use LIBC_MACHINE_ARCH/CPU if set for expected symbols.

Otherwise, we get the wrong list of symbols for compat library
builds, where MACHINE_ARCH/CPU is different from
LIBC_MACHINE_ARCH/CPU, e.g. building compat 32-bit sparc libm on
sparc64.

XXX This is kinda kludgey -- `libc' seems wrong here.


1.404 07-May-2024 riastradh

bsd.lib.mk: Allow MACHINE_CPU for default expsym file.


1.403 06-May-2024 mrg

use objcopy's --compress-debug-sections when creating debug files.

this reduces the size of the installed files by over half in most cases,
though the debug set size doesn't really change much (which looks like
close to 1GB of space on amd64 with xdebug installed, similar on arm64,
and about 600MB without xdebug.)

tested by running GDB on a few things, seems just as functional, on amd64,
arm64, and slightly on riscv64.

(first attempt for this feature used "gcc -gz=zlib", but that ends up
making CTF unhappy, but fortunately this works in binutils to create
the .debug files separate to any ctf usage of the main file.)


1.402 11-Apr-2024 christos

fix previous. Doing assignmnents of conditionals does not work for being
used as conditionals (thanks rillig@)


1.401 09-Apr-2024 christos

Merge two identical if's and fix a logic error in them ( && instead of ||)


1.400 05-Apr-2024 christos

- Create 3 new variables:
MAKELINKLIB that follows MKLINKLIB but can be overwritten by Makefiles
MAKESTATICLIB that follows MKSTATICLIB but can be overwritten by Makefiles
LINKINSTALL that follows MAKELINKLIB but can be overwritten by Makefiles
These give enough control to the module Makefiles so that they don't need
to override the default library install rules which break the debug sets.
- Remove /usr/libexec/named which duplicated /usr/lib/named


1.399 02-Apr-2024 christos

Back-out unintented commit.


1.398 02-Apr-2024 christos

PR/58104: Kouichi Hashikawa: Use ${TOOL_AWK}


1.397 26-Mar-2024 riastradh

bsd.lib.mk: Avoid symbol check if we're not doing shared libraries.

Otherwise this fails on non-shlib builds like sun2.


1.396 23-Mar-2024 riastradh

bsd.lib.mk: Tidy up expected symbols check a little.

Add some documentation in bsd.README.


1.395 20-Mar-2024 riastradh

bsd.lib.mk: Check expected vs actual symbols at build-time.

If, for LIB=foo, you create a file foo.expsym, bsd.lib.mk will list
the dynamic symbols and their versions with

nm --dynamic --extern-only --defined-only --with-symbol-versions

and compare the names (not addresses or types) to foo.expsym. If
there are any differences, they will be printed and the build will
fail.

foo.expsym should be sorted with `LANG=C sort -u'.

This way, you can verify changes don't inadvertently add or remove
symbols. If you do want to add (or, if you're bumping the major,
remove) symbols, you can verify the changes and edit the foo.expsym
file accordingly. This will also help to enforce rules about symbol
changes on pullups in release branches.

Note that using a version map (-Wl,--version-script=...) doesn't
catch symbol removal -- ld quietly ignores symbols in the version map
that aren't actually defined by any object in the library. So this
supplements the version map.

Proposed on tech-userlevel:
https://mail-index.NetBSD.org/tech-userlevel/2024/03/16/msg014264.html


1.394 03-Jun-2023 lukem

bsd.*.mk: move MKSTRIPSYM default to bsd.own.mk

Add default for MKSTRIPSYM=yes to to bsd.own.mk _MKVARS.no.
Test ${MKSTRIPSYM} != "no".


1.393 28-May-2023 lukem

share/mk: finish USE_COMBINE, NOCOMBINE deprecation

Remove the leftover remnants of deprecated USE_COMBINE and NOCOMBINE,
as gcc -combine has been EOL for many years.

Completes the work done by maya@ on 2019-05-10 in bsd.kmodule.mk rev 1.61.


1.392 09-May-2023 riastradh

bsd.lib.mk: Nix trailing whitespace.


1.391 08-May-2023 christos

Allow linking against archives like PROGDPLIBS does.


1.390 07-Feb-2023 mrg

fix code attempting to skip adding "-g" if "-g*" already is used.

in bsd.lib.mk there's a check for "MKDEBUG != no" that will add
-g to CFLAGS (maybe) and to CSHLIBFLAGS (always), given that it
isn't in CFLAGS already.. except the conditional is "||" instead
of "&&" and since the MKDEBUG/NODEBUG checks pass, the CFLAGS
check isn't even performed.

additionally, check CXXFLAGS as well as CFLAGS.

this fixes the attempt to use "-g1" in the llvmrt build, which
fails because the compile lines end up being "... -g1 .. -g ..",
(the "-g" comes from the CSHLIBFLAGS variable in that case.)

this reduces the size of llvm-enabled gallium debug by ~1.5GiB
on amd64.


Revision tags: netbsd-10-base
1.389 29-Mar-2022 christos

branches: 1.389.2;
get rid of old style `` command substitution in shell and use $() instead.


1.388 28-Nov-2021 christos

For private and module libraries, build lint but do not install the lint
libraries. We want to lint the private library code and we want to be able
to link against the lint libraries, for example llib-largon2 from cgdconfig
which is accessed via PROGDPLIBS.


1.387 27-Oct-2021 ryo

revert previous: http://mail-index.netbsd.org/source-changes/2021/10/25/msg133295.html

going to add __always_inline to the functions called from _mcount()
discussed on http://mail-index.netbsd.org/source-changes-d/2021/10/25/msg013480.html


1.386 25-Oct-2021 ryo

In some arch, _mcount() would be called recursively when built with COPTS=-O0.

Normally, functions called from mcount.c are expected to be expanded inline,
so _mcount() will never be called recursively. But when build with COPTS=-O0,
`static inline' functions aren't inlined, and _mcount() will be called
recursively.

Even if _mcount() has `__attribute__((__no_ instrument_function__))',
it has no effect on the calling external (no-inlined) function.

To avoid this, PROF.<fn> is added can be set the profiling flag of any file.
"PROF.mcount.c" is set to blank by default, mcount.c itself is compiled
without -pg.


1.385 21-Aug-2021 andvar

fix some more typos in comments/log messages, improve wording as well.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.384 09-Nov-2020 christos

- make the CTFCONVERT command lines consistent and concise by putting all
the implementation stuff in a variable CTFCONVERT_RUN
- introduce an OBJECT_TARGET variable that contains the output object file
- when we need to run ctfconvert, go through an intermediate ${.TARGET}.o
file, instead of writing directly to ${.TARGET} and then overwriting
${.TARGET} with ctfconvert. This avoids build failures after a build
got interrupted (the "partially built from C" scourge).


1.383 01-Jun-2020 christos

1. if ${LIBISPRIVATE} == "pic", create _pic.a so that we can embed the library
to another shared object
2. Don't compare ${LIBISPRIVATE} to "yes", because there are 3 places in
Makefiles which set it to empty (this was a bug)
3. For private libraries, don't create .so* files


1.382 30-May-2020 christos

Allow LIBISPRIVATE to build a pic version of itself for embedding into
other shared libraries.


1.381 10-May-2020 maxv

Pass -Wno-unused-command-line-argument for LLVM, discussed on
tech-toolchain@.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
1.380 27-Aug-2019 kamil

Enhance the support of LLVM sanitizers

Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.

Add bsd.sanitizer.mk to share common code used by programs and libraries.

Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.


Revision tags: netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
1.379 21-Jan-2019 christos

branches: 1.379.2;
Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118
1.378 06-Jan-2019 christos

Since g++ uses stdc++_p when building with -pg make this PIC on the
platforms where PIC is available, so that linking shared objects with
-pg works, without needing to create a shared library version of the
profiled libraries.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728
1.377 25-Jul-2018 kamil

Introduce MKLIBCSANITIZER in the share/mk rules

Add flags that are required to build a program and a dynamically loaded
library.

Propagade LIBCSANITIZERFLAGS to CFLAGS and CXXFLAGS.

LDFLAGS is not changed on purpose, as a libcsanitizer is inside libc
and no external dependencies are needed.

Register NOLIBCSANITIZER, as certain distribution parts will need to be
skipped.


Revision tags: phil-wifi-base
1.376 25-Jun-2018 kamil

branches: 1.376.2;
Add a framework for renaming symbols in libc&co for MKSANITIZER

A new keyword SANITIZER_RENAME_SYMBOL. It's a variable that has specified
a list of symbols to be renamed in a processor in order to remove naming
conflicts with public symbols in libc/m/pthread/rt.

This renaming will occur for libraries and programs.
A symbol with a conflicting 'name', will be renamed to '__mksanitizer_name'.

Based on an idea by <christos>


Revision tags: pgoyette-compat-0625
1.375 21-Jun-2018 kamil

Refactor MKSANITIZER flags in mk rules

Introduce a new variable SANITIZERFLAGS that contains all the sanitizer
specific flags. These flags are designed to be passed to CFLAGS, CXXFLAGS
and LDFLAGS.

Pass SANITIZERFLAGS in bsd.prog.mk rules to CFLAGS, CXXFLAGS and LDFLAGS.

Pass SANITIZERFLAGS in bsd.lib.mk rules to *_pic.a build flags. The *_pic.a
libraries are designed to construct .so libraries. All .so libraries with
few exceptions are expected to be prebuilt with a sanitizer. Another
purpuse of *_pic.a files can be constructing static PIE programs, however
they are not supported as of now and there is no sanitization of static
programs either.

Once MKSTATICPIE will be supported, it will be initially incompatible with
MKSANITIZER.

This change also makes it easier to build other targets like kernel and
kernel modules without userland sanitizers.

No functional change intended for MKSANITIZER=no users.


1.374 05-Jun-2018 christos

Elide -nostdinc from LINK.c when linking object files since clang complains
about unused argument. Note that we can't remove CPPFLAGS from LINK.c because
it is used in the "shuttle rules" (from .c to executable).


1.373 05-Jun-2018 christos

Add rules for building relocatable objects to avoid having random Makefiles
use ${LD} ${LDFLAGS} -r which does not work if we specify MKRELRO since
LDFLAGS is supposed to be passed to LINK.c not LD directly (although some
of the flags work).


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE 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 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base
1.372 29-May-2017 christos

branches: 1.372.8;
remove ugly profiling hack now that the compiler is fixed.


1.371 23-May-2017 christos

XXX: Remove -fPIE for profiled libraries because this breaks relocations for
the call to __mcount.


Revision tags: prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426
1.370 24-Apr-2017 chs

fix another parallel-build race with MKDEBUG=yes by creating the .so.link
with a temporary name and renaming to the final name only after
the file is fully written.


Revision tags: bouyer-socketcan-base1
1.369 20-Apr-2017 ozaki-r

Introduce MKSTRIPSYM build option

If it's yes, all local symbols of shared libraries are stripped
(default). If it's no, only temporary local symbols are stripped;
for example, symbols of static functions are kept. Keeping such
symbols is useful on using DTrace for userland libraries and
getting a backtrace from a rump server loading modules (shared
libraries).

Proposed and discussed on tech-kern and tech-toolchain


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base
1.368 08-Jan-2017 christos

branches: 1.368.2;
- centralize setting of MK* vars in bsd.own.mk
- make sure that the default setting of all vars is done in _MKVARS.{yes,no}
if possible.


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.367 12-Mar-2016 mrg

branches: 1.367.2;
remove conditionals that are always true with GCC >= 4.8.


1.366 27-Feb-2016 christos

Revert and leave broken.


1.365 27-Feb-2016 christos

Don't build archive libs with -fPIC breaks static binaries and profilig.


1.364 21-Feb-2016 christos

Add NODEBUG


1.363 31-Jan-2016 christos

Introduce NOPIE and NOCTF so that standalone programs build properly.


1.362 08-Sep-2015 uebayasi

Revert previous. It was not wrong, but not necessary for everyone.

(If really wanted, *.a generation rule can be easily overriden locally.)


1.361 07-Sep-2015 uebayasi

Order object build alphabetically.


1.360 29-Jul-2015 tsutsui

Revert rev 1.359 which broke libsa builds. PR/50101


1.359 20-Jul-2015 joerg

Simplify the build of library archives by no longer doing a topological
sort.


1.358 04-Jun-2015 mrg

fix MKDEBUG vs parallel builds. split the creation of the final
.so file from the main link of it, and use the main file as the
input for both the .so output and the .so.debug file. for MKDEBUG
builds we now:

(a) create the (new) .so.full file
(d) create the .so.debug file
(c) create the (installable) .so file

for other builds, we simply use the same rule for (a) to create (c).

this stops the .so.debug rule from modifying the .so rule's target
and leading to mayhem.

see this thread for more details:
http://mail-index.netbsd.org/tech-toolchain/2015/06/03/msg002616.html


1.357 02-Jun-2015 christos

Strip the debug symbols via a temporary file, atomically replacing the full
random access archive to avoid races.


1.356 01-Dec-2014 erh

PR toolchain/9618: add ".d" to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
1.355 13-Jun-2014 mrg

branches: 1.355.2;
remove the build support for GCC 4.1, and any hacks i found for it.

there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)


Revision tags: yamt-pagecache-base9
1.354 24-Apr-2014 pooka

allow use with linkers that don't support --warn-shared-textrel
(Solaris, OpenBSD)


1.353 11-Apr-2014 matt

Back changes from 1.349 on since the -Wl,-x bug has been fixed in binutils.


1.352 11-Apr-2014 christos

explain what's going on, add another kludge for -g


1.351 09-Apr-2014 christos

Since the objcopy -x removes debugging symbols, delay that if we are building
debugging libraries and do the stripping with the debug symbol separation
step.


1.350 09-Apr-2014 christos

change -x to OBJCOPYLIBFLAGS like everywhere else.


1.349 04-Apr-2014 matt

branches: 1.349.2;
Using -Wl,-x breaks build ARM BE8 shared libraries by striping the $a/$d/$t
symbols before the linker can use them. Instead do ${OBJCOPY} -x ${.TARGET}
afterwards.


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.348 09-Mar-2014 christos

let's see if the new dwarf library can handle dwarf 4


1.347 02-Mar-2014 christos

If we are compiling with -g and using gcc4.8 and dtrace downgrade
dwarf generation to version 2 for now.


1.346 26-Feb-2014 mrg

define EXTERNAL_GCC_SUBDIR based upon HAVE_GCC, for GCC >= 4.5,
and use it in the one place (bsd.lib.mk) it's used in share/mk.


1.345 14-Jan-2014 apb

Let MKARZERO default to the same value as MKREPRO, so callers
can set MKREPRO=yes and automatically get MKARZERO=yes.


1.344 16-Dec-2013 matt

Back out change for bsd.lib.mk which skips objcopy -x for BE ARM.
Change OBJCOPYLIBFLAGS to keep $a/$d/$t symbols on BE ARM.


1.343 13-Dec-2013 matt

Don't strip local symbols for earmv7*eb images since that will break linking.


1.342 18-Oct-2013 christos

change if HAVE_GCC is defined


1.341 14-Oct-2013 joerg

Rename USE_LIBGCC to HAVE_LIBGCC and retry using it as flag on unwind.h.


1.340 14-Oct-2013 joerg

Include compiler-rt and libunwind in libc for Clang/x86 builds.


1.339 12-Sep-2013 joerg

Handle dependency on libstdc++ / libc++ in bsd.lib.mk.


1.338 12-Sep-2013 joerg

Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
1.337 19-Jul-2013 pooka

Enable opt-out from shlib mapfile creation. Not all linkers (namely
the solaris one) support such fancy features.

no default functional change


Revision tags: riastradh-drm2-base
1.336 16-Jul-2013 matt

branches: 1.336.2;
When linking shared libraries, produce a map file.


1.335 22-Apr-2013 riastradh

Move addition of -g to CSHLIBFLAGS later in bsd.lib.mk.

It is now past any conditionals where its emptiness or nonemptiness can
influence the decision of what objects get built.

Fixes MKDEBUG=yes build on vax (PR 47700).


1.334 11-Apr-2013 christos

Install shlibdir debug links


1.333 04-Apr-2013 christos

fix mkdebug for private libraries.
while here, centralize the strip variable handling per type of object.


Revision tags: agc-symver-base
1.332 05-Mar-2013 pooka

branches: 1.332.2;
Make "make DBG=-g -O2" for a library once again produce a shared library
with debugging symbols (irregardless of .debug).


1.331 13-Feb-2013 nakayama

Fix copy and paste miss introduced in rev 1.327.


1.330 09-Feb-2013 christos

Allow setting _LIB_PREFIX externally.


1.329 09-Feb-2013 spz

typo in a MKDEBUGLIB part


1.328 08-Feb-2013 matt

Add missing }


1.327 08-Feb-2013 christos

- factor out variables so that the code is more readable, make them conistent
- use _LIB_PREFIX correctly.


1.326 22-Jan-2013 christos

Make the libfoo.so.X.Y.debug files actually contain debug symbols if MKDEBUG.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
1.325 13-Nov-2012 pooka

Make it easier build binaries against the host's libs, e.g.
libpthread which might be in /lib/x86_64-linux-gnu/libpthread.so.0
or some other unholy place.


Revision tags: yamt-pagecache-base6
1.324 23-Aug-2012 joerg

branches: 1.324.2;
Revert last, it breaks the tricks xsrc uses.


1.323 23-Aug-2012 joerg

Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if
SHLIBDIR differs from /usr/lib.


1.322 19-Jul-2012 christos

From pooka: Fix EXTERNAL_TOOLCHAIN compilation where crti/crtn are not in the
same directory as crtbegin


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
1.321 19-Feb-2012 matt

Add support for --combine with gcc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
1.320 28-Jan-2012 christos

rename to OBJCOPYLIBFLAGS


1.319 28-Jan-2012 christos

Provide a way to override the default objcopy flags for library modules.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.318 07-Oct-2011 mrg

branches: 1.318.2;
obsolete libgcc_pic and friends. all libgcc's are supposed to be pic
for platforms with shlibs already (and are.)

this obsoletes our hacks for the libgcc specs to use libgcc_pic, and
fixes a couple of other issues reported to me directly.


1.317 25-Sep-2011 apb

If the number of entries in CLEANFILES is too large, then the
commands in bsd.clean.mk encounter errors like "exec(/bin/sh)
failed (Argument list too long)". Avoid that by splitting the
files to clean into several lists using different variable names.

This should fix PR 45397, at least until the number of files
grows much larger.


1.316 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.315 27-Aug-2011 joerg

Add new "analyze" command to run clang's static analyzer in a directory
on all C/C++ files.


Revision tags: cherry-xenmp-base
1.314 11-Apr-2011 joerg

Adjust --sysroot related usage:
-Wl,-rpath does not expand =, so just drop it.

Drop -Wl,-rpath-link entries that duplicate the -Wl,-rpath entries, this
is done implicitly now that ld is built with sysroot support.

Use ${DESTDIR} explicitly for the remaining -Wl,-rpath-link entries.


1.313 10-Apr-2011 joerg

For USETOOLS=yes, use the --sysroot support of the compiler to cut down
the number of hard-coded pathes and magic invocations.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
1.312 10-Feb-2011 matt

Only define DPLIBC if LIBC_SO is not empty otherwise we an errant
dependency on DESTDIR.


1.311 06-Feb-2011 joerg

Allow HOSTLIB to use C++ by not specifying -nostdinc++.


Revision tags: matt-mips64-premerge-20101231
1.310 08-Dec-2010 joerg

branches: 1.310.2;
Don't depend on ${CC} passing down -R to ld, use -Wl,-rpath explicitly.


1.309 08-Nov-2010 lukem

Preserve date on original shared library or program when stripping
the debug symbols and adding the debug-link to .debug.
Use '(rm -f file; false)' in the failure path to force failure.
Based on solution proposed by Nicolas Joly on tech-toolchain in July 2010.
Should fix PR toolchain/44046 from Andreas Gustafsson.


1.308 06-Jul-2010 mrg

remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h


1.307 27-Apr-2010 lukem

Support MKDEBUG for shared libraries.


1.306 26-Apr-2010 lukem

fix comment (so bracket matching works as intended)


1.305 02-Mar-2010 darran

DTrace: Add CTF generation to the make framework. Only enabled when
MKDTRACE=yes.


1.304 22-Feb-2010 njoly

Change shared object file extension from .so to .pico, to avoid
conflicts with shared libaries names libXX.so; as recently seen with
MKUPDATE=yes builds for libelf and libnvpair.

All now stalled regular .so files need to be manually removed from
object directories.


1.303 25-Jan-2010 christos

PR/42658: Geoff Wing: Quote directory variables to deal with spaces in the
source pathname.


1.302 30-Dec-2009 abs

Add brief line on SHLIB_MAJOR, SHLIB_MINOR and SHLIB_TEENY in comments
section - addresses PR bin/39693


Revision tags: matt-premerge-20091211
1.301 12-Dec-2009 mrg

replace /usr/lib with ${_GCC_CRTDIR} or ${SHLIBDIR} as appropriate.


1.300 08-Dec-2009 uebayasi

When PROGS / LIBS are used, you can pass each PROG / LIB specific parameters
to ${LD} via:

${LDADD.${PROG}}
${LDFLAGS.${PROG}}
${LDSTATIC.${PROG}}
${LDADD.${LIB}}
${LDFLAGS.${LIB}}

OTOH you can't pass parameters to ${CC}, because in suffix rules make(1) only
knows the name of ${.IMPSRC} and ${.TARGET}; it's users' responsivility to
define ${CC} parameters to all the sources of a given ${PROG} / ${LIB}.

Should address bin/42381.

(Bug in this commit log was pointed out by mrg@.)


1.299 27-Nov-2009 tsutsui

If CPPFLAGS or CXXFLAGS already contains -nostdinc or -nostdinc++,
don't add ${CPPFLAGS_ISYSTEM} or ${CPPFLAGS_ISYSTEMXX} to refer
${DESTDIR}/usr/include or ${DESTDIR}/usr/include/g++.

This change might cause errors on some MD stand dir, but in that case
each Makefile should be fixed to search proper system include paths
by -Ipath option in own CPPFLAGS.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.298 10-Apr-2009 apb

Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links. They have no effect except when using a
metalog, in which case the information is added to the metalog. In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg. This should fix PR 24457 and PR 41155.


1.297 01-Apr-2009 perry

Add a _ARRANFL for the flags for invoking ar as ranlib.
Will be used only for Makefile.rump for now.


1.296 13-Mar-2009 perry

Add a MKARZERO flag, which invokes ar(1) with the new D flag when it
is set to "yes" -- defaults to "no" except for build.sh builds. This
results in a deterministic .a file rather than one that reflects
timestamps and permissions on the source files.

Also, clean up the ar flags we're using, and remove a redundant use of
ranlib that on a modern POSIX ar can be done with the "s" flag.

Discussed on tech-toolchain


1.295 17-Jan-2009 he

branches: 1.295.2;
If we have a SHLIB_VERSION_FILE, add is as a dependency for the
library. This is mostly a convenience, so that you can trigger
a shared library rebuild by touching the shlib_version file, it
should not otherwise impact the build one way or the other.


1.294 17-Jan-2009 he

Move _LIBLDOPTS and LDFLAGS to a spot behind LDADD when making a
shared library. This is done so that -L options pointing into
DESTDIR will come after -L options pointing into our object tree
for shared libraries this shared library depends on.

This makes a difference when shared library major numbers are bumped
(as was recently done in our tree), and you build into an already-
populated DESTDIR, because otherwise the old major version shared
libraries will be picked up, because the new ones have not yet been
installed at this stage. This will in all probability lead to
conflicts later on when linking programs, where one would try to
mix new and old major versions for the same shared library.

I *hope* this will not have any negatively impact by moving other
order-dependent options around; local tests with rebuilds did not
uncover any problems I could see.

OK'ed by lukem@


1.293 08-Jan-2009 pooka

Add comment requesting modifications to __archivebuild be reflected
in the rump build.


1.292 08-Dec-2008 pooka

Don't use -isystem in rump builds. This ensures that only headers
in the kernel tree are used.


1.291 06-Dec-2008 mrg

add LIBISCXX. if it is != "no", use ${CXX} instead of ${CC} to link
shared libraries. use it for the one c++ library we have.

fixes PR#39936.


1.290 24-Nov-2008 cube

Allow the use of NOSTATICLIB along with LIBISPRIVATE to build private libs
that are suitable to be linked into a shared lib.


Revision tags: netbsd-5-base matt-mips64-base2
1.289 19-Oct-2008 apb

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


1.288 19-Oct-2008 christos

handle assembly files for MKPIE


1.287 17-Oct-2008 christos

make .a archives PIC for MKPIE


Revision tags: wrstuden-revivesa-base-3 mjf-devfs2-base
1.286 09-Sep-2008 joerg

Add MKSTRIPIDENT to remove the RCS IDs from binary programs and shared
libraries for space-constraint systems. The description is based on the
feedback of hubertf@, the logic on input from lukem@

This obsoletes the removal of LIBC_SCCS and SYSLIBC_SCCS for libc builds.


Revision tags: wrstuden-revivesa-base-2
1.285 13-Aug-2008 christos

fix debugging library build.


1.284 10-Aug-2008 lukem

Fix installed symlinks for LIBISMODULE=yes.
Further fixes to support for SHLIB_MAJOR set without SHLIB_MINOR.


1.283 10-Aug-2008 lukem

When building a .so, don't require the library to have a minor version.
Prevents a "stat: Too many levels of symlinks" build error.


1.282 10-Aug-2008 lukem

Implement LIBISMODULE:
If not "no", install as ${LIB}.so (without the "lib" prefix),
and act as "MKDEBUGLIB=no MKLINT=no MKPICINSTALL=no
MKPROFILE=no MKSTATICLIB=no".
Default: no


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
1.281 03-May-2008 lukem

branches: 1.281.2;
Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)


1.280 03-May-2008 lukem

Provide a "lint" target that will lint all the sources, even if MKLINT=no.
(MKLINT=no still prevents installation of the lint libraries).
Explictly disable some library variations if MKPRIVATELIB=yes.


1.279 02-May-2008 lukem

Explicitly set MKLINT=no if MKLINKLIB==no, rather than just acting that way.


1.278 29-Apr-2008 simonb

Use -nodefaultlibs instead of -nostdlib when linking libc and libgcc*
so that we still link in the crt* start/end files.
Explicitly link libc against gcc_pic, since -nodefaultlibs undoes this.

Fixes problems where shared libraries don't get init/fini sections,
most easily noticable with pthreads programs not working.

Approved by: skrll
Thanks: bjs, mrg, icb peanut gallery.


1.277 27-Apr-2008 christos

now that gcc adds -lc, reverse the logic and explain.


1.276 26-Apr-2008 christos

Exempt gcc libraries from linking against libc.


1.275 26-Apr-2008 christos

deal with modules that don't define lib.


1.274 26-Apr-2008 christos

make all shared libraries depend on libc.


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
1.273 09-Jan-2008 simonb

branches: 1.273.4; 1.273.6;
Remove support for NetBSD/pc532.


Revision tags: pc532-eol-2008 cube-autoconf-base matt-armv6-base
1.272 15-Sep-2007 christos

Enable text relocation warnings.


Revision tags: matt-mips64-base
1.271 18-Mar-2007 tsutsui

branches: 1.271.4;
CPPICFLAGS -> CPPPICFLAGS (in comments)


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
1.270 23-Nov-2006 martin

When checking wether we are debugging, look for -g in ${CFLAGS} instead
of ${COPTS}. The latter explicitly includes the former and ${DBG}, where
the -g most likely is hidden.


1.269 18-Sep-2006 dbj

pay attention to MKUPDATE instead of UPDATE when installing libs


Revision tags: abandoned-netbsd-4-base
1.268 22-Jul-2006 lukem

Rename MKDEBUG to MKDEBUGLIB.


1.267 11-May-2006 mrg

add support for ${OBJCOPTS} and ${OBJCOPTS}.<lib|prog|fn>.


1.266 09-Apr-2006 christos

Add MKDEBUG and the ability to build debugging versions of the libraries.


1.265 30-Mar-2006 christos

make symlink types consistent.


1.264 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


1.263 28-Jan-2006 dsl

Use ${OBJCOPY} -[xX] ${.TARGET} instead of getting the file written to
${.TARGET}.tmp and running ${LD} -[xX] ...
I don't believe there are any architectures where objcopy can't delete local
symbols.


1.262 08-Jan-2006 christos

Compile all profiling sources with -DPROF -DGPROF, not just assembly sources.


1.261 10-May-2005 lukem

Also use relative symlinks for the /usr/lib/lib${LIB}.so.${SHLIB_FULLVERSION}
symlink to ../../lib/... because runtime lookups on the former aren't
speed critical either.


1.260 10-May-2005 lukem

Restore rev 1.247:
Use relative symlinks for /usr/lib/libfoo.so -> /lib/libfoo.so.M.N
This should work now that "install -l r -d destdir" works if destdir
contains a symlink.


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.259 10-Jan-2005 lukem

Revert previous (1.258): we don't want to link .so libraries against
(non-PIC) .a libraries, and the problem which triggered the addition
of the previous has been fixed by providing librpcsvc as a .so.


1.258 29-Dec-2004 lukem

When setting DPADD based on LIBDPLIBS, only add the .so if it exists
and fallback to the .a instead. This allows the use of libraries
which are .so only, have both .so & .a, and are .a only.


1.257 02-Dec-2004 simonb

Add COPTS to AFLAGS so assembly files pick up flags like -msoft-float.


1.256 04-Aug-2004 lukem

Implement LIBDPLIBS, which is a list of the tuples:
libname path-to-srcdir-of-libname

For each tuple;
* LIBDO.libname contains the .OBJDIR of the library `libname', and
if it is not set it is determined from the srcdir and added to
MAKEOVERRIDES (the latter is to allow for build time optimization).
* LDADD gets -L${LIBDO.libname} -llibname added.
* DPADD gets ${LIBDO.libname}/liblibname.so added.


1.255 29-Jul-2004 thorpej

Assign STOBJS the value of OBJS, and use that when referring to static
library objects, rather than using OBJS to refer to them. This gives us
a separate variable to refer to static library objects that does not affect
profile library objects (which has POBJS) or shared library objects (which
has SOBJS).


1.254 10-Jun-2004 lukem

Be consistent in handling YHEADER, similar to Christos' fix in bsd.lib.mk 1.253


1.253 09-Jun-2004 christos

PR/25887: Peter Bex: Missing yacc dependency in bsd Make system


1.252 23-May-2004 lukem

* Add MKPRIVATELIB; if not "no", act as "MKPROFILE=no MKPIC=no MKLINT=no"
and don't install the (.a) library.
This is useful for "build only" helper libraries.
* Add some #{ [...] #} comments around large conditional statements.


1.251 18-Apr-2004 lukem

Rework .s.{o,po,so} and .S.{o,po,so} to be more like the <bsd.sys.mk> rules:
- support ${COPTS.<fn>} ${CPUFLAGS.<fn>} ${CPPFLAGS.<fn>}
(deficiency noted by Tyler Retzlaff <rtr@NetBSD.org>)
- use ${COMPILE.s} for .s.o .s.po .s.so (instead of ${COMPILE.S})
- don't support AINC anymore; append to AFLAGS instead

Remove .c.ln - it was a duplicate of the rule in <bsd.sys.mk>


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.250 23-Feb-2004 skrll

hppa can uses the standard flags so remove the unnecessary special case.


1.249 15-Feb-2004 skrll

Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

- creates libgcc, libgcc_eh and libgcc_s

- updates LIBGCC_SPEC to use them appropriately.

There's a hack in here at the moment with respect to libgcc_so in that it
is preferable to link against libgcc_so will only when -shared-libgcc is
specified (the c++ frontend does this automatically.) Configurations where
LINK_EH_SPEC is defined already do this. The gcc configuration for
NetBSD/alpha and another NetBSD platform (I forget which) actually define
LINK_EH_SPEC probably by accident rather than design.

- updates share/mk to use the compiler's knowledge of what needs linking into
libraries and executables. This removes an hppa hack.

- updates the sets for the newly created libgcc* files.

- support for linking against the _pg version of libgcc has been removed.


1.248 09-Feb-2004 lukem

Revert previous; install -l r doesn't appear to work correctly when
DESTDIR is a symlink.
(Yet another reason why "-l r" looks good on paper but sucks in practice).


1.247 06-Feb-2004 lukem

Convert the /usr/lib/libfoo.so -> /lib/libfoo.so.M.N link into a relative link.
This simplifies using ld with ${DESTDIR}/usr/lib whilst retaining the
(slightly faster) absolute links for the run-time libraries.
Per discussion on tech-toolchain.

(Side note; install(1) -l r needs the source to be prefixed with ${DESTDIR}
to operate correctly, which makes it non trivial to enable '-l r' by default
for all ${INSTALL_SYMLINK}s)


1.246 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.245 27-Jan-2004 lukem

Replace
:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)


1.244 07-Jan-2004 skrll

Correct a comment


1.243 23-Dec-2003 rtr

Need to provide alternate definitions of __archive{build,install} for x11.
approved by lukem


1.242 07-Dec-2003 simonb

No shared libraries on ns32k at the moment - set *PICFLAGS to nothing.


1.241 13-Nov-2003 matt

Use ${HOST_LN}
Fix how hppa gets to -lgcc_pic


1.240 11-Nov-2003 dsl

Set MKDEP_SUFFIXES to get additional targets in .depend instead of using
sed in .afterdepend. I don't think .afterdepend is used anywhere any more.


1.239 26-Oct-2003 lukem

use ${HOST_SH} instead of sh


1.238 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.237 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.236 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.235 30-Sep-2003 lukem

Set _LIBLDOPTS to set -Wl,-rpath-link -R -L appropriately based
on the setting of ${SHLIBDIR} and ${SHLIBINSTALLDIR} (_not_ ${_LIBSODIR}).

Fixes cruel and unusual ^W^W^W obscure native-build and not-so-obscure
cross-builds problems I was having with shared libraries with a
non-base LIBDIR (e.g, /usr/X11R6/lib) that use LDADD to pull in other
libraries from /usr/lib (such as libm) which are really in /lib and the
symlink from ${DESTDIR}/usr/lib/libm.so to /lib/libm.so.N.M was confusing
the linker. Stuffing -rpath-link ${DESTDIR}/lib in solves the problem.

This should mean that shared libraries that depend upon other shared
libraries in other directories should DTRT in a DESTDIR (cross-)build...

Inspired by _PROGLDOPTS in <bsd.prog.mk>


1.234 13-Sep-2003 lukem

implement MKSTATICLIB, which defaults to "yes". if "no" (which NOSTATICLIB
also sets, a la the other variables), prevents build and installation
of the "normal" static *.a libraries.


1.233 13-Sep-2003 erh

Also support per-program LDFLAGS and LDSTATIC.


1.232 13-Sep-2003 erh

Create a way to add additional flags to COPTS, CPPFLAGS, CXXFLAGS and LDADD
for particular libraries or programs by specifying the additions in mk.conf
instead of needing to go edit individual Makefiles.


1.231 24-Aug-2003 lukem

Support ${LDFLAGS} when linking libraries


1.230 01-Aug-2003 lukem

Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".


1.229 28-Jul-2003 lukem

be consistent when adding *.y and *.l to DPSRCS


1.228 28-Jul-2003 lukem

Overhaul how the .{c,cc,cpp,cxx,C,f,m.S}.{o,po,so} rules are implemented:
only list the (often complicated) ${COMPILE.*} rules once always building
to ${.TARGET}.tmp. Then, depending on whether *OPTS has -g, either
"mv ${.TARGET}.tmp ${.TARGET}" or "${LD} -[xX] -r ${TARGET}.tmp -o ${.TARGET}"
as appropriate.
This can prevent inconsistency that could occur between "echo ${COMPILE.*:Q}"
and "${COMPILE.*}", such as the problem in rev 1.226. (There were still
examples of this in .cc.so and .m.so !!!)

Remove `@' from most non-echo rules, so that we can actually see what's
happening. This helps debugging problems, such as that fixed by rev 1.226.

Always remove all possible temp files that might occur because of the above.

Be consistent about ${CC} instead of $(CC)


1.227 28-Jul-2003 lukem

Pull in <bsd.sys.mk> before supplying our own .c.o (et al) rules.
Otherwise, <bsd.sys.mk>'s implementations will be used instead. (oops!)


1.226 28-Jul-2003 lukem

fix typo (insert botch? :) in previous, which broke .cxx.po


1.225 27-Jul-2003 mrg

introduce a new $CPPFLAG_ISYSTEMXX that is used to reference c++ system
includes. for GCC3, set this to -I instead of -isystem.

XXX this should really be either not required or a -isystem-cxx, but for
now this is required to build libstdc++-v3, which otherwise complains
heavily about STL headers not being C code(!)


1.224 22-Jul-2003 lukem

Add source-file-specific variables in <bsd.lib.mk> and <bsd.prog.mk>:

COPTS.<fn> Additional flags to the compiler when creating the C objects
for <fn>.

CPUFLAGS.<fn> Additional flags to the compiler/assembler for <fn>.

CPPFLAGS.<fn> Additional flags to the C pre-processor for <fn>.


(For <fn>.[ly], "<fn>.c" must be used.)


1.223 20-Jul-2003 lukem

Consistently support the different C++ file extensions: .cc .cpp .cxx .C
Noted by Andrew White in PR toolchain/18246


1.222 18-Jul-2003 lukem

whitespace cleanup


1.221 27-Jun-2003 drochner

Use ${CC} instead of ${LD} to build shared objects.
(g)cc has all the knowledge which startfiles/libgcc to
use, so we don't need to duplicate all that here.

Externally visible change:
Shared objects are linked against libgcc_pic.a now
(if the in-tree gcc2 is used). This fixes problems with
dlopen()'ed objects referencing libgcc functions not used
(thus not linked in) by the main program.


1.220 11-Jun-2003 msaitoh

catch signal 1,2,3,13 and 15 to clean /tmp/_dependXXX


1.219 31-May-2003 thorpej

If EXTERNAL_TOOLCHAIN is defined, allow the compiler to define the
location of crt{begin,end}{,S}.o and libgcc.a. Encapsulate all of
this logic into the new bsd.gcc.mk, and use it in bsd.prog.mk and
bsd.lib.mk.


1.218 27-May-2003 wiz

Use && instead of ; to only overwrite a file if the corresponding sed worked (from christos).
Add .cpp rules.


1.217 26-May-2003 wiz

s/${ECHO}/@echo/, since we don't define ECHO in share/mk.


1.216 22-Apr-2003 christos

fix lossage caused by previous commit.


1.215 20-Apr-2003 christos

PR/6257: Izumi Tsutsui: bsd.lib.mk should set target only if LIB is defined.


1.214 11-Apr-2003 thorpej

Provide the MKPICLIB value in bsd.own.mk, rather than bsd.lib.mk. It
is sometimes necessary for non-library Makefiles to determine if _pic
libraries are being built.

Problem pointed out by Havard Eidnes.


1.213 30-Mar-2003 thorpej

If MACHINE_ARCH is powerpc and we HAVE_GCC3, add crtsaveres.o to the
endfile spec.


Revision tags: fvdl_fs64_base
1.212 22-Nov-2002 thorpej

Split crtbegin/crtend into crti/crtbegin/crtend/crtn. NetBSD-specific
things like the .note.netbsd.ident section are provided by crti/crtn.
crti/crtn also provide the _init() and _fini() routines.

crtbegin/crtend now only provide support for ctors/dtors. This paves
the way to using the "crtstuff" provided with GCC (when we upgrade to
GCC 3.3), which provides, among other things, much better C++/Java
exception handling.


1.211 10-Nov-2002 thorpej

Oops, AINC actually is still used; put it back.


1.210 10-Nov-2002 thorpej

The MIPS toolchain now defines __ABICALLS__ when abicalls are in use,
and the sources now use that define, so there is no need for us to define
ABICALLS. Since that was the only use for the AINC variable, garbage-collect
it.


1.209 09-Nov-2002 thorpej

Now that the compiler does the right thing with -KPIC, we no longer
need to add it (or -fpic, for that matter) explicitly when building
shared libraries on MIPS.


1.208 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


1.207 27-Sep-2002 thorpej

Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.


1.206 14-Sep-2002 thorpej

If DESTDIR is set, add ${DESTDIR}/usr/libdata to the lint library
search path. This works around the problem of lint using the
wrong lint libraries until a "lint -d ..." equivalent is implemented
for libraries.


1.205 20-Jul-2002 yamt

- add CSHLIBFLAGS.
- fix typos in comment.


1.204 01-Jul-2002 fredette

Added a temporary workaround when building libraries for hppa:
link in libgcc to get the millicode routines.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.203 07-May-2002 eeh

branches: 1.203.2;
Don't add -DBIGPIC to APICFLAGS.


1.202 07-May-2002 eeh

Turn on 32-bit relocations for sparc64 PIC code.


1.201 26-Apr-2002 lukem

Implement NETBSDSRCDIR, which is the top level of the NetBSD source tree.
Defaults to the directory determined by the _SRC_TOP_ logic (if != ""),
and the BSDSRCDIR.

NETBSDSRCDIR has been provided for use by the various NetBSD source
Makefiles to find the top of the NetBSD source tree, and isn't
affected by the inheritance properties of _SRC_TOP_, nor does it
have the magic BSDOBJDIR baggage that BSDSRCDIR is stuck with.


1.200 10-Apr-2002 lukem

replace BSDSRCDIR with _SRC_TOP_, since the latter is more likely to
be "accurate". document _SRC_TOP_.


1.199 19-Mar-2002 lukem

use ${VAR:D:U...} if we only want a value in the undefined case


1.198 19-Mar-2002 lukem

Change library installation.
Instead of:
install -m 600 [...]
ranlib -t [...]
chmod 444 [...]
use the newly added "-a" flag to install(1) to invoke ranlib ifndef UPDATE.
Should prevent unnecessary ranlib-ing of installed libraries with UPDATE
defined.

Per discussion with simonb.


1.197 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.196 28-Dec-2001 lukem

cosmetic tweak on an older comment


1.195 28-Dec-2001 lukem

* Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".

- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.

- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so

2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so

3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed


1.194 28-Nov-2001 tv

If DESTDIR is set, do a similar nostdinc dance for the standard C++ include
directory.


1.193 24-Nov-2001 perry

Now that install has been fixed to deal with -r in the symlink case,
make bsd.lib.mk use INSTALL_SYMLINK instead of mv and ln -s.
Note: There is still one weird case I left alone, in which symlinks
get built in the objdir. I didn't want to log metadata for those links
so I left the old machinery in for them.
XXX do we even need that elaborate dance for the ln's in the objdir?


1.192 19-Nov-2001 thorpej

Use a little transitional hack to determine if we use -isystem
or -idirafter. Use the former only of USE_NEW_TOOLCHAIN, since
-isystem causes the old toolchain to bomb out when building
libstdc++.


1.191 14-Nov-2001 tv

C/..$/.c/ -> C/\..$/.c/


1.190 14-Nov-2001 tv

Move the DESTDIR-based nostdinc logic to bsd.lib.mk and bsd.prog.mk where
it belongs (with the native target compile rules).


1.189 02-Nov-2001 simonb

Set installed library mode correctly in UNPRIVILEGED case.


1.188 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.187 25-Oct-2001 nathanw

Don't explicitly set SHLIB_LDSTARTFILE and SHLIB_LDENDFILE for the
generic architecture case; this permits the later ELF clause to set
them properly for ELF platforms.

This will cause crtbeginS.o and crtendS.o to be included in shared
libraries built on all ELF platforms, not just alpha, mips, vax, and
sparc.


1.186 19-Oct-2001 tv

Add .NOPATH for all files generated from .l or .y files in SRCS. Fixes PRs
bin/14187 and lib/14239.

Also simplify the handling of these transforms to .c and .h files a bit by
leveraging make's builtin macro operators.


1.185 21-Sep-2001 tv

Since SHLIB_MAJOR may be set even in a MKPIC=no situation, make sure that
print-shlib-* targets only print stuff if MKPIC=yes.


1.184 21-Sep-2001 tv

If SHLIB_MAJOR is explicitly set in a Makefile, don't even look for a
shlib_version file. (Part of a larger change which will also update
checkver to deal with this, and migrate old makefiles to include
SHLIB_MAJOR/SHLIB_MINOR. For now, just add the hooks so that the old
gnu/lib toolchain libraries can use this as a workaround.)


1.183 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.182 08-Jun-2001 mrg

redo the previous; allow SHLIB_LDSTARTFILE and SHLIB_LDENDFILE to be overridden.


1.181 07-Jun-2001 mrg

set SHLIB_LDSTARTFILE and SHLIB_LDENDFILE based on ${LIBDIR} not hard coded
/usr/lib.


1.180 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.179 27-Apr-2001 dmcmahill

add support for building shared libs from fortran sources. Works correctly
with the default of 'f77' as the fortran compiler or using the 'f2c-f77'
script from pkgsrc (selected by overriding the FC variable)


1.178 05-Dec-2000 mycroft

This is *purely* anal-retentive, but: remove extra spaces in the generated
commands in the previous.


1.177 05-Dec-2000 mycroft

When handling ELF library symlinks, rather than removing and recreating the
symlink, instead create a temporary one ending in `.tmp' and `mv -f' it.
This way there is no window where libc isn't loadable (and thus
`make -j 100 install' works for libc).


1.176 09-Aug-2000 gmcgarry

Remove executable permission from src/lib/checkver.


1.175 19-Jul-2000 mrg

simplify previous.


1.174 17-Jul-2000 eeh

Tell gas how to make PIC objects on sparc64.


1.173 14-Jul-2000 christos

PR/10556: Veego: Shared library support was broken if shlib_version file
was not present.


1.172 06-Jul-2000 matt

Add NetBSD/vax ELF hook.


1.171 03-Jul-2000 christos

add support for teeny dewey numbers; cleanup duplicated variables.


1.170 25-Jun-2000 erh

For the case when DESTDIR is set: move the -L${DESTDIR}/usr/lib after ${LDADD} so any -L directories set in LDADD are searched first to avoid possibly linking against old versions of libraries.


Revision tags: netbsd-1-5-base
1.169 19-Jun-2000 thorpej

branches: 1.169.2;
Add print-shlib-major and print-shlib-minor targets.


1.168 06-Jun-2000 mycroft

Minor rearrangement.


Revision tags: minoura-xpg4dl-base
1.167 03-May-2000 matt

branches: 1.167.2;
Implement my MKLINKLIB=yes fix a bit differently. Don't include ${OBJS}
in ${ALLOBJS} if MKLINKLIB=yes. This allows Makefiles to continue to
modify ${OBJS}.


1.166 03-May-2000 matt

rework slightly so that when MKLINKLIB=no only the shared objects are built.
(building normal objects when they are never used really sucks on slow build
machines).


1.165 29-Apr-2000 dmcmahill

Change -fpic to -fPIC. Change was approved by mycroft.


1.164 24-Apr-2000 simonb

White space bogons (double spaces, spaces instead of tabs).


1.163 19-Feb-2000 erh

Add NOPATH for all output files to prevent their presence in the search path from causing problems.


1.162 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


1.161 17-Jan-2000 abs

remove duplicate += of OBJS, introduced in 1.158 - fixes PR #8487


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.160 28-Nov-1999 simonb

Add a MKPICLIB variable. If set to "no", don't build an _pic.a library
and build shared objects from the .a library. A symlink is installed
in /usr/lib so that the name "libfoo_pic.a" still exists for third party
software that explicitly wants an _pic.a library.


Revision tags: comdex-fall-1999-base
1.159 14-Sep-1999 perry

branches: 1.159.4;
Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.158 12-Sep-1999 christos

sort the object file build so that we get better buffer cache behavior.
[from perry, with fixes from me]


1.157 04-Sep-1999 fredb

Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.


1.156 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


1.155 14-Jul-1999 wrstuden

branches: 1.155.2;
Re-arrange location of "-nostdlib" in DESTDIR case so that cross-ld's
won't name the output file "stdlib".


1.154 10-Jun-1999 simonb

Use ${SHLIB_VERSION_FILE} as the location of the shared library version
file. Pass this to checkver with the new -v option as well.


1.153 07-Jun-1999 christos

Don't strip symbols if -g is specified. We might want to be able to debug
libraries!


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.152 30-Mar-1999 fair

branches: 1.152.2;
Patched per PR 7283; this causes shared libraries which depend on
other shared libraries to load against the ones just built when
DESTDIR is set (i.e. -L${DESTDIR}${LIBDIR} ), rather than what's
installed in /usr/lib (previous behavior definitely violated the
Principle of Least Astonishment!).


1.151 24-Feb-1999 drochner

add missing parts of the "mips"->"mipse?" transition


1.150 14-Feb-1999 christos

Add sparc/elf bits.


1.149 12-Feb-1999 lukem

for MKSHARE=no, set MKDOC=no MKMAN=no MKNLS=no, and for MKMAN=no, set
MKCATPAGES=no. this simplifies various tests.


1.148 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.147 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.146 02-Dec-1998 thorpej

When installing a shared library, run /sbin/ldconfig -m ${LIBDIR} if
DESTDIR is not set and the object format is a.out.


1.145 30-Nov-1998 erh

Don't do the version check if we can't find the script.


1.144 12-Nov-1998 erh

Add ability to use either a file or the sets files when checking library version numbers. Added -d, -s and -f flags for check dir, check sets and check file. Suggested by Simon Burge.


1.143 07-Nov-1998 erh

Add a checkver target to bsd.lib.mk. This target executes the checkver script to find installed shared libraries with major/minor versions that are too big. The realinstall target now depends upon this target so this check is done whenever a library is installed. The check may be disabled by setting NOCHECKVER.


1.142 05-Nov-1998 jonathan

Set SHLIB_LD{START,END}FILE to crt{begin,end}S.o for all ELF ports.


1.141 07-Oct-1998 wrstuden

Make lintlib generation work with PATH'd source. We should pull in the
real source, not the implied names, so that we find things we PATH in from
other directories.


1.140 28-Sep-1998 christos

Use preserve flag in install.


1.139 13-Sep-1998 tv

Rethink the origins of LDSTATIC. Instead, use an option NOLINKLIB, which
builds and installs only what is necessary to link and run binaries, when
the library is not externally useable.
- NOPIC: Create and link against a static library.
- PIC: Create, link against, and install a shared object.
- PIC+LDSTATIC: Create and link against a static library; create and
install a shared object.


1.138 22-Aug-1998 tv

Fix the .c.a brokenness with libbfd the "right" way - nuke everything but
*o from .ALLSRC.


1.137 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.136 02-May-1998 christos

fix lint library rule bug; use ${.ALLSRC} as suggested.


1.135 17-Apr-1998 tv

Fix symlinks creation in the build directory: create the symlinks there,
not in ${DESTDIR}.


1.134 15-Apr-1998 tv

Braindead pmake conditionals.


1.133 15-Apr-1998 tv

Create the ELF symbolic links in the build tree, too. Needed for libamu
and egcs libcc1 to make sure linking is done against the correct shared
object.


1.132 15-Apr-1998 tv

Compare ${LDSTATIC} against ""; don't check for definition. Make this
DTRT on setups with a global setting of LDSTATIC= (nothing)


1.131 12-Apr-1998 tv

Also build a static library regardless of NOSTATICLIB if LDSTATIC is
defined. In situations where a "private library" is being built, a static
library is needed to link binaries statically (LDSTATIC=-static).


1.130 09-Apr-1998 tv

New flag, NOSTATICLIB, prevents build and install of the standard static
library unless NOPIC is set.


1.129 09-Apr-1998 tv

.y.c <sys.mk> rule fixes. Don't create a y.tab.h file unless asked for,
and use smarter creation of the header file.


1.128 01-Apr-1998 tv

Revert. This broke too much in the build tree, and a better solution
needs to be created. (The existing situation breaks a lot too.)


1.127 01-Apr-1998 tv

Fix .y rules to DTRT with possibly generated .h files. See mail on
tech-toolchain for a very detailed explanation of this. In short, add
a .y.h rule identical to the .y.c rule and make the .y.c rule rename
the .h file; also, clean the .h file in CLEANFILES.


1.126 07-Mar-1998 jonathan

Use the new binutils-compatible ld commandline syntax to build
shared-library .so files on both ELf and a.out platforms.


1.125 23-Feb-1998 jonathan

More table-driven changes for different toolchains:
* new bsd.own.mk variable OBJECT_FMT with values "a.out" or "ELF".
* use OBJECT_FMT in Makefile tests that depend on toolchain.
* Add new bsd.own.mk variable NOSHLIB that, if set indicates a given
port doesnt yet do shared libraries. Set on powerpc.
* Document new feature-test variables in src/share/mk/bsd.README.
Tested on i386, mips, fakedup Alpha environment.


1.124 18-Feb-1998 jonathan

Fix dyslexic typo.


1.123 18-Feb-1998 jonathan

Make bsd.lib.mk rules to build ELF vs a.out shlibs more table-driven.
No more .if in solib link rule.


1.122 24-Dec-1997 cgd

kill a couple of (insignificant but) bogus extra spaces


1.121 05-Nov-1997 thorpej

Fix .c.ln rule: use CPPFLAGS, not CFLAGS.


1.120 04-Nov-1997 gwr

Use LORDER, TSORT


1.119 30-Oct-1997 lukem

remove lint rules for objective c as lint can't cope


1.118 28-Oct-1997 lukem

add default rules for Objective C sources (`.m' suffix):
- sys.mk:
add ${OBJC} and ${OBJCFLAGS} (equivalent to ${CC} and
${CFLAGS} respectively), and ${COMPILE.m} and ${LINK.m} rules
- bsd.sys.mk:
add .m, .m.o, and .m.ln rules (as per the C rules in sys.mk).
it's here, rather than in sys.mk, because `.m' isn't
exclusively used for Objective C files.
- bsd.lib.mk:
add .m.o, .m.po, .m.so, and .m.ln rules (as per C)


Revision tags: netbsd-1-3-base
1.117 11-Oct-1997 mycroft

branches: 1.117.2;
Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)


1.116 04-Jun-1997 pk

Put `-DPIC' back in CPICFLAGS (a.out section); at least one C source
file (sparc/include/profile.h) relies on this.


1.115 31-May-1997 cjs

Back out BUILDDIR and NOINSTALL changes.


1.114 30-May-1997 cjs

branches: 1.114.2;
Add NOINSTALL option for libraries that are used only during the build
of a program, and not installed into the final system.


1.113 29-May-1997 veego

Fix pr#3679 a little different.
Remove the '-nostdlib' flag for ELF systems and keep it for a.out systems.


1.112 28-May-1997 veego

Add '-nostdlib -L${BUILDDIR}/usr/lib' for ${LDADD} so it links a shared
library with the correct shared library.


1.111 27-May-1997 mycroft

Add a missing / in SHLIB_LD*FILE.


1.110 27-May-1997 cjs

Always look in usr/lib for crtbegin/crtend; LIBDIR is the destination
directory of the library we're currently compiling.


1.109 27-May-1997 cjs

Re-add other folks' changes that I accidently reverted when I did my
build system changes commit.


1.108 26-May-1997 cjs

These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.


1.107 24-May-1997 jonathan

More table-driven changes: split CPICFLAGS into separate flags, to
support the two different incompatible rules for build .so files from
.S source on both NetBSD and binutils toolchains:

${CPP} | ${AS} for syscalls
${CC} for non-syscalls
for which the different toolchains's ${AS} requires diffferent flags.


1.106 17-May-1997 mycroft

Do LINKS and SYMLINKS after FILES and INCS.


1.105 17-May-1997 mycroft

Remove unneeded .SUFFIXES lines, and move .s and .S closer to .o to give the
right preferences.


1.104 09-May-1997 mycroft

Fix typo in previous.


1.103 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.102 09-May-1997 mycroft

Remove cruft.


1.101 09-May-1997 mycroft

Don't empty the suffix list.


1.100 09-May-1997 mycroft

Oops; rearrange dependencies to get things built early enough.


1.99 09-May-1997 mycroft

Make sure INCS and SRCS are built if necessary.


1.98 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.97 07-May-1997 mycroft

Various simplifications.


1.96 07-May-1997 mycroft

Shuffle some .PHONYs around, to work better with `-t'.


1.95 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.94 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.93 17-Apr-1997 thorpej

Pass the program to use for nm(1) to lorder(1), helps cross-compiling.


1.92 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.91 27-Mar-1997 christos

Put the FILES generated rules in a separate .mk file since both bsd.prog.mk
and bsd.lib.mk use them.


1.90 24-Mar-1997 christos

put the 'r' back in archive.


1.89 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.88 23-Mar-1997 cgd

add SHLIB_LDSTARTFILE and SHLIB_LDENDFILE variables for a.out shared lib
architectures, for consistency. (For a.out shared libs, they're empty.)
Make the shared library target depend on them.


1.87 22-Mar-1997 perry

Fix SYMLINKS not to include DESTDIR in the link itself


1.86 15-Mar-1997 jonathan

Use table-driven rules for linking shared libraries on a.out or ELF systems.


1.85 14-Mar-1997 cgd

pull crtbeginS.o and crtendS.o in from DESTDIR


1.84 13-Mar-1997 perry

add SYMLINKS, by analogy to LINKS. Vetted by Christos.


1.83 17-Feb-1997 cgd

clean up Alpha (ELF) shared library build and install rules. The latter
are now more like what's "normal" for ELF.


1.82 28-Jan-1997 mikel

add support for COPTS, as in bsd.prog.mk


1.81 22-Jan-1997 cgd

if 'clean' is not already defined, rather than simply defining it with
a bunch of rules, define a clean{kmod,lib,prog} target with the rules,
and have both clean and cleandir depend on that. That eliminates a bug
where 'cleandir' in a directory which included e.g. bsd.prog.mk but which
also had subdirs would 'make clean' all the subdirs and then 'make cleandir'
all ofthe subdirs. It also allows Makefiles to add more dependencies
to 'clean' after inclusion of the make template.

If 'clean' is already defined, the behaviour is the same as it used to be.


1.80 29-Dec-1996 christos

Don't use @echo "${command}" to echo commands, because if ${command} contains
double quotes we generate shell syntax errors. Use @echo ${command:Q} instead
which properly quotes shell metacharacters.


1.79 20-Dec-1996 cgd

change the afterdepend target so that its sed script adds <filename>.ln
for each <filename>.o as an object file which has the given dependencies
(in addition to <filename>.po and <filename>.so, which were already there).


1.78 19-Dec-1996 cgd

remove outdated XXX comment (mine)


1.77 17-Dec-1996 cgd

undo (or actually, do differently) that last: On the Alpha, build shared
libraries with LD, but add /usr/lib/crtbegin.o and /usr/lib/crtend.o
before and after the rest of the stuff being linked. This is a losing
situation all-around: for correct 'DESTDIR' builds, it should be including
them from ${DESTDIR}/usr/lib. However, since those objects should be
included for all shared libraries, including them from ${DESTDIR} won't work,
because they won't be installed by normal builds by the time they need to
be used.


1.76 17-Dec-1996 cgd

build Alpha shared libraries with ${CC} rather than ${LD}, because cc
understands how to do the c run-time startup magic necessary for shared
libraries and ld doesn't.


1.75 30-Nov-1996 jtc

Define GPROF when assembling *.S files


1.74 05-Nov-1996 mikel

Remove extra ".o"s; fixes PR misc/2883.


1.73 18-Oct-1996 thorpej

Use ${INSTALL} rather than "install".
From Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.


1.72 13-Oct-1996 cgd

if ${MACHINE_ARCH} is "alpha" build shared libs with the 'normal' GNU
linker's command line args, rather than the NetBSD linker's command
line args. This is a hack, and should go away in favor of something
more general when that something is developed. In the mean time, it
might be appropriate for the various mips ports to do the same thing.


1.71 23-Sep-1996 abrown

Add missing quote (") in @echo line of .S.o rule, to prevent sh from
getting confused in certain cases.


1.70 23-Sep-1996 jtc

Fix from Aaron Brown that fixes some typos


1.69 20-Sep-1996 jtc

Use `${COMPILE.S}' instead of `${CPP} ..... | ${AS} ....' to compile
assembly language source.


1.68 05-Sep-1996 cgd

use -pg rather than -p when compiling profiled objects.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.67 17-Jan-1996 mycroft

Use the `-q' option to tsort(1). From der Mouse, PR 1204.


1.66 22-Oct-1995 christos

Added include file <bsd.sys.mk> that contains lex and yacc "parallel aware"
rules. These rules are not turned on by default; they are enabled by setting
the PARALLEL variable.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.65 30-Sep-1995 pk

Use CPPFLAGS in .S rules.


1.64 27-Sep-1995 christos

- make sure the afterdepend rule fires `after' .depend gets created.
[fixed for parallel make]
- make depend prettier printing.


1.63 26-Sep-1995 jtc

Fix .cc.o .C.o rule; PR #1522


1.62 25-Sep-1995 christos

- Actually commit the bsd.lib.mk changes mentioned above...


1.61 29-Jun-1995 cgd

oops


1.60 27-Jun-1995 cgd

fix a paste-o


1.59 26-Jun-1995 cgd

fix more possibly-empty 'rm's, here. kill long-dead {profiled,...}/* cleans


1.58 24-Jun-1995 cgd

update lint rules, but keep linting disabled


1.57 21-Apr-1995 jtc

.include <bsd.nls.mk> unless NONLS is defined.


1.56 19-Apr-1995 cgd

don't ranlib read-only files. patch for bug 977, from Greg Hudson
(ghudson@MIT.EDU). He doesn't think this patch is particularly
beautiful, but i'm not sure much can be done about that.
in particular:
(1) installing to a different file name, then chowning that
and using 'mv' brings up a couple of bugs that
can't reasonably be tested for (and shouldn't have to be),
(2) you don't particularly want people trying to use the libraries
until they've been successfully installed, anyway.


1.55 13-Dec-1994 mycroft

Slight simpliciation.


1.54 19-Aug-1994 cgd

include bsd.own.mk early on, to get NOPIC definition.


1.53 09-Aug-1994 pk

Don't keep local symbols in a shared library symbol table.


Revision tags: netbsd-1-0-base
1.52 06-Jul-1994 mycroft

branches: 1.52.2;
Include ${CPPFLAGS} when compiling .c and .cc files.


1.51 30-Jun-1994 deraadt

.m4 files are sources too


1.50 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.49 30-Jun-1994 cgd

don't be careless with _SUBDIRUSE


1.48 24-Mar-1994 mycroft

Remove *.core on clean.


1.47 09-Feb-1994 cgd

kill install -d's.


1.46 31-Jan-1994 jtc

Moved manpage formatting rules from sys.mk to bsd.man.mk.
Some programs (like ispell) use *.[0-8] for non-manpage things, and having
the manpage rules in sys.mk really messes things up.


1.45 07-Jan-1994 pk

Archive member names need no longer be truncated.


1.44 06-Jan-1994 mycroft

`ld -x -r' on .so files really does work now. Maybe it will continue to for
a little while.


1.43 05-Jan-1994 mycroft

ld -x -r for .so files clearly does not work yet.


1.42 04-Jan-1994 mycroft

Use ${DPADD} and ${LDADD} only when building shared library.


1.41 04-Jan-1994 mycroft

Reinstate `ld -x -r' for .so.


1.40 04-Dec-1993 cgd

allow .S; keep .s around for now


1.39 14-Nov-1993 pk

Always install lib*_pic.a archives.


1.38 02-Nov-1993 cgd

make libfoo.so.m.n depend on libfoo_pic.a, and also explain
what we're doing when building libfoo.so.m.n.


1.37 02-Nov-1993 cgd

MAJOR -> SHLIB_MAJOR, MINOR -> SHLIB_MINOR


1.36 02-Nov-1993 pk

Add `-Bshareable' to shared library rule.


1.35 02-Nov-1993 pk

Don't try to build things when installing.


1.34 27-Oct-1993 pk

`-Bshareable' added to link rule for shared libs.


1.33 24-Oct-1993 pk

Install shared library with version numbers from `shlib_version'.


1.32 17-Oct-1993 pk

Added rule for installing PIC archives (not the shared libraries themselves).


1.31 11-Oct-1993 pk

Removed `ld -r -X' line from the .cc.so and .C.so rule, as ld does
not yet support it.


1.30 07-Oct-1993 cgd

rm _pic libs on clean, too.


1.29 06-Oct-1993 pk

Added .so to `.depend' (Thanks to Andrew Wheadon for poiting this out).


1.28 04-Oct-1993 cgd

add .so rules for c++ files.


1.27 29-Sep-1993 pk

Support for building PIC libraries.
Given a library name `x', an archive `libx_pic.a is built, unless NOPIC
is defined (like NOPROFILE).


1.26 16-Aug-1993 mycroft

Don't define afterdepend if no SRCS.


1.25 15-Aug-1993 mycroft

Don't automatically include bsd.subdir.mk in bsd.prog.mk and bsd.lib.mk.
Put back .MAIN in bsd.man.mk, and be careful not to include ../Makefile.inc
a second time.


1.24 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


1.23 15-Aug-1993 mycroft

Abstract out dependency stuff, and add RCS identifiers.


1.22 15-Aug-1993 mycroft

Create target directories with `install -d', and move `obj' targets into one
file.


1.21 30-Jul-1993 mycroft

When generating a default OBJS, ignore .h files.


1.20 29-Jul-1993 mycroft

Don't print the `making ...' message if an obj dir already exists.
Also, a minor cleanup.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
1.19 17-Jul-1993 mycroft

Fix C++ dependencies for good. `make depend' is now done in two passes--one
of C files and one for C++ files. No need to specify `-+' in your Makefile,
as it is now done automatically.


1.18 17-Jul-1993 mycroft

Combine some suffix rules.


1.17 17-Jul-1993 mycroft

Add suffix rules for C++ files.


1.16 17-Jun-1993 mycroft

Never mind. I was being led astray.


1.15 17-Jun-1993 mycroft

We use ranlib; we don't need lorder.


1.14 02-Jun-1993 cgd

get make depend right, so that it depends .po's too.


1.13 26-May-1993 cgd

change libraries to use ${RANLIB} rather than "ranlib" explicitly,
also, ranlib them when they're made, so /usr/obj can be read-only


1.12 26-May-1993 cgd

if NOPROFILE defined, don't try to install the profiled libs.


1.11 25-Apr-1993 mycroft

Add afterinstall and make maninstall not lose if bsd.man.mk not included (i.e. NOMAN set).


1.10 25-Apr-1993 mycroft

Don't build man pages if NOMAN set.


1.9 20-Apr-1993 cgd

get make clean[dir] to work right. fixes /bin/sh: not found problem


Revision tags: netbsd-0-8 netbsd-alpha-1
1.8 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


1.7 08-Apr-1993 cgd

try to do the right thing, in terms making directories before we
install into them, and get the manpage cleans _OUT_ of "clean".
they don't belong there, only in cleandir, WFJ be damned.


1.6 08-Apr-1993 cgd

fixed typos...


1.5 08-Apr-1993 cgd

(silently) make sure we have directories before installing


1.4 04-Apr-1993 cgd

make `install' of libraries copy rather than move.


1.3 23-Mar-1993 cgd

made .CURDIR be absolute, not relative, thereby eliminating
the need for some of the makefile trickery when making objects,
and fixing a few .PATH bugs


1.2 22-Mar-1993 cgd

fixed "make obj" for cases when sources not in /usr/src/...
if sources not there, it now mkdirs obj, but some trickery
is necessary, to avoid deleting cwd.


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.35 29-Mar-2022 christos

get rid of old style `` command substitution in shell and use $() instead.


Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-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 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
1.34 10-Apr-2009 apb

Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links. They have no effect except when using a
metalog, in which case the information is added to the metalog. In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg. This should fix PR 24457 and PR 41155.


1.33 01-Mar-2009 isaki

Make configlinksinstall work correctly even if CONFIGSYMLINKS is
defined but empty.


Revision tags: netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-4-base
1.32 11-Sep-2006 dbj

branches: 1.32.24; 1.32.26; 1.32.28;
fixes for installing into a case insensitive $DESTDIR
when files may have hard links to a a name that only differs by case
- change install to unconditionally remove its temporary file
when installing hard links with -r. This avoids problems when
built with posix rename(2) semantics and reinstalling an existing
hard link.
- rework hard link targets in bsd.man.mk and bsd.links.mk
to use makefile constructs instead of shell constructs
- always reinstall hard links that may have case conflicts, even
when MKUPDATE=yes, this ensures that they get added to METALOG
- remove man pages which were hard linked to themselves in libform
- remove improper hard link command for existing man page in libkrb5
- fix libl's makefile to include bsd.lib.mk at end
- remove shell quoting in link target for test's [.1 man page


Revision tags: abandoned-netbsd-4-base
1.31 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


1.30 31-Aug-2005 lukem

Fix parallel build race in CONFIGSYMLINKS & CONFIGLINKS by
makeing configlinksinstall depend upon configfilesinstall.


Revision tags: netbsd-3-base
1.29 25-Jun-2004 christos

branches: 1.29.2;
check for defined before checking for empty to ease a 1.6 transition


1.28 16-May-2004 lukem

Support CONFIGLINKS, which is similar to LINKS, except that they're installed
with the 'configinstall' target instead of the 'install' target.


1.27 13-May-2004 lukem

Add CONFIGFILES & CONFIGSYMLINKS; similar semantics to FILES & SYMLINKS
yet installed by 'configinstall' not 'install'.
(CONFIGFILES uses FILES{DIR,MODE,OWN,GRP,NAME}{,_*} as per FILES)


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.26 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.25 07-Nov-2003 lukem

Support MAKEVERBOSE more effectively.


1.24 28-Jul-2003 lukem

pull in <bsd.sys.mk> for TOOL_* incase this is used with USETOOLS=never


1.23 20-Jul-2003 lukem

<bsd.init.mk> is a good idea


1.22 20-Jul-2003 lukem

LINKS: use stat -qf '%d %i' $l to read the device & inode # of the source
and target (and rely upon a non-zero exit value to indicate a missing file),
instead instead of unconditionally installing the link.

SYMLINKS: use stat -qf '%Y' $l to read a symlink's target (and rely upon
a non-zero exit value to indicate a missing file or non-symlink),
instead of test -h $l && ls -ld $l | awk '{print $NF}' , since
the former is quicker and more concise.

This resolves PR toolchain/16885 from David Laight.


Revision tags: fvdl_fs64_base
1.21 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


1.20 24-Aug-2002 lukem

don't bother with "rm -f $$t" before ${INSTALL_LINK} or ${INSTALL_SYMLINK},
as they default to using install(1) -r.
the rm can cause problems in certain situations, such as moving a library or
shared linker that install(1) depends upon to another location and replacing
it with a (sym)link.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.19 30-Apr-2002 sommerfeld

make(1) specifies, regarding :: targets:
Sources for a target do not accumulate over dependency lines
when this operator is used.

An unstated implication of this is that when parallel builds are done,
each separate instance of the target can be scheduled independantly.
As a result, the linksinstall target with commands could be executed
too early during a parallel build since they didn't actually have a
dependancy on "realinstall".

To fix this, correct the linksinstall:: realinstall dependancy by
eliminating the command-less linksinstall target, and moving the
dependancy to the other linksinstall target.


1.18 21-Mar-2002 pk

`linksinstall' cannot be issued in parallel with other realinstall sources.


1.17 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.16 19-Nov-2001 perry

replace instances of ln with ${INSTALL_LINK} and ${INSTALL_SYMLINK}


1.15 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.14 07-Jul-2000 cgd

test -h, not test -L.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.13 23-Apr-2000 simonb

Change SYMLINKS so that the link isn't recreated if it already points
to the right place (much the same as bsd.obj.mk already does).


1.12 26-Feb-2000 mycroft

Make sure the `rm' and `ln' for a link are in the same shell command.
(The reason for this is obscure...)


1.11 10-Feb-2000 drochner

fix link creation:
-put "echo"s for the daughter Makefile into a subshell to get them all
into the Makefile (instead of stdout - should fix PR misc/9336 by
Bernd Ernesti)
-change operator for "realall" back to ":" - rules are supposed to
accumulate, and "::" clashes with the definition in <bsd.own.mk>
-call sub-make with the "all" target to make sure we don't get just
the first rule


1.10 24-Jan-2000 mycroft

Fix a bogon that caused some symlinks to not be installed.


1.9 22-Jan-2000 mycroft

Adjust symlink crap for all/realall changes.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.8 31-Dec-1998 castor

Change make to ${MAKE} to allow standard make to be overridden.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.7 10-May-1997 mycroft

Always rebuild links, since dependencies don't DTRT.


1.6 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.5 07-May-1997 mycroft

Various simplifications.


1.4 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.3 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.2 28-Mar-1997 christos

Don't make bogus dependencies with symlinks sources.


1.1 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.10 03-Jun-2023 lukem

bsd.*.mk: move MKSTRIPSYM default to bsd.own.mk

Add default for MKSTRIPSYM=yes to to bsd.own.mk _MKVARS.no.
Test ${MKSTRIPSYM} != "no".


1.9 16-Apr-2023 nikita

Resolve conflicts for lua 5.4.4 import.
Adjust various files for lua 5.4.4.


Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 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 pgoyette-compat-base 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
1.8 20-Apr-2017 ozaki-r

branches: 1.8.22;
Introduce MKSTRIPSYM build option

If it's yes, all local symbols of shared libraries are stripped
(default). If it's no, only temporary local symbols are stripped;
for example, symbols of static functions are kept. Keeping such
symbols is useful on using DTrace for userland libraries and
getting a backtrace from a rump server loading modules (shared
libraries).

Proposed and discussed on tech-kern and tech-toolchain


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE 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 tls-earlyentropy-base tls-maxphys-base
1.7 19-Jul-2014 lneto

branches: 1.7.6; 1.7.10;
lua: updated from 5.1 to 5.3 work3

* lua(1):
- changed lua_Integer to intmax_t
- updated distrib/sets/lists and etc/mtree
- updated bsd.lua.mk
- fixed bozohttpd (lua-bozo.c)
- compatibilized bindings: gpio, sqlite
* lua(4):
- removed floating-point and libc dependencies using '#ifndef _KERNEL'
- fixed division by zero and exponentiation
- libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
- acpica: removed isprint() from acnetbsd.h
- libc: moved strcspn.c, strpbrk.c and strspn.c to common
- removed stub headers
- compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.6 12-Sep-2013 joerg

branches: 1.6.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.


1.5 11-Sep-2013 joerg

If a library needs a symbol from another library, pull that library in
explicitly, even if the DT_NEEDED closure would normally already ensure
the presence.


Revision tags: 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-6-1-2-RELEASE netbsd-6-0-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 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.4 16-Oct-2011 mbalmer

branches: 1.4.2; 1.4.8;
Uncomment LUA_DPLIBS processing, but do not auto-include liblua.so,
under the assumption that programs that load Lua modules already have
loaded it.


1.3 08-Oct-2011 mbalmer

Comment out the '##### Libraries that modules may depend upon.' for now,
so that modules written in C can be built.


1.2 07-Oct-2011 apb

Use bsd.clean.mk instead of defining our own "clean" target.


1.1 07-Oct-2011 plunky

Add a bsd.lua.mk for building Lua modules


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.122 10-Nov-2020 kamil

Reintroduce the support of MKCATPAGES

Requested by <mrg>


1.121 08-Nov-2020 kamil

Remove the support for MKCATPAGES

It was optional since 1999 and disabled by default since 2012.

Proposed on tech-userlevel@.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
1.120 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
1.119 14-Jul-2017 jmcneill

branches: 1.119.2; 1.119.4; 1.119.6;
Latest mandoc no longer supports multiple -O options. Instead it expects
option values to be separated by commas. PR toolchain/52402


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.118 19-Oct-2015 dholland

branches: 1.118.8;
because I'm feeling tetchy, implement "make describe" for everything that
has man pages.


1.117 19-Dec-2014 christos

protect the variable name, and explain why setting it does not work.


1.116 19-Dec-2014 christos

Explain why used to fold case when deciding if we are going to install manual
page links, and change the behavior not to do this anymore.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-earlyentropy-base tls-maxphys-base
1.115 05-Aug-2014 apb

Use ${TOOL_GZIP_N} instead of ${TOOL_GZIP} -n, and similarly
use ${TOOL_GZIP_N} -9 instead of ${TOOL_GZIP} -9n, etc.

This will pass -nT instead of just -n if the gzip program is
actually pigz.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.114 25-Oct-2013 apb

branches: 1.114.2;
Rename _MNUMBERS to _MSECTIONS. The manual section identifiers
are not just numbers any more.

Also introduce a new variable, _MSECTIONREGEX, as a regular expression
to match any of the elements of ${_MSECTIONS}. Use this instead of
\.[1-9][a-z]*.


1.113 25-Oct-2013 apb

Recognise .3lua and .9lua as man page extensions. Source
files like foo.3lua will result in installed files like
/usr/share/man/man3lua/foo.3lua, /usr/share/man/cat3lua/foo.0,
and /usr/share/man/html3lua/foo.html.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base
1.112 21-Mar-2013 christos

fix groff html generation


1.111 21-Mar-2013 christos

handle NOMANDOC in the html case too


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
1.110 30-Nov-2012 joerg

CATDEPS is bogus for mandoc, so disable it in that case.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.109 10-Sep-2011 apb

branches: 1.109.2; 1.109.8;
Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.108 30-Jun-2011 matt

Replace gzip with ${TOOL_GZIP} in manual compression.
Modify the description of USE_PIGZGZIP.


Revision tags: cherry-xenmp-base
1.107 08-Mar-2011 njoly

Adjust html link template and css location for man pages in arch
subdirs.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
1.106 12-Jan-2011 joerg

mandoc now supports tbl(1) formatting, so adjust rules.
Use -Wstop in lintmanpages.


Revision tags: matt-mips64-premerge-20101231
1.105 02-Dec-2010 wiz

Remove HTMLDEPS; was only used by nroff.
Ok joerg@


1.104 01-Jun-2010 joerg

Install mdocml's default CSS as /usr/share/man/style.css. Switch HTML
man pages to use mandoc unconditional as it gives reasonable output for
all man pages, not only a subset of mdoc(7). Use the newly installed
style.css for formatting and produce hyperlinks for .Xr.


1.103 01-Mar-2010 joerg

Make lintmanpages not depend on MKMANDOC, it is built by default now.
Use -Wall to increase usefulness.


Revision tags: matt-premerge-20091211
1.102 23-Oct-2009 joerg

Do not run mandoc for lintmanpages if MANPAGES is empty.
Add it to the list of targets to recurse for.


1.101 23-Oct-2009 joerg

Add MKMANDOC option to trigger building cat pages and HTML pages with
mdocml. Add a lintmanpages target for developers to check man pages
with the strictest settings of mandoc.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.100 10-Apr-2009 apb

Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links. They have no effect except when using a
metalog, in which case the information is added to the metalog. In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg. This should fix PR 24457 and PR 41155.


1.99 31-Mar-2009 perry

add -n to gzip invocation


Revision tags: netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 mjf-devfs2-base
1.98 29-Aug-2008 lukem

branches: 1.98.2; 1.98.4; 1.98.6;
Use ${MANDIR} instead of /usr/share/man as part of the default ${HTMLDIR}


1.97 27-Aug-2008 lukem

Rework MKHTML (HTML manual pages) implementation to behave like
the manpages and catpages builds, with similar target names (etc).


Revision tags: netbsd-4-0-1-RELEASE 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 keiichi-mipv6-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-4-base
1.96 11-Sep-2006 dbj

branches: 1.96.16; 1.96.20;
fixes for installing into a case insensitive $DESTDIR
when files may have hard links to a a name that only differs by case
- change install to unconditionally remove its temporary file
when installing hard links with -r. This avoids problems when
built with posix rename(2) semantics and reinstalling an existing
hard link.
- rework hard link targets in bsd.man.mk and bsd.links.mk
to use makefile constructs instead of shell constructs
- always reinstall hard links that may have case conflicts, even
when MKUPDATE=yes, this ensures that they get added to METALOG
- remove man pages which were hard linked to themselves in libform
- remove improper hard link command for existing man page in libkrb5
- fix libl's makefile to include bsd.lib.mk at end
- remove shell quoting in link target for test's [.1 man page


Revision tags: abandoned-netbsd-4-base
1.95 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


1.94 19-Apr-2005 tron

Honor contents of "CLEANFILES" in "cleandir" target.


Revision tags: netbsd-3-base
1.93 23-Jun-2004 jmc

branches: 1.93.2;
If USETOOLS != yes then depend on the system tmac directory, not DESTDIR since
USETOOLS=no/never means the system groff is being used so depending on
anything except it's tmac files makes no sense (and prevents builds with
USETOOLS=no/never from working as PR#23067 points out)


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.92 29-Jan-2004 lukem

oops in previous; can't call cleanhtml in cleandir at this time


1.91 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.90 07-Nov-2003 lukem

Support MAKEVERBOSE more effectively.


1.89 06-Nov-2003 lukem

Support MAKEVERBOSE when installing man symlinks.
Note; this makes symlink installation more "chatty" in the MAKEVERBOSE=2
case, but results in more consistent operation for that level.


1.88 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.87 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.86 18-Oct-2003 lukem

implement MAKEVERBOSE for rules which are of the form:
@cmp -s ${.ALLSRC} ${.TARGET} || ( echo cmd && cmd )


1.85 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.84 03-Sep-2003 lukem

pull in <bsd.files.mk> incase LNFILES is used by <bsd.man.mk> user.


1.83 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.82 18-Jul-2003 lukem

Add MKMANZ; if not set to "no", compress the manual pages at installation time.
This replaces the previous .if defined (MANZ) behaviour, although the latter
will set MKMANZ=yes for compatibility purposes.

Don't bother with -P-bou in TOOL_ROFF_HTML; it doesn't appear to be
necessary with groff 1.19.

Fix NOHTML implementation to be consistent with other NOxxx / MKxxx
variables, and expose the user-tweakable MKHTML.


1.81 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.80 30-Jun-2003 wiz

Adapt CATDEPS/HTMLDEPS for groff-1.19.


Revision tags: fvdl_fs64_base
1.79 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.78 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.77 07-Feb-2002 ross

Honor MANSUBDIR when installing md html pages.


1.76 07-Feb-2002 ross

fix html sources, they were depending on -mdoc, not -mdoc2html


1.75 04-Feb-2002 christos

s/.NOSUFF/.MADE/


1.74 03-Feb-2002 christos

Apply a .NOSUFF: directive to targets we don't want to have processed by
the suffix rules engine.


1.73 06-Jan-2002 mrg

generate man pages into a temporary file and rename it if groff succeeds.
this avoids a problem where groff was dumping core and leaving empty
manpage.catN files, that would later not be rebuilt.


1.72 17-Dec-2001 tv

Always depend on ${MANPAGES}, so deliberately pre-generated files are
built automatically (even without a ${MANSUFFIX}).


1.71 28-Nov-2001 jmc

There's no need for TMACDIR here after all. Anything using it is using it for
FILES installs so it can't have DESTDIR in front of it (and those Makefiles
all explicitly set it).


1.70 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.69 28-Nov-2001 jmc

Separate out TMACDIR's use for install's from it's dependency function.
The dependency should be against the TOOLDIR files (is USETOOLS=yes) but
installs will always use ${DESTDIR}/usr/share/tmac.

Without this if people do not have /usr/share/tmac/tmac.andoc on their
systems while building the build will break in the groff areas due to
the dependency rules.


1.68 19-Nov-2001 perry

replace instances of ln with ${INSTALL_LINK} and ${INSTALL_SYMLINK}


1.67 17-Nov-2001 thorpej

Need bsd.sys.mk for the GROFF definition in the non-USETOOLS case.


1.66 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


1.65 04-Nov-2001 enami

Don't try to build nonexistent compressed man page.


1.64 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.63 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.62 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.61 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


1.60 21-Mar-2001 simonb

Don't overwrite catman pages if there's no difference between the old
and the new pages. As per discussion on tech-install (a little while
ago).


1.59 05-Mar-2001 tron

Back out last change as there is no measurable performance gain.


1.58 05-Mar-2001 tron

Invoke "groff" directly when building manual pages, "nroff" is just a
shell script wrapper. This saves at least one fork(2) and one exec(2)
while creating each manual page and should thus speed up builds.


1.57 26-Sep-2000 phil

Get the correct command line using groff instead of nroff.


1.56 22-Sep-2000 phil

Add rules to make and install html pages in /usr/share/man/html*


1.55 13-Aug-2000 itojun

MLINK optimization based on timestamp.


1.54 13-Aug-2000 itojun

do not test $UPDATE nor file existence, on "MLINKS" installation.
the check will leave original manpage and linked manpage unsynchronized,
as we use hard link instead of symlinks.

this backs out 1.37 -> 1.38 change.


Revision tags: netbsd-1-5-ALPHA2 netbsd-1-5-base
1.53 06-Jun-2000 mycroft

branches: 1.53.2;
Minor rearrangement.


1.52 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base
1.51 19-Feb-2000 erh

branches: 1.51.2;
Add NOPATH to prevent .cat* files in the search path from interfering.


1.50 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.49 14-Sep-1999 perry

Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.48 04-Sep-1999 fredb

Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.


1.47 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


1.46 16-Apr-1999 mycroft

branches: 1.46.2;
Use -Tascii for pre-generated man pages, to avoid some nroff character set
magick.


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.45 13-Feb-1999 christos

branches: 1.45.2;
Don't attempt to build catpages when MKMAN == no


1.44 12-Feb-1999 lukem

for MKSHARE=no, set MKDOC=no MKMAN=no MKNLS=no, and for MKMAN=no, set
MKCATPAGES=no. this simplifies various tests.


1.43 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.42 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.41 28-Sep-1998 christos

Use preserve flag in install.


1.40 27-Sep-1998 lukem

don't build/install man pages or docs if NOSHARE defined


1.39 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.38 09-Apr-1998 fair

a link installation performance optimization: only fire off "ln -f", not "rm -f; ln" for each link created


1.37 15-Feb-1998 thorpej

Make the .N.catN rules depend on the troff macros used in manpage builds.


1.36 02-Dec-1997 mikel

add missing 'man' so unformatted manpage installation will work when
target exists; solution provided by christos


1.35 30-Oct-1997 mrg

set all: target for defined(NOMAN) that does nothing.


Revision tags: netbsd-1-3-base
1.34 11-Oct-1997 mycroft

branches: 1.34.2;
Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)


1.33 30-Jun-1997 phil

Some man pages need tbl to make their man page. This adds support for
tbl in building man pages. If the variable USETBL is defined, the
rules for making the man pages include tbl before nroff.

This supports at least 3 man pages in the tree.
(Related to PR 3144.)


1.32 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.31 07-May-1997 mycroft

Always define cleanman.


1.30 07-May-1997 mycroft

Various simplifications.


1.29 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.28 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.27 15-Apr-1997 perry

fix 3497 from Manuel Bouyer -- install source man pages with proper suffix.


1.26 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.25 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.24 18-Oct-1996 thorpej

Use ${INSTALL} rather than "install".
From Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.23 10-Feb-1996 jtc

Use ksh-style substring parameter expansion expressions instead of
calling expr when constructing manpage directory and file names.
Much, much faster.


1.22 15-Jan-1996 thorpej

Allow override of nroff program, requested by Masanobu Saitoh
<msaitoh@spa.is.uec.ac.jp> in PR #1741.


1.21 25-Nov-1995 perry

Add support for Section 9 (kernel internals) manpages


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.20 07-Jun-1995 cgd

make this work whether or not MANZ is defined. also, clean it up a bit,
remove some extra cruft, and make the way compressed man pages are installed
a bit more sane. (DON'T blow away uncompressed man pages of the same name,
if they're also there...)


1.19 02-Jun-1995 brezak

define MANZ=1 in bsd.own to get compressed man pages installed


1.18 28-Dec-1994 mycroft

Insert a missing ${MANSUBDIR}.


1.17 28-Dec-1994 mycroft

Install links after, not before the pages.


1.16 23-Dec-1994 cgd

fix up a botch, defining MANALL when there weren't any MANs.


1.15 22-Dec-1994 cgd

specify man pages differently, and document how.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
1.14 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.13 09-Feb-1994 cgd

kill install -d's.


1.12 31-Jan-1994 jtc

Moved manpage formatting rules from sys.mk to bsd.man.mk.
Some programs (like ispell) use *.[0-8] for non-manpage things, and having
the manpage rules in sys.mk really messes things up.


1.11 25-Jan-1994 jtc

Change regular expressions used by expr in MLINKS processing so we can have
manpages with more than one dot. For example, resolve.conf(5)


1.10 15-Aug-1993 mycroft

I completely blew that...


1.9 15-Aug-1993 mycroft

Don't automatically include bsd.subdir.mk in bsd.prog.mk and bsd.lib.mk.
Put back .MAIN in bsd.man.mk, and be careful not to include ../Makefile.inc
a second time.


1.8 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


1.7 15-Aug-1993 mycroft

Abstract out dependency stuff, and add RCS identifiers.


1.6 15-Aug-1993 mycroft

Create target directories with `install -d', and move `obj' targets into one
file.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base netbsd-0-8 netbsd-alpha-1
1.5 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


1.4 08-Apr-1993 cgd

try to do the right thing, in terms making directories before we
install into them, and get the manpage cleans _OUT_ of "clean".
they don't belong there, only in cleandir, WFJ be damned.


1.3 08-Apr-1993 cgd

fixed typos...


1.2 08-Apr-1993 cgd

(silently) make sure we have directories before installing


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-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 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.47 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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.46 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


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-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-3-base 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.45 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.44 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.43 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.42 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.41 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.40 14-Jul-2003 lukem

Be consistent with other bsd.*.mk, and pull in <bsd.init.mk> at the
start (which pulls in <bsd.own.mk>), and <bsd.obj.mk> and <bsd.sys.mk>
at the end. These provide the appropriate settings for TOOL_* .


1.39 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.


Revision tags: fvdl_fs64_base
1.38 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.37 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.36 03-Jan-2002 tv

Don't end up with a "rm -f" statement with no args. Fixes toolchain/15074.


1.35 28-Nov-2001 tv

Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.


1.34 06-Nov-2001 tv

Remove dependency on NLSDIR entirely, now that it's not auto-created.


1.33 06-Nov-2001 lukem

Don't create missing NLS directories; require them to already exist
(by updating etc/mtree/NetBSD.dist as necessary).
`nlsinstall' is now in line with other *install targets.


1.32 02-Nov-2001 tv

Use INSTALL_FILE/INSTALL_DIR as appropriate.


1.31 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.30 14-Aug-2001 tv

Use GENCAT as a variable to determine the location of "gencat".


1.29 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.28 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.27 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.26 08-Jun-2000 mycroft

Rearrange slightly to get rid of unneeded conditionals (and make this
*slightly* less painful to trace through, though not much).


1.25 07-Jun-2000 matt

More lossage. You need to make the directory each catalog will go into.


1.24 06-Jun-2000 mycroft

Abuse .USE some more.


1.23 06-Jun-2000 mycroft

Minor rearrangement.


1.22 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base
1.21 19-Feb-2000 erh

branches: 1.21.2;
Add NOPATH to keep *.cat files in the search path from interfering with the build.


1.20 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.19 04-Sep-1999 fredb

Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.


1.18 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.17 12-Feb-1999 lukem

branches: 1.17.2; 1.17.4;
for MKSHARE=no, set MKDOC=no MKMAN=no MKNLS=no, and for MKMAN=no, set
MKCATPAGES=no. this simplifies various tests.


1.16 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.15 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.14 28-Sep-1998 christos

Use preserve flag in install.


1.13 27-Sep-1998 lukem

don't build/install nls files if NOSHARE defined


1.12 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.11 03-Apr-1998 enami

Test target __initialized__ instead of .MAIN to see if inclusion
of ../Makefile.inc is necessary.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.10 11-Oct-1997 mycroft

Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)


1.9 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.8 07-May-1997 mycroft

Always define cleanman.


1.7 07-May-1997 mycroft

Various simplifications.


1.6 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.5 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.4 19-Apr-1997 christos

Update for incremental make changes.


1.3 18-Oct-1996 thorpej

Use ${INSTALL} rather than "install".
From Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.2 27-Apr-1995 jtc

Only set NLSALL if NLS is defined and not empty.


1.1 20-Apr-1995 jtc

First cut of makefile header that builds and installs message catalogs.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.54 03-Jun-2023 lukem

bsd.obj.mk: move MKHOSTOBJ to bsd.own.mk

Add default for MKHOSTOBJ=no to to bsd.own.mk _MKVARS.no.
Simplify bsd.obj.mk check.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.53 29-Mar-2022 christos

get rid of old style `` command substitution in shell and use $() instead.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
1.52 19-May-2018 christos

Prevent 'make obj' creating an objdir inside an objdir. This happens the
second time we call 'make obj' in /usr/src/rescue with MAKEOBJDIR set.
XXX: pullup-8


Revision tags: 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 pgoyette-compat-base 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 bouyer-socketcan-base pgoyette-localcount-20170107
1.51 10-Dec-2016 christos

branches: 1.51.6; 1.51.12;
Back in 1993 ${MACHINE} was a unique way to define objdirs for
every platform. Thus setting OBJMACHINE, allowed one to keep
in-tree objdirs with multiple builds. With the advent of evb*, this
has become impossible until now. Introduce OBJMACHINE_ARCH that
adds ${MACHINE_ARCH} to the objdir so that we have unique objdirs
per build again. Until we restructure things to that this is not
necessary, it is the simplest fix.


1.50 08-Dec-2016 christos

factor out expression.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 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-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-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 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.49 25-Jan-2010 christos

branches: 1.49.28;
PR/42658: Geoff Wing: Quote directory variables to deal with spaces in the
source pathname.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 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-nbase keiichi-mipv6-base pc532-eol-2008 matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
1.48 11-Dec-2007 lukem

It's "its" for possessive, not "it's".


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
1.47 26-Nov-2006 dsl

branches: 1.47.8;
Comment where make's internal copy of .OBJDIR gets changed


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE abandoned-netbsd-4-base 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-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-3-base 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.46 04-Dec-2003 lukem

Ensure that ${TOOL_STAT} is executable before trying to run it;
it may not be available when performing "make obj" in tools/
when using BSDSRCDIR & BSDOBJDIR (instead of MAKEOBJDIR{,PREFIX}).


1.45 06-Nov-2003 lukem

support MAKEVERBOSE for objdir creation messages


1.44 28-Jul-2003 lukem

Be consistent how "multiple include protection" is implemented. I.e,

.if !defined(_BSD_foo_MK_)
_BSD_foo_MK_=1

# ...

.endif # !defined(_BSD_foo_MK_)


1.43 28-Jul-2003 lukem

Pull in <bsd.sys.mk> as well, for the TOOL_ variables in the
USETOOLS=never case.
Found & fixed by Anders Hjalmarsson in PR misc/22283.


1.42 20-Jul-2003 lukem

Use ltarg=`stat -qf '%Y' $l` to read a symlink's target (and rely upon
a non-zero exit value to indicate a missing file or non-symlink),
instead of test -h $l && ltarg=`ls -ld $l | awk '{print $NF}'`
since the former is quicker and more concise.


1.41 18-Jul-2003 lukem

whitespace cleanup


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.40 14-Mar-2002 thorpej

Add a BUILDID variable, which further qualifies object directories.


1.39 29-Nov-2001 wiz

Remove spurious '.' in line 42, as reported by Naoto Shimazaki on
current-users on Thu, 29 Nov 2001 09:17:16.


1.38 28-Nov-2001 tv

Use :U successfully this time. In an expression such as ${FOO:D:Ubar}, you
end up with empty string if FOO is defined, and `bar' if it is undefined.


1.37 27-Nov-2001 jmc

If using MAKEOBJDIRPREFIX use the same checks as the symlink logic does below.

i.e. if the root of the object tree doesn't exist then complain and exit.

This makes both sections consistant to each other (MAKEOBJDIR specifies an
exact directory so there's no root per se to check so nothing can really be
done there).


1.36 20-Nov-2001 tv

:U can't be used to test for existence, as the variable may contain an
arbitrary value; change back to .if !defined(). Problem noted by
bernd@arresum.inka.de in PR toolchain/14629.


1.35 14-Nov-2001 tv

Turn off host-specific objdirs by default. Set MKHOSTOBJ=yes to enable.


1.34 12-Nov-2001 tv

Use ${__curdir} consistently.


1.33 11-Nov-2001 tv

Also handle the USR_OBJMACHINE case for OBJHOSTMACHINE.


1.32 11-Nov-2001 tv

Affix the ${HOST_OSTYPE} info to the end of the objdir name if OBJMACHINE
is set (and MAKEOBJDIR[PREFIX] is not in use). This permits multiple hosts
to compile hostprogs (not just src/tools) for a given target without
colliding with each other.

Currently restricted only to new toolchain builds, as this requires a new
make(1) in order to function properly.


1.31 11-Nov-2001 tv

Fix variable concatenation in previous.


1.30 11-Nov-2001 tv

Make the BSDSRCDIR/BSDOBJDIR symlink based objdir system work for the top
source directory. This will use BSDOBJDIR of OBJMACHINE is unset, and will
create a directory '.MACHINE' inside BSDOBJDIR if OBJMACHINE is set.

MAKEOBJDIR and MAKEOBJDIRPREFIX based objdirs already cope with the top
level directory just fine.


1.29 31-Oct-2001 tv

Use __curdir throughout, so MAKEOBJDIR builds see resolved paths in the
"foo -> bar" messages written to stdout.


1.28 14-Aug-2001 tv

Protect against multiple inclusion, and evaluate ${.CURDIR} early (to assist
the top-level toolchain bootstrap).


1.27 10-Jun-2001 mrg

fail `make obj' if $BSDOBJDIR doesn't exist. fixes PR#12937.


1.26 11-Mar-2001 cgd

"test !", rather than "! test". The former is more portable.


1.25 07-Jul-2000 cgd

test -h, not test -L.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.24 18-Feb-2000 itohy

s/MAKOBJDIR/MAKEOBJDIR/
Pointed out by Katsuomi Hamajima.


1.23 08-Feb-2000 sjg

Fixed handling of MAKEOBJDIR so that it matches make(1)'s expectations.
Added handling of MAKEOBJDIRPREFIX.
In both cases we simply need to mkdir the appropriate path if it does not
exists.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.22 04-Dec-1999 sommerfeld

When building obj symlinks, if there's already a link pointing at the right target,
do nothing rather than deleting and recreating an identical link.


Revision tags: comdex-fall-1999-base
1.21 21-Aug-1999 sommerfeld

branches: 1.21.4;
Use (if defined) instead of obj.foo or obj
when building object directories


1.20 10-Jun-1999 kim

Oops, PWD is really something else in most environments.
Call this variable PAWD instead.


1.19 10-Jun-1999 tls

Fix a typo which caused "make obj" to try to *execute* the direcroty it was in.


1.18 08-Jun-1999 kim

Allow "make obj" to work nicely with amd by setting
PWD=/usr/bin/pawd in /etc/mk.conf and using the amd
mount point path for BSDSRCDIR.


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.17 12-Feb-1999 lukem

branches: 1.17.2;
pull in bsd.own.mk for MKOBJ


1.16 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.15 27-Aug-1998 tv

Rename show-objdir to print-objdir to be consistent with existing
convention.


1.14 27-Aug-1998 tv

Add pseudo-target "show-objdir", which will print the value of ${.OBJDIR}
and nothing else. Intended target: cleaning up the ugly "echo | make"
constructs to find files from another directory's objdir.


Revision tags: netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.13 09-May-1997 mycroft

branches: 1.13.2;
Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.12 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.11 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.10 15-Apr-1997 christos

Make the `obj' target `.PHONY', so that does not get affected by .PATH/VPATH
This is not hurting things right now, and it will help things when path
searching for target nodes is enabled for make.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.9 10-Apr-1996 thorpej

Get the current working directory from "/bin/pwd" rather than "pwd".
Changes to the shell make the behavior of "make obj" inconsistent
with previous behavior, depending on the login shell used by the user.
See PR #2200 for details. PR remains open while further analysis is
done. This at least restores the previous semantics for us csh(1) users.


1.8 21-Feb-1996 pk

Use shell internal substring matching, like bsd.man.mk.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.7 10-Jun-1995 mycroft

Explicitly remove obj link before creating it.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
1.6 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.5 30-Jun-1994 cgd

don't be careless with _SUBDIRUSE


1.4 07-Nov-1993 cgd

define BSDOBJDIR and BSDSRCDIR to have make think of the src and obj
trees as rooted someplace other than /usr/src and /usr/obj.


1.3 23-Oct-1993 cgd

add support to make obj.${MACHINE} dirs, if the user so requests.
note that not all makefiles in the tree will work with them, yet.


1.2 21-Oct-1993 cgd

'obj' was missing in echo which informed of symlink creation


1.1 15-Aug-1993 mycroft

Create target directories with `install -d', and move `obj' targets into one
file.


1.1452 22-Dec-2025 thorpej

Conditionalize 802.11 support (hostapd, hostapd_cli, wlanctl, wpa_cli,
wpa_passphrase, wpa_supplicant, wiconfig, wlanctl, plus 802.11 support
in ifconfig) on MKWLAN, which defaults to "yes", except on m68000.


1.1451 22-Dec-2025 thorpej

Build audio programs (aiomixer, audiocfg, audioctl, audioplay,audiorecord,
and hdaudioctl) conditionally on MKAUDIO, which defaults to "yes" except
on m68000 (no sun2 systems supported audio; the publicly-available copy
of the Sun2 architecture manual states that the sound generation feature
was removed from the system specification in Dec 1983).


1.1450 22-Dec-2025 thorpej

Default MKPF to "no" on m68000.


1.1449 22-Dec-2025 thorpej

Conditionally build Bluetooth support on MKBLUETOOTH and default it
to "yes" except on m68000.


1.1448 21-Dec-2025 thorpej

Trim down sun2 installations with the following defaults:

MKBSDTAR.m68000?= no
MKDTC.m68000?= no
MKGROFF.m68000?= no
MKHESIOD.m68000?= no
MKHTML.m68000?= no
MKIPFILTER.m68000?= no
MKISCSI.m68000?= no
MKLDAP.m68000?= no
MKLVM.m68000?= no
MKNPF.m68000?= no
MKPOSTFIX.m68000?= no
MKRUMP.m68000?= no
MKUNBOUND.m68000?= no


1.1447 09-Dec-2025 mrg

switch all mips to GCC 14.


1.1446 06-Dec-2025 mrg

reverse the GCC 14 test polarity, now just alpha, mips, sh3, and m68k.

mips switching soon, the others have some issues remaining.


1.1445 04-Dec-2025 nia

Import BSD-licensed diff from FreeBSD to replace GNU diffutils

Ported to NetBSD, compiler warnings fixed, and some unnecessary
features (for the purpose of replacing our GPLv2 diff) have been
stripped out.

Non-default at the moment, requires building with MKBSDDIFF=yes.

PR bin/59798 We are still using GNU diffutils


1.1444 28-Nov-2025 martin

Switch ppc to gcc14


1.1443 09-Nov-2025 skrll

Enable DTB generation on armv5. Missed with the GENERIC_V5 work in

https://mail-index.netbsd.org/source-changes/2025/10/09/msg158486.html


1.1442 29-Oct-2025 mrg

switch ia64 to GCC 14.


1.1441 20-Oct-2025 nat

New port: mac68ksf - Macintosh 68k softfloat.

This commit is all the Makefile glue for the new port which is the mac68k
port with MKSOFTFLOAT set to "yes".

As posted here:
https://mail-index.netbsd.org/port-mac68k/2025/10/14/msg001037.html


1.1440 07-Oct-2025 mrg

switch to GCC 14 for arm*, arm64*, riscv*, x86, sparc*, hppa.


1.1439 18-Sep-2025 mrg

sort prior two additions and also add new one

CC_WNO_ENUM_INT_MISMATCH is used for GCC 14's -Wno-enum-int-mismatch.


1.1438 18-Sep-2025 mrg

introduce a couple of new turn-off-gcc-warning variables and use them.

GCC 14 has a new annoying calloc() checker that we turn off in a bunch
of places, and there are a few more dangling-pointer issuse that come up,
but seem bogus.


1.1437 10-Sep-2025 nat

Switch over m68k soffloat build to libc/softfloat.

m68k would previously use softfloat functions contained in libgcc_s.

This change aligns m68k with other platforms built with softfloat.

It is still possible to build the gcc_s softfloat impementation by setting
MKSOFFTFLOAT=yes MKLIBCSOFTFLOAT=no

Addresses PR/59393.


1.1436 08-Sep-2025 mrg

switch everyone to gcc.old by default.

in my testing, tools/gcc notices and cleans itself automatically and
i am reasonably confident this does not need a UPDATING entry.


1.1435 02-Sep-2025 christos

switch everyone to gdb 16.30 for testing.


1.1434 02-Sep-2025 rin

bsd.own.mk: Switch everyone to binutils 2.45 again


1.1433 30-Aug-2025 christos

revert new binutils change. Most of the errors are caused by larger
binaries produced. Will investigate.


1.1432 29-Aug-2025 christos

move everyone to new binutils. move amd64 to new gdb.


1.1431 27-Aug-2025 christos

switch everyone to gdb.old


1.1430 26-Aug-2025 christos

switch amd64 to new binutils


1.1429 24-Aug-2025 christos

switch everyone to binutils.old


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.1428 21-Jul-2025 mrg

turn of GCC ISL for m68k, vax, and sh3 as well.


1.1427 20-Jul-2025 christos

switch everyone to OpenSSL-3.5.1


1.1426 20-Jul-2025 martin

Enable PIE for macppc


1.1425 19-Jul-2025 martin

Switch sh3 and m68k to openssl 3.5


1.1424 18-Jul-2025 christos

Switch amd64 to OpenSSL-3.5.1


1.1423 13-Jul-2025 christos

Get ready to handle the openssl move from bsd -> apache2


1.1422 10-Jun-2025 christos

centralize pack-relative-relocs handling


1.1421 04-Jun-2025 rillig

all: fix some "internal option -J" warnings from make


1.1420 25-May-2025 nia

mk: Revert RELRO on sparc64 for now.

PR port-sparc64/59442 sparc64 disk usage more than doubled


1.1419 13-May-2025 nia

x11: Separate concepts of having EGL and having glamor/DRMKMS

EGL is becoming an increasingly popular API and it makes sense to
offer it as standard - the package builds suffer otherwise.
It seems to work fine on sparc64 and other ports that don't use
DRMKMS.


1.1418 06-May-2025 nia

mk: Enable partial relro by default on sparc64.


1.1417 28-Apr-2025 nia

mk: Enable SSP on MIPS, since it works and defends properly.

Also carry over RELRO enablement to n64 variants.

PR pkg/59368


1.1416 27-Apr-2025 riastradh

bsd.own.mk: If NOPIE is defined, set MKPIE=no.

This way, on sun2, we don't wind up with the bizarre setting of
MKPIC=no MKPIE=yes by default.

Preparation for conditionalizing automatic tests for:

PR lib/59359: static pies are broken


1.1415 26-Apr-2025 nia

mk: Enable partial relro on mips64.


1.1414 13-Apr-2025 rin

bsd.own.mk: Switch vax to Mesa 21

ICE has been worked around. Both 19 and 21 does not work anyway
due to IEEE754-depended floating-point manipulations...


1.1413 13-Apr-2025 rin

bsd.own.mk: Switch vax to GCC12

Let me thank kalvisd@ again for great works!!


1.1412 24-Feb-2025 martin

Centralize the test for platforms that HAVE_EFI_RT


1.1411 15-Feb-2025 skrll

Fix a couple of comments


1.1410 31-Jan-2025 christos

switch everyone to jemalloc-5.3.0


1.1409 11-Dec-2024 maya

Avoid using host tools for building INSTALL_WALNUT kernel

From Kouichi Hashikawa in PR toolchain/58810


1.1408 23-Oct-2024 kalvisd

declare vax-mopcopy to be a build tool

OK rin@


1.1407 16-Oct-2024 macallan

add ngle driver for Xorg


1.1406 24-Sep-2024 christos

switch x86 to new jemalloc


1.1405 23-Sep-2024 christos

Handle multiple versions of jemalloc


1.1404 23-Sep-2024 rin

bsd.own.mk: Switch sh3 to GCC12

No new regression observed for full ATF run on DIAGNOSTIC
kernel for landisk.

PR toolchain/58411


1.1403 23-Sep-2024 rin

bsd.own.mk: Switch m68k to GCC12

- No new regression for full ATF run on virt68k.
- sun2 works at a level as GCC10.


1.1402 22-Sep-2024 mrg

install several font packages that we used to have with xfree86

this brings in these versions:
font-arabic-misc 1.0.4
font-micro-misc 1.0.4
font-schumacher-misc 1.1.3
font-sun-misc 1.0.4
font-cronyx-cyrillic 1.0.4
font-misc-cyrillic 1.0.4
font-screen-cyrillic 1.0.5
font-winitzki-cyrillic 1.0.4
font-xfree86-type1 1.0.5

fixes problem reported on netbsd 9.2 install.

XXX: pullup-10, pullup-9


1.1401 15-Sep-2024 tsutsui

Move macppc bootable installcd stuff to sys/arch/macppc/stand dirs.

- move installboot (for CD ISO) and mkboothfs (for mkhybrid(8)) tools to
sys/arch/macppc/stand
- also build mkboothfs as ${TOOL_MACPPCMKBOOTHFS} in src/tools
- explicitly generate boothfs file (for mkhybrid(8)) in
sys/arch/macppc/stand/boothfs and install it into /usr/mdec
- use installed /usr/mdec/boothfs to create macppc bootable iso
- move list files for mkhybrid(8) hfs options to etc/etc.macppc


1.1400 27-Aug-2024 christos

switch everyone to new binutils+gdb


1.1399 27-Aug-2024 christos

switch everyone but powerpc (because sim does not build) to new gdb


1.1398 18-Aug-2024 rin

bsd.own.mk: Introduce MKGDBSERVER


1.1397 15-Aug-2024 christos

switch amd64 to gdb 15.1


1.1396 15-Aug-2024 mrg

allow HAVE_MESA_VER to be overriden by the environment.


1.1395 13-Aug-2024 rin

bsd.own.mk: Switch alpha and sh3 to binutils 2.42

No new regression for ATF, and some pkgsrc's successfully build.
Bootloaders also work fine, at least:

- alpha: bootxx_ffsv2, boot, netboot
- landisk: mbr, bootxx_ffsv2, boot


1.1394 12-Aug-2024 christos

point gdb to gdb.old


1.1393 10-Aug-2024 mrg

introduce a way to build GCC without the isl library

if NOGCCISL is set, don't build or link against isl. should fix PR#58505.


1.1392 16-Jul-2024 skrll

Switch arm to new binutils (2.42)


1.1391 15-Jul-2024 skrll

Switch hppa to new binutils (2.42)


1.1390 14-Jul-2024 skrll

Switch aarch64 (evbarm64) to new binutils (2.42)


1.1389 14-Jul-2024 skrll

Switch RISC-V to new binutils (2.42)


1.1388 13-Jul-2024 rin

bsd.own.mk: Switch mips to binutils 2.42

There is no new regression observed for brief tests on OCTEON ({,n}64eb)
as well as on MIPSSIM{,64} (all ABI combinations).

Let us see what happens for PR toolchain/57241; I've never reproduced
this failure locally. It may be precisely host-environment dependent,
and therefore very hard to track :(


1.1387 10-Jul-2024 christos

switch amd64 to binutils-2.42


1.1386 09-Jul-2024 rin

bsd.own.mk: Fix MKCOMPAT=no build for mipsn64e[bl]


Revision tags: perseant-exfatfs-base-20240630
1.1385 30-Jun-2024 christos

switch everyone to binutils.old


1.1384 29-Jun-2024 mrg

switch powerpc and mips to GCC 12.


1.1383 22-Jun-2024 mrg

now that alpha builds with xorg-server 21 again, switch it back.


Revision tags: perseant-exfatfs-base
1.1382 16-Jun-2024 skrll

branches: 1.1382.2;
Switch hppa to gcc 12


1.1381 16-Jun-2024 skrll

Style and sort MACHINE_CPU entries for GCC version conditional. NFCI.


1.1380 16-Jun-2024 mrg

alpha and xorg-server 1.20 has regressed since i last tested.

revert alpha back to 1.10 for now.


1.1379 16-Jun-2024 mrg

check for MACHINE_ARCH of i386/x86_64 instead of MACHINE i386/amd64.

seems to fix weird xen kernel builds where MACHINE=xen, and it would
not have the GCC-12 only warning flags present.


1.1378 15-Jun-2024 mrg

switch several ports over to GCC 12.

arm32, arm64, riscv, x86, sparc*, ia64, and alpha.

thanks for several folks help testing and fixing things, most
espcially rin@.


1.1377 15-Jun-2024 mrg

switch netwinder and alpha over to xorg-server 1.20.

the leaves sgimips as the only remaining xorg-server 1.10
consumer, and largely because it has XAA and EXA and the
sgimips drivers does not work well.


1.1376 08-Jun-2024 tsutsui

Build src/distrib/cdrom/macppc_installboot in src/tools as a tool.

Also use the tools version ${TOOLS_MACPPC_INSTALLBOOT} to create
bootable ISO9660/HFS hybrid installcd image for macppc.


1.1375 31-May-2024 tsutsui

Build mkhybrid as a build tool.


1.1374 29-May-2024 riastradh

New make(1) variable NETBSD_REVISIONID in the NetBSD build.

This is intended to be a tree-wide revision identifier, like a commit
hash or similar. This way, in builds from non-CVS trees where
per-file $NetBSD$ revision ids aren't incremented, we can still track
some version provenance of files with ident(1).

If defined, bsd.own.mk adds a macro _NETBSD_REVISIONID to CPPFLAGS
with the stringified text of NETBSD_REVISIONID.

In turn, if _NETBSD_REVISIONID is defined in sys/cdefs.h, then
__RCSID will put the concatenation of:
- `$NetBSD: '
- the file name
- ` '
- _NETBSD_REVISIONID
- ` $'
alongside the per-file revision id passed as an argument to __RCSID.

Since this is passed through command-line arguments, it doesn't cause
make to consider any dependencies to change when the revision id
changes -- so incremental builds remain incremental. And if you
don't set it, nothing changes from the __RCSID we had before.

Currently nothing sets NETBSD_REVISIONID automatically yet -- subject
to experimentation. Could just be verbatim commit hash, or could be
longer `hg identify' output -- or, in git, with the help of tags,
could be `git describe --dirty' output like

10.99.10-2924-gd01834fb75de

(or `10.99.10-2924-gd01834fb75de-dirty' if the working tree is dirty)
for the commit at
https://mail-index.netbsd.org/source-changes/2024/05/24/msg151526.html
which is 2924 linear commits after the commit bumping sys/param.h to
10.99.10 and (in the current git conversion) had commit hash starting
with d01834fb75de. This may require some discipline around branching
and tagging but it's worth a shot -- we'll see.

Based on a patch from joerg@ a while ago.


1.1373 28-Apr-2024 nia

Turn off MKAMDGPUFIRMWARE on i386

It's too big for the i386 install media and not useful on either
pre-2012 hardware or the kinds of embedded systems where i386 still
thrived after 2012.

(The build of the kernel parts of amdgpu on i386 is nevertheless useful
for finding obscure bugs.)

"go for it" riastradh


1.1372 24-Apr-2024 martin

Explicitly exclude VAX from new Mesa due to a gcc internal compiler error


1.1371 24-Apr-2024 martin

Force old Mesa for all old X server builds


1.1370 24-Apr-2024 martin

Switch alpha and VAX back to old Mesa for now untill someone fixes
those builds with newer Mesa.


1.1369 24-Apr-2024 nia

USE_XZ_SETS is no longer needed for sparc64 to fit on a standard CD-ROM


1.1368 23-Apr-2024 maya

Switch to mesa 21

Works well enough for me on various GPUs, let's try it out. Can be easily
reverted if anyone encounters major issues.


1.1367 07-Apr-2024 tsutsui

Switch vax to HAVE_XORG_SERVER_VER=120.

Tested on my VAXstation 3100/m30 with smg(4).
Ok'ed by mrg@ on tech-x11@:
https://mail-index.netbsd.org/tech-x11/2024/04/thread1.html#002457


1.1366 02-Apr-2024 riastradh

bsd.own.mk: No need for MKSLJIT to be set differently from others.

- Use ?=, not =, so mk.conf setting wins.
- Write out per-architecture tabular settings, not a conditional.
- Add comments for the architectures that look like they should have
sljit but don't. (XXX Missing comments about powerpc and mips --
not sure why, is this because modules don't yet work on those
architectures, or what?)

Tidying for PR 58103: bpfjit.kmod is not built on aarch64.


1.1365 02-Apr-2024 riastradh

bsd.own.mk: Enable MKLSJIT on aarch64.

Make sure there's only one copy of the conditional, in bsd.own.mk;
just make sys/modules/Makefile conditional on MKSLJIT so we don't
have to keep these in sync.

As a workaround for PR 58106, tweak the conditional definition of
SLJIT_CACHE_FLUSH to use cpu_icache_sync_range only in _HARDKERNEL,
and use __builtin___clear_cache in userland and in rump kernels.

PR 58103: bpfjit.kmod is not built on aarch64


1.1364 01-Apr-2024 christos

Use the TOOL_GZIP we built as part of tools if available.


1.1363 20-Jan-2024 skrll

risc-v: Add bwfm(4) firmware files to release image

Create the correct link for beagle,beaglev-starlight-jh7100-r0.txt NVRAM
config file.


1.1362 03-Jan-2024 thorpej

Add mvme68k to MACHINES.m68k.


1.1361 03-Jan-2024 thorpej

Add virt68k to MACHINES.m68k.


1.1360 02-Sep-2023 lukem

bsd.own.mk: sort the CC_WNO variables


1.1359 24-Aug-2023 rin

bsd.own.mk: Switch mips64e[bl] to binutils 2.39 again

Potential fix for PR toolchain/57241 has been committed.
Let us see whether this works fine or not.


1.1358 20-Aug-2023 rin

bsd.own.mk: Put gdb back for m68000

However, unfortunately, it does not work even if MAXTSIZ is bumped.
It seems to be too large for 24-bit address space.

This is not a regression; gdb.old does not work also.


1.1357 19-Aug-2023 christos

Add elfedit (needed to tag binaries as linux) from GSoC 2023 (Theodore Preduta)


1.1356 13-Aug-2023 wiz

fix typo in previous


1.1355 13-Aug-2023 christos

sun2 can't make gdb anymore. there is no gmp because no gcc.


1.1354 11-Aug-2023 christos

switch everyone to gdb-13.2


1.1353 09-Aug-2023 christos

put back the new gdb


1.1352 08-Aug-2023 mrg

introduce new GCC 12 warning disables and use them in a few places

this introduces 4 new warning disable flags:

CC_WNO_MISSING_TEMPLATE_KEYWORD
CC_WNO_REGISTER
CC_WNO_STRINGOP_OVERREAD
CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings. of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.


1.1351 08-Aug-2023 mrg

put amd64 back to GDB 11. it doesn't build for me, or others.

the first problem is that this rule:

GDBvn.texi: ${DIST}/gdb/version.in
echo "@set GDBVN $$(${TOOL_CAT} ${.ALLSRC})" > ${.TARGET}

conflicts with the "GDBvn.texi" in the source tree and fail to write
this file with r/o source trees.

the second problem is that gdbserver fails to link because it compiles
the wrong file to create target.o. this seems like a very bad make or
bsd.*.mk bug -- "SRCS= .. target.cc ...", and yet, make manages to
compile the file "target.c" to create target.o, and then the required
symbols the rest of gdbserver needs are missing.

the third problem is that when you make it build the right target.cc,
it wants bfd.h, and gmp.h, and even after solving those issues, i'm
still getting a fourth issue linking gdbserver and thus reverting.


1.1350 06-Aug-2023 christos

switch gdb to 13.20 for x86_64


1.1349 03-Aug-2023 rin

bsd.own.mk: Revert CC_WNO_USE_AFTER_FREE

This is an undefined behavior in general. Implementation details of
pointer are not defined in C standards; it is not necessarily address
of memory objects.

Pointed out by uwe@. Thanks!!


1.1348 03-Aug-2023 rin

bsd.own.mk: Introduce CC_WNO_USE_AFTER_FREE for GCC12

-Wuse-after-free for GCC 12 is premature. It fires on a common idiom:

newbuf = realloc(buf, size);
p = newbuf + (p - buf);

Let shut this up for GCC 12 (with hoping it gets improved for 13!).


1.1347 01-Aug-2023 mrg

we skipped GCC 11, so change the test to GCC 12.


1.1346 31-Jul-2023 christos

we ended up importing 13.2


1.1345 23-Jul-2023 lukem

bsd.own.mk: force MKSTRIPSYM=no if MKDEBUG=yes

Local symbols are desirable with MKDEBUG=yes, so don't strip them.
Per request from mrg@


1.1344 23-Jul-2023 lukem

bsd.own.mk: style: block comments, move CC_flag vars

Add #{ .. #} block comments to a long conditional.

Move the CC_flag variables closer to other compiler-related
variables instead of being in the middle of some arch-specific
overrides.


1.1343 21-Jul-2023 riastradh

bsd.own.mk: Use MACHINE_ARCH for default MKCTF/MKDTRACE=yes x86.

The substantive impact of this is that it enables MKCTF=yes for Xen
kernels. This is a change because, when building a Xen kernel
(XEN3_DOM0, XEN3_DOMU), MACHINE is set to `xen', not to `i386' or
`amd64', so the conditional never took effect.

(The side effect of setting MKDTRACE=yes when building Xen kernels is
unlikely to matter; that affects module and userland builds.)

PR port-xen/57535

XXX pullup-10


1.1342 10-Jun-2023 lukem

sets: enhance MAKEVERBOSE support

Add more messages for various sets operations.
Add ${_MKMSG_CREATE} to bsd.own.mk.

Enhance maketars to be a bit more verbose even with -q,
to make it more obvious why certain operations may be slow.
May help debugging PR 47562.


1.1341 03-Jun-2023 lukem

bsd.*.mk: move MKSTRIPSYM default to bsd.own.mk

Add default for MKSTRIPSYM=yes to to bsd.own.mk _MKVARS.no.
Test ${MKSTRIPSYM} != "no".


1.1340 03-Jun-2023 lukem

bsd.obj.mk: move MKHOSTOBJ to bsd.own.mk

Add default for MKHOSTOBJ=no to to bsd.own.mk _MKVARS.no.
Simplify bsd.obj.mk check.


1.1339 03-Jun-2023 lukem

bsd.dep.mk: move MKDEPINCLUDES to bsd.own.mk

Add default for MKDEPINCLUDES=no to to bsd.own.mk _MKVARS.no.
Simplify bsd.dep.mk check.


1.1338 03-Jun-2023 lukem

bsd.*.mk: move MKCLEAN* to bsd.own.mk

Move the defaults for MKCLEANSRC and MKCLEANVERIFY
from bsd.clean.mk to bsd.own.mk _MKVARS.yes.


1.1337 03-Jun-2023 lukem

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.


1.1336 03-Jun-2023 lukem

bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
CLANG_NO_ADDR_OF_PACKED_MEMBER
CC_NO_ADDR_OF_PACKED_MEMBER
GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.


1.1335 02-Jun-2023 lukem

bsd.own.mk: obsolete non-MK variants MANZ UNPRIVED UPDATE

Remove support for variables deprecated 20 years ago
by their MK* equivalents.


1.1334 01-Jun-2023 lukem

bsd.own.mk: describe recent convention in comments


1.1333 01-Jun-2023 lukem

bsd.own.mk: MKPERFUSE isn't used anywhere

perfuse is built unconditionally, and MKPERFUSE
isn't tested anywhere.


1.1332 01-Jun-2023 lukem

bsd.own.mk: MKLLD, MKLLDB, MKMCLINKER are obsolete

MKLLD, MKLLDB, MKMCLINKER aren't used in the build,
so remove them.

These were obsoleted by joerg@ on 2019-11-11
with the update of LLVM to 10.0.0git (01f3a59).


1.1331 31-May-2023 lukem

bsd.own.mk: support ${MACHINE} defaults in MK* = yes

For MK* variables (in _MKVARS.yes), default to
MK*.${MACHINE} if MK*.${MACHINE_ARCH} isn't defined.

Equivalent to _MKVARS.no change by mrg@ in rev 1.1065 on 2018-06-16.


1.1330 31-May-2023 lukem

bsd.own.mk: sort lists. whitespace fixes

Create _NOVARS for the list of NO* variables,
for consistency with _MKVARS.yes and _MKVARS.no

Format _NOVARS, _MKVARS.yes, and _MKVARS.no with
one entry per line, and sort the lists.
Simplifies review and adding new entries.
Per suggestion from riastradh@

Line up some variable assignments more consistently.


1.1329 29-May-2023 lukem

bsd.own.mk: rename NO_ADDR_OF_PACKED_MEMBER to CC_NO_ADDR_OF_PACKED_MEMBER

Add "CC_" prefix to NO_ADDR_OF_PACKED_MEMBER.

We now have the following convention:
GCC_NO_*: Disable specific warnings from GCC.
CLANG_NO_*: Disable specific warnings from Clang.
CC_NO_*: Disable specific warnings from both Clang and GCC.

This reserves "NO_*" Makefile variables to disable other features.

Some space->tab fixes.


1.1328 29-May-2023 lukem

bsd.own.mk: sort list of NO* variables

List the NO variables in order, leaving enough room to add more entries,
not splitting the next letter after "NO" across a line.

No functional change; just prettier and easier to review.


1.1327 28-May-2023 lukem

bsd.own.mk: deprecate NOCRYPTO

MKCRYPTO was removed by riastradh@ on 2017-05-22,
so the NOCRYPTO override is now unnecessary.


1.1326 23-May-2023 lukem

tools/compat: MAKEVERBOSE support in regen


1.1325 22-May-2023 lukem

man0: support objdirs, tools, parallel builds

man0 creates files, so write to the the OBJDIR instead of the
source directory.

Use TOOL_ appropriately.
Add MAKEVERBOSE support.

Add separate rules to generate:
- all.files: the list of all man files to process (based on mkman)
- manNpages.files: per-section files from all.files. (based on mkman)
- manNpages.ps: per-section .ps from manNpages.files, with
per-file MAKEVERBOSE messages to stderr (as before, just prettier).
- manNpages.pdf: per-section .pdf from manNpages.ps.

Remove the now-obsolete mkman script.

Add TOOL_GROPS and _MKSHMSG_FORMAT to <bsd.own.mk>


1.1324 15-May-2023 christos

switch everyone to OpenSSL-3.x


1.1323 14-May-2023 christos

move hppa and powerpc to OpenSSL-3.x


1.1322 14-May-2023 christos

move arm to OpenSSL-3.x


1.1321 14-May-2023 christos

switch alpha to OpenSSL-3.x


1.1320 13-May-2023 christos

switch i386 and m68k to OpenSSL-3.x


1.1319 13-May-2023 riastradh

compat: Disable relro in 32-bit arm compat.

Not supported by binutils:

ld: warning: -z relro ignored

PR toolchain/57405


1.1318 12-May-2023 ryoon

Fix broken conditional


1.1317 12-May-2023 christos

switch vax to OpenSSL-3.x


1.1316 11-May-2023 christos

switch sparc64/aarch64 to OpenSSL-3.x


1.1315 11-May-2023 skrll

risc-v: use ${MACHINE}-${MACHINE_ARCH} for the default RELEASEMACHINEDIR

Hopefully, this fixes the release binaries being available on cdn/nyftp.


1.1314 10-May-2023 christos

switch amd64 to OpenSSL-3.0.8


1.1313 08-May-2023 skrll

RISC-V: enabled GDB


1.1312 07-May-2023 skrll

RISC-V support that works on QEMU with a single hart.

Thanks for Simon Burge for plic(4).


1.1311 07-May-2023 martin

Switch mips64eb back to old binutils too, with new binutils it causes
random autobuild failures (same reason mips64el had been switched back
before)


1.1310 18-Apr-2023 christos

switch everyone to openssl.old


1.1309 02-Apr-2023 christos

switch gdb to gdb.old


1.1308 12-Mar-2023 martin

PR 57241: switch mips64el back to old binutils for now


1.1307 20-Feb-2023 mrg

GCC 10 now comes from gcc.old.


1.1306 05-Feb-2023 christos

switch the remainder to binutils 2.39


1.1305 04-Feb-2023 wiz

stop building and installing xfwp

As proposed on tech-x11
https://mail-index.netbsd.org/tech-x11/2022/12/29/msg002333.html


1.1304 29-Jan-2023 mrg

add brotli to x11 src dirs.


1.1303 28-Jan-2023 martin

Switch sh3 to binutils 2.39


1.1302 25-Jan-2023 christos

add mipsel and m68k to binutils 2.39


1.1301 25-Jan-2023 christos

switch sun2 to binutils 2.39


1.1300 24-Jan-2023 christos

switch vax to binutils 2.39


1.1299 21-Jan-2023 martin

Switch powerpc over to binutils 2.39


1.1298 16-Jan-2023 skrll

Switch hppa to new binutils


1.1297 16-Jan-2023 skrll

Switch RISC-V to new binutils (2.39)


1.1296 15-Jan-2023 rillig

bsd.own.mk: replace '!empty' with direct expression

The variables MACHINE and MACHINE_ARCH are guaranteed to be defined,
therefore they don't need to be wrapped in '!empty(...)'.

This is simpler to read and, in case of typos, is more likely to lead to
an error message from make, as a line starting with '!' is interpreted
as a dependency line, while a line using only '==' but not '!=' leads to
a syntax error of the form 'Invalid line type'.


1.1295 15-Jan-2023 skrll

Sort in the binutils version selection


1.1294 15-Jan-2023 skrll

Really switch aarch64 and sparc binutils to 2.39


1.1293 14-Jan-2023 christos

add aarch64 and sparc to binutils 2.39


1.1292 13-Jan-2023 christos

switch alpha to binutils-2.39


1.1291 28-Dec-2022 christos

switch x86 to binutils 2.39


1.1290 23-Dec-2022 christos

switch everyone to binutils.old which is now 2.34


Revision tags: netbsd-10-base
1.1289 14-Dec-2022 skrll

branches: 1.1289.2;
Trailing whitespace


1.1288 21-Aug-2022 lukem

Deprecate extsrc/, EXTSRCSRCDIR, MKEXTSRC

Remove support for building extsrc/:
1. Makefile: remove do-extsrc target.
2. build.sh: remove options -y and -Y extsrcdir.
3. distrib/sets: remove support for extsrc in various tools
including the options -L ext and -y, and the extsrc sets.
4. doc/BUILDING.mdoc: remove docs for extsrc/, EXTSRCSRCDIR, MKEXTSRC (etc)
5. bsd.own.mk and various Makefiles: remove support for extsrc/,
EXTSRCSRCDIR, MKEXTSRC.

As proposed on tech-kern and tech-userlevel on 2022-01-07
and followed up on 2022-08-21.


1.1287 27-Jul-2022 maya

Enable amdgpu module & firmware on x86

Make it easier to test this one out, add `load amdgpu` before boot netbsd.

XXX there should probably be a drm block in sys/modules/Makefile which
includes aarch64.


1.1286 14-Jul-2022 mrg

add libxcvt.


1.1285 06-Jun-2022 nia

build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.


1.1284 29-May-2022 nia

mk: Add MKTIMED and MKMOUSED flags for compiling NetBSD without timed
and moused


1.1283 29-May-2022 nia

mk: Add a MKPPP flag to exclude pppd(8) and related utilities from
the build


1.1282 28-May-2022 nia

mk: Add MKFINGER, MKTALK flags for not building
talk, talkd, finger, fingerd.


1.1281 28-May-2022 nia

mk: Add MKNTP, MKTCPDUMP knobs.


1.1280 27-May-2022 nia

mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.


1.1279 25-May-2022 nia

mk: Rename the MKMBONE option to MKMROUTING for greater accuracy and
to match the related kernel config option.


1.1278 25-May-2022 nia

mk: Allow setting MKDHCPD=no to build base without the ISC DHCP server,
useful for embedded images that don't need to act as one.


1.1277 25-May-2022 nia

mk: Allow building base without the MBONE applications by setting
MKMBONE=no in mk.conf


1.1276 29-Mar-2022 christos

get rid of old style `` command substitution in shell and use $() instead.


1.1275 17-Mar-2022 mrg

apply some more consistency in platform checks, collapse some
checks, and enable pigz on arm64eb.


1.1274 17-Mar-2022 mrg

enable ZFS on arm64eb. works witih basic testing.
(dtrace does not.)


1.1273 30-Dec-2021 christos

remove the NEED_OWN_INSTALL_TARGET conditional for setting the install
variables, suggested by phone@


1.1272 20-Dec-2021 christos

Rename:
MKKDEBUG -> MKDEBUGKERNEL
MKTOOLSDEBUG -> MKDEBUGTOOLS
while keeping compatibility with the old names. Add missing documentation.
Now all debugging tunables are prefixed with MKDEBUG.


1.1271 20-Dec-2021 christos

PR/55557: Andreas Gustafsson" Introduce a new variable MKDEBUGKERNEL which
as the name implies, includes a netbsd.gdb inside each kernel set:
$ tar -tzvf kern-GENERIC.tgz
-rwxr-xr-x 0 root wheel 29398264 Dec 19 12:50 ./netbsd
-rwxr-xr-x 0 root wheel 208125880 Dec 19 12:50 ./netbsd.gdb


1.1270 12-Dec-2021 maya

Add amdgpu firmware build goo (disabled)


1.1269 06-Dec-2021 abs

Add Xwsfb X server to pmax build

With the previous tweak to TURBOchannel framebuffers in sys/dev/tc this
should allows pmax to once again run X11.

TODO: Investigate pullup to -9


1.1268 13-Nov-2021 skrll

Hook in riscv dtb build


1.1267 13-Nov-2021 skrll

Correct a comment


1.1266 14-Oct-2021 nia

mk: Enable MKPIE on aarch64 (it's already enabled on 32-bit arm)


1.1265 14-Oct-2021 nia

mk: Enable MKRELRO on aarch64 to match x86.


1.1264 14-Oct-2021 nia

mk: Enable MKARGON2 now that this stuff works.


1.1263 30-Sep-2021 jmcneill

efiboot: Build and install bootriscv64.efi for riscv64 builds.


1.1262 26-Sep-2021 maya

Restore MKNOUVEAUFIRMWARE and MKRADEONFIRMWARE and make gpufw set unconditional

Simplifies logic.
(Second commit - first one was partial)

Restoring MK* requested by mrg on tech-kern discussion
https://mail-index.netbsd.org/tech-kern/2021/09/25/msg027695.html


1.1261 25-Sep-2021 maya

Move DRM-driver firmware from base to its own set, gpufw

This set is only installed on amd64,i386,evbarm.
This set is installed on minimal installs and on install media, in
case someone needs it for basic driver functionality.

Comments:
Switched to a single MK tunable for it - that is probably unneeded.

An upcoming DRM update will include even fatter firmware, and we'd
like to minimize the impact of it.


1.1260 19-Aug-2021 mrg

fix arm64 builds: turn off MKCOMPAT for GCC

no idea why it was enabled as we can't easily target 32 bit.

if we figure this out for aarch32, the subdir names etc will
probably be different, or we can just revive the deleted
files no longer referenced with this commit.


1.1259 16-Aug-2021 mrg

switch sh3 to GCC 10. buh bye GCC 9!

thanks to everyone who helped (most espcially rin@.)


1.1258 11-Jul-2021 mrg

switch Mesa 19 to use MesaLib.old subdir.


1.1257 19-Jun-2021 mrg

switch m68000, m68k and 32 bit arm to GCC 10. just sh3 left!

special thanks to rin for fixing arm32.


Revision tags: cjep_sun2x-base1
1.1256 03-Jun-2021 rin

Switch amiga to Xorg server 1.20; wsfb(4) is only graphic driver both for
1.10 and 1.20 (Xamiga was gone a long ago...), and there is no reason to
stay with 1.10.

At least, 1.20 works fine on wsdisplay(4) at amidisplaycc(4).


Revision tags: cjep_sun2x-base cjep_staticlib_x-base1
1.1255 29-May-2021 rin

branches: 1.1255.2;
Switch mac68k to Xorg server 1.20. Only available driver is wsfb(4) both
for 1.10 and 1.20, and there is no reason to stay with 1.10.

XXX
1.20 works fine on WSFB* kernels with genfb(4), whereas both 1.10 and
1.20 fail for GENERIC* kernels with macfb(4) as some mandatory ioctl's
are missing. It would be better to make genfb(4) default before netbsd-10
is branched.


1.1254 27-May-2021 christos

mips has switched already.


1.1253 27-May-2021 christos

mips64 only works with gcc-10


1.1252 27-May-2021 christos

switch to MACHINE_ARCH i386 to include xen (thanks mlelstv)


1.1251 27-May-2021 christos

Switch "xen" to gcc 10 too, otherwise xen kernel builds fail because they
"think" we have gcc-9 where we have gcc-10 in reality (since MACHINE=xen),
and we don't add ${GCC_NO_RETURN_LOCAL_ADDR} COPTS.in_pcb.c


1.1250 27-May-2021 christos

remove dup line (thanks rillig)


1.1249 27-May-2021 mrg

switch mips* and i386 to GCC 10.

arm32 (significant issues remaining), m68k (seems fine, but x68k
needs to reduce support in loadbsd), and sh3 remaining.


1.1248 26-May-2021 christos

Add date as a tool


Revision tags: cjep_staticlib_x-base
1.1247 06-May-2021 rin

branches: 1.1247.2;
PR port-mvme68k/56146

Build wrtvid as tools.


1.1246 25-Apr-2021 christos

make MACHINE_MIPS a boolean not a condition


1.1245 25-Apr-2021 rin

Add missing \ for previous.


1.1244 25-Apr-2021 christos

- since we are using regex already, shorten by merging arm and mips entries
- add a MACHINE_MIPS64 macro shorthand
- pass -m{soft,hard}-float to the assembler when we are passing it to the
compiler


1.1243 25-Apr-2021 mrg

switch powerpc and arm64 to GCC 10.


1.1242 18-Apr-2021 skrll

Switch hppa to gcc 10


1.1241 17-Apr-2021 mlelstv

Use GCC10 for all amd64 including XEN kernels.


1.1240 17-Apr-2021 mrg

switch alpha, ia64, sparc*, riscv*, amd64 and vax to GCC 10 default.


1.1239 12-Apr-2021 mrg

add GCC_NO_IMPLICIT_FALLTHRU, GCC_NO_MAYBE_UNINITIALIZED, and
GCC_NO_RETURN_LOCAL_ADDR.


1.1238 10-Apr-2021 mrg

switch HAVE_GCC=9 to gcc.old.


1.1237 31-Mar-2021 simonb

Reenable kernel modules for MIPS now that they work.


1.1236 07-Mar-2021 rin

Build Xorg server for evbppc with minimum wsfb(4) support for Explora.


1.1235 06-Dec-2020 christos

Move everyone to gdb-11


1.1234 17-Nov-2020 rin

Set USE_XZ_SETS to yes by default for aarch64eb in the same manner as aarch64.


1.1233 10-Nov-2020 kamil

Reintroduce the support of MKCATPAGES

Requested by <mrg>


1.1232 08-Nov-2020 kamil

Remove the MKCATPAGES remnants


1.1231 08-Nov-2020 kamil

Remove the support for MKCATPAGES

It was optional since 1999 and disabled by default since 2012.

Proposed on tech-userlevel@.


1.1230 05-Nov-2020 rin

Build dtb set for aarch64eb.


1.1229 25-Oct-2020 tsutsui

Switch alpha to USE_XZ_SETS=no, i.e. using gzip for installation sets.

Ok'ed by martin@ in PR/55751. Maybe worth to pullup to netbsd-9.


1.1228 18-Oct-2020 christos

provide a no-addr-of-packed-member for both clang and gcc


1.1227 17-Oct-2020 mrg

turn off kernel modules on mips since they don't work yet, and
we build 2 or 3 versions of them.


1.1226 16-Oct-2020 nia

share/mk: Define some missing X11 libraries.


1.1225 09-Oct-2020 rin

Build GDB for aarch64eb; it works just fine as far as I can see.


1.1224 09-Oct-2020 mrg

switch powerpc, sh3, vax and m68k to GCC 9. that's everyone.

thanks espcially to rin@ for testing and fixing issues.


1.1223 09-Oct-2020 macallan

build Xorg server on hppa


1.1222 26-Sep-2020 jmcneill

Add HAVE_NVMM and use it to control the build of NVMM related components.
Defined to "yes" on amd64, "no" everywhere else.


1.1221 23-Sep-2020 kamil

Switch GDB on i386 to 1100

Confirmed to build and work.


1.1220 20-Sep-2020 christos

switch amd64 to gdb-11


1.1219 15-Sep-2020 mrg

reverse HAVE_GCC test, and list remaining GCC 8 platforms:
- powerpc
- sh3
- m68k
- vax


1.1218 15-Sep-2020 mrg

switch sparc* and mips* to GCC 9.


1.1217 15-Sep-2020 christos

make everyone use gdb.old


1.1216 14-Sep-2020 skrll

Switch hppa to gcc 9.

Summary for 883 test programs:
7487 passed test cases.
644 failed test cases.
51 expected failed test cases.
582 skipped test cases.


1.1215 14-Sep-2020 mrg

switch m68k and sh3 to binutils 2.34. testing sun3 in tme
and landisk in gxemul shows them both to work as well as
binutils 2.31.

that's binutils 2.34 for everyone now.


1.1214 13-Sep-2020 mrg

fix syntax errors in previous.


1.1213 13-Sep-2020 mrg

switch riscv and ia64 to GCC 9.
switch riscv to binutils 2.34.


1.1212 13-Sep-2020 mrg

switch vax and ia64 to binutils 2.34. reverse the list and leave
the remaining m68k (untested), riscv (riscv64 ld is missing emulations
for 32 bit targets), and sh3 (untested).


1.1211 13-Sep-2020 kamil

Build and install GCC TSan for 64-bit CPUs


1.1210 12-Sep-2020 jmcneill

Add HAVE_ACPI and HAVE_UEFI flags to bsd.own.mk and use them to
conditionally include ACPI and UEFI bits instead of relying on adhoc
MACHINE_ARCH tests.


1.1209 12-Sep-2020 mrg

switch to GCC 9 on arm and x86.

note GCC 8.3, 8.4 and 9.3 import dates. add an UPDATING entry.


1.1208 10-Sep-2020 mrg

switch sparc to binutils 2.34. tested on an ss20.


1.1207 07-Sep-2020 mrg

switch mips to binutils 2.34.


1.1206 06-Sep-2020 mrg

add support for new GCC 9 warnings that may be too much to fix
right now. new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree. mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it. (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.) clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.


1.1205 20-Aug-2020 mrg

make GCC 8 consumers to use gcc.old.


1.1204 16-Aug-2020 mrg

switch netbsd/m68k to GCC 8.

special thanks to rin@ for fixing many things and figuring out
what was the major issue (STACK_BOUNDARY.)


1.1203 11-Aug-2020 mrg

update GCC 7 version to nb4 20200810, and fix the unknown GCC version
error assignment from "=?" to "?=" so it works as designed.


1.1202 21-Jul-2020 tsutsui

Switch x68k to HAVE_XORG_SERVER_VER=120.

Confirmed both color "Graph" VRAM and mono "Text" VRAM servers on XM6i.


1.1201 20-Jul-2020 tsutsui

Switch ports using MI wsfb drivers to HAVE_XORG_SERVER_VER=120.

Xorg wsfb servers from 1.20 for dreamcast (16bpp), hp300 (8bpp), and
luna68k (1bpp) work fine even on NetBSD 9.0, and zaurus is also
confirmed working.

Discussed with mrg@ and macallan@ on tech-x11:
https://mail-index.netbsd.org/tech-x11/2020/07/thread1.html#002098


1.1200 04-Jul-2020 chs

the x86 xen and non-xen modules are identical,
so remove the unneeded extra copies.
Xen kernels now use the same modules as native kernels.


1.1199 06-Jun-2020 joerg

sun2 and vax have no native TLS support, so avoid using modern jemalloc
as it has a couple of nasty race conditions when using TSD.


1.1198 02-Jun-2020 jmcneill

Set USE_XZ_SETS for evbarm-aarch64


1.1197 29-May-2020 mrg

remove useless MACHINE_ARCH == sh3 check for GCC 8.


1.1196 29-May-2020 mrg

switch vax to GCC 8. testing in simh shows the same set of bugs.


1.1195 27-May-2020 jmcneill

Set MKDTB=yes for armv6


1.1194 27-May-2020 mrg

switch alpha to GCC 8. tested by rin@, same atf result as with GCC 7.

thanks rin! only vax, sh3 and m68k left.


1.1193 26-May-2020 christos

Move sun2 and alpha to new binutils


1.1192 24-May-2020 rin

Add GNU_ARCH for earmv5hf{,eb}.


1.1191 20-May-2020 martin

Switch sparc64 to binutils 2.34


1.1190 19-May-2020 rin

Try to fix fallout from addition of dtb.tgz; MKDTB was added to both
_MKVARS.yes and _MKVARS.no. Remove it from the former.


1.1189 18-May-2020 jmcneill

Separate devicetree .dts -> .dtb building from kernel builds. They are now
part of a separate set, "dtb.tgz", and only built when MKDTB=yes. This
defaults to yes for earmv[67]* and aarch64, and no everywhere else.


1.1188 05-May-2020 skrll

switch hppa to new binutils (2.34)


1.1187 27-Apr-2020 mrg

invert the GCC 7/8 conditional.

only alpha, vax, m68k and sh3 are still on GCC 7.


1.1186 26-Apr-2020 mrg

switch mips to GCC 8.


1.1185 26-Apr-2020 skrll

Switch hppa to gcc 8


1.1184 23-Apr-2020 christos

Swirch arm to the new binutils


Revision tags: phil-wifi-20200421
1.1183 15-Apr-2020 christos

need more ||


1.1182 15-Apr-2020 christos

fix backslash


1.1181 15-Apr-2020 christos

switch ppc to the new binutils


Revision tags: phil-wifi-20200411 phil-wifi-20200406
1.1180 04-Apr-2020 christos

Document and set a default for KERNEL_DIR


1.1179 04-Apr-2020 christos

Switch x86 to the new binutils.


1.1178 03-Apr-2020 christos

Switch to binutils.old


Revision tags: is-mlppp-base
1.1177 27-Feb-2020 macallan

ZFS works fine on my v210, so let's enable it for sparc64


1.1176 07-Feb-2020 jmcneill

Update comment


1.1175 22-Jan-2020 uwe

Switch powerpc to GCC 8 again now that alloca() is fixed.
PR port-macppc/54827


1.1174 22-Jan-2020 uwe

Switch powerpc back to GCC 7 until we fix alloca() PR port-macppc/54827
ok mrg@


1.1173 19-Jan-2020 jmcneill

Install nouveau and radeon firmware on aarch64


1.1172 17-Jan-2020 christos

Back to libarchive's bsdtar


1.1171 14-Jan-2020 christos

Back to pax as tar until I figure out how I broke libarchive (hard link
extraction creates 0 length files for existing hard-links).


1.1170 12-Jan-2020 christos

re-enable BSDTAR now that the two issues (symlinks/atomicity) have been fixed.


1.1169 14-Dec-2019 mrg

switch powerpc to GCC 8.


1.1168 04-Dec-2019 jmcneill

Enable DTrace on aarch64


1.1167 01-Dec-2019 jmcneill

Enable ZFS support on aarch64


1.1166 21-Nov-2019 mrg

switch riscv32/64 to GCC 8.


Revision tags: phil-wifi-20191119
1.1165 18-Nov-2019 christos

switch arm to gcc-8


1.1164 17-Nov-2019 mrg

switch powerpc64 to GCC 8.


1.1163 17-Nov-2019 mrg

switch ia64 to GCC 8. boots just as far as GCC 7 in ski.


1.1162 16-Nov-2019 mrg

sparc & sparc64 -> GCC 8.


1.1161 16-Nov-2019 mrg

i386 -> GCC 8.


1.1160 13-Nov-2019 joerg

Restore pax-as-tar.


1.1159 31-Oct-2019 martin

PR misc/54657: let RELEASEMACHINEDIR default to ${MACHINE}-${MACHINE_ARCH}
for evb{arm,mips,sh3}*.


1.1158 24-Oct-2019 christos

1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and
bsd.own.mk also adds it for gcc only (so we end up with 2 -marm for gcc).
Just add -marm unconditionally in bsd.own.mk in ARM_APCS_FLAGS and remove
it from everywhere else.
2. gcc-8 now warns about thumb internetwork in APCS mode. This does not make
sense because the documentation says that this flag does not make a
difference in apcs mode, but might produce larger code in non-APCS mode.
So we just add it to silence the warnings.


1.1157 22-Oct-2019 christos

move a{md,arch}64 to gcc 8


1.1156 13-Oct-2019 mrg

make GCC_NO_STRINGOP_OVERFLOW apply to gcc 7 too.


1.1155 13-Oct-2019 mrg

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


1.1154 09-Oct-2019 jhigh

added backend support for argon2 password scheme


1.1153 29-Sep-2019 mrg

gcc 7 can now be found in gcc.old.


1.1152 15-Sep-2019 bad

Also don't add a sysroot at all if a rumpkernel build.


1.1151 23-Aug-2019 mrg

fix MKCXX=no:
- don't build GDB
- don't build sanitizers
- don't build GCC commands
- fix some set lists


1.1150 10-Aug-2019 christos

Don't install PIC libraries by default because they are too big since they
contain debug symbols. I supplied a patch in PR/54449 to remove the debugging
symbols but folks preferred to not install them at all.


Revision tags: netbsd-9-base
1.1149 24-Jul-2019 roy

branches: 1.1149.2;
MKBSDTAR now defaults to yes

Starting to see some modern archives not opening, it's time to make them
work!

OK joerg@ agc@


1.1148 20-Jul-2019 mrg

add util-macros src dir.


1.1147 20-Jul-2019 wiz

Install the nouveau gm206 firmware as used by my graphics card.

Also add the other gm20x nouveau firmwares to the source tree
to make it easier to add them for someone who can test them.

Installed if MKNOUVEAUFIRMWARE is set to 'yes'.
This defaults to no except on amd64 and i386 (like for radeon).


1.1146 11-Jun-2019 mrg

turn on MKLLVMRT for aarch64 X11 builds.

with llvmpipe vs swrast, on pinebook 1080p i see 6x speed up for glxgears,
seamonkey & google maps is significantly faster, and ksudoku is workable.


Revision tags: phil-wifi-20190609
1.1145 02-Jun-2019 mrg

minor hack fix for the previous:

MKX11 is used before it was defaulted, leading to eg:

... Malformed conditional (${MKX11} != "no" && ${HAVE_MESA_VER} == "18")

gain knowledge that it defaults to "no" immediately below.
could split this list, but seems uglier.


1.1144 02-Jun-2019 mrg

fix building x86 with X11 but not LLVM:

- change the defaults for MKLLVMRT and MKX11 so we don't have to
force-override later. this makes "build.sh -V MKLLVMRT=no"
work to disable building the LLVM Mesa components.

- in gallium, don't BUILD_RADEON if MKLLVMRT is no.

this stops GL from working, but basic X seems OK enough for Xvideo
to still work on modern radeon (ie, video mostly works fine, though
eg, "mpv -vo gpu" won't. use "mpv -vo xv".)


1.1143 30-May-2019 christos

Everyone is on gdb-8.3 now.


1.1142 30-May-2019 christos

add vax to new gdb


1.1141 29-May-2019 christos

move sparc* to new gdb.


1.1140 29-May-2019 christos

Add i386


1.1139 29-May-2019 christos

amd64 switched to gdb-8.3


1.1138 26-May-2019 christos

build gdb from gdb.old


1.1137 17-May-2019 nakayama

Use ${_TOOL_PREFIX} instead of hardcoding "nb" for consistency.


1.1136 17-May-2019 nakayama

Revert previous.
The binaries created are different, but according to joerg@ there
is no difference in functionality.


1.1135 16-May-2019 nakayama

Rename nb{clang,llvm}-tblgen to ${MACHINE_GNU_PLATFORM}-{clang,llvm}-tblgen
since they contain the default target (e.g. x86_64--netbsd).


1.1134 11-May-2019 christos

Everyone is using gcc-7 now.


1.1133 10-May-2019 mrg

add an entry to find upcoming intel-2014 driver.


1.1132 19-Apr-2019 mrg

switch ia64 to GCC 7. scole@ commited a workaround for the one new problem.

this leaves ppc64 as the only GCC 6 port left.


1.1131 18-Apr-2019 mrg

turn on MKCOMPAT for riscv64.


1.1130 16-Apr-2019 mrg

enable EGL and glamor. partly from maya@.

for x86 and evbarm:
- install headers and libEGL
- install xorg-server glamoregl component
- link xorg drivers against gbm/egl

bonus fix:
- fix some wrongly marked compatx11file files


build tested on shark, sgimips, evbarm64-el, amd64 and i386.
run tested on radeon, intel and nvidia on amd64, including
'modesetting' driver on amd64. however, my systems disable
it due to llvmpipe so i'm not sure what is happening.


1.1129 15-Apr-2019 maya

Don't build compat libraries for riscv, for now.


1.1128 05-Apr-2019 maya

Switch everyone to mesa 18.


1.1127 05-Apr-2019 maya

Limit MKLLVMRT being enabled with MKX11 to x86.


1.1126 05-Apr-2019 maya

Frantically revert previous because of missing stuff


1.1125 05-Apr-2019 maya

switch everyone to mesa 18.


1.1124 04-Apr-2019 mrg

switch hppa to GCC 7.

note vax atf fails same as GCC 6. hppa mostly works but has an
atf issue also unrelated to the compiler version

note ia64 mostly builds, but the kernel fails earlier than GCC 6.


1.1123 03-Apr-2019 christos

vax "cough" works, with gcc-7


1.1122 03-Apr-2019 joerg

Use and enable MKLLVMRT for HAVE_MESA_VER=18.


1.1121 03-Apr-2019 joerg

Provide a default value of no for MKLLVMRT.


1.1120 03-Apr-2019 joerg

Revert MKLLVMCMDS changes.


1.1119 28-Mar-2019 christos

re-enable jemalloc.


1.1118 28-Mar-2019 christos

disable jemalloc again until we can figure out what to do with the bloat
for installer media.


1.1117 27-Mar-2019 christos

back to jemalloc for the masses


1.1116 27-Mar-2019 christos

undo previous, too much breaks.


1.1115 27-Mar-2019 christos

jemalloc for everyone!


1.1114 21-Mar-2019 martin

Switch sparc64 over to newer jemalloc.


1.1113 20-Mar-2019 mrg

split MKLLVM into MKLLVM and MKLLVMCMDS, like MKGCC and MKGCCCMDS:

- only build clang or clang-tblgen if MKLLVMCMDS != "no"
- move HAVE_MESA_VER earlier so we can detect mesa 18 and enable
MKLLVM on platforms that need it
- move the clang commands and headers into llvmcmds group
- only build the clang specific LLVM libraries if MKLLVMCMDS != "no"

much of this work came from maya@'s github commit
f90685c11d4460d3098fa35f48b58d1893e974e0, reworked for HAVE_MESA_VER
and llvmcmds vs MKCLANG.


build tested on several platforms and on amd64 and i386 with several
different build options (clang build, gcc build, gcc build with llvm
libs).


1.1112 11-Mar-2019 mrg

install transset.


1.1111 10-Mar-2019 mrg

export HAVE_MESA_VER for use in makefiles and set lists.


1.1110 10-Mar-2019 mrg

move mesa10 build into .old scheme:

- add ${X11SRCDIR.MesaLib.old} and introduce ${X11SRCDIR.Mesa} as an
alias for either the former or the non old. this allows many of
the makefiles to simply use ${X11SRCDIR.Mesa} (but does not really
enable much sharing of makefiles, but reduces their diffs.)

- use mesa-which.mk to define ${OLD_PREFIX} to either "" or ".old",
and to know if to build 'dri7' (.old only.) ${OLD_PREFIX} is used
by other code (eg, LIBDPLIBS) to pick the right subdir.


1.1109 09-Mar-2019 christos

Switch i386 and aarch64 to jemalloc (really I could switch everyone at this
point).


1.1108 08-Mar-2019 christos

Back to using jemalloc for x86_64; all problems have been resolved.


1.1107 04-Mar-2019 christos

Switch back amd64 to the old jemalloc. We have some pthread unit-tests
failing.


1.1106 04-Mar-2019 christos

switch amd64 to jemalloc-5.1.0


1.1105 04-Mar-2019 mrg

switch 32 bit arm, m68* and sh3 to GCC 7.

reverse the polarity now that few ports remain: hppa, vax, ia64 and ppc64


1.1104 09-Feb-2019 maya

Use GCC 7 on riscv, it is not supported on 6.


1.1103 09-Feb-2019 mrg

switch ppc64 back to gcc7, it was an accident.


1.1102 08-Feb-2019 mrg

switch aarch64, alpha, i386, mips, powerpc, sparc, sparc64,
and x86_64 to GCC 7.


1.1101 06-Feb-2019 mrg

move OBJECT_FMTS setting after MKCOMPAT default, so it works.

should fix mips64 builds.


1.1100 05-Feb-2019 mrg

re-do version 1.1098 properly:

- fix OBJECT_FMTS if mips64 and !MKCOMPAT


1.1099 04-Feb-2019 mrg

revert previous for now.


1.1098 04-Feb-2019 mrg

don't add elf64 to OBJECT_FMTS if !MKCOMPAT and mips64.


1.1097 30-Jan-2019 scole

don't disable MKRUMP by default for ia64 as it can at least build now


1.1096 29-Jan-2019 scole

remove "MKLINT.ia64=no" as default is no anyway, and should compile on 64 bit host now


Revision tags: pgoyette-compat-20190127
1.1095 19-Jan-2019 mrg

obsolete gcc 5 support.
add gcc 7 support. call it "nb1 20190119"


Revision tags: pgoyette-compat-20190118
1.1094 09-Jan-2019 mrg

add vboxvideo.


1.1093 03-Jan-2019 christos

Move x68k to the old xserver. It does not build with the new one (yet).


1.1092 02-Jan-2019 christos

un-86'ed the ELF2AOUT variable.


1.1091 31-Dec-2018 christos

- prefix elf conversion tools with their platform to avoid conflicts
- add arm-elf2aout


1.1090 31-Dec-2018 mrg

updates for xorg-server 1.20.


1.1089 30-Dec-2018 christos

binutils 2.31 for everyone!


1.1088 27-Dec-2018 christos

Back to 2.31 for x86! Hooray :-)


Revision tags: pgoyette-compat-1226
1.1087 25-Dec-2018 christos

back to binutils 227: constructors in ifconfig are broken.


1.1086 24-Dec-2018 christos

Switch x86 to binutils 2.31.1


1.1085 03-Dec-2018 christos

Head is binutils 2.31


Revision tags: pgoyette-compat-1126
1.1084 19-Nov-2018 aymeric

Prepend ${_TOOL_PREFIX} to xz, too.


1.1083 15-Nov-2018 martin

Explicitly document the incompatibility between USE_PIGZGZIP
and USE_XZ_SETS. Disable the latter if the former is enabled.


1.1082 11-Nov-2018 christos

disorder police


1.1081 11-Nov-2018 maya

Provide a fallback dtc if USE_TOOLS isn't in use.

From Daniel Loffgren in PR kern/53720.


1.1080 10-Nov-2018 maya

Revert part of 1.1079. MKSOFTFLOAT?=yes for mips64*.

That is most likely an accidental commit.

PR port-mips/53719


1.1079 10-Nov-2018 macallan

more Xorg on iyonix building goop


Revision tags: pgoyette-compat-1020
1.1078 06-Oct-2018 martin

Remove duplicate conditional assignment in previous - pointed out by wiz@


1.1077 06-Oct-2018 martin

Switch amd64, sparc64 and alpha to .tar.xz sets


Revision tags: pgoyette-compat-0930
1.1076 29-Sep-2018 martin

Add defaults and documentation for USE_XZ_SETS - a new variable
controlling whether an architecture will use .tgz or tar.xz
sets.


Revision tags: pgoyette-compat-0906
1.1075 05-Sep-2018 mrg

flip all ports to gcc.old GCC 6.4.


1.1074 12-Aug-2018 maya

Try the more likely gfortran instead of g77.
g77 has likely not shipped as a binary in a long time.

No change for netbsd src as it has no fortran code, no change for pkgsrc
because it passes ${FC} for fortran packages.


1.1073 11-Aug-2018 christos

use the tools version of grep


Revision tags: pgoyette-compat-0728
1.1072 25-Jul-2018 kamil

Introduce MKLIBCSANITIZER in the share/mk rules

Add flags that are required to build a program and a dynamically loaded
library.

Propagade LIBCSANITIZERFLAGS to CFLAGS and CXXFLAGS.

LDFLAGS is not changed on purpose, as a libcsanitizer is inside libc
and no external dependencies are needed.

Register NOLIBCSANITIZER, as certain distribution parts will need to be
skipped.


1.1071 18-Jul-2018 christos

Remove special-casing of aarch64 now that gcc works (switch aarch64 to gcc)


1.1070 17-Jul-2018 christos

Let's build gdb for aarch64.


1.1069 16-Jul-2018 christos

Everyone has gcc-6 now.


1.1068 14-Jul-2018 maya

Update comment to match what the below text does

(This logic needs to go into gcc config files, but removing it
requires mknative)


1.1067 12-Jul-2018 joerg

Update MKSTATICPIE entry to actually do something.


Revision tags: phil-wifi-base pgoyette-compat-0625
1.1066 22-Jun-2018 christos

branches: 1.1066.2;
- Fix groff reproducibility:
- specify mdoc and font paths
- clear encoding
- specify pagesize on the command line
XXX: pullup-8


1.1065 16-Jun-2018 mrg

check MK{FOO} defaults for $MACHINE as well as $MACHINE_ARCH.
should restore firmware files for some platforms that were
missing them.


1.1064 02-Jun-2018 christos

Add NORELRO


1.1063 02-Jun-2018 christos

Add build glue to build all the code with sanitizers: MKSANITIZE.


1.1062 31-May-2018 mrg

introduce MKFIRMWARE that controls where (most) of the contents
of /libdata/firmware and /usr/libdata/firmware are not installed
if set to "no". from the bsd.README:

MKFIRMWARE If "no", install the /libdata/firmware directory,
which is necessary for several drivers: athn(4), bwfm(4),
ipw(4), iwi(4), iwm(4), iwn(4), otus(4), rtwn(4), urtwn(4),
wpi(4), ral(4), rum(4), run(4), zyd(4), bcm43xx(4), and
the Tegra 124 SoC.
Default: yes on amd64, cobalt, evbarm evbmips, evbppc, hpcarm,
hppa, i386, mac68k, macppc, sandpoint, and sparc64, no elsewhere.

convert MKRADEONFIRMWARE and MKTEGRAFIRMWARE into FOO.arch lists,
and move their defaults above the general defaults setting.

saves about 12MB in a normal installation for other platforms.


Revision tags: pgoyette-compat-0521
1.1061 09-May-2018 joerg

Don't assume that EXTERNAL_TOOLCHAIN is gcc. HAVE_GCC can and should be
defined appropiately if it is an external GCC.


1.1060 09-May-2018 joerg

Always provide --sysroot arguments, even for EXTERNAL_TOOLCHAIN.


1.1059 04-May-2018 nisimura

remove duplicated cobalt in MACHINES.mips= line.


Revision tags: pgoyette-compat-0502
1.1058 24-Apr-2018 christos

PR/53209: David Shao: lang/llvm BFD (NetBSD Binutils nb1) 2.30 assertion fail elflink.c:2824
switch x86 back to old binutils until it is fixed.
(also non pie binaries have broken relocs)


Revision tags: pgoyette-compat-0422
1.1057 15-Apr-2018 christos

switch x86 to binutils-2.30


Revision tags: pgoyette-compat-0415
1.1056 14-Apr-2018 christos

switch everyone to binutils.old


1.1055 07-Apr-2018 mrg

switch vax to GCC 6. thanks to Krister and Maya for the fixes.
it now appears as disfunctional as GCC 5 for vax. ok ragge@.

this was the final GCC 5 platform in -current. hooray!


Revision tags: pgoyette-compat-0407
1.1054 05-Apr-2018 mrg

switch m68000 and m68k to GCC 6. ok mlelstv.


1.1053 01-Apr-2018 ryo

Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)


1.1052 31-Mar-2018 kamil

Drop the USE_LIBTRE build option

libtre cannot be used any more as a replacement for regex(3).
Tt does not build and the library development is stalled in upstream.

Proposed on mailing list.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-0330 pgoyette-compat-0322
1.1051 15-Mar-2018 christos

Don't barf if the ctf tools are not installed.
[perhaps warn?]


Revision tags: pgoyette-compat-0315
1.1050 14-Mar-2018 mrg

complete the switch to xorgproto over *proto split packages
- remove old package makefiles
- update makekeys for Xfuncproto.h being a real file now
- clean up deleted package X11SRCDIR.pkg settings

this should be functionally equivalent.


1.1049 14-Mar-2018 mrg

add xorgproto srcdir.


1.1048 11-Mar-2018 mrg

stop building libXfontcache as it is obsolete for a decade.


1.1047 09-Mar-2018 christos

everyone switched to openssl-1.1


Revision tags: pgoyette-compat-base
1.1046 05-Mar-2018 christos

branches: 1.1046.2;
switch everyone but vax to OpenSSL1.1.


1.1045 05-Mar-2018 mrg

switch sh3 to GCC 6. tested on landisk in emul and hardware.

actually do this by reversing the check to look for m68* and vax
to choose GCC 5, and otherwise default to GCC 6.


1.1044 05-Mar-2018 mrg

switch arm ports to GCC 6.

this is the last GCC that will support these ports:
- epoc32
- netwinder
- shark
- acorn32
- cats
- most hpcarm systems (only NETBOOKPRO and WZERO3 remain)


1.1043 05-Mar-2018 mrg

swtich ia64 to GCC 6.


1.1042 05-Mar-2018 christos

switch ppc to OpenSSL-1.1, use MACHINE_CPU consistently.


1.1041 04-Mar-2018 mrg

switch powerpc, mips and arm ports to GCC 6.

all kernels that build with gcc 5 still build.
several platforms tested in emulators and real hardware.


1.1040 04-Mar-2018 christos

switch sh3 to openssl-1.1


1.1039 03-Mar-2018 christos

switch arm to openssl-1.1


1.1038 26-Feb-2018 martin

Switch sparc over to openssl 1.1 again - thanks to christos for fixing it!


1.1037 23-Feb-2018 skrll

Switch hppa to gcc 6.4


1.1036 20-Feb-2018 martin

Switch sparc back to old openssl - needs more work and testing.


1.1035 19-Feb-2018 christos

switch sparc to openssl-1.1


1.1034 17-Feb-2018 mrg

switch i386, sparc and sparc64 to GCC 6.


1.1033 11-Feb-2018 christos

switch amd64 to gcc-6. Thanks mrg for all the work!


1.1032 09-Feb-2018 christos

missing backslash


1.1031 04-Feb-2018 christos

switch everyone to openssl.old


1.1030 02-Feb-2018 mrg

convert HAVE_GCC handling to modern GCC release numbering:
- HAVE_GCC=5 is now the default (vs. HAVE_GCC=53 we've been using for
GCC 5.4 and GCC 5.5.)
- remove some more GCC 4.8 code. we don't support GCC 4 here.
- adjust set lists to gcc=5 from gcc=53.

add some basic HAVE_GCC=6 handling (totally unused so far.)


1.1029 27-Jan-2018 christos

explain how to allow coverity to use sysroot


1.1028 24-Jan-2018 skrll

Remove port-acorn26

OK core@


1.1027 22-Jan-2018 christos

Disgusting and evil hack to elide coverity options that break production
of coverity output when present [userland portion]

- --sysroot
- -fstack-protector
- -std=gnu99
- --nostdinc
- -fPIE

The critical one here being --sysroot because this means that we need to
use the actual system headers while building (or chroot/sandbox appropriately)


1.1026 07-Jan-2018 jmcneill

Import NVIDIA Tegra XUSB firmware for Tegra124 and Tegra210. Installation
of this firmware is controlled by the MKTEGRAFIRMWARE option, which
defaults to yes on evbarm and evbarm64 and no everywhere else.


1.1025 01-Dec-2017 mrg

allow EXTERNAL_GCC_SUBDIR to be overriden.


1.1024 29-Nov-2017 christos

back to gdb 801


1.1023 29-Nov-2017 christos

move gdb back to 7.12 for now


1.1022 29-Nov-2017 christos

switch everyone to gdb-8.0.1


1.1021 29-Nov-2017 christos

switch amd64 to gdb-8.0.1


1.1020 28-Nov-2017 christos

switch everyone to gdb.old


1.1019 08-Oct-2017 christos

need a few more commits to enable this.


1.1018 08-Oct-2017 christos

Add variables for static PIE


1.1017 06-Oct-2017 tsutsui

Switch hp300 to HAVE_XORG_SERVER_VER=118.

Tested on HP 9000/425t with HP98550 catseye (topcat).


1.1016 22-Aug-2017 joerg

Strip .debug_macinfo when converting to a.out, clang may generate it.


1.1015 16-Aug-2017 tsutsui

Switch dreamcast to HAVE_XORG_SERVER_VER=118. It just works.


1.1014 14-Aug-2017 mrg

swtich luna68k to xorg-server 1.18. tested by tsutsui@.


1.1013 04-Aug-2017 mrg

switch bebox, cats, ibmnsw and prep to xorg-server 1.18.


1.1012 23-Jul-2017 mrg

GCC 5.3 now lives in gcc.old.
add Xfont2 to X11 list.


1.1011 18-Jul-2017 joerg

Build PIC libs on MIPS and PPC64. While the normal calling convention is
position-independent, real PIC defaults to Global Dynamic as TLS model,
while non-PIC and PIE code can use more restrictive models like Initial
Exec. This is most visible with the thread_local destructor code now
using TLS in libc as it would be clobbered by any other shared library
with TLS due to static offset assignment by ld.


Revision tags: perseant-stdc-iso10646-base
1.1010 05-Jun-2017 christos

add MKDTC


Revision tags: netbsd-8-base
1.1009 21-May-2017 riastradh

branches: 1.1009.2;
Remove MKCRYPTO option.

Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export. The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated. I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet... That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.


1.1008 21-May-2017 riastradh

Remove MKCRYPTO_RC5. Unconditionally include RC5 in libcrypto.so.

This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate. The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at
<https://www.uspto.gov/patent/laws-and-regulations/patent-term-calculator#heading-5>
(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number filing date
5,724,428 1995-11-01
5,835,600 1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html


Revision tags: prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
1.1007 22-Mar-2017 chs

provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().


Revision tags: pgoyette-localcount-20170320
1.1006 13-Feb-2017 snj

prune duplicate xkeyboard-config and xkbcomp


1.1005 10-Feb-2017 christos

add MKDIRPERM


1.1004 10-Feb-2017 christos

Add MKDIRMODE


1.1003 18-Jan-2017 matt

Resort _MKVARS.no


Revision tags: bouyer-socketcan-base
1.1002 10-Jan-2017 skrll

branches: 1.1002.2;
binutils 2.26 is no more.


1.1001 08-Jan-2017 christos

- centralize setting of MK* vars in bsd.own.mk
- make sure that the default setting of all vars is done in _MKVARS.{yes,no}
if possible.


1.1000 07-Jan-2017 christos

add nsd


Revision tags: pgoyette-localcount-20170107
1.999 11-Dec-2016 christos

complete the transition to binutils-2.27


1.998 11-Dec-2016 mrg

aarch64 builds work with binutils 2.27. switch it. hppa builds,
just needs a run time test if someone wants. then we're done!


1.997 11-Dec-2016 mrg

switch mips (32 bit) and arm to binutils 2.27. hppa and aarch64 left.


1.996 10-Dec-2016 mrg

revert binutils check polarity. now we know that only these are
not updated to binutils 2.27: aarch64*, *arm*, hppa, mipse[lb]


1.995 10-Dec-2016 mrg

switch ppc* to binutils 2.27.


1.994 08-Dec-2016 christos

move sh3 to new binutils


1.993 03-Dec-2016 christos

switch sparc/sparc64 to binutils 227


1.992 03-Dec-2016 christos

move alpha to new binutils


1.991 03-Dec-2016 christos

switch mips64 to new binutils and gdb.


1.990 02-Dec-2016 christos

switch m68k to new binutils and gdb


1.989 27-Nov-2016 christos

switch vax to new binutils and gdb.


1.988 21-Nov-2016 snj

nuke xf86-video-nvxbox, as xbox support went away in 2011.


1.987 14-Nov-2016 joerg

Drop remarks about AArch64 ABI being PIC following a discussion with Tim
Northover. The default code model is small and globals are expected to
be within the lower 4GB if not explicitly using -fPIC.


1.986 13-Nov-2016 joerg

Define the MKPICLIB default for aarch64 and powerpc64 only for native
builds, not inside src/compat.


Revision tags: pgoyette-localcount-20161104
1.985 01-Nov-2016 skrll

enable xorg-server 1.18 for evbarm


1.984 01-Nov-2016 christos

add NODEBUGLIB


1.983 27-Oct-2016 christos

switch x86 to the new binutils


1.982 26-Oct-2016 christos

switch everyone to binutils.old


1.981 22-Oct-2016 skrll

Switch hppa to gdb 7.12... passes basic tests


1.980 21-Oct-2016 mrg

flip the polarity of the xorg-server version: list the unconverted ports.
i distilled this list from the old list and the MKXORG_SERVER list, but
there may be some build fallout.


1.979 20-Oct-2016 mrg

sh3 (le) gdb 7.12 works. switch it.
sun2 gdb probably doesn't work any less bad. switch it.


1.978 19-Oct-2016 mrg

turn off MKCOMPAT for aarch64eb builds for now.


1.977 19-Oct-2016 mrg

set {_LIBC_COMPILER_RT,MKGDB,_NEEDS_LIBCXX}.aarch64eb=yes.


1.976 17-Oct-2016 mrg

switch evbcf and powerpc64 to GDB 7.12.

remaining ports: hppa, sun2, vax, m68k, sh3, mips64*


1.975 17-Oct-2016 mrg

reverse the HAVE_GDB test - list the unconverted ports.


1.974 17-Oct-2016 mrg

switch i386 and 32 bit mips to GDB 7.12.


1.973 16-Oct-2016 mrg

switch alpha to GDB 7.12. it works just as featureful as 7.7/7.10.
'step' and 'stepi' both fail, but 'next' and break points are ok,
so a sufficiently determined user can get somewhere..

someone should try to fix 'step'. it appears to loop forever inside
ld.elf_so for me in an atomic cas function.


1.972 16-Oct-2016 mrg

switch sparc, sparc64, arm and powerpc to gdb 7.12.


1.971 13-Oct-2016 joerg

Build the new X server on AArch64, it is slightly less offensive.


1.970 12-Oct-2016 christos

amd64 switches to gdb 7.12


1.969 12-Oct-2016 christos

switch to gdb.old


1.968 11-Oct-2016 macallan

switch evbmips to new xorg


1.967 07-Oct-2016 christos

bye {gcc,gdb,binutils}.old


1.966 05-Oct-2016 christos

switch mips64 to pie/gcc53/binutils226/gdb710
switch ppc64 to binutils226/gdb710 (gcc/pie pending to toc issue)


1.965 04-Oct-2016 mrg

convert the old binutils and gdb lists to only contain the
unconverted ports:
ppc64/mips64 for both


1.964 29-Sep-2016 mrg

enable xorg-server 1.18 for sparc64. minor consistency


1.963 27-Sep-2016 mrg

set X11SRCDIR.xf86-video-modesetting correctly for xorg-server 1.18.4.
should fix build errors for x86.


1.962 23-Sep-2016 macallan

switch sparc to new Xorg


1.961 17-Sep-2016 christos

switch arm to new binutils.


1.960 17-Sep-2016 kre

YAF


1.959 17-Sep-2016 kre

Fix the fix...


1.958 17-Sep-2016 christos

add \


1.957 17-Sep-2016 christos

switch m68k to new gcc/gdb/binutils and pie. Tested with sun3 and tmesh.
Too bad there is not enough memory for ASLR :-)


1.956 15-Sep-2016 mrg

switch amd64, i386, shark, ofppc and macppc to xorg-server 1.18.

add a note to UPDATING about needing a clean objdir and destdir.


Revision tags: localcount-20160914
1.955 11-Sep-2016 tsutsui

Switch NetBSD/x68k to Xorg server 1.18 by default.

Build confirmed by build.sh -x release.


1.954 05-Sep-2016 mrg

oops, put mips32 back to gcc 5.3.


1.953 04-Sep-2016 mrg

reverse the GCC 5 test and only list the platforms not using it:
${MACHINE_CPU} == "mips" || \
${MACHINE_CPU} == "m68k" || \
${MACHINE_ARCH} == "coldfire" || \
${MACHINE_ARCH} == "m68000" || \
${MACHINE} == "or1k" || \
${MACHINE} == "riscv"

and considering riscv and or1k both need to either wait for GCC 6
or have someone who cares port their 5.x patches to our tree, that
really only means we have mips and m68k left.


1.952 03-Sep-2016 jakllsch

Switch shark to Xorg server 1.18.

The igs driver no longer builds against 1.10.


1.951 03-Sep-2016 christos

Switch mips32 to new binutils/gcc/gdb/pie. Tested with gxemul+pmax


1.950 03-Sep-2016 christos

gcc-5.3 for sh3


1.949 31-Aug-2016 christos

switch all arm to new binutils


1.948 28-Aug-2016 christos

Turn on PIE for all arm and sh3


1.947 26-Aug-2016 nonaka

Add TOOL_GPT


1.946 26-Aug-2016 christos

block sun2 from MKPIE!


1.945 20-Aug-2016 christos

unbound additions


1.944 20-Aug-2016 mrg

HAVE_XORG_SERVER_VER is always set, if not earlier, immediately above.


1.943 19-Aug-2016 mrg

- introduce HAVE_XORG_GLAMOR which is set to yes on xorg-server 1.18
and x86 ports only so far.
- build glamor extension.
- fix debug set lists for xorg-server 1.18
- install xf86-video-amdgpu driver on xorg-server 1.8 and x86
- clean up radeon-kms Makefile and enable glamor xorg-server 1.8
- clean up various obsolete makefile parts


1.942 18-Aug-2016 mrg

x11: add amdgpu driver, libepoxy and remove radeonhd driver


1.941 16-Aug-2016 mrg

add a HAVE_XORG_SERVER_VER for use in sets. clean up the x11
defines a little for modern xorg, particularly the version.


1.940 15-Aug-2016 mrg

add libxshmfence.


Revision tags: pgoyette-localcount-20160806
1.939 05-Aug-2016 scole

PR port-ia64/51261

For ia64, don't build elf32, disable MKDYNAMICROOT and MKRUMP.
ld.elf_so and rump are not implemented yet


Revision tags: pgoyette-localcount-20160726 pgoyette-localcount-base
1.938 07-Jul-2016 martin

branches: 1.938.2;
Switch sparc64 to gcc 5.4, binutils 2.26 and gdb 7.10.


1.937 01-Jul-2016 martin

Switch ia64 and alpha to latest gcc/binutils(alpha was there already)/gdb.


1.936 14-Jun-2016 christos

Add and document MKRELRO and set x86 to partial by default.


1.935 10-Jun-2016 mrg

switch sparc to GCC 5.4 and powerpc to GDB 7.10


1.934 10-Jun-2016 mrg

re-enable MKCOMPAT for arm eabi platforms, as it now works again.


1.933 10-Jun-2016 mrg

switch all arm (vs just evbarm) to GDB 7.10.


1.932 10-Jun-2016 mrg

switch to using xorg-server.old for everyone.


1.931 10-Jun-2016 mrg

define XORG_SERVER_SUBDIR to either xorg-server or xorg-server.old.


1.930 10-Jun-2016 mrg

switch powerpc64 to GCC 5.


1.929 09-Jun-2016 mrg

allow earm* platforms to *try* to enable MKCOMPAT=yes, since it only
is a build failure, not an entirely unavailable feature.


1.928 08-Jun-2016 mrg

switch all arm platforms to GCC 5, not just evbarm.


1.927 21-May-2016 christos

switch evbarm to gdb-7.10.1


1.926 21-May-2016 christos

Switch evbarm to gcc-5.3 and turn on PIE.


1.925 20-May-2016 christos

i386 is PIE now since I am turning PaX ASLR/MPROTECT on.


1.924 19-May-2016 christos

Turn on PIE for sparc64 so we can use ASLR effectively.


1.923 11-May-2016 martin

Switch alpha and sparc64 back to gcc 4.8 and old binutils for now - too much
fallout from gcc 5.3 and no quick solution, it needs more work.
Binutils 2.26 does not play well with old gcc and causes random fallout
when building pkgs (e.g. /usr/pkg/lib/libgthread-2.0.so.0:
Trying to call undefined weak symbol `__deregister_frame_info' when
build gstremeer0.10)


1.922 28-Apr-2016 martin

Switch sparc64 to gcc 5.3. OK: mrg


1.921 26-Apr-2016 mrg

switch powerpc to GCC 5.3.


1.920 11-Apr-2016 martin

Add missing .if so MKPIE is only defaulting to yes on amd64 for now


1.919 10-Apr-2016 christos

Enable PIE binaries on amd64 by default.


1.918 04-Apr-2016 skrll

Switch alpha to binutils 2.26


1.917 03-Apr-2016 mrg

switch amd64 and i386 to GCC 5.3 by default.


1.916 02-Apr-2016 mrg

add some comments and prefer MACHINE over MACHINE_ARCH when
they're always the same. no functional change.


1.915 30-Mar-2016 mrg

turn off MKCOMPAT for arm and GCC 5 (for now).


1.914 29-Mar-2016 mrg

switch alpha to GCC 5.3. works just as well on my UP1000.


1.913 27-Mar-2016 skrll

Switch hppa to gcc 5.3


1.912 26-Mar-2016 mrg

switch sparc to GDB 7.10. works for me.


1.911 26-Mar-2016 martin

Switch playstation2 over to gcc 5.3, binutils 2.26 and gdb 7.10


1.910 24-Mar-2016 martin

Switch mips64 over to new gdb - old one doesn't work there either, better
to debug in the newer version.


1.909 24-Mar-2016 christos

switch vax to new binutils and gdb.


1.908 24-Mar-2016 christos

switch vax to gcc-5.3


1.907 13-Mar-2016 christos

Add NO{SSP,FORTIFY}


1.906 13-Mar-2016 mrg

remove some more GCC 4.5 code. make GCC 5.3 be HAVE_GCC=53, so that,
for example, HAVE_GCC >= 48 works properly.


1.905 01-Mar-2016 uwe

Switch sh3 to the new binutils and gdb. Lightly tested on landisk.
sh3eb compile-tested only.


1.904 28-Feb-2016 martin

Switch sparc64 over to new binutils


1.903 27-Feb-2016 joerg

Sparc/Sparc64 also support libc++ and compiler-rt in libc with Clang.


1.902 23-Feb-2016 macallan

switch sparc to new binutils


1.901 19-Feb-2016 macallan

switch powerpc ports to new binutils


1.900 09-Feb-2016 plunky

use pcpp front end rather than libexec/cpp directly, since commandline
options may not be handled by the latter


1.899 08-Feb-2016 skrll

Remove the .SUNW_ctf sections when converting form ELF -> a.out by
updating OBJCOPY_ELF2AOUT_FLAGS


1.898 06-Feb-2016 riz

Back out unintended changes committed with last.


1.897 06-Feb-2016 riz

Don't test dtrace-related variables until after they've been set.


1.896 03-Feb-2016 christos

switch i386 to gdb-7.10.1


1.895 03-Feb-2016 christos

switch amd64 to gdb-7.10.1


1.894 02-Feb-2016 christos

everyone, back to gdb.old


1.893 02-Feb-2016 christos

Switch i386 to new binutils.


1.892 01-Feb-2016 skrll

Switch hppa to binutils 2.26


1.891 31-Jan-2016 christos

flip amd64 and evbarm to the new binutils


1.890 31-Jan-2016 christos

Introduce NOPIE and NOCTF so that standalone programs build properly.


1.889 29-Jan-2016 christos

new binutils will be 2.26


1.888 26-Jan-2016 christos

back to binutils.old now that it works.


1.887 26-Jan-2016 christos

back to use binutils since the path is hard-coded everywhere!


1.886 26-Jan-2016 christos

external binutils and gdb variables.


1.885 24-Jan-2016 christos

Add tool cvslatest


1.884 22-Jan-2016 riz

Build DTrace userland by default on i386, amd64 and earm*


1.883 19-Dec-2015 wiz

Fix pasto.


1.882 18-Dec-2015 christos

Sort texinfo dir file for MKREPRO


1.881 01-Dec-2015 joerg

Don't set TOOL_GREP to something which doesn't exist, just use the host
tool for now.


1.880 15-Nov-2015 pooka

describe => rumpdescribe


1.879 06-Nov-2015 jmcneill

Build xf86-video-modesetting on evbarm


1.878 04-Nov-2015 phx

Build a wsfb Xorg server for amiga.


1.877 19-Oct-2015 pooka

Allow "make describe" to descend into SUBDIRs.


1.876 13-Oct-2015 rjs

Add Xorg server to ibmnws build.


1.875 13-Oct-2015 mrg

add xf86-video-nouveau


1.874 30-Sep-2015 rjs

Build Xorg server and wsfb driver for mac68k.


1.873 25-Sep-2015 mrg

move GCC 4.8 users to using gcc.old. should be no functional change.


1.872 17-Aug-2015 christos

switch everyone to gdb 7.9.1


1.871 17-Aug-2015 christos

switch powerpc to gdb 7.9.1


1.870 17-Aug-2015 christos

switch vax to gdb-7.9.1


1.869 17-Aug-2015 christos

add sun2


1.868 17-Aug-2015 christos

switch sparc64 to gdb-7.9.1


1.867 17-Aug-2015 christos

switch alpha to gdb-7.9.1


1.866 17-Aug-2015 christos

switch m68k to gdb-7.9.1


1.865 17-Aug-2015 christos

add sparc


1.864 17-Aug-2015 christos

switch i386 to gdb-7.9.1


1.863 16-Aug-2015 christos

switch amd64 to gdb 7.9.1


1.862 23-Jul-2015 mrg

remove the xfree86 reachover makefiles and the vast majority of
the support in the rest of the source tree.

X11 sets could use some cleaning up perhaps (just deletion, as
we've never really marked the old X11R6 as obsolete for native
xorg using platforms so far either.)


1.861 23-Jul-2015 mrg

add rstart and showfont.


1.860 23-Jul-2015 mrg

add libXpresent.


1.859 27-Jun-2015 matt

Add MKCOMPATX11 knob for making X11 compat libraries.


1.858 24-Jun-2015 matt

Support building the xorg X11 libraries under MKCOMPAT.
Add XORG_MACHINE_ARCH to compat's bsd.*.mk
Turn xorg makekeys and makestrs into real host tools which are installed into
${TOOLSDIR}


1.857 23-Jun-2015 matt

Default MKPICLIB on powerpc64 to yes


1.856 22-Jun-2015 matt

Default MKCOMPATMODULES to yes for mips64e{b,l}


1.855 19-Jun-2015 matt

Add MKCOMPATTESTS knob to enable building and installing the NetBSD test
suite as part of doing MKCOMPAT


1.854 18-Jun-2015 pooka

add READELF and STRINGS


1.853 04-Jun-2015 martin

Cosmetics: simplify MKCOMPAT default settings


1.852 29-May-2015 martin

Enable MKCOMPAT for earm*, now that it works. Ok: matt@


1.851 28-May-2015 rjs

Build both xf86-video-radeon drivers for amd64 and i386, just build the
old one for other ports.


1.850 28-May-2015 matt

Compile ARM apcs with -marm (no thumb).


1.849 21-May-2015 rjs

Add xf86-video-intel-old to the build.


1.848 12-May-2015 martin

No kernel modules for acorn26


1.847 26-Apr-2015 mrg

two changes to radeon drm firmware:
- only install it by default on x86, set new MKRADEONFIRMWARE variable
- install in /libdata, so that separate /usr systems work

(this still doesn't solve PR#49811, which possibly could be handled by
having them being a kernel module loaded by /boot.)


1.846 22-Apr-2015 pooka

Build ZFS by default only for amd64, not i386.

If we build i386 for 486 (i.e. no 64bit atomic ops) and as a substitute
for the modern hardware that the code was designed to run on use solid
workarounds like external/cddl/osnet/lib/libzpool/atomic.c, there's not
much point in anything.


1.845 08-Apr-2015 mrg

remove support to look for GCC 4.5 in gcc.old.


1.844 01-Mar-2015 mrg

add build framework to choose between xf86-video-ati 6.x (UMS/KMS)
and 7.x (KMS only), and switch x86 to the latest (KMS only) version.

(if someone can make x86 install both radeon_drv.so.[67] and leave
the default symlink to .7, that would be nice. renaming it so that
it's easier to choose via xorg.conf is a little more tricky..)


1.843 26-Feb-2015 snj

prune a number of now-nonexistent xorg components


1.842 23-Jan-2015 chs

switch m68k to use gcc48.


1.841 05-Jan-2015 mrg

sets.subr:
support machine=<xxx>, machine_arch=<xxx>, machine_cpu=<xxx> tags.

dri7: build Mesa 7 r300_dri.so for x86 platforms.


1.840 05-Jan-2015 mrg

fix MKGCCCMDS=no, and turn it on by default for sun2.


1.839 18-Dec-2014 mrg

switch PPC to GCC 4.8.


1.838 16-Dec-2014 mrg

add X11SRCDIR entries for the new separated mesa components.


1.837 25-Nov-2014 skrll

Another section to delete when converting elf -> a.out


1.836 05-Oct-2014 apb

Use HAVE_LLVM, not MKLLVM, in tests related to the active compiler.

Fixes problems in a build with MKLLVM=yes HAVE_LLVM=no,
where this error interacted with settings in
src/external/gpl3/gcc/lib/libgcc/Makefile.inc to cause
some object files to be omitted from the libgcc_s library.


1.835 19-Sep-2014 matt

Add RISCV-V support.


1.834 03-Sep-2014 matt

Change to support OR1K


1.833 23-Aug-2014 matt

Change powerpc64 to use GCC 4.8


1.832 13-Aug-2014 joerg

Use compiler-rt and libc++ with LLVM on PowerPC64.


1.831 13-Aug-2014 justin

Respect EXTERNAL_TOOLCHAIN on aarch64


1.830 11-Aug-2014 matt

Change the way we default MK vars to yes or no allowing
MK<var>.${MACHINE_ARCH} to override.
e.g MKGDB.aarch64=no will default MKGDB to no on aarch64


Revision tags: netbsd-7-base tls-maxphys-base
1.829 11-Aug-2014 jnemeth

branches: 1.829.2;
Add the infrastructure for MODULAR support for Xen kernels. At
the moment, this can only load very simple modules due to missing
symbols. It is being add at this time to make pullups to the
netbsd-7 branch easier. It is not enabled by default in any kernels.


1.828 10-Aug-2014 joerg

LLVM builds on PowerPC want no libgcc, but enabled libc++.


1.827 10-Aug-2014 matt

Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only. While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.


Revision tags: tls-earlyentropy-base
1.826 05-Aug-2014 apb

Typo in comment


1.825 05-Aug-2014 apb

Provide and document GZIP_N_FLAG and TOOL_GZIP_N.
These may be used to pass "-nT" instead of just "-n"
when the gzip program is actually pigz.


1.824 24-Jul-2014 plunky

add p++ tool, for PCC


1.823 15-Jul-2014 christos

stray slash


1.822 15-Jul-2014 christos

fix typo


1.821 15-Jul-2014 christos

Add vfontedpr


1.820 06-Jul-2014 dholland

Add MKGROFFHTMLDOC and make it default to no. It seems that sometimes
when generating html groff runs netpbm behind your back. Needless to
say we don't have netpbm in base, so this fails on a clean install; so
for now disable generating html for /usr/share/doc by default.
Workaround for PR 48970.

It seems that all available document preparation toolchains are made
of fail.


1.819 05-Jul-2014 dholland

Remove HTMLDOCDIR; it is no longer used (and doesn't fit the docs
scheme) and it was never honored anyway except in a couple places.


1.818 05-Jul-2014 dholland

Rework /usr/share/doc.

Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
- explicit use of soelim
- refer
- tbl
- pic
- eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.


1.817 29-Jun-2014 mrg

set TOOLCHAIN_MISSING for playstation2.
default EXTERNAL_TOOLCHAIN to choosing to be GCC.

ps2 pkgsrc almost works now..


1.816 23-Jun-2014 christos

unbreak powerpc64; it is not ready for gcc-4.8 ATM.


1.815 06-Jun-2014 skrll

Switch sh3 to gcc 4.8. My landisk just survived two atf runs through
/usr/tests with

Summary for 587 test programs:
3691 passed test cases.
50 failed test cases.
27 expected failed test cases.
137 skipped test cases.


1.814 06-Jun-2014 martin

Switch ia64 to gcc 4.8


1.813 05-Jun-2014 matt

Switch VAX to default to GCC 4.8


1.812 30-May-2014 joerg

If clang is requested for i386, amd64 or eARM, also build libc++.


1.811 30-May-2014 joerg

Always use our exception handling code for eARM.


1.810 30-May-2014 joerg

Remove platform support list for libc unwinder, just keep comment about
ia64 state.


1.809 23-May-2014 matt

Since the majority of architectures uses GCC 4.8, make it the default.
Only ia64, m68k, 32-bit powerpc, and sh3 still use GCC 4.5


1.808 23-May-2014 skrll

Under "switch it" instructions from matt@ make mips use gcc 4.8


1.807 20-May-2014 martin

Switch powerpc64 architectures over to gcc 4.8.
OK: mrg@


1.806 17-May-2014 joerg

Use compiler-rt in libc for Clang on NetBSD/ARM as well.


1.805 17-May-2014 joerg

Structure HAVE_LIBGCC condition similar to HAVE_LIBGCC_EH.


1.804 16-May-2014 joerg

Mark unwinding as supported for eARM.


Revision tags: yamt-pagecache-base9
1.803 08-May-2014 phx

Use TOOL_NCDCS to turn an ibmnws kernel automatically into a valid NCD
firmware image for netbooting. This is still a valid ELF kernel, but with
a patched CRC checksum and image size included.


1.802 26-Apr-2014 wiz

Fix typo in previous.


1.801 26-Apr-2014 joerg

Add initial unwind support for MIPS and MIPS64.


1.800 22-Apr-2014 joerg

Retire USE_COMPILERCRTSTUFF=yes.


1.799 19-Apr-2014 joerg

Basic unwind support for HPPA.


1.798 15-Apr-2014 joerg

Add basic Alpha support to libunwind.


1.797 15-Apr-2014 joerg

Add initial unwind support for SPARC/SPARC64.


1.796 05-Apr-2014 christos

branches: 1.796.2;
convert i386 to gcc-4.8. boot blocks tested by booting netbsd/i386 multiuser on:
qemu
dell precision t5400
sony vaio vgn250p


1.795 04-Apr-2014 christos

Add NOCTF


1.794 03-Apr-2014 riastradh

Elide broken exists tests for TOOL_CTFCONVERT and TOOL_CTFMERGE.

Either you set MKCTF=yes and they should exist, or you set MKCTF=no
and it doesn't matter. If MKCTF=yes and they don't exist, something
is broken, and this should fail noisily, not silently.


1.793 02-Apr-2014 joerg

Support SH3 in our unwinder.


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
1.792 25-Mar-2014 ozaki-r

Add MKCTF

This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.


1.791 24-Mar-2014 joerg

Add m68k support to our unwinder.


1.790 18-Mar-2014 joerg

libunwind supports vax now.


Revision tags: riastradh-drm2-base3
1.789 17-Mar-2014 mrg

add libpthread-stubs.


1.788 16-Mar-2014 mrg

add dri2proto and presentproto.


1.787 16-Mar-2014 joerg

libunwind supports PowerPC.


1.786 12-Mar-2014 joerg

Add quotes.


1.785 12-Mar-2014 joerg

More readable condition.


1.784 11-Mar-2014 christos

switch amd64 to gcc-4.8


1.783 10-Mar-2014 pooka

Move the "is arch capable of loading native kernel modules into
rump kernel" clauses from bsd.own.mk to Makefile.rump. Also,
add a rump_nativeabi_p() call to determine if rump kernel is
compiled with native ABI support.


1.782 09-Mar-2014 matt

Fix inverted test MKCOMPATMODULES


1.781 07-Mar-2014 skrll

Switch arm to gcc 4.8

OK matt@


1.780 07-Mar-2014 martin

Switch alpha over to gcc 4.8


1.779 07-Mar-2014 matt

Make MKCOMPAT default to yes for powerpc64.
Make MKCOMPATMODULES defaultt to no for evbppc && powerpc64.


1.778 06-Mar-2014 mrg

switch sparc* to GCC 4.8.


1.777 06-Mar-2014 skrll

Switch hppa to gcc 4.8


1.776 04-Mar-2014 joerg

When using Clang, disable integrated assembler for genassym. It creates
syntactically invalid assembler, which is normally not a problem as it
is also using -S.


1.775 02-Mar-2014 matt

Add OBJECT_FMTS which is a list of object formats supported by the MACHINE_ARCH


1.774 01-Mar-2014 tsutsui

Switch x68k to X11FLAVOUR=Xorg, including a working monolithic X68k server.

Confirmed that "build.sh -m x68k -x release" gets no error.


1.773 28-Feb-2014 martin

Make powerpc64 use Matt's new csu stuff


1.772 27-Feb-2014 mrg

remove the GCC 4 EXTERNAL_GCC_SUBDIR, and switch GCC 4.8 to use gcc.old.


1.771 27-Feb-2014 martin

For now, provide a path to the gcc 4.1 distribution as well


1.770 26-Feb-2014 mrg

put the new EXTERNAL_GCC_SUBDIR under MKGCC.


1.769 26-Feb-2014 christos

powerpc64 needs USE_COMPILERCRTSTUFF=yes


1.768 26-Feb-2014 mrg

define EXTERNAL_GCC_SUBDIR based upon HAVE_GCC, for GCC >= 4.5,
and use it in the one place (bsd.lib.mk) it's used in share/mk.


1.767 24-Feb-2014 skrll

Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.


1.766 31-Jan-2014 tsutsui

Switch ews4800mips and newsmips to Xorg server.

There is ~no user of X11R6 Xservers except a few developers on these ports
and Xorg wsfb server should work with manual keymap settings.


1.765 22-Jan-2014 matt

Add MKGCCCMDS to _MKVARS.yes after the loop.


1.764 21-Jan-2014 matt

Make MKGCCCMDS default mirror MKGCC. (if MKGCC is no, MKGCCCMDS must be no).


1.763 18-Jan-2014 joerg

Use a separate variable for the use of GCC's unwind code.


1.762 16-Jan-2014 christos

- Add a new bsd.host.mk that contains all the HOST_ variables extracted from
bsd.sys.mk and bsd.own.mk
- Add protection requiring that:
1. bsd.sys.mk is not include from other Makefiles directly
2. bsd.own.mk must be included before bsd.sys.mk since it
sets variables that bsd.sys.mk uses as conditionals.

This is step 1 of removing all variable settings from bsd.sys.mk and
leaving behind only rules. This way, the structure of a standard Makefile
is:
variable overrides

optionally include bsd.own.mk
optionally include bsd.endian.mk

variable settings that use variables defined in bsd.own.mk

include a one or more rule .mk files (such as bsd.prog.mk etc)


1.761 14-Jan-2014 apb

Use parentheses in .if A && ( B || C || D || ... )


1.760 31-Dec-2013 christos

redo the ctf stuff to handle the USETOOLS=never case correctly and explain
how.


1.759 16-Dec-2013 skrll

Provide ARM_APCS_FLAGS on arm and earm.


1.758 15-Dec-2013 joerg

Move flags for ARM's APCS ABI into a common variable. Add some forces to
deal with limitations in the Clang <-> LLVM backend interaction to pick
the correct ABI and target assembler.


1.757 06-Dec-2013 matt

Describe MACHINES.${MACHINE_CPU}. <fixme>
Add sparc64 to MACHINES.sparc since sparc64 can be build as sparc.


1.756 05-Dec-2013 matt

Add MACHINES.${MACHINE_CPU} values.


1.755 29-Oct-2013 joerg

Unbreak src/tools usage of C++.


1.754 28-Oct-2013 mrg

add MKDEPCXX, that is used for C++ files depend creation. also
add some missing ${COPTS.${.IMPSRC:T}} and ${CPUFLAGS.${.IMPSRC:T}}
to the dependancy rules.

this makes it possible to have C++ files .d files created with the
C++ compiler, and with the normal options for this file, which
means that we can build libstdc++-v3 from gcc 4.8.


1.753 14-Oct-2013 joerg

Rename USE_LIBGCC to HAVE_LIBGCC and retry using it as flag on unwind.h.


1.752 14-Oct-2013 joerg

Include compiler-rt and libunwind in libc for Clang/x86 builds.


1.751 29-Sep-2013 joerg

Hook up initial build infrastructure for LLDB. Update LLVM/Clang
snapshot to r191390 for some required changed. Re-enable static analyzer
in Clang.


1.750 02-Sep-2013 joerg

Update LLVM/Clang snapshot to r189662. This includes many improvements
to the new SLP vectorizer, fast codegen support for PPC and using
terminfo for the color sequences. In addition, add (optional) build
infrastructure for lld to allow easier testing. This is controlled by
MKLLD.


1.749 26-Aug-2013 matt

Change the default for MKLINT to no


1.748 15-Aug-2013 martin

Add .ARM.extab to the list of sections to be removed when converting to
aout format.


1.747 12-Aug-2013 joerg

Do as the last commit message said and not as the change did, only use
GCC's crt code on ia64.


1.746 12-Aug-2013 joerg

Only ia64 defaults to USE_COMPILERCRTSTUFF=no now, so simplify
conditional.


1.745 12-Aug-2013 joerg

Don't copy .eh_frame section when trying to create a.out binaries.


1.744 12-Aug-2013 matt

Fix MACHINE_CPU for armeb


1.743 07-Aug-2013 skrll

Switch alpha to USE_COMPILERCRTSTUFF= no


1.742 06-Aug-2013 matt

Add GNU_ARCH for earmv4eb, earmv5, earmv5eb, earmv6, earmv6hf, earmv6eb,
earmv6hfeb, earmv7, earmv7hf


1.741 05-Aug-2013 matt

Add 3 more MACHINE_ARCH: earmv4 earmv7eb earmv7hfeb
The latter are for cortex big-endian which uses a different binary format
than previous arm big endian platforms.


1.740 27-Jul-2013 skrll

Switch hppa to USE_COMPILERCRTSTUFF=no


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
1.739 19-Jul-2013 matt

Use m5407--netbsdelf for coldfire (Why not just use m5407--netbsd? Because
gas will think that's a.out since internally it expands it to m68--netbsd
and that matches a.out)


1.738 18-Jul-2013 matt

Test BSD makefile about coldfire.
XXX still hate m68k--netbsdelf-coldfire


Revision tags: riastradh-drm2-base
1.737 11-Jul-2013 martin

branches: 1.737.2;
Switch sparc and sparc64 to USE_COMPILERCRTSTUFF=no


1.736 25-Jun-2013 matt

MIPS now uses USE_COMPILERCRTSUTFF=no


1.735 25-Jun-2013 matt

For VAX, enable USE_COMPILERCRTSTUFF = no
Sort the arm ELF2AOUT sections to be removed.


1.734 12-Jun-2013 mrg

rename (new) xorg_drivers to xorg_server -- platforms that build the
actual Xorg server (aka "xfree86 server").

move the list of these platforms from xorg-server/Makefile.common to
bsd.own.mk, so that we can access it easily in distrib.

this should fix most of the current build failures.


1.733 10-Jun-2013 mrg

add a new MKXORG_DRIVERS that defaults to yes on MKXORG platforms
besides acorn26. useful for sets, and avoids overloading the
value of XFREE86_SERVERS.


1.732 05-Jun-2013 mrg

define X11SRCDIR.xorg-docs.


1.731 02-Jun-2013 mbalmer

New variable MKX11MOTIF to enable building libGLw with Motif support.
Defaults to 'no'.


1.730 03-May-2013 matt

Make disklabel a MI tool. It will use MACHINE/MACHINE_ARCH to determine
the disklabel params as well as allowing command-line options of -M <machine>
and -B {le,be} to specify MACHINE and byteorder to be used.


1.729 03-May-2013 matt

Use !empty(MACHINE_ARCH:Mearm*) instead of ${MACHINE_ARCH:Mearm*} != ""


1.728 28-Apr-2013 joerg

Introduce MKLIBSTDCXX, defaulting to yes.


1.727 27-Apr-2013 joerg

Add build glue for libc++.


1.726 27-Apr-2013 matt

Default MKCOMPAT to no for earm


Revision tags: agc-symver-base
1.725 27-Feb-2013 joerg

Add infrastructure for building MCLinker.


1.724 15-Feb-2013 jmmv

Add the MKKYUA knob.

MKKYUA defaults to no and will remain as such until the import is complete
and validated.

This knob does not currently have any effects on the build as nothing relies
on it yet. Upcoming imports and changes in this area will all be guarded by
this flag.


1.723 10-Feb-2013 jmcneill

add TOOL_MKNOD


1.722 03-Feb-2013 matt

Add support for MACHINE_ARCH earmhf and earmhfeb


1.721 27-Jan-2013 christos

Move HAS_SSP and USE_SSP out of bsd.sys.mk. They did not belong there in
the first place. Rename HAS_SSP to HAVE_SSP to match existing practice.


1.720 27-Jan-2013 christos

we cannot include bsd.sys.mk because of YHEADER. The incestious relation
of the .mk files needs to be fixed.


1.719 26-Jan-2013 christos

include <bsd.sys.mk>
This is a mess. HAS_SSP (which should really be HAVE_SSP), is defined
in bsd.sys.mk. So things that need it, include the file directly. The
trouble comes because bsd.sys.mk, needs stuff that bsd.own.mk defines,
so including first does not work. Anyway most other files include bsd.sys.mk
directly, so user Makefiles should just not do that, and just include
<bsd.own.mk> to get all the defines they need.


Revision tags: yamt-pagecache-base8
1.718 18-Jan-2013 christos

Now that ctf is fixed for at least amd64, go back to an equivalent to the
original functionality, use the tool only if it exists.


1.717 11-Jan-2013 matt

Make MKSOFTFLOAT = yes for ARM (since arm is softfloat by default).


Revision tags: yamt-pagecache-base7
1.716 30-Nov-2012 joerg

Don't force link and CSS options in bsd.own.mk, bsd.man.mk sets them.


1.715 24-Nov-2012 alnsn

Add sljit and bpfjit to evbmips. Not enabled by default.


1.714 22-Nov-2012 pooka

Support clang as EXTERNAL_TOOLCHAIN


1.713 20-Nov-2012 apb

Make the test for infinite recursion in PRINTOBJDIR more specific,
and make the error case more easily recognisable.

Now "make -V '${PRINTOBJDIR}'" works instead of misinterpreting the "-V"
as infinite recursion.


1.712 15-Nov-2012 jkunz

Add elftosb tools to evbarm userland and toolchain.
Elftosb is used to create a digitaly signed "secure boot" file.
This sb file can be booted by the first stage boot loader found in
Freescale i.MX23 and i.MX28 application processors.

Copyright (c) 2004-2010 Freescale Semiconductor, Inc.


1.711 06-Nov-2012 skrll

Switch mips to gdb 7.3.1

# of expected passes 11545
# of unexpected failures 401
# of expected failures 45
# of untested testcases 23
# of unresolved testcases 1549
# of unsupported tests 112


1.710 05-Nov-2012 alnsn

Enable MKSLJIT on sparc.


1.709 05-Nov-2012 alnsn

Build sljit test when MKSLJIT != no and set MKSLJIT to yes on amd64 and i386.


1.708 04-Nov-2012 christos

add MKTPM, default to no


1.707 04-Nov-2012 apb

Add _NETBSD_VERSION_DEPENDS in bsd.own.mk. Targets that need
to be re-generated when the NetBSD version numberchanges,
or when any build-related variables change, may depend on
${_NETBSD_VERSION_DEPENDS}.


Revision tags: yamt-pagecache-base6
1.706 16-Aug-2012 matt

branches: 1.706.2;
Add ARM cpus to those MACHINE_ARCH which USE_COMPILERCRTSTUFF=no


1.705 10-Aug-2012 joerg

Don't set HAVE_GCC by default, if MKGCC is disabled.


1.704 10-Aug-2012 matt

Add .ARM.exidx as a section to be removed for a.out on ARM


1.703 08-Aug-2012 christos

add MKRUMP by popular demand.


1.702 05-Aug-2012 matt

Add the new MACHINE_ARCH of earm and earmeb (arm EABI(AAPCS-LINUX)).


1.701 19-Jul-2012 macallan

add xgi to the list of known Xorg drivers just to make sure I don't forget
to add it here when I actually import it


1.700 14-Jul-2012 spz

more MKCRYPTO_IDEA and MKCRYPTO_MDC2 removal (resp, adjustment to IDEA and
MBC2 now always being included)
MKCRYPTO_RC5 now builds shared libs, add the missing files to sets


1.699 22-Jun-2012 abs

Switch -current vax back to gcc 4.1 to match netbsd-6 - until someone has
time to look at the gcc 4.5 codegen issues we should at least have a usable
-current for vax.


1.698 17-Jun-2012 uwe

Switch sh3 ports to our own csu (USE_COMPILERCRTSTUFF?= no).


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
1.697 17-Feb-2012 joerg

Derive MANINSTALL from MKCATPAGES and MKHTML.


Revision tags: netbsd-6-base
1.696 10-Feb-2012 matt

branches: 1.696.2;
Switch VAX to use GCC 4.5 and GDB 7.
Change VAX to use DBG=-O2 like most other ports.


1.695 07-Feb-2012 joerg

Switch to using mandoc for formatting man pages as new default.
Stop building catpages by default.


1.694 07-Feb-2012 joerg

Import the new apropos/whatis.

This code has been developed by Abhinav Upadhyay as part of Google's Summer
of Code 2011. It uses libmandoc to parse man pages and builds a Full
Text Index in a SQLite database. The combination of indexing the full
manual page, filtering out stop words and ranking individual matches
based on the section gives a much improved user experience.

The old makewhatis and friends are kept under MKMAKEMANDB=no for now.


1.693 25-Nov-2011 skrll

Switch hppa to gdb 7.


1.692 15-Nov-2011 jdc

Switch alpha to gdb 7.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.691 02-Nov-2011 uwe

branches: 1.691.2;
Switch sh3 to gdb7.


1.690 01-Nov-2011 joerg

Hook up nbperf into the normal tool build.


1.689 31-Oct-2011 chs

switch everything except vax to gcc 4.5.
switch m68k to -Os since -O2 produces much bigger code
with gcc 4.5 than it did with gcc 4.1.


1.688 31-Oct-2011 mrg

obsolete now useless (and wrongly set to "219" :-) HAVE_BINUTILS.
switch the sense of the gdb and gcc tests to list the platforms not
switched to gcc 4.5 or gdb 7, which is now:

GCC 4.1:
.if ${MACHINE_ARCH} == "alpha" || \
${MACHINE_CPU} == "arm" || \
${MACHINE_CPU} == "m68k" || \
${MACHINE_CPU} == "vax"

GDB 6:
.if ${MACHINE_ARCH} == "alpha" || \
${MACHINE_ARCH} == "hppa" || \
${MACHINE_CPU} == "mips" || \
${MACHINE_CPU} == "sh3" || \
${MACHINE_ARCH} == "vax"

let's go, people! (-:


1.687 30-Oct-2011 mrg

switch powerpc64 to GCC 4.5 and GDB 7. untested, but it builds which
is a step forward from a week ago.


1.686 28-Oct-2011 mrg

switch m68* to GDB 7.3.1. tested on sun2 and sun3 in TME. works
at least reasonably on sun3. GCC 4.1 barely runs on sun2 and GCC
4.5 doesn't run...


1.685 25-Oct-2011 mrg

switch sparc, sparc64, arm and powerpc to GDB 7.


1.684 11-Oct-2011 joerg

Update LLVM/Clang snapshot to r141658. This primarily fixes a regression
preventing Qt4 from building.


1.683 08-Oct-2011 christos

Switch i386 and amd64 to gdb7.


1.682 02-Oct-2011 christos

No point on keeping hp700 on the old gcc; it is produces broken assembly
according to the new binutils.


1.681 27-Aug-2011 joerg

Add new "analyze" command to run clang's static analyzer in a directory
on all C/C++ files.


1.680 25-Aug-2011 uwe

Switch sh3 to GCC 4.5. Tested on landisk (including doing build.sh on it).


1.679 17-Aug-2011 mrg

switch sparc to GCC 4.5.3.


1.678 07-Aug-2011 mrg

switch x86 to GCC 4.5.


1.677 05-Aug-2011 matt

Switch mips and powerpc to GCC 4.5


1.676 04-Aug-2011 mrg

switch sparc64 to GCC 4.5.3.


1.675 16-Jul-2011 tsutsui

Add definitions for elf2aout tools.


1.674 10-Jul-2011 tsutsui

Add OBJCOPY_ELF2AOUT_FLAGS for some arm ports to create a.out binaries
using objcopy(1) for old firmware, shared among src/distrib and
src/sys/arch/${MACHIHNE}/conf/Makefile.${MACHINE}.inc.

Discussed with mrg@ and matt@ on source-changes-d@.


1.673 02-Jul-2011 matt

Switch powerpc to USE_COMPILERCRTSTUFF=no


1.672 30-Jun-2011 matt

After making sure USE_PIGZGZIP is defined, add a TOOL_GZIP which will be
gzip or ${TOOL_PIGZ}. Use of gzip can be replaced with ${TOOL_GZIP} and
automatically get to use pigz if USE_PIGZGZIP is defined as "yes". This
avoid having to special case each of gzip.


1.671 20-Jun-2011 mrg

remove all the code that supported HAVE_GCC=3. mostly from chuq.


1.670 15-Jun-2011 mrg

build evbppc modules in 3 different flavours:

- oea (default)
- ibm4xx
- booke

this, together with earlier machine_module[] work, should allow evbppc
platforms to use modules.


Revision tags: cherry-xenmp-base
1.669 27-May-2011 drochner

branches: 1.669.2;
make the "tags" target non-.PHONY because it reflects a real file,
and remove some nonsense in libc Makefile which caused that
a "tags" file was written in my source tree


1.668 20-May-2011 plunky

simplify PCC inclusion; MKPCCDMDS is not really required


1.667 19-May-2011 joerg

Add fine-grained compiler selection, including clang support.


1.666 19-May-2011 adam

Reverting last change; joerg has a better approach


1.665 18-May-2011 adam

Add support for LLVM/Clang


1.664 09-May-2011 haad

Add MKPERFUSE flag to those who are enabled by default.


1.663 21-Apr-2011 joerg

Add MKBSDGREP switch for easy testing of the GNU grep
replacement/alternative.


1.662 18-Apr-2011 joerg

Fix --sysroot usage.


1.661 17-Apr-2011 christos

Revert previous, breaks builds completely (cd /usr/src/bin/test && make clean &&
make)


1.660 17-Apr-2011 tron

Don't use "--sysroot=/" for host builds as "nbhost-mkdep" doesn't
understand that option. This should unbreak tool builds.


1.659 17-Apr-2011 mrg

it's spelled CPPFLAGS not CPPFLAGGS.


1.658 16-Apr-2011 christos

Need --sysroot=/ otherwise ld does not find crt0.o and friends.


1.657 16-Apr-2011 christos

Simplify and correct (previous did not work for !defined(DESTDIR)


1.656 15-Apr-2011 elric

Upgrade Heimdal to 1.5pre1 by switching the build from crypto/dist/heimdal
to crypto/external/bsd/heimdal. The latter was just imported as the head
of the Heimdal tree as of a few days ago.


1.655 10-Apr-2011 joerg

Use ?: operator to determine when to add --sysroot. Unbreaks clang
bootstrap.


1.654 10-Apr-2011 joerg

For USETOOLS=yes, use the --sysroot support of the compiler to cut down
the number of hard-coded pathes and magic invocations.


1.653 08-Mar-2011 njoly

Adjust html link template and css location for man pages in arch
subdirs.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
1.652 07-Feb-2011 mrg

add missing SRCDIR for synaptics.


1.651 06-Feb-2011 joerg

Add LLVM and clang build system. It is enabled by MKLLVM=yes.
Upstream sources can be fetched by running "make checkout" in
src/external/bsd/llvm, they will be properly imported once the
integration and missing features are sorted out.


1.650 31-Jan-2011 matt

Add TOOL_MKUBOOTIMAGE


1.649 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


1.648 25-Jan-2011 he

Default MKREPRO to "no", so that the tests in stand/ etc. don't need
to add ":Uno" to the variable expansion inside the test to avoid errors
from nbmake.


1.647 18-Jan-2011 matt

branches: 1.647.2;
Default mips64e[bl] to SOFTFLOAT.


Revision tags: matt-mips64-premerge-20101231
1.646 13-Dec-2010 pooka

Define RUMPPRG, which is just like PROG, except it additionally
builds a rump client with the name rump.${PROG}. The rump client
is not installed suid/sgid by default even if BINMODE is defined.


1.645 05-Dec-2010 mrg

switch ofppc to xorg.


1.644 28-Nov-2010 skrll

Fix a comment


1.643 28-Nov-2010 skrll

Centralise USE_COMPILERCRTSTUFF.

PCC might need help.


1.642 12-Nov-2010 tsutsui

Switch NetBSD/dreamcast to X11FLAVOUR=Xorg.

No particular comments on port-dreamcast@ and
tested with JP (HKT-7600) and US (HKT-7620) keyboards.


1.641 04-Sep-2010 ahoka

Add libc glue for libtre.
tre will be compiled without approx and wchar/mulibyte support to
only match the minimum requirement to replace our spencer regex.

This needs a lot of testing.

Only enabled when USE_LIBTRE is set to `yes'.


1.640 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


1.639 15-Aug-2010 mrg

add new option to build/use tools/pigz for compressing sets. for now
USE_PIGZGZIP defaults to "no". (it depends upon local <pthread.h> and -lz.)

you can set it to "yes" on most modern platforms just fine.


1.638 02-Aug-2010 jmmv

Move the TESTSBASE definition from bsd.test.mk to bsd.own.mk. Per joerg@'s
suggestion.


1.637 31-Jul-2010 tsutsui

Cleanup and sort if-clause lines for X11FLAVOUR per ${MACHINE}.


1.636 31-Jul-2010 tsutsui

Switch hpcarm, hpcmips, and hpcsh to using X11FLAVOUR=Xorg.


1.635 17-Jul-2010 mrg

- add X11SHAREDIR definition
- X11SRCDIR's for libxcb, xcb-proto and xcb-utils


1.634 11-Jul-2010 mrg

ldap is configured to depend upon MKCRYPTO no, so force MKLAP=no if
MKCRYPTO=no.
don't build pkg_install, libcrypto tests or rump_smbfs if MKCRYPTO=no.
mark librumpcrypto, rump_smb, pkg_*

fix set lists as appropriate.


1.633 06-Jul-2010 mrg

remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h


1.632 20-Jun-2010 mrg

- note that if MKINET6 is "no", MK11 must also be "no". we don't support
building X11 without inet6 support. the support to maintain patches to
generated files and other files is too great. PR#42856
- add TOOL_PIGZ, which defaults to the (not yet default) built tools/pigz.


1.631 19-Jun-2010 mrg

- always install pigz. hooary!
- kill MKPIGZ.
- add MKPIGZGZIP. if it is "no", then only install pigz as pigz. if it is
not "no", don't install mrgzip, install pigz as gzip.

in all cases, the z* scripts.


i don't like the name MKPIGZGZIP so if anyone has a better name, feel free
to replace it. i don't care enough since killing the ugly name is just
more incentive to get pigz doing .bz2, .Z and .z.


1.630 17-Jun-2010 mrg

default MKPIGZ to "no", for now.


1.629 04-Jun-2010 joerg

Add definitions for TOOL_MANDOC_* for standalone users. Requested by
dyoung.


1.628 04-Jun-2010 jmmv

Simplify build of shell-based test cases: atf-compile is gone.


1.627 01-Jun-2010 joerg

Install mdocml's default CSS as /usr/share/man/style.css. Switch HTML
man pages to use mandoc unconditional as it gives reasonable output for
all man pages, not only a subset of mdoc(7). Use the newly installed
style.css for formatting and produce hyperlinks for .Xr.


1.626 28-May-2010 mrg

add / retire some xf86-video drivers.


1.625 23-Apr-2010 joerg

Add MKBSDTAR, defaulting to no. It switching cpio and tar to the
libarchive based frontends.


1.624 22-Mar-2010 mrg

set MACHINE_CPU to powerpc for MACHINE_ARCH of powerpc64.

from pooka via PR#43021.


1.623 13-Mar-2010 mrg

revert the previous:

- the default for ZFS on x86 already was "yes".

- this left MKZFS unset for other platforms, which breaks the build.


1.622 13-Mar-2010 haad

Enable MKZFS by default on i386 and amd64 now when it compiles.


1.621 08-Mar-2010 he

Fix the setting of MKZFS for amd64 and i386, so that the set lists
match up again, and it matches with the comment a few lines above.


1.620 02-Mar-2010 darran

DTrace: Add CTF generation to the make framework. Only enabled when
MKDTRACE=yes.


1.619 27-Feb-2010 haad

As a preparation for zfs sources update disable MKZFS for some time.


1.618 21-Feb-2010 darran

Add a MKDTRACE build knob for DTrace, off by default.


1.617 11-Feb-2010 macallan

add suncg14


1.616 03-Feb-2010 roy

Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@


1.615 25-Jan-2010 christos

PR/42658: Geoff Wing: Quote directory variables to deal with spaces in the
source pathname.


1.614 14-Dec-2009 christos

don't need GENCMD anymore.


1.613 14-Dec-2009 matt

Merge from matt-nb5-mips64


Revision tags: matt-premerge-20091211
1.612 13-Dec-2009 mrg

enable MAKEDIRTARGET to be called with a separate environment,
called $MAKEDIRTARGETENV, defaulting to nothing.


1.611 13-Dec-2009 mrg

if BSD_MK_COMPAT_FILE is defined, .include it.


1.610 13-Dec-2009 nakayama

32-bit compat is CPU specific rather than machine.
So use MACHINE_ARCH instead.


1.609 12-Dec-2009 snj

Switch cats to X.Org.


1.608 11-Dec-2009 snj

Switch netwinder to X.Org.


1.607 11-Dec-2009 uebayasi

GENCMD: quote the string to eval in case it has spaces.


1.606 11-Dec-2009 he

Move the test for evbppc out of sets.subr and into bsd.own.mk, to
decide whether to make kernel modules: set MKKMOD to no for evbppc.
Use this in etc/Makefile to decide whether to do the "modules"
obsolete sets. Move the ./var/db/obsolete/modules entry from the
"mi" to the "module.mi" file set.

Fixes the build for evbppc.

Discussed with uebayasi@


1.605 11-Dec-2009 uebayasi

${GENCMD}:
Prefix tmp directories as /tmp/_gencmd.XXXXXX to give users a clue when it's
left accidentally.


1.604 11-Dec-2009 uebayasi

${GENCMD} is used to generate only one output from file generation commands
which potentially have multiple output files, which confuses make(1).

This wrapper copies all involved files into /tmp, execute the command, and
copy the wanted file back to ${.OBJDIR}. If this is expensive, consider to
rewrite the generation command to output files individually.

XXX bsd.own.mk is too bloated.


1.603 06-Dec-2009 uebayasi

Simplify how MKZFS is set. No functional changes.


1.602 04-Dec-2009 haad

Switch MKLVM to default value to yes. There are only few bits missing and it
would be great if it can receive more testing.

Oked: core@, yamt@


1.601 03-Dec-2009 tron

Add "MKZFS" to either "_MKVARS.yes" or "_MKVARS.no" depending on the
default of this platform. This fixed the build for NetBSD/amd64
and NetBSD/i386.

Yes, this horrible. There should be a better way to handle these
settings in general.


1.600 02-Dec-2009 uebayasi

Define lists of MK* variable names as _MKVARS.yes and _MKVARS.no. They're
referred to by syspkg.


1.599 01-Dec-2009 uebayasi

Add ${TOOL_PKG_CREATE}.


1.598 30-Nov-2009 uebayasi

Support "extsrc", externally added programs and libraries. Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org. (These sets are not included as TNF releases.)


1.597 28-Nov-2009 mbalmer

Add the xf86-input-elographics driver to i386 builds.


1.596 28-Nov-2009 mbalmer

Link the xf86-input-ws X.Org input driver to the build and add it to the lists
that also have the wsmouse driver.

xf86-input-ws adds support for touchpanels in X11 that report absolute position
data through wscons(4), e.g. the extended ums(4) driver. xf86-input-ws was
written by Matthieu Herrb for OpenBSD.

Please remember to also update xsrc before the next system build.


1.595 10-Nov-2009 macallan

add igs driver for Xorg


1.594 05-Nov-2009 skrll

Switch everyone to binutils 2.19.


1.593 04-Nov-2009 skrll

Switch mips to binutils 2.19.


1.592 24-Oct-2009 joerg

Add lintmanpages later to target to ensure that MKMANDOC is set.


1.591 23-Oct-2009 joerg

Do not run mandoc for lintmanpages if MANPAGES is empty.
Add it to the list of targets to recurse for.


1.590 23-Oct-2009 joerg

Add MKMANDOC option to trigger building cat pages and HTML pages with
mdocml. Add a lintmanpages target for developers to check man pages
with the strictest settings of mandoc.


1.589 22-Oct-2009 skrll

Switch powerpc to binutils 2.19.


1.588 21-Oct-2009 joerg

Add tool definition for mandoc in ascii (plain text), html and lint
mode.


1.587 10-Oct-2009 apb

If ${NETBDSRCDIR}/../xsrc exists, then use it as the default value
of X11SRCDIR. If it doesn't exist, then use /usr/xsrc as before.

OK mrg


1.586 09-Oct-2009 haad

Enable MKZFS for i386 and amd64 so zfs tools and modules will be included in
a daily builds and anyone can test zfs for NetBSD easier.


1.585 05-Oct-2009 haad

Add zfs sets and needed veriables to hook zfs into the build. ZFS on i386
need still one fix othervise it should be ready for testing.


1.584 01-Oct-2009 skrll

Switch amd64 to binutils 2.19.1.


1.583 29-Sep-2009 tsarna

Multicast DNS ("Bonjour") support, based on Apple's mDNSResponder.


1.582 26-Sep-2009 skrll

Switch arm and armeb to binutils 2.19.

Tested on my cats and all other platforms build tested.


1.581 22-Sep-2009 skrll

Switch m68k to binutils 2.19.

Tested on mac68k by martin@. All other m68k platforms build tested.


1.580 22-Sep-2009 uwe

Switch sh3eb to binutils 2.19.
Compile-tested for mmeye.


1.579 21-Sep-2009 uwe

Switch sh3el to binutils 2.19.
Boot-tested on landisk.


1.578 19-Sep-2009 skrll

Switch vax to binutils 2.19.


1.577 19-Sep-2009 skrll

Switch sparc and sparc64 to binutils 2.19.

Thanks to martin@ for testing.


1.576 17-Sep-2009 skrll

Move alpha to binutils 2.19.


1.575 16-Sep-2009 mrg

switch port-sparc over to Xorg by default.


1.574 12-Sep-2009 skrll

Switch hppa to binutils 2.19.

There is a lot of rump breakage for hppa. Hopefully it will be fixed soon.


1.573 09-Sep-2009 skrll

Switch i386 to binutils 2.19.


1.572 08-Sep-2009 skrll

Rename MKBFD to MKBINUTILS and support HAVE_BINUTILS for set lists. This
makes {MK,HAVE_}BINUTILS consistent with {MK,HAVE_}{GCC,GDB}.

Allow MKBFD to defines MKBINUTILS as a backwards compatibility hook.

Update the sets lists and add conditionals for lib{bfd,opcodes}.


1.571 04-Sep-2009 macallan

add sunleo


1.570 30-Aug-2009 dyoung

Let us use MKKMOD=yes to leave the kernel modules out of the
distribution.


1.569 20-Aug-2009 macallan

add suntcx


1.568 18-Aug-2009 skrll

Add HAVE_BINUTILS and default to 2.16


1.567 18-Jun-2009 mrg

implement MKX11FONTS for Xorg.


1.566 11-Jun-2009 mrg

add xkeyboard-config.


1.565 10-Jun-2009 mrg

+dri2proto -printproto


1.564 10-Jun-2009 mrg

sync the list of valid xorg packages:
- add libpciaccess
- remove Xp XprintUtil XprintAppUtil


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.563 04-May-2009 ad

Enable -mtune=nocona by default on x86. I have tested on a range of CPUs
and this seems to give the best results.


1.562 01-May-2009 apb

Switch from sha1 to sha256 in the METALOG. The same information
also ends up in /etc/mtree/set.* after installation.


1.561 10-Apr-2009 bouyer

Revert accidental switch of alpha to Xorg. We don't have the XdecNetBSD
and XalphaNetBSD drivers in xorg yet.
Fixes release build for alpha.


1.560 27-Mar-2009 drochner

Use "i486" as GNU_ARCH for i386 so that the toolchain and libraries
can use instructions which were not available on the original i386
(eg cmpxchg). Due to some strangeness in gcc's i386 support this needs
an extra --with-arch=i486 configure argument for gcc to have the desired
effect, see my post "i386 vs i486, some inconsistencies" to tech-toolchain
some weeks ago.
I'm not happy to break compatibility, but since (a) kernel support
for i386 was removed and (b) i387 code was put into libm this is
just another coffin nail.
The gain is besides consistency and more efficient code that intel
atomar intrinsics can now be used by gcc. (which would need runtime
library support otherwise)


1.559 09-Mar-2009 apb

Add "-", "_", and "A-Z" to the set of allowed characters in the
result from `uname -p`. We already have a platform with an underline
("x86_64"), and the other chars seem harmless.


1.558 06-Mar-2009 apb

In build.sh and bsd.own.mk, if uname -p fails, or prints "unknown", or
prints something that does not look like an identifier, then use uname
-m instead. (Cygwin prints "unknown", and OpenBSD prints a long string
containing several spaces; this code should handle both.)


1.557 25-Feb-2009 sketch

Make grep a host tool.


1.556 24-Feb-2009 macallan

Switch sgimips over to Xorg


1.555 17-Feb-2009 abs

Cut all non Xserver building ports across to Xorg, tested on vax and
a selection of m68k ports.

The remaining XFree using ports are:
acorn32 amiga cats dreamcast ews4800mips hpcarm hpcmips hpcsh
mac68k netwinder newsmips ofppc pmax sgimips sparc sun3 x68k


1.554 25-Jan-2009 tron

branches: 1.554.2;
Install the "sony-misc" font from the X.org distribution.
Patch supplied by Takeshi Nakayama in PR xsrc/40476.


1.553 30-Dec-2008 pooka

Move list of rump-uses-kmod archs to bsd.own.mk for wider consumption.


1.552 23-Dec-2008 agc

Put MKLVM in order in the list of variables


1.551 19-Dec-2008 haad

Merge the haad-dm branch to -current. This branch adds LVM functionality to
the base NetBSD system. It uses Linux LVM2 tools and our BSD licensed
device-mapper driver.

The device-mapper driver can be used to create virtual block devices which
maps virtual blocks to real with target mapping called target. Currently
these targets are available a linear, zero, error and a snapshot (this is
work in progress and doesn't work yet).

The lvm2tools adds lvm and dmsetup binary to based system, where the lvm
tool is used to manage and administer whole LVM and the dmestup is used to
communicate iwith device-mapper kernel driver. With these tools also
a libdevmapper library is instaled to the base system.

Building of tools and driver is currently disable and can be enabled with
MKLVM=yes in mk.conf. I will add sets lists and rc.d script soon.

Oked by agc@ and cube@.


1.550 15-Nov-2008 mrg

revert sparc back to default of XFree86 at the request of macallan.


1.549 13-Nov-2008 apb

Add support for new MAKEVERBOSE levels 3 and 4. The complete list is now:

0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command
3 Ignore the effect of the "@" prefix in make commands
4 Trace shell commands using the shell's -x flag

The default remains MAKEVERBOSE=2.


1.548 12-Nov-2008 pooka

Now that MKPUFFS is default, kill it as advertised.
While there, give puffs and refuse files sensible syspkg entries.


1.547 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


1.546 11-Nov-2008 cube

Add MesaGLUT to the list of X11SRCDIR.<package> variables.


1.545 11-Nov-2008 macallan

it's ag10e not agten


1.544 09-Nov-2008 mrg

- retire MKXORG from public use
- introduce X11FLAVOUR to choose src/x11 vs src/external/mit/xorg
for the X11 to build if MKX11=yes is set. it takes the values
of either Xorg or XFree86.
- default to Xorg on alpha, i386, macppc, shark, sparc and sparc64
- remove MKXORG_WITH_XSRC_XSERVER, unused and never useful


1.543 06-Nov-2008 macallan

add a couple driver names for Xorg


Revision tags: netbsd-5-base
1.542 29-Oct-2008 macallan

branches: 1.542.2;
add suncg6 driver


1.541 29-Oct-2008 agc

Flick the puffs switch, and set MKPUFFS on by default.


1.540 29-Oct-2008 macallan

add sunffb driver


1.539 27-Oct-2008 mrg

- enable 32-bit library builds on amd64 and sparc64

- add 3 new top-level targets:
do-compat-lib-csu
do-compat-libgcc
do-compat-lib-libc
and run them before "do-build" if ${MKCOMPAT} != "no"


1.538 26-Oct-2008 apb

Always define TOOL_* variables in bsd.own.mk, not in bsd.sys.mk.

Previously, they were defined in bsd.own.mk if USETOOLS=yes, but in
bsd.sys.mk if USETOOLS!=yes. This caused makefiles that did this:

.include <bsd.own.mk>
FOO != ${TOOL_BAR} args...

to work in the USETOOLS=yes case but not in the USETOOLS!=yes case.


1.537 26-Oct-2008 apb

Set HOST_SH?=/bin/sh unconditionally. Previously, it was conditionally
set to /usr/bin/bash if HOST_CYGWIN was defined, but now build.sh
tries to set HOST_SH appropriately.

Remove the HOST_CYGWIN variable, which was not used for any other purpose.

Document that HOST_SH should be an absolute path.

THis was proposed in tech-toolchain.


1.536 26-Oct-2008 mrg

add MKCOMPAT, to build 32 bit libs. default to no for now for everyone.


Revision tags: matt-mips64-base2
1.535 19-Oct-2008 apb

Define TOOL_AWK.


1.534 19-Oct-2008 apb

Add the NOINFO variable, which works just like all other NOxxx variables.


1.533 13-Oct-2008 apb

Remove references to TOOL_BEBOXELF2PEF and TOOL_BEBOXMKBOOTIMAGE,
which were obsoleted in May 2008.


1.532 13-Oct-2008 apb

In bsd.sys.mk and bsd.own.mk, sort lists of TOOL_* variables.
In bsd.README, document all TOOL_* variables that are set in bsd.sys.mk.

There are several TOOL_* variables that are set in bsd.own.mk, but not
set in bsd.sys.mk and not documented in bsd.README.


1.531 12-Oct-2008 mrg

add X11SRCDIR.xf86-video-r128


Revision tags: mjf-devfs2-base
1.530 26-Sep-2008 apb

Build strfile both as a host tool and as an installed program:
* in games/fortune/strfile/Makefile, build strfile as a
regular program instead of as a host tool;
* add tools/strfile directory to build strfile as a host tool;
* in tools/Makefile, add strfile to SUBDIR list;
* in BSD.*.mk, define TOOL_STRFILE variable;
* in games/fortune/datfiles/Makefile, use TOOL_STRFILE when creating
databases at build time;
* in distrib/sets/lists/games/mi, mention usr/games/strfile.


1.529 21-Sep-2008 mrg

add X11SRCDIR.xf86-video-nvxbox


1.528 21-Sep-2008 mrg

add X11SRCDIR.xf86-video-mach64


Revision tags: wrstuden-revivesa-base-3
1.527 09-Sep-2008 joerg

Add MKSTRIPIDENT to remove the RCS IDs from binary programs and shared
libraries for space-constraint systems. The description is based on the
feedback of hubertf@, the logic on input from lukem@

This obsoletes the removal of LIBC_SCCS and SYSLIBC_SCCS for libc builds.


Revision tags: wrstuden-revivesa-base-2
1.526 06-Sep-2008 mrg

add X11SRCDIR.xinput


1.525 31-Aug-2008 christos

remove NVI; it is the default now.


1.524 31-Aug-2008 lukem

Enable MKHTML by default; we now install the HTML version of the man
pages as well as the source & catman versions.
Add "htmlinstall" to default MANINSTALL, so MKHTML will operate correctly.


1.523 30-Aug-2008 mrg

add X11SRCDIR.xkeyboard-config


1.522 28-Aug-2008 mrg

- s/X11R6/X11/ in a couple of comments.
- set X11ROOTDIR?=/usr/X11R7 if MKXORG != "no".
- MKXORG does not need two default values.


1.521 27-Aug-2008 lukem

Rework MKHTML (HTML manual pages) implementation to behave like
the manpages and catpages builds, with similar target names (etc).


1.520 26-Aug-2008 lukem

Default MKHTML to no, as per bsd.README.
(The default and documentation may change to yes in the near future,
as the build infrastructure for HTML man pages is fixed.)


1.519 24-Aug-2008 gmcgarry

Honour HAVE_PCC


1.518 02-Aug-2008 mrg

add X11SRCDIR.* for xf86-{video,input}*.


1.517 02-Aug-2008 mrg

add X11SRCDIR.pixman


1.516 29-Jul-2008 mrg

begin to add support for cross-built Xorg:

- add MKXORG
- default to DRI-on for Xorg
- add paths for 192 Xorg packages that will exist in
xsrc/external/mit/<package>/dist
- add some more X11FLAGS.* variables if MKXORG.

this is somewhat based on the xorg work rtr@ did a couple of years ago.

XXX: seriously need to fix the XORG_RELEASE value, it is still set to
XXX: 6.8.1 from when rtr was working on this.


1.515 23-Jul-2008 dogcow

add MKNVI to vivified MK* variables. (HI, DYOUNG!)


1.514 12-Jul-2008 gmcgarry

Add and document knobs to turn off building ATF and libm complex support.
Also add knobs for PCC which parallel GCC ones.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
1.513 23-May-2008 wiz

Sort variables.


1.512 22-May-2008 lukem

Add MKLDAP, USE_LDAP, LIBLBER, LIBLDAP


1.511 20-May-2008 ad

Install kernel modules into the proper locations, taking machine and
kernel version into account.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
1.510 10-May-2008 skrll

Add TOOL_HP700MKBOOT


1.509 03-May-2008 lukem

branches: 1.509.2;
Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)


1.508 02-May-2008 ad

Build and install modules into /kernel/modules. Each module gets a
directory for properties, blobs, etc. It's not fixed in stone and
can easily be changed if there are issues with the location/layout.


1.507 02-May-2008 lukem

Explicitly set MKLINT=no if MKLINKLIB==no, rather than just acting that way.


1.506 30-Apr-2008 garbled

Convert prep to use the new unified mkbootimage rather than it's own. This
mkbootimage can be shared by prep, rs6000, and bebox.

TODO: Convert bebox to use this. Needs someone to test.


Revision tags: yamt-pf42-baseX yamt-pf42-base
1.505 31-Mar-2008 lukem

branches: 1.505.2; 1.505.4;
Change USE_SKEY default to "no"; we have had USE_PAM=yes as the default
for a long time, and there's no point having custom S/Key support in the
applications given that pam_skey.so is now in /etc/pam.d/*


1.504 24-Mar-2008 lukem

Make it easier to find various MK* and USE_* variable definitions
by expanding their names in the for loops.

Inspired by a recent commit, which made sense to me based on the
number of times I've had to redo a search without the leading MK|USE_
within this file just to find the default...


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
1.503 10-Mar-2008 dholland

Adjust the loop that handles NOMAN and friends so grepping for NOMAN
actually finds it. Also note that it only works if set before
bsd.own.mk is included.

Otherwise, grep NOMAN /usr/share/mk/*.mk comes up empty, and since
naively setting it may not work, one can easily draw wrong
conclusions.


Revision tags: hpcarm-cleanup-base
1.502 09-Feb-2008 jmmv

branches: 1.502.2;
Add a MKMODULAR build-time option, defaulting to no, to enable the new
kernel modules framework.


1.501 29-Jan-2008 nakayama

Follow the recent rpcgen(1) change.
The environment variable of the C preprocessor has replaced to RPCGEN_CPP.


1.500 10-Jan-2008 skrll

Enable gdb on hppa.


1.499 09-Jan-2008 simonb

Remove support for NetBSD/pc532.


Revision tags: pc532-eol-2008 cube-autoconf-base matt-armv6-base
1.498 12-Nov-2007 jmmv

Add the atf host tools

This adds reachover Makefiles to build the atf tools required during a
cross-build.


1.497 06-Oct-2007 ad

Add USE_JEMALLOC.


Revision tags: matt-mips64-base
1.496 03-Jul-2007 joerg

branches: 1.496.4;
Rename nbinstall to ${MACHINE_GNU_PLATFORM}-install as it calls the
target strip. Don't pass down strip as it is not needed any longer.


1.495 08-Apr-2007 scw

Remove support for NetBSD/{,evb}sh5.


1.494 31-Mar-2007 matt

Don't test machine_arch for m68k and m68000, just test machine_cpu for
m68k. Turn on PIC/PICLIB for VAX.


1.493 19-Feb-2007 chs

switch the rest of the architectures to gdb6.


1.492 14-Jan-2007 apb

Define TOOL_JOIN.


1.491 29-Dec-2006 pooka

if MKPUFFS=yes is given, build & install mount_psshfs (default: no)


1.490 09-Dec-2006 dyoung

Change the name of the host disklabel to nbdisklabel-${MAKEWRAPPERMACHINE},
where ${MAKEWRAPPERMACHINE} is the suffix XXX on the target's make
wrapper, nbmake-XXX.

Fixes toolchain/30673, "single arch host disklabel isn't enough".


Revision tags: netbsd-4-base
1.489 29-Nov-2006 dsl

branches: 1.489.2; 1.489.4;
If MAKEOBJDIRPREFIX or MAKEOBJDIR is defined, then we rely on make to
set .OBJDIR so 'make -V .OBJDIR' doesn't need to read any makefiles.
Given how much cud-chewing make does in order to read a line, this
speeds things up significantly (the operation in hand).


1.488 26-Nov-2006 drochner

mk.conf might refer to all kinds of make variables, so we can't just pull
it in without everything else (reported by martin). So revert to 1.485
which did at least work for everyone.


1.487 24-Nov-2006 drochner

fix previous: need to pull in <bsd.obj.mk> to get the real .OBJDIR


1.486 22-Nov-2006 dsl

If we only want .OBJDIR printed, there is no point parsing the default
make rules, nor reading Makefile.
It is rather a shame we can't stop .depend being parsed as well.
Quite possibly one could argue that nothing in .depend should affect the
output of 'make -V xxxx'.


1.485 21-Nov-2006 dsl

Mark all the .PHONY targets as .NOTMAIN in one go - instead of individually.
Add .WAITs after beforeinstall and before afterinstall.
Remove the bogus dependency lines that someone must have added with the
vague hope they would cause the build to happen in the right order!
Since we have 'realinstall: proginstall scriptsinstall' stopping
'realinstall' running never has stopped 'proginstall' running.
Fixing this probably fixes a variety of problems, including, but not
restricted to 'install' in src/sys/arch/atari/stand/bootxx
(NB this particular file is untested due to other local changes)


1.484 12-Nov-2006 christos

more uucp removal.


1.483 10-Nov-2006 christos

if ${PROG_PAX} is defined, run paxctl on the binary after linking with
the value of the variable. This way, if you set:

PROG_PAX=+M

in /etc/mk.conf, you get what you deserve.


1.482 18-Oct-2006 bjh21

Use GDB 6 on armeb as well.


1.481 18-Oct-2006 bjh21

GDB 6.5 seems to be basically functional on ARM, so make it the default there.


1.480 09-Oct-2006 mrg

- clean up some comments to reality.
- retire LIBDCK, LIBG2C and (long broken) USE_LIBSTDCXX
- in bsd.hostprog.mk's LIBSTDCPP -> LIBSTDCC
- add LIBSUPCXX
- don't default USE_LIBSTDCXX or USE_GCC4 since they are
not used in the tree any where
- same with USE_XF86_4; retire it
- remove _SUPCXX handling in bsd.prog.mk

inspired by PR#26714.


1.479 01-Oct-2006 tsutsui

- pc532 is ${MACHINE}, not ${MACHINE_ARCH}; use ns32k
- fix a comment (sh5 has been switched to gcc4)


1.478 27-Sep-2006 martin

Default sparc64 to gdb6.


1.477 26-Sep-2006 matt

Make GCC4 the default (except for pc532).
Switch powerpc to GDB6.


1.476 26-Sep-2006 christos

switch i386 to gdb6.


1.475 22-Sep-2006 skrll

Switch hppa to gcc4.


1.474 19-Sep-2006 simonb

Switch MIPS to gcc4 by default.


1.473 17-Sep-2006 tsutsui

Switch m68k ports to gcc4.

Tested on most m68k ports. Still there is no report of
atari, cesfic, luna68k, and mvme68k on real machines,
but at least builds for these ports should work.


1.472 14-Sep-2006 skrll

ia64 doesn't do gdb yet.


1.471 10-Sep-2006 cherry

Switch ia64 to gcc4


1.470 04-Sep-2006 scw

Switch sh5el to gcc4.


1.469 26-Aug-2006 matt

MACHINE_CPU for mips64e[bl] is mips


1.468 25-Aug-2006 matt

Add enough configury glue so that src/tools can build a N64 mips toolchain.


Revision tags: abandoned-netbsd-4-base
1.467 24-Jul-2006 uwe

Switch sh3 to gcc4.

sh3el tested on hpcsh. sh3eb only compile-tested with an mmeye build.


1.466 23-Jul-2006 lukem

add reminder to sync with etc/Makefile and share/man/man5/mk.conf.5


1.465 23-Jul-2006 lukem

Implement MKDEBUG:
If "no", don't build and install separate debugging symbols
into /usr/libdata/debug.
Default: no


1.464 22-Jul-2006 lukem

Rename MKDEBUG to MKDEBUGLIB.


1.463 08-Jul-2006 matt

Switch vax to GCC 4


1.462 01-Jul-2006 mrg

vax needs NOPIC for >= GCC3 not just == GCC3.


1.461 26-Jun-2006 drochner

switch alpha to gcc4


1.460 25-Jun-2006 mrg

put hppa in to the list of working but not switched to GCC4 platforms.


1.459 24-Jun-2006 garbled

Switch powerpc to gcc4. Confirmed working with prep and macppc ports.


1.458 24-Jun-2006 mrg

switch sun2 over to GCC4. however, turn off profiling for sun2 since
GCC4 generates bogus code when calling mcount().


1.457 24-Jun-2006 mrg

default MKISCSI to yes.


1.456 23-Jun-2006 christos

- switch arm, armeb, i386, sparc, sparc64, x86_64 to gcc4
as discussed with gimpy and phone.

- add glue for gdb-6 build


1.455 22-Jun-2006 mrg

make powerpc64 use GCC4. the first GCC4 platform!

add mipsel and mipseb to the list of platforms that could have GCC4
but not done yet.


1.454 18-Jun-2006 gdamore

Forgot to commit these for TOOL_SED. Thanks to tsutsui@ for pointing it out.


1.453 07-Jun-2006 rpaulo

Add variables for /libdata/firmware path.


1.452 02-Jun-2006 mrg

delete support for USE_TOOLS_TOOLCHAIN and HAVE_GCC==2.
update the list of platforms that build for GCC4 (but do not switch
any of them yet.)


1.451 30-May-2006 christos

Remove sendmail.


1.450 12-May-2006 mrg

support CPPFLAG_ISYSTEMXX for GCC4.


1.449 09-Apr-2006 tls

bsd.lib.mk used MKDEBUG, but nothing defined it. Fix this.


1.448 07-Apr-2006 mrg

retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3 or 4.


Revision tags: rtr-xorg-branch-base
1.447 01-Apr-2006 christos

Add a HAVE_GCC4


1.446 29-Mar-2006 jmc

Provide TOOL_GMAKE defintiion


1.445 29-Mar-2006 jmc

Provide a default for USE_GCC4 (no currently) so it can be tested against


1.444 20-Mar-2006 christos

Oops, I did not mean to commit that [turning on relative symlinks]


1.443 20-Mar-2006 christos

Goodbye KerberosIV


1.442 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


1.441 17-Aug-2005 skrll

Initial pass at an in-tree ia64 toolchain. From PR 29141 with some fixes
from me.


1.440 12-Jun-2005 dyoung

Add definitions for the new "host tools " disklabel and fdisk.
Define TOOL_DISKLABEL and TOOL_FDISK. Also introduce HOST_INSTALL_DIR
and HOST_INSTALL_SYMLINK. These re-usable definitions help me to
install headers for disklabel and fdisk into ${TOOLDIR}/include/nbinclude/.


1.439 30-May-2005 thorpej

Add TOOL_GENASSYM. Part of PR toolchain/30350


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.438 28-Feb-2005 christos

Turn on PAM by default. Approved by core.


1.437 24-Feb-2005 christos

Don't disable PAM when MKPIC=no. PAM should work with static libraries, and
this breaks PAM on programs that decide not to use PIC libraries, such as
the X server.


1.436 22-Feb-2005 peter

Add MKIPFILTER; if set to no, don't build and install the ipf(4) programs,
headers and LKM.

Add MKPF; if set to no, don't build and install the pf(4) programs,
headers, LKM and spamd.

Both options default to yes, so nothing changed in the default build.

Reviewed by lukem.


1.435 13-Jan-2005 thorpej

Back out previous. The intent is for MKPAM to be "yes" and USE_PAM to
be "no". The su(1) Makefile has been fixed to test the correct variable.


1.434 13-Jan-2005 manu

Put back PAM to disabled by default and add a notice explaining why it
is disabled and why it should not be re-enabled until it gets stable.


1.433 12-Jan-2005 lukem

Rework PAM defaults:
MKPAM=yes # provide infrastructure by default (unless MKPIC=no)
USE_PAM=no # don't compile PAM support in by default


1.432 11-Jan-2005 he

Add a default setting of MKPAM to "yes".


1.431 10-Jan-2005 manu

Disable PAM by default until it gets properly integrated.
Now have MKPAM=yes in /etc/mk.conf if you want to experiment with PAM.


1.430 10-Jan-2005 he

Don't build libpam and associated bits if the target platform doesn't
support shared libraries (sun2 and evbsh5 at it would seem), or if the
user has specified MKPIC=no. Also introduce a new tag to the set lists
("pam"), so that the non-shlib ports can once again complete a release
build.

Discussed with christos and lukem.


1.429 07-Jan-2005 tron

EOL of XFree86 3.3.6, approved by core@NetBSD.org


1.428 06-Jan-2005 lukem

Provide MKPAM and USE_PAM


1.427 28-Nov-2004 jmc

branches: 1.427.2;
Convert mkboot into a full cross tool. Last hurdle for hp300 to building on
non NetBSD/bsd hosts.


1.426 28-Nov-2004 jmc

Convert remaining host tools for amiga to correct cross tools. Now allows
complete amiga builds on non netbsd/bsd hosts


1.425 25-Nov-2004 jmc

Convert bebox's remaining host tools over to cross tools scheme. Builds to sets
w/o error now.


1.424 07-Aug-2004 chs

turn on lint and profiling for hppa.


1.423 04-Aug-2004 lukem

Revert most of previous, and move the LIB<libname>?= assignments
back to bsd.prog.mk from bsd.own.mk.

pkgsrc uses <bsd.own.mk>, and setting LIB<libname> in it causes
problems with various package builds.
This should fix PR #26542 submitted by Jim Bernard.

(I'll be implementing the DPADD for shared libraries in a different
manner that generally won't depend upon ${LIB<libname>}.)


1.422 30-Jul-2004 lukem

Move the LIB<libname>?= assignments from bsd.prog.mk to bsd.own.mk so
that they may be used by non PROGs (e.g., LIBs).

Improve some comments.


1.421 11-Jun-2004 jmc

Clean up HOST_OSTYPE a bit more and turn any spaces into _'s as well as
stripping paren'd values from HOST_ARCH. Fixes PR#25586 for uname -p output
on linux hosts which return multi-word values


1.420 08-Jun-2004 abs

Add TOOL_SPARKCRC. Need to clean up what happens in the non tools case.


1.419 23-May-2004 lukem

* Add MKPRIVATELIB; if not "no", act as "MKPROFILE=no MKPIC=no MKLINT=no"
and don't install the (.a) library.
This is useful for "build only" helper libraries.
* Add some #{ [...] #} comments around large conditional statements.


1.418 12-May-2004 cl

``build.sh -m xen-i386 release'' now builds a release for NetBSD/xen
for i386. The resulting release consists of:
- NetBSD/xen for i386 kernel, loader and docuemntation
- NetBSD/i386 userland sets


1.417 12-May-2004 lukem

define X11ETCDIR (as /etc/X11)


1.416 30-Apr-2004 skrll

GDB doesn't work on hppa at the moment.


1.415 13-Apr-2004 rtr

+ define a proper variable/knob for building XFree86 as loadable or non.

let the breakage begin...


1.414 13-Apr-2004 lukem

Add MAKEDIRPREFIX shell macro to <bsd.own.mk>.
Usage: ${MAKEDIRTARGET} dir target [params]
Runs "cd $${dir} && ${MAKE} [params] $${target}",
displaying a "pretty" message whilst doing so.

Use MAKEDIRPREFIX to implement the __recurse .USE macro in <bsd.subdir.mk>


Revision tags: netbsd-2-0-base
1.413 08-Mar-2004 jmc

branches: 1.413.2;
Turn off MKKERBEROS4 if MKKERBEROS==no.


1.412 04-Mar-2004 rtr

+ add switch for DRI components of X11 build.


1.411 22-Feb-2004 uwe

Flip HAVE_GCC3 switch for sh3 ports.


1.410 13-Feb-2004 lukem

Change STRIPFLAG from "-s" to ""; we now don't strip binaries with install(1).

The benefits of having the symbol table available by default (easier
debugging of core dumps, etc) outweigh the minor (3%) increase in
the size of the distribution, and end-users can always strip(1) their
systems if they're concerned about that 3% of disk space.


1.409 30-Jan-2004 lukem

Add '-h sha1' to INSTPRIV.unpriv, so that SHA-1 hashes for installed files
are calculated and written to the METALOG.


1.408 07-Jan-2004 lukem

Add MKX11 to control if src/x11 is traversed during the build. (default: no)

Document <bsd.x11.mk>.


1.407 03-Jan-2004 lukem

sort list


1.406 02-Jan-2004 lukem

Consistently test all variables that support a "yes"/"no" value with
${VAR} == "no"
or
${VAR} != "no"
(instead of against "yes"). Variables affected:
TOOLCHAIN_MISSING
HAVE_GCC3
USE_TOOLS_TOOLCHAIN
NEED_OWN_INSTALL_TARGET
USE_SHLIBDIR

Improve the documentation.


1.405 11-Dec-2003 matt

Add TOOL_MACPPCFIXCOFF


1.404 07-Dec-2003 simonb

Disable native gdb for ns32k (but cross-gdb works).


1.403 07-Dec-2003 scw

And the monkey flicks the switch ...

Enable the in-tree toolchain on sh5, at least for the time being so I
can evaluate the situation.

There are still numerous problems with gcc3's sh5 support, not least
of which is the fact that a native gcc3 doesn't work at all. As a
cross-compiler, it works reasonably well. Certainly enough to build
userland and kernel code.

Binutils also has problems dealing with shared libraries on sh5, so
we're back to static userland for now.


1.402 07-Dec-2003 matt

Fix fumble-fingers && && -> &&


1.401 07-Dec-2003 matt

Turn on NOPIC= if using GCC3 for VAX.


1.400 05-Dec-2003 simonb

ns32k doesn't have a missing toolchain anymore, does support
gcc3 and always uses static libraries (for now...)


1.399 05-Dec-2003 matt

Add MKINET6/USE_INET6 support.


1.398 04-Dec-2003 mrg

build lib{opcodes,bfd,iberty} back in gnu/lib instead of gnu/usr.bin/binutils
as they are needed earlier than when gnu/usr.bin/binutils is built when
"make -j" is used.


1.397 03-Dec-2003 mrg

switch everyone to binutils 2.14. it's confirmed to work on all the
platforms that actually build at the moment...


1.396 27-Nov-2003 mrg

oops, really force 2.13


1.395 27-Nov-2003 mrg

remove the GDB53 section.
change the polarity of the GCC3 section - list missing ports.
add a binutils 2.14 knob, forced to 2.13 for now.


1.394 24-Nov-2003 lukem

In _MKTARGET_*, use ${.CURDIR:T} instead of ${.OBJDIR:T}, because that's more
useful when using actual 'obj' dirs. Suggested by Alan Barrett, with some
tweaks by me.


1.393 22-Nov-2003 lukem

In the various _MKTARGET macros, prepend "${.OBJDIR:T}/" to the ${.TARGET},
to provide more context about the operation. Especially useful for crunched
binaries and kernel builds. Idea suggested by David Laight <dsl@>


1.392 09-Nov-2003 mrg

switch to GDB 5.3 on armeb & m68000.


1.391 07-Nov-2003 lukem

Support MAKEVERBOSE more effectively.


1.390 05-Nov-2003 skrll

Switch ARM to gdb 5.3.

XXX 26bit support isn't there at the moment.


1.389 04-Nov-2003 mrg

switch sun2 to GCC3


1.388 03-Nov-2003 sekiya

Use XFree86 4.x on sgimips.


1.387 28-Oct-2003 mrg

GCC3:
- move m68000 into "mostly working" section
GDB53:
- move m68000 & armeb into "in progress" section
- enable sh3eb


1.386 28-Oct-2003 simonb

Sort MACHINE_ARCH's in the GDB section.


1.385 27-Oct-2003 mrg

turn on GCC3 for armeb


1.384 27-Oct-2003 uwe

Mark GCC3 for sh3el as "mostly working". Remaining issues are
toolchain/22452 and toolchain/22489 (gcc's optimization/11937).


1.383 27-Oct-2003 uwe

Switch sh3el to GDB 5.3.


1.382 26-Oct-2003 mycroft

I have no idea how this built, given that there seems to be a syntax error...


1.381 26-Oct-2003 mycroft

Note that armeb needs GCC 3, and hppa and m68000 need GDB 5.3.


1.380 26-Oct-2003 lukem

Improve how build.sh -N and MAKEVERBOSE interoperate;
rather than adding '-s' to make's command line in the makewrapper,
use the .SILENT target based on MAKEVERBOSE's value.

This means that you can do:
./build.sh -N 1 makewrapper

$TOOLDIR/bin/nbmake-$MACHINE
# runs at MAKEVERBOSE==1, with command lines suppressed

$TOOLDIR/bin/nbmake-$MACHINE MAKEVERBOSE=2
# runs at MAKEVERBOSE==2 for this invocation, with command lines shown


1.379 26-Oct-2003 simonb

Switch MIPS to GDB 5.3


1.378 25-Oct-2003 mycroft

Throw the switch for mipseb and mipsel -- GCC 3 works.


1.377 25-Oct-2003 matt

Switch VAX to GDB 5.3


1.376 24-Oct-2003 mycroft

68k works with GCC 3 on next68k and amiga. Throw the switch.


1.375 22-Oct-2003 skrll

gdb 5.3 for arm is in progress


1.374 21-Oct-2003 lukem

Move the MAKEVERBOSE setup from <bsd.sys.mk> to <bsd.own.mk>, and
change all the variable assignments from = to ?=


1.373 18-Oct-2003 matt

Default MK{BINUTILS,CVS,GCCCMDS,POSTFIX,SENDMAIL,UUCP} to yes


1.372 14-Oct-2003 fvdl

Enable gdb 5.3 for MACHINE_ARCH == x86_64


1.371 06-Oct-2003 matt

HPPA toolchain is now in-tree.


1.370 05-Oct-2003 fvdl

Enable gcc3 for x86_64.


1.369 27-Sep-2003 mycroft

List VAX as non-GCC3.


1.368 26-Sep-2003 christos

back out previous, suggested by gimpy.


1.367 26-Sep-2003 christos

entry for amd64->x86_64 map in gnu arch.


1.366 24-Sep-2003 matt

Switch Alpha to GDB5.3


1.365 24-Sep-2003 matt

Switch PowerPC to GCC 3.3.1 and GDB 5.3.


1.364 23-Sep-2003 christos

Turn on the switch for gdb53/m68k. Thanks Christian Limpach!


1.363 22-Sep-2003 christos

Add more comments for gdb-5.3


1.362 22-Sep-2003 matt

Add missing continuator.


1.361 21-Sep-2003 matt

Switch MACHINE_ARCH arm to GCC 3.3.1


1.360 19-Sep-2003 mrg

switch i386, sparc, sparc64 & alpha to GCC 3.3.1.


1.359 18-Sep-2003 mrg

add a HAVE_GDB53 switch. defaults to no one yet.


1.358 13-Sep-2003 lukem

implement MKSTATICLIB, which defaults to "yes". if "no" (which NOSTATICLIB
also sets, a la the other variables), prevents build and installation
of the "normal" static *.a libraries.


1.357 12-Sep-2003 lukem

add infrastructure to support reach-over builds of xsrc


1.356 01-Sep-2003 uwe

Now that HAVE_GCC3 is always defined, adjust the logic that selects if
NOPIC for sh3 should be set to check the value of HAVE_GCC3.


1.355 29-Aug-2003 martin

Default sparc64 to XFree 4.


1.354 28-Aug-2003 tron

Fix logic error in last change which caused GCC 3.x to be the default for
several platforms unintentionally.


1.353 27-Aug-2003 mrg

introduce an additional switch to enable building GCC3 instead of GCC2:
HAVE_GCC3. if this is set, we also set USE_TOOLS_TOOLCHAIN=no. change
the definition of the former to be restricted to whether tools/toolchain
is used or not.


1.352 01-Aug-2003 mrg

use -isystem-cxx for now. update the "mostly ready to switch to gcc3" list


1.351 28-Jul-2003 lukem

replace MKCXXSUPCXX(!=no) with USE_LIBSTDCXX(==no)


1.350 28-Jul-2003 lukem

Change defined(CXX_SUPCXX) to MKCXXSUPCXX != "no".

Clarify that command-line overrides of the MKxxx variables should be
done via the environment rather than make(1) command-line variable
assignment, since the latter doesn't actually work as intended.


1.349 28-Jul-2003 matt

Back last commit and just allow USE_TOOLS_TOOLCHAIN be overridden in the
environment.


1.348 28-Jul-2003 matt

Let the if define USE_TOOLS_TOOLCHAIN.


1.347 28-Jul-2003 lukem

Be consistent how "multiple include protection" is implemented. I.e,

.if !defined(_BSD_foo_MK_)
_BSD_foo_MK_=1

# ...

.endif # !defined(_BSD_foo_MK_)


1.346 27-Jul-2003 mrg

introduce a new $CPPFLAG_ISYSTEMXX that is used to reference c++ system
includes. for GCC3, set this to -I instead of -isystem.

XXX this should really be either not required or a -isystem-cxx, but for
now this is required to build libstdc++-v3, which otherwise complains
heavily about STL headers not being C code(!)


1.345 25-Jul-2003 mrg

add a new variable USE_TOOLS_TOOLCHAIN that is set to "yes" currently, but
will be set to "no" when GCC3 is used in tree.


1.344 23-Jul-2003 itojun

split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)


1.343 22-Jul-2003 mrg

switch sparc port to xfree 4 tree.


1.342 20-Jul-2003 lukem

add TOOL_STAT for stat(1)


1.341 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.340 18-Jul-2003 lukem

Add MKMANZ; if not set to "no", compress the manual pages at installation time.
This replaces the previous .if defined (MANZ) behaviour, although the latter
will set MKMANZ=yes for compatibility purposes.

Don't bother with -P-bou in TOOL_ROFF_HTML; it doesn't appear to be
necessary with groff 1.19.

Fix NOHTML implementation to be consistent with other NOxxx / MKxxx
variables, and expose the user-tweakable MKHTML.


1.339 16-Jul-2003 lukem

Change the default TOOLDIR from
top-of-obj/tools/tools.OS-VERSION-STRING
to
top-of-obj/tooldir.OS-VERSION-STRING

It's more consistent with the build.sh defaults for DESTDIR and
RELEASEDIR, and it's easier on "mr lazy completion fingers".


1.338 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.337 02-Jul-2003 marcus

With gcc3, PIC code can be created for sh3.


1.336 30-Jun-2003 wiz

Add NROFF.


1.335 26-Jun-2003 tshiozak

Citrus iconv support(3)
add host tools : mkcsmapper and mkesdb
mkcsmapper - coded character set mapping table compiler
mkesdb - encoding scheme database compiler


1.334 18-May-2003 lukem

Add ${TOOL_DB}; db(1) as a (host) tool.

Note: this is the first tool using a "TOOL_" prefix in the make(1) variable;
other similar "non-standard" variable names will be converted in the future.


1.333 08-May-2003 christos

Fix _HOST_CYGWIN lossage.


1.332 08-May-2003 salo

Whitespace.


1.331 08-May-2003 christos

Deal with CYGWIN's sh screwage.


1.330 29-Apr-2003 scw

Build shared libraries by default on sh5. They seem stable enough now.


1.329 27-Apr-2003 fvdl

Correct previous. MACHINE is amd64. MACHINE_ARCH is x86_64.


1.328 27-Apr-2003 tron

x86_64 -> amd64


1.327 11-Apr-2003 thorpej

Provide the MKPICLIB value in bsd.own.mk, rather than bsd.lib.mk. It
is sometimes necessary for non-library Makefiles to determine if _pic
libraries are being built.

Problem pointed out by Havard Eidnes.


1.326 25-Mar-2003 pooka

add file as a host tool


1.325 07-Mar-2003 thorpej

Add a HEXDUMP host tool.


Revision tags: fvdl_fs64_base
1.324 23-Dec-2002 lukem

Rework METALOG manipulation:
- add '-D ${DESTDIR}' to INSTPRIV, so install(8) removes the leading
${DESTDIR} from the metalogged path
- provide ${METADB.add} variable (for "${CAT} -l >> ${METALOG}"), to make
it easier to replace manual metalog manipulation in the future.
- with manual metalog additions, don't add the leading ${DESTDIR} in the path
- in maketars, use "mtree -C ..." instead of
"mtree -D ... | sed -e 's,\(.*\) \(\..*\),\2 \1,";

Benefits:
- maketars "Parsing METALOG" step speeds up from 29 seconds to 1.2 seconds
on a P3-600.
(This also benefits "make installworld" at the top level.)
- ${DESTDIR}/METALOG is easier to read without the leading "${DESTDIR}"
on all the pathnames, and it's smaller as well.


1.323 23-Dec-2002 lukem

Only set INSTPRIV?= if "inside" a NetBSD src tree (i.e, ${_SRC_TOP_} != "").
Fixes a problem found by Andrew Brown where programs outside of the NetBSD
src that use the /usr/share/mk framework (such as pkgsrc/pkgtools/digest)
couldn't be installed if /usr/src/etc wasn't present.


1.322 23-Dec-2002 lukem

correct a comment


1.321 19-Dec-2002 lukem

Add "-N ${NETBSDSRCDIR}/etc" to ${INSTPRIV}, so that non-host ${INSTALL_*}
rules use that directory to lookup users & groups as opposed to the
host system's passwd(5) and group(5) databases.

This is a change of behaviour which should make the build system more
robust when new users & groups are added to the NetBSD source.

The only users who may be adversely affected are those (small number,
if any) that renumber the uids & gids away from the "standard" NetBSD
ones; in this case said users should maintain local mods to
${NETBSDSRCDIR}/etc/{master.passwd,group} ...


1.320 08-Dec-2002 thorpej

Centralize the definition of the tool name prefix (i.e. "nb") into
bsd.own.mk, as the _TOOL_PREFIX variable.


1.319 26-Nov-2002 lukem

Deprecate SYS_INCLUDE and the optional SYS_INCLUDE=symlinks functionality,
and only support the "copies" default.
Per discussion on tech-userlevel@.


1.318 26-Nov-2002 thorpej

* If EXTERNAL_TOOLCHAIN is defined, consider it to be the root of
where the GNU tools are found, e.g. ${EXTERNAL_TOOLCHAIN}/bin/...
* Allow MACHINE_GNU_PLATFORM to be set in mk.conf.


1.317 26-Nov-2002 thorpej

sh64 -> sh5, which matches the names that the NetBSD-targeted GNU
toolchain uses for 32-bit SH5. OK'd by steve.


1.316 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


1.315 27-Sep-2002 thorpej

Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.


1.314 27-Sep-2002 thorpej

Back out previous; it was incomplete.


1.313 27-Sep-2002 thorpej

Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.


1.312 26-Sep-2002 itojun

MDC2 is a patented algorithm; don't ship it in default libcrypto.
MKCRYPTO_MDC2 will build a separate library, libcrypto_mdc2.


1.311 22-Sep-2002 lukem

Enable MKDYNAMICROOT=yes by default.
This means that:
+ /bin and /sbin (and the few programs in /usr/* which were statically
linked) are now dynamically linked.
+ The shared libraries that are needed by the /bin and /sbin programs
are now installed into /lib (with compatability symlinks from
/usr/lib). These are:
c crypt edit ipsec kvm m m387 termcap termlib util z
+ The shared linker is now in /libexec/ld.elf_so, and
/usr/libexec/ld.elf_so is a symlink to the former.

If you want the prior behaviour of "some applications statically linked,
the rest dynamically linked", set MKDYNAMICROOT=no in your mk.conf(5).

If you have a philosophical objection to dynamic libraries, continue
to set LDSTATIC=-static in your mk.conf(5), and please don't waste any
more time in trying to convince us why dynamic libraries are 3v1l.


1.310 17-Sep-2002 thorpej

* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.

If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.

If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.


1.309 15-Sep-2002 thorpej

No longer have to invoke lorder with the shell explicitly; the host
tool is patched to use the working shell as the interpreter.


1.308 14-Sep-2002 thorpej

* Add MKTEMP as a host tool.
* Pass MKTEMP to lorder, and invoke lorder with sh.


1.307 28-Aug-2002 lukem

In the MKDYNAMICROOT==yes case, move the shared linker from /lib/ld.elf_so to
/libexec/ld.elf_so. Per discussion with a few other developers.


1.306 27-Aug-2002 lukem

Implement MKDYNAMICROOT, which currently defaults to "no", but will
be changed in the future to "yes".

If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).

If MKDYNAMICROOT == "yes", the following changes occur:
in <bsd.own.mk>:
SHLIBDIR?= /lib
SHLINKDIR?= /lib
in various Makefiles, the following entry is DISABLED.
LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).


1.305 03-Aug-2002 chris

Default cats to using X 4.

Also correct macppc entry while here.


1.304 17-Jul-2002 mycroft

USE_XF86_4 on macppc.


1.303 17-Jul-2002 fredette

Now build profiled libraries on m68000.


1.302 11-Jul-2002 scw

Add MKBFD=no for SH5.


1.301 11-Jul-2002 scw

SH5 Makefile Magic.


1.300 03-Jul-2002 tron

Use XFree86 4.x by default on i386 and x86_64.

This change was approved by Frank van der Linden.


1.299 01-Jul-2002 fredette

Enabled building PIC on hppa. Also don't use a --netbsdelf GNU target name.


1.298 10-Jun-2002 mason

Add cat(1) as a host tool.


1.297 10-Jun-2002 fredette

Add cases for hppa.


1.296 05-Jun-2002 thorpej

Some changes to facilitate fixing the toolchain issue on ns32k:

* Don't make OBJECT_FMT dependent on USE_NEW_TOOLCHAIN. All ports
except ns32k are ELF, so set it appropriately. Allow it to be
overridden in the ns32k case.
* If ns32k && USE_NEW_TOOLCHAIN, don't build shared libraries, because
external toolchains don't support them for our a.out.
* If ns32k && OBJECT_FMT == ELF, the GNU platform is "netbsdelf".
* If ns32k && USE_NEW_TOOLCHAIN, don't attempt to build the in-tree
binutils 2.11.2, gdb 5.0, or gcc 2.95.3.

This allows us to do USE_NEW_TOOLCHAIN cross-builds to ns32k using
an external toolchain.


1.295 28-May-2002 bjh21

Add fgen as a host tool, used for sys/arch/sparc/bootblk.


Revision tags: netbsd-1-6-base
1.294 20-May-2002 thorpej

branches: 1.294.2;
Add cases for "armeb" (big-endian ARM).


1.293 07-May-2002 lukem

remove now-unnecessary SPARCINSTALLBOOT


1.292 03-May-2002 kleink

Add PREPMKBOOTIMAGE.


1.291 03-May-2002 lukem

Move the METALOG from ${_SRC_TOP_OBJ_} to ${DESTDIR}.

There were too many synchronisation problems with using the former;
including situations such as a "make clean" performed between two
installs to the same DESTDIR would result in a truncated METALOG and
the resultant sets would be missing stuff such as include files that
don't get reinstalled if they haven't changed, even with !UPDATE.


1.290 29-Apr-2002 wiz

sh3e[bl] uses new toolchain, so remove an .elsif that doesn't make sense
anymore.


1.289 26-Apr-2002 groo

Complete the switch to NEW_TOOLCHAIN for sh3e[lb].


1.288 26-Apr-2002 lukem

Implement NETBSDSRCDIR, which is the top level of the NetBSD source tree.
Defaults to the directory determined by the _SRC_TOP_ logic (if != ""),
and the BSDSRCDIR.

NETBSDSRCDIR has been provided for use by the various NetBSD source
Makefiles to find the top of the NetBSD source tree, and isn't
affected by the inheritance properties of _SRC_TOP_, nor does it
have the magic BSDOBJDIR baggage that BSDSRCDIR is stuck with.


1.287 26-Apr-2002 lukem

Revert part of previous; don't set _SRC_TOP_ to BSDSRCDIR if it can't be
determined, since BSDSRCDIR's default of /usr/src might not exist and the
calculation of _SRC_TOP_OBJ_ would then generate a warning :-(.
_SRC_TOP_ can now == "" if make(1) (or a parent make(1)) was started
outside of the NetBSD source tree.

Now, if _SRC_TOP_ != "", BSDSRCDIR defaults to ${_SRC_TOP_} and
BSDOBJDIR defaults to the objdir of ${BSDSRCDIR}.

Failsafe defaults for BSDSRCDIR (/usr/src) and BSDOBJDIR (/usr/obj)
are provided later in the file.

This should result in a usable BSDSRCDIR default (i.e, _SRC_TOP_ if
running from within the source tree), with safe fallbacks as appropriate
(/usr/src, as always), meaning that BSDSRCDIR should be able to be used
instead of _SRC_TOP_ in the source tree, although I need to carefully
test this. *aaaiiiieeee!!!*. (Now I understand some of Todd's pain :)


1.286 23-Apr-2002 lukem

Overhaul how _SRC_TOP_ is determined, ensuring that it will be set to
${BSDSRCDIR} if make(1) is running outside of the NetBSD source tree.
This should solve various issues, including building xsrc which uses
${BSDSRCDIR}/distrib/sets/maketars.


1.285 12-Apr-2002 lukem

add ELF2ECOFF


1.284 10-Apr-2002 lukem

replace BSDSRCDIR with _SRC_TOP_, since the latter is more likely to
be "accurate". document _SRC_TOP_.


1.283 08-Apr-2002 wiz

No more arm32.


1.282 03-Apr-2002 lukem

add INSTALLBOOT. sort some entries in bsd.sys.mk


1.281 31-Mar-2002 bjh21

Add CKSUM.


1.280 31-Mar-2002 bjh21

MACHINE_ARCH can't be "arm26", so don't bother checking for that.


1.279 30-Mar-2002 matt

Change VAX to default to new toolchain.


1.278 28-Mar-2002 matt

Don't complain if vax && ELF.


1.277 25-Mar-2002 shiba

Switch mac68k to ELF. Now the default executable binaries are ELF.

Approved by Scott,briggs,fredb,wormey


1.276 22-Mar-2002 thorpej

Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)

* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.

As discussed on tech-toolchain.


1.275 19-Mar-2002 lukem

- ensure that check_DESTDIR and check_RELEASEDIR are always available,
even if USETOOLS==no.
- wrap setting of DESTDIR?= with own USETOOLS==yes check.

should fix a problem noted on current-users with USETOOLS=no


1.274 18-Mar-2002 bjh21

We never set MACHINE_ARCH to "arm26" so remove the MACHINE_GNU_ARCH mapping
for it.


1.273 09-Mar-2002 tv

Remove the ability to set "USE_NEW_TOOLCHAIN=no" explicitly. This is a
one-way transition, so once it's defined by default for a port, it can't
be turned off.


1.272 05-Mar-2002 lukem

oops; should define check_DESTDIR before setting default for DESTDIR...


1.271 05-Mar-2002 lukem

provide check_DESTDIR and check_RELEASEDIR targets in <bsd.own.mk>
and use those rather than local versions


1.270 15-Feb-2002 is

Move Amiga PORT to ELF and new toolchain. Still missing:
support in UPGRADE to move old shared libs to /emul/aout


1.269 15-Feb-2002 matthias

".else if" doesn't work, thus everything was "COFF". Changed to ".elif".


1.268 07-Feb-2002 ross

if NOMAN is defined, also define NOHTML


1.267 04-Feb-2002 thorpej

* Turn lint and profiling on for SuperH.
* Turn lint on for m68000.


1.266 03-Feb-2002 thorpej

Allow PIC on SuperH if HAVE_GCC3 is defined.


1.265 31-Jan-2002 tv

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.


1.264 29-Jan-2002 thorpej

Simplify OBJECT_FMT assignment:
* All new-toolchain platforms are ELF.
* Else, if SuperH, old toolchain is COFF.
* Else, a.out.


1.263 29-Jan-2002 tv

rpcgen now accepts CPP from the environment; set it here for TOOLDIR builds.


1.262 28-Jan-2002 thorpej

Make sun2 use the new toolchain.


1.261 28-Jan-2002 thorpej

GNU_ARCH.m68000=m68010


1.260 28-Jan-2002 thorpej

m68000 also gets "-netbsdelf", for consistency with m68k.


1.259 28-Jan-2002 thorpej

Reverse the sense of the check for new-toolchain platforms. Instead,
list the MACHINE_ARCHs and MACHINEs that have NOT yet converted to
the new-toolchain.


1.258 27-Jan-2002 ross

Drink ALL the Kool-Aid.

(Move -mieee from lib/ to bsd.*.mk; new var MKIEEEFP defaults to yes.)


1.257 26-Jan-2002 reinoud

Some targets were obmitted in the .PHONY declaration in the bsd.own.mk file
resulting in (number of suffix rules) times stat() calls to be made to the
kernel.

Also fixing typo cheanhtml to cleanhtml.


1.256 25-Jan-2002 lukem

add $PAX to both, and $MAKEFS to bsd.sys.mk


1.255 19-Jan-2002 mrg

add SUNLABEL & SPARCINSTALLBOOT.


1.254 15-Jan-2002 tv

Remove parentheticals from _HOST_OSREL, to avoid them showing up in
directory names (which would confuse shells).


1.253 10-Jan-2002 lukem

revert previous, and reenable tools/makefs now that it works on
netbsd-current and netbsd-1-5


1.252 09-Jan-2002 tv

Disable makefs in src/tools for the moment; it's very dependent on -current
NetBSD headers and sources right now. (Temporary workaround for PR 15175.)


1.251 05-Jan-2002 mrg

add ${ZIC}


1.250 05-Jan-2002 mrg

add ${MAKEFS}


1.249 04-Jan-2002 thorpej

Switch the MIPS ports to the new-toolchain.


1.248 03-Jan-2002 tv

Add more tolerant script-based implementation of mkdep for host tool
compiles. Based loosely on mkdep.old.compiler (so CSRG license copied),
but now uses just one rewrite (awk) process per cpp invocation and
determines the proper way to run cpp and awk via a "configure" script.

Use HOST_MKDEP in bsd.hostlib/hostprog.mk (defaulting to the old override
value of MKDEP), and give it a TOOLDIR equivalent in bsd.own.mk.


1.247 02-Jan-2002 thorpej

Remove x86-64 "nolint" hack.


1.246 02-Jan-2002 thorpej

Remove the "MKLINT=no if HAVE_GCC3" hack; a patch to support lint
comments has been submitted to the GCC maintainers, so if you're
using a GCC 3.x that doesn't support lint, set MKLINT=no in mk.conf.


1.245 01-Jan-2002 thorpej

If HAVE_GCC3 is set, force MKLINT to "no", since GCC 3.x's C pre-processor
does not yet support our lint(1).


1.244 01-Jan-2002 thorpej

Don't set NOPROFILE for x86-64.


1.243 31-Dec-2001 thorpej

* Remove -Wno-format -fno-builtin from CFLAGS in the x86-64 case.
* Default MKBFD, MKGDB, and MKGCC to "yes". Set them to "no" for
x86-64.


1.242 28-Dec-2001 thorpej

x86_64 doesn't use the "new toolchain" but it doesn't really use the
old one either. The "new toolchain" environment is closer to what we
want, however, for using the external toolchain currently required for
x86_64, so set USE_NEW_TOOLCHAIN for x86_64.


1.241 28-Dec-2001 lukem

* Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".

- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.

- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so

2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so

3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed


1.240 24-Dec-2001 minoura

ELF!!


1.239 22-Dec-2001 chs

convert luna68k to ELF. ok'd by nisimura.


1.238 20-Dec-2001 thorpej

Switch alpha to the new toolchain.


1.237 16-Dec-2001 scw

Switch all OBJECT_FMT=elf m68k ports to new-toolchain.


1.236 15-Dec-2001 thorpej

Err, after consulting FSF's config.sub, shl -> shle.


1.235 15-Dec-2001 thorpej

MACHINE_GNU_ARCH for sh3el is "shl". sh3eb and sh3el ELF targets
are also named "netbsdelf".


1.234 12-Dec-2001 thorpej

Per suggestion from Todd:

Wrap assignments of various tools within USETOOLS_BINUTILS and
USETOOLS_GCC (names reflect the FSF packages the tools are provided
by), which default to "yes", for easy testing of different versions
of these packages.


1.233 12-Dec-2001 tv

Revert rev. 1.228. If USE_NEW_TOOLCHAIN is set to "yes" explicitly by the
user on a platform that is not *OFFICIALLY* switched to the new toolchain,
WE REALLY, REALLY DO WANT A LOUD WARNING AT THE START OF THE BUILD!


1.232 12-Dec-2001 tv

Revert previous. This breaks many things, since such variables as LD and AS
are defined in <sys.mk>!

A better way needs to be devised for this.


1.231 12-Dec-2001 thorpej

Set the following vars with FOO?= so that alternative versions
can be specified in mk.conf: AR, AS, LD, NM, OBJCOPY, OBJDUMP,
RANLIB, SIZE, and STRIP.

This, along with some symlinks in TOOLDIR, makes it much easier to
test different versions of the GNU toolchain (e.g. binutils-current).


1.230 11-Dec-2001 tv

Major readability cleanups.


1.229 07-Dec-2001 jmc

Add pwd_mkdb as a toolchain bit for builds


1.228 04-Dec-2001 jmc

If USE_NEW_TOOLCHAIN is defined and set to yes treat that as a match (and then
reset it to nowarn so it lines up with ported platforms).


1.227 29-Nov-2001 thorpej

Provide ${MAKEWHATIS}.


1.226 28-Nov-2001 jmc

Make sure the tools built roff tools are first in the path before calling groff
as it calls troff/etc without any leading pathnames. Otherwise the tools
version is fairly useless as the installed system version will be used to
build all manpages


1.225 25-Nov-2001 jmc

Back out last change until some more testing is done. Should account for folks
not using objdirs and also force this to cd to $_SRC_TOP_ before doing the
make obj


1.224 25-Nov-2001 jmc

Before checking the value from PRINTOBJDIR force a make obj at $_SRC_TOP_.


1.223 24-Nov-2001 perry

1) Use the -r flag for INSTALL_SYMLINK and INSTALL_LINK, just like
INSTALL_FILE does.
2) Patch around a bug that has been biting people in which bsd.own.mk
attempts to cd into space when building outside of the tree. I may
have a better solution for the whole thing later.


1.222 19-Nov-2001 perry

Snapshot of some things for builds as non-root -- work in progress:

0) rename UNPRIVILEGED UNPRIVED. It was too long. We'll argue about if
we should replace it with yet something else later. It currently
logs metadata by default. We'll argue more about that later too.
1) create a _SRC_TOP_OBJ_ variable pointing at the /usr/src objdir so
we know where to dump metadata.
2) Add a METALOG variable pointing at the default location for the
metadata log. (This may be moved or renamed -- the location is just
for testing.)
3) Add a HOST_INSTALL_FILE used in host tools Makefiles instead of
INSTALL_FILE, which doesn't include ${INSTPRIV} (i.e -U -M ${METALOG})
4) Add INSTALL_LINK, INSTALL_SYMLINK for use in other .mk files so we
can get rid of explicit uses of ln. Slightly clean up INSTALL_FILE.


1.221 19-Nov-2001 thorpej

Use a little transitional hack to determine if we use -isystem
or -idirafter. Use the former only of USE_NEW_TOOLCHAIN, since
-isystem causes the old toolchain to bomb out when building
libstdc++.


1.220 15-Nov-2001 atatat

Add OBJDUMP to the toolchain list.


1.219 15-Nov-2001 tv

Make it possible to warn about platforms that are not yet switched to the
new toolchain.


1.218 15-Nov-2001 wiz

It's called nbmakeinfo now, not makeinfo.


1.217 14-Nov-2001 tv

Prefix all target-specific things with `${MACHINE_GNU_PLATFORM}-'.
Prefix all non-target-specific things with `nb'.


1.216 14-Nov-2001 thorpej

If MACHINE_ARCH == arm, set USE_NEW_TOOLCHAIN=yes and OBJECT_FMT=ELF.
It is infeasible for some ARM ports to use anything but ELF/new-toolchain,
and this allows for the ARM ports that aren't ready for ELF to stay at
MACHINE_ARCH == arm32 until they're ready. The rest of the ARM ports
have a userbase such that if a flag day happens with the compiler (there
are a couple of ABI issues still being discussed), that it won't matter
so much.

Discussed with Ben Harris, Matt Thomas, and Chris Gilbert.


1.215 13-Nov-2001 tv

"${FOO}" -> ${FOO:Q}


1.214 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


1.213 12-Nov-2001 tv

MAKEFLAGS isn't accessible from a conditional during parse; use .MAKEFLAGS
instead.


1.212 12-Nov-2001 tv

"true" doesn't output anything; use "echo" instead.


1.211 12-Nov-2001 tv

Make PRINTOBJDIR use "${MAKE} -V .OBJDIR" so it will work correctly with
<bsd.obj.mk> rewrites of ${.OBJDIR}. Add a failsafe (checking for the
-V option in MAKEFLAGS) to prevent infinite recursion.


1.210 09-Nov-2001 thorpej

Add a DBSYM variable for the dbsym(8) host tool.


1.209 05-Nov-2001 tv

Extend the use of NEED_OWN_INSTALL_TARGET (used by bsd.pkg.mk since its
creation, to exclude conflicting make targets from botching pkgsrc), to
avoid defining INSTALL_FILE. pkgsrc is self-contained except for
<bsd.own.mk>, so this doesn't have an adverse effect on real <bsd.*.mk>
build trees.


1.208 04-Nov-2001 thorpej

Switch PowerPC to the new toolchain.


1.207 03-Nov-2001 thorpej

Fix typo in previous.


1.206 03-Nov-2001 thorpej

Switch NetBSD/sparc to the new toolchain.


1.205 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.204 31-Oct-2001 tv

* Create a variable HOST_OSTYPE that represents the host build environment,
using `uname -s`-`uname -r`-`uname -p || uname -m`. This can be overridden
in mk.conf or the environment, and is used by host tools to ensure that
build hosts do not clobber each other.

* Now that there's an objdir in src/tools, make a default TOOLDIR by creating
"tools.${HOST_OSTYPE}" in the objdir (if it exists) of src/tools. This
means that TOOLDIR is no longer required to be set in a build, though it
still may be set manually if desired.

* Set MKTOOLS to "yes" by default, since the default TOOLDIR is now located
in a known mutable location. This may still be set manually if desired.


1.203 31-Oct-2001 tv

Make REQUIRETOOLS work properly -- don't error if USE_NEW_TOOLCHAIN is
not set. Also, nuke redundant USE_NEW_TOOLCHAIN check with USETOOLS.


1.202 28-Oct-2001 jmc

already gets checked and prints out an error if it's used without
being set. You want to use it if USE_NEW_TOOLCHAIN is set and you're in
the source tree by default.


1.201 28-Oct-2001 chs

if TOOLDIR is not defined, USETOOLS should default to "no",
since defaulting to "yes" will just give an error every time.


1.200 26-Oct-2001 jmc

Remove debug echo statement


1.199 26-Oct-2001 jmc

Change the check for BSD_PKG_MK into something which looks to see if we're
running from inside of $BSDSRCDIR (recurse back and look for file/dir
signatures or reach /, whichever comes first).

Do it once and then pass the results to sub-makes.

Finally, if using the new toolchain and USETOOLS=yes check $TOOLDIR
before using it. Print an error message out if it's not set when expected
here.


1.198 25-Oct-2001 bjh21

USE_NEW_TOOLCHAIN for ARM ELF platforms (just arm26), since the old toolchain
doesn't do ARM ELF at all.


1.197 25-Oct-2001 thorpej

Oops, typo.


1.196 25-Oct-2001 thorpej

Add an ASN1_COMPILE variable for that host tool.


1.195 24-Oct-2001 thorpej

MDSETIMAGE gets a MACHINE_GNU_PLATFORM prefix.


1.194 24-Oct-2001 thorpej

LINT needs a ${MACHINE_GNU_PLATFORM}- prefix now.


1.193 23-Oct-2001 thorpej

Quote the ${CC} provided to mkdep's environment.


1.192 23-Oct-2001 thorpej

When setting MACHINE_GNU_PLATFORM for ARM ports, we need compare
MACHINE_GNU_ARCH (not MACHINE_ARCH) to "arm", otherwise the GNU
platform won't be set properly if OBJECT_FMT=ELF.


1.191 21-Oct-2001 jmc

Pull in mdsetimage to the tools builds. (XXX - using libbfd here would
probably be preferrable long term).


1.190 21-Oct-2001 jmc

Pass ${.MAKE} to crunchgen so it uses the one for cross builds correctly


1.189 20-Oct-2001 jmc

Change sets so the differing toolchain bits only (not the complete toolchain
at the moment) are pulled out into tc.mi and tc.old files.

tc.mi has any files which are in the new toolchain only and tc.old contains
the reverse (files which only existed in the old toolchain). The remainder
of the toolchain that is common between both old and new is still contained
in the various mi/md files.

Check for USE_NEW_TOOLCHAIN=yes in makeflist to determine which tc files to
pull in if they exist.

XXX - All the toolchain bits should eventually be pulled out into separate
lists as tc.mi and tc.<arch>. Leaving it for now until the new toolchain is
fully integrated on all ports.


1.188 20-Oct-2001 jmc

Add mklocale to cross-tools and turn it back on for the builds.


1.187 13-Oct-2001 jmc

Add crunchgen, msgc and menuc


1.186 09-Oct-2001 enami

Make mtree a host tool and use it when appropriate.


1.185 08-Oct-2001 mrg

use CC="${CC}" and NM="${NM}" so that, eg, "CC=cc -m64" works.


1.184 04-Oct-2001 tv

Make sure to define USETOOLS properly always (set it to "no" on systems
without USE_NEW_TOOLCHAIN). This will allow conversion of in-tree
conditionals to use only USETOOLS....


1.183 26-Sep-2001 mrg

enable a toolchain for the sparc64.


1.182 25-Sep-2001 tv

Add STRIP to the environment of binstall, to use proper strip at install
time. Noted by <jepeway@blasted-health.com>.


1.181 25-Sep-2001 tv

Add mssed commit that sets USETOOLS=no if BSD_PKG_MK is set. Noted by erh.


1.180 22-Sep-2001 tv

Move the definitions of host tools from Makefile.tools to <bsd.own.mk>.

Turn on USE_NEW_TOOLCHAIN explicitly on i386. (See current-users or
tech-toolchain for the heads up announcement and tech details.)


1.179 16-Sep-2001 chris

Arm doesn't do ELF by default yet. Should fix PR 13973.


1.178 08-Sep-2001 thomas

On Atari now the default object format is ELF.


1.177 26-Aug-2001 eeh

Build lint on sparc64.


1.176 25-Aug-2001 chs

switch cesfic to ELF.


1.175 19-Aug-2001 mrg

enable profile libraries on sparc64


1.174 15-Aug-2001 tv

Revert previous temporarily to deal with PR bin/13722; will revisit this
(and close the PR) after I've located all of the uses of PRINTOBJDIR and
fixed them up not to bork themselves recursively.


1.173 14-Aug-2001 tv

Speed up PRINTOBJDIR a little by changing it to "${MAKE} -V .OBJDIR" (it
will recurse, but won't need to spawn a shell and run commands now).


1.172 14-Aug-2001 tv

Simplify some MACHINE_ARCH transforms, and redefine MACHINE_GNU_PLATFORM
as the full GNU triplet name.


1.171 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.170 14-Aug-2001 tv

Simplify PRESERVE and INSTPRIV by using ${...:D...}.


1.169 14-Aug-2001 tv

Make MAKECONF defined always by setting MAKECONF?=/etc/mk.conf and using
that variable only for including make(1) variables. Much more consistent
and less prone to ambiguity this way (and now, ${MAKECONF} can be used in
messages indicating a missing option needed for a build).


1.168 23-Jul-2001 matt

MACHINE_ARCH=arm changes


1.167 21-Jul-2001 bjh21

Since arm26 and arm32 are heading towards shared binaries, don't distinguish
them for the GNU tools.


1.166 21-Jul-2001 bjh21

arm26 uses ELF.


1.165 13-Jul-2001 fredette

Added support for the m68000 MACHINE_ARCH, as an incomplete
ELF port with a MACHINE_CPU of m68k.


1.164 19-Jun-2001 fvdl

Add some extra flags for the x86-64 port. Disable -O in sys.mk
(which is where all ports set it); there seem to be some lurking
optimization bugs for the x86-64.


1.163 18-Jun-2001 simonb

Add a new make variable "MKSOFTFLOAT". If not set to "no", it adds
"-msoft-float" to COPTS and FOPTS, and possibly builds soft-float
library support (port specific).
Defaults to "no".


1.162 02-Jun-2001 tv

Fix typo.


1.161 02-Jun-2001 tv

Add MACHINE_GNU_PLATFORM to identify as "netbsdelf" for historically a.out
platforms. While there, allow MACHINE_GNU_ARCH and MACHINE_CPU to be
inherited from the environment.


1.160 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.159 12-May-2001 chs

next68k is now ELF.


1.158 19-Mar-2001 tsutsui

Switch news68k to ELF:
- Set OBJECT_FMT=ELF on news68k


1.157 24-Feb-2001 msaitoh

NetBSD/sh3 ELF doesn't supports dynamic link yet.


1.156 22-Feb-2001 chs

sun3 now uses ELF.


1.155 01-Feb-2001 itojun

add LOCALEDIR and related declarations.


1.154 08-Jan-2001 itojun

use MACHINE_CPU=arm on both arm26/32.


1.153 08-Jan-2001 itojun

declare MACHINE_CPU. MACHINE_CPU will be generated from MACHINE_ARCH,
to identifiy CPU type in build tree (like mipse[lb] -> mips, sh3e[lb] -> sh3).

XXX what should we do about arm and sparc?


1.152 05-Jan-2001 itojun

s/.INIT/.BEGIN/ for NetBSD make


1.151 04-Jan-2001 itojun

die if MACHINE_ARCH == sh3


1.150 04-Jan-2001 itojun

sh3 split (MACHINE_GNU_ARCH)


1.149 04-Jan-2001 itojun

sh3 split


1.148 02-Jan-2001 simonb

Switch NetBSD/hp300's OBJECT_FMT to ELF


1.147 30-Dec-2000 sommerfeld

Change ${PRINTOBJDIR} to a "safer" but more complex form which avoids
infinite recursion when directories reference each other or themselves
(most common when a FOOOBJDIR is defined in a common Makefile.inc).


1.146 07-Dec-2000 scw

NetBSD/mvme68k's OBJECT_FMT is now officially ELF. :-)


1.145 06-Dec-2000 sommerfeld

define PRINTOBJDIR as a canned known-safe print-objdir invocation.


1.144 30-Sep-2000 itojun

always compile RSA into libcrypto.
MKCRYPTO disables the whole crypto tree, and in that case,
we will not have RSA (nor libcrypto) with us.


1.143 30-Sep-2000 itojun

repair openssl (libcrypto) for non-32bit architecture.
don't use unsigned long where 32bit unsigned variable is asked for.
use u_int32_t. (not sure if uint32_t is better or not, but anyway,
u_int32_t <-> uint32_t should not raise binary compatibility issue)
PR10921.

TODO: have arch-dependent Makefiles where we supply -DFOO for optimization.
(do not change size of variable though)

XXX: we should actually nuke all other #ifdef in /usr/include/openssl/*.h,
however, that needs a lot of work and will make future openssl upgrade harder.

remove RC5 and IDEA by default. build them separately as
libcrypto_{rc5,idea}.a. put dummy function, which is "warning to stderr
and exit(1)". NOCRYPTO_{RC5,IDEA} are obsoleted.
PR10883.


1.142 22-Sep-2000 phil

Add rules to make and install html pages in /usr/share/man/html*


1.141 02-Aug-2000 msaitoh

sh3 port is incomplete, so add NOLINT=1 and NOPROFILE=1
(and NOPIC=1 if OBJECT_FMT==COFF)


1.140 26-Jul-2000 mycroft

Build shared libraries on sparc64.


1.139 27-Jun-2000 bjh21

Add GNU_ARCH.arm26


1.138 23-Jun-2000 thorpej

Garbage-collect old KERBEROS* switches.


1.137 23-Jun-2000 thorpej

Add MK... variables to enable/disable various aspects of building
crypto support into the system. See share/mk/bsd.README for more
a full description.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
1.136 02-May-2000 simonb

branches: 1.136.4;
Add HTMLDOCDIR pointing to /usr/share/doc/html.


1.135 24-Apr-2000 simonb

White space bogons (double spaces, spaces instead of tabs).


1.134 20-Feb-2000 wiz

removed 'UVM?= YES'


1.133 19-Feb-2000 tsutsui

pica no longer exists, and arc has already switched to UVM.

XXX We still need "UVM?= yes" ?


1.132 22-Jan-2000 mycroft

Do the NEED_OWN_INSTALL_TARGET klugery for depend and all, too, so this works
with pkgsrc.


1.131 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.130 30-Nov-1999 sommerfeld

Add MKOBJDIRS make variable to bsd.own.mk, defaulting to "no" but
overrideable in mk.conf

Document in bsd.README; this is distinct from "MKOBJ", which controls
whether "make obj" does anything.

In the top-level makefile, if MKOBJDIRS != "no", do a "make obj" at an
appropriate point during a "make build".


Revision tags: comdex-fall-1999-base
1.129 06-Oct-1999 msaitoh

add GNU_ARCH.sh3=sh


1.128 14-Sep-1999 perry

branches: 1.128.2;
Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.127 12-Sep-1999 chs

the PMAP_NEW option is gone as the new interface is no longer optional.


1.126 21-Aug-1999 simonb

If UNPRIVILEGED is defined, set ${INSTPRIV} to -U. Passed to install(1)
so that it doesn't try to set the user or group of the destination
file(s).


1.125 16-Aug-1999 simonb

Make -r the default for RENAME, as per discussion on tech-install.


1.124 05-Jul-1999 fvdl

branches: 1.124.2;
Switch the i386 port to ELF.


1.123 26-Jun-1999 danw

Remove the NOPROFILE=1 for powerpc


1.122 10-Jun-1999 simonb

Conditionally define SHLIB_VERSION_FILE as ${.CURDIR}/shlib_version .


1.121 06-Jun-1999 pk

Switch the sparc to ELF.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.120 24-Feb-1999 drochner

add missing parts of the "mips"->"mipse?" transition


1.119 13-Feb-1999 lukem

don't bother supporting NOINFO (since it's a new thing); just support MKINFO=no
fix description of MKSHARE=no


1.118 12-Feb-1999 tv

Add {MK,NO}INFO, and use that to control generation/installation of Info
documentation. MKINFO=no is implied by MKSHARE=no.


1.117 12-Feb-1999 lukem

for MKSHARE=no, set MKDOC=no MKMAN=no MKNLS=no, and for MKMAN=no, set
MKCATPAGES=no. this simplifies various tests.


1.116 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.115 11-Feb-1999 tv

Create <bsd.info.mk> for Info documentation, and avoid the nasty install
stuff duplication by expressing it in terms of <bsd.files.mk>. Allow for
multiple inclusion of <bsd.files.mk> by clearing ${FILES} at the end, and
using FILES+= rather than FILES= in <bsd.info.mk>.


1.114 10-Feb-1999 tv

Remove GNU_ARCH.mips=mipsel, and produce an error if MACHINE_ARCH is only
"mips".


1.113 07-Feb-1999 hubertf

s/bsd.port.mk/bsd.own.mk/


1.112 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.111 31-Dec-1998 tv

GC conditional egcs cruft.


1.110 23-Dec-1998 itohy

Switch x68k port to UVM by default.
Mach VM and even old contig and non-contig codes are still alive.


1.109 23-Dec-1998 mrg

move sun3 to UVM by default. only pica/arc & x68k left.


1.108 12-Dec-1998 thorpej

Just switch all m68k to EGCS.


1.107 12-Dec-1998 is

Switch Amiga port to egcs.


1.106 02-Dec-1998 tsubai

Use egcs by default on powerpc.


1.105 28-Nov-1998 eeh

Fix up GNU_ARCH for sparc64.


1.104 25-Nov-1998 mrg

note that the sparc64 does not yet do pic or profile libraries.


1.103 24-Nov-1998 tsubai

Remove NOPIC= on powerpc.


1.102 22-Nov-1998 mycroft

Use egcs on sparc.


1.101 21-Nov-1998 mycroft

Invert the sense of the UVM test, so it lists those ports which do *not* have
UVM yet.


1.100 21-Nov-1998 mycroft

Use egcs on arm32.


1.99 19-Nov-1998 dbj

Set UVM to yes by default for next68k userland compiles.


1.98 16-Nov-1998 tsubai

Enable UVM on newsmips.


1.97 15-Nov-1998 jonathan

Make UVM default for pmax.


1.96 14-Nov-1998 perry

Per Charles, turn back on egcs on port-i386. If this causes problems,
the methodology is now to fix the problems instead of backing out.


1.95 31-Oct-1998 jonathan

Make EGCS default compiler on mips platforms.


1.94 31-Oct-1998 matt

Enable shared libraries and EGCS.


1.93 30-Oct-1998 mark

Define UVM for arm32.


1.92 28-Oct-1998 is

Switch the Amiga port to UVM.


1.91 04-Oct-1998 tv

Back out egcs from i386 and sparc. There are not enough fixes on the egcs
1.1 branch to repair the already open PRs on egcs codegen. `For now, I
give up.' Perhaps another day....


1.90 28-Sep-1998 christos

Use PRESERVE flag only when UPDATE is defined.


1.89 28-Sep-1998 christos

Use preserve flag in install.


1.88 15-Sep-1998 matthias

Take a deep breath and switch over NetBSD/pc532 to use egcs by default.


1.87 14-Sep-1998 tv

Transition sparc platform to egcs.


1.86 14-Sep-1998 tv

Switch i386 to egcs 1.1.


1.85 11-Sep-1998 eeh

Add some more sparc64 stuff.


1.84 03-Sep-1998 tsubai

UVM is now standard on macppc.


1.83 03-Sep-1998 sakamoto

UVM is the default on bebox,ofppc.


1.82 02-Sep-1998 matthias

UVM/PMAP_NEW are now the standard for the pc532.


1.81 02-Sep-1998 mrg

really turn UVM on on the atari...


1.80 02-Sep-1998 mrg

UVM is the default on sparc64


1.79 31-Aug-1998 thorpej

Switch the i386 port to UVM+PMAP_NEW.


1.78 27-Aug-1998 tv

Alpha is now egcs by default (now all that's left is as and ld).


1.77 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.76 07-Aug-1998 frueauf

SYS_INCLUDE=symlinks should not be enabled by default. I guess it was done
by accident.


1.75 04-Aug-1998 ragge

Put in that vax uses PMAP_NEW as default.


1.74 27-Jul-1998 tv

- Add MACHINE_GNU_ARCH entries for mipseb and mipsel. Temporarily remap
mips to mipsel.
- Remove the unused definition of NOSHLIB for powerpc. NOPIC is being
used for this purpose.


1.73 22-Jul-1998 perry

Get rid of NONOLINT, and unset NOLINT. We now build lint libraries by default.


1.72 27-Jun-1998 mark

Define NONOLINT for arm32.


1.71 29-May-1998 agc

Delete (duplicate) setting of UVM if the MACHINE_ARCH is "sparc" - this
is done earlier in the file, with the other platforms on which it's
standard.


1.70 25-May-1998 tv

SPARC was missing from the list of GNU_ARCHs.


1.69 22-May-1998 tv

Add the ability to map a MACHINE_ARCH to a GNU architecture name:
- ${GNU_ARCH.${TARGET_ARCH}} will produce a target architecture name in
mainline sources
- ${MACHINE_GNU_ARCH} is equivalent to ${GNU_ARCH.${MACHINE_ARCH}}


1.68 10-May-1998 kleink

Set NONOLINT on sparc.


1.67 05-May-1998 mrg

make UVM the default on the sparc


1.66 04-May-1998 thorpej

Make UVM standard procedure on hp300, mac68k (per scottr), and mvme68k.


1.65 04-May-1998 thorpej

Add a mechanism for specifying which platforms use UVM and which use
PMAP_NEW, and enable both for NetBSD/alpha.


1.64 13-Apr-1998 lukem

only read /etc/mk.conf once (stops += variables getting double assignments)


1.63 03-Apr-1998 agc

Correct a definition name in a comment.


1.62 28-Mar-1998 cgd

GC alpha's ECOFF_TOOLCHAIN make variable, and related bits. Nobody
should be using an ECOFF toolchain on NetBSD/alpha any more.


1.61 26-Feb-1998 lukem

change default ownership from bin:bin to root:wheel


1.60 25-Feb-1998 perry

set NONOLINT on i386. Other ports on which building with lint is okay should
be added to this list until we get all ports okay.


1.59 23-Feb-1998 jonathan

More table-driven changes for different toolchains:
* new bsd.own.mk variable OBJECT_FMT with values "a.out" or "ELF".
* use OBJECT_FMT in Makefile tests that depend on toolchain.
* Add new bsd.own.mk variable NOSHLIB that, if set indicates a given
port doesnt yet do shared libraries. Set on powerpc.
* Document new feature-test variables in src/share/mk/bsd.README.
Tested on i386, mips, fakedup Alpha environment.


1.58 15-Jan-1998 agc

Move the inclusion of bsd.own.mk back to the correct place in
bsd.port.mk, but this time use a definition before the inclusion,
which stops <bsd.own.mk> defining its own install target when
using the package system.

This makes the package system take notice of the definitions in
/etc/mk.conf


1.57 03-Nov-1997 cgd

if "NONOLINT" is defined, don't automatically define NOLINT. "yuck."
Once lint support is completely working, NOLINT's definition should be
removed from this file entirely.


1.56 27-Oct-1997 drochner

Fix the before/after-install ordering problem in a different way.
The old fix broke with multiple targets on the make command line.


1.55 23-Oct-1997 drochner

Force "beforeinstall" and "afterinstall" to be executed before/after
"install". (pr misc/4319)


Revision tags: netbsd-1-3-base
1.54 11-Oct-1997 mycroft

branches: 1.54.2;
Move the previous to a different place, because `.if !target(...' sucks.


1.53 11-Oct-1997 mycroft

As the comment says:
Make sure all of the standard targets are defined, even if they do nothing.

Also, add a .PHONY for regress.


1.52 03-Oct-1997 mycroft

Install man page source, in addition to the cat files.


1.51 30-Sep-1997 is

Make "make regress" work; by Charles Hannum.


1.50 31-May-1997 cjs

Back out BUILDDIR and NOINSTALL changes.


1.49 30-May-1997 cjs

branches: 1.49.2;
Set or unset OBJDIR before we determine BUILDDIR.


1.48 30-May-1997 cjs

Fix quoting yet again; reformat.


1.47 30-May-1997 cjs

Don't add MACHINE to BUILDDIR if it's already added to BSDOBJDIR.


1.46 29-May-1997 cjs

Quote it properly this time.


1.45 29-May-1997 cjs

Forgot to quote a variable.


1.44 29-May-1997 cjs

If BUILDDIR is the same as DESTDIR, we aren't really using an object
file tree, so undef OBJDIR and install includes, etc. the old way.
Also, don't use OBJDIR at all if we're not under BSDSRCDIR.


1.43 28-May-1997 cjs

Append ${MACHINE} to ${BUILDDIR} if USR_OBJMACHINE is not set.


1.42 26-May-1997 pk

Remove bogon.


1.41 26-May-1997 cjs

These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.


1.40 10-May-1997 mycroft

Add another .PHONY.


1.39 10-May-1997 mycroft

Add some .NOTMAINs.


1.38 09-May-1997 mycroft

Get the install dependencies in the right order, for the first time.


1.37 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.36 07-May-1997 mycroft

Various simplifications.


1.35 07-May-1997 mycroft

Shuffle some .PHONYs around, to work better with `-t'.


1.34 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.33 17-Apr-1997 thorpej

Rename STRIP -> STRIPFLAG - this is a flag passed to install(1) to
indicate whether or not the program should be stripped. This rename
allows the user to set STRIP as an alternative to /usr/bin/strip,
helping cross-compiling.


1.32 29-Mar-1997 thorpej

Set NOPIC and NOPROFILE on PowerPC.


1.31 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.30 23-Feb-1997 cgd

turn Alpha's ELF_TOOLCHAIN checks to ECOFF_TOOLCHAIN checks


1.29 18-Feb-1997 cgd

fix botch in the last checkin.


1.28 10-Feb-1997 jonathan

Change bsd.own.mk to build shared libs on mips CPUs by default.


1.27 13-Jan-1997 mark

The arm32 architecture also needs to set NOPIC.


1.26 13-Oct-1996 cgd

define NOPIC on the alpha only if ELF_TOOLCHAIN is not defined.
(This is a hack.)


1.25 27-Aug-1996 explorer

Fix a missing dollar sign, and move paths and modes
to bsd.own.mk for KMOD* vars


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.24 13-Apr-1996 thorpej

Add the ability to override defaults in bsd.own.mk more easily, by
looking for "${MAKECONF}", or failing that, "/etc/mk.conf" and including
the first one it finds, if it exists. From Chris Demetriou <cgd@netbsd.org>,
PR #1970.


1.23 03-Nov-1995 cgd

NetBSD/Alpha now supports profiling


1.22 12-Oct-1995 cgd

install -s now works properly on the alpha, so don't redefine STRIP
(to kill the -s).


Revision tags: netbsd-1-1-base
1.21 02-Oct-1995 cgd

branches: 1.21.2;
correct an alpha-specific comment


1.20 27-Sep-1995 cgd

alpha no longer needs NOMAN=


1.19 22-Jul-1995 ragge

NOPIC option added, so that we don't try to generate it.


1.18 24-Jun-1995 cgd

update lint rules, but keep linting disabled


1.17 02-Jun-1995 brezak

define MANZ=1 in bsd.own to get compressed man pages installed


1.16 21-Apr-1995 cgd

special hacks for alpha; mostly: some things aren't supported.


1.15 20-Feb-1995 jtc

Define NLSDIR, NLSGRP, NLSOWN, and NLSMODE (for message catalogs).


1.14 28-Dec-1994 phil

Enable shared libs on the pc532.


1.13 28-Sep-1994 mycroft

Add SKEY (defined) and KERBEROS (commented out) variables.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
1.12 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.11 27-Mar-1994 cgd

kill a bogosity


1.10 19-Jan-1994 jtc

Change MANOWN, MANGRP, DOCOWN & DOCGRP to _not_ be initialized from
BINOWN or BINGRP. Otherwise manual pages and documentation installed
from the same directories as suid or sgid programs will have incorrect
user or group ownership. (Uucico manpage owned by uucp, su manpage owned
by root, etc.)


1.9 08-Dec-1993 cgd

get rid of definitions of *OBJMACHINE which charles (hopefully)
accidentally added...


1.8 07-Dec-1993 mycroft

Only disable shared libs on 32k, for now.


1.7 07-Nov-1993 cgd

define BSDOBJDIR and BSDSRCDIR to have make think of the src and obj
trees as rooted someplace other than /usr/src and /usr/obj.


1.6 04-Oct-1993 cgd

set NOPIC on machines which don't know how to build PIC libraries.


1.5 15-Aug-1993 mycroft

Oops. DOCOWN and DOCGRP were recursive.


1.4 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


1.3 15-Aug-1993 mycroft

Abstract out dependency stuff, and add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
1.2 10-Jul-1993 brezak

Allow SYS_INCLUDES={copies,symlinks} choice in bsd.own.mk.


Revision tags: netbsd-0-8 netbsd-alpha-1
1.1 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406 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 pgoyette-compat-0728 pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE agc-symver-base tls-maxphys-base yamt-pagecache-base8 yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base bouyer-quota2-nbase bouyer-quota2-base matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE 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 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base mjf-devfs2-base keiichi-mipv6-nbase keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
1.63 14-Apr-1998 agc

Move bsd.port.mk and bsd.port.subdir.mk into pkgsrc/mk (by CVS
repository copy), which is a much better place for them. Update the
Makefile to reflect these changes.


1.62 09-Apr-1998 hubertf

Don't creade dirs mode 444, inspired by fvdl's last commit.


1.61 08-Apr-1998 fvdl

INSTALL_DATA_DIR should not install directories with mode 444


1.60 24-Mar-1998 tron

Add "ftp.uni-paderborn.de" and "ftp.x.org" to "${MASTER_SITE_XCONTRIB}".


1.59 23-Mar-1998 hubertf

Document ALL_TARGET and INSTALL_TARGET, as per PR 5186.


1.58 09-Mar-1998 agc

Temporarily revert to using GNU tar, until pax is bug-compatible with
gtar. pax has problems extracting certain archives which were made by
gtar and contain trailing trash at the end - gtar ignores this dross,
pax thinks it's valid, and prompts for the second volume.


1.57 08-Mar-1998 hubertf

Make definition of OBJMACHINE in mk.conf work.


1.56 08-Mar-1998 frueauf

Introduce "Arch:" field in INDEX to handle the ONLY_FOR_ARCHS case better.


1.55 07-Mar-1998 hubertf

Add INSTALL_*_DIR macros.


1.54 01-Mar-1998 tron

MANZ now handles symlinks properly.


1.53 28-Feb-1998 hubertf

Cleanup fetch-list change reported by Bernd Ernesti..


1.52 28-Feb-1998 tron

Fix merge problem with last commit.


1.51 28-Feb-1998 tron

Fix problem with registering foreign language manual pages.


1.50 27-Feb-1998 agc

Patches from Matthew Green to use pax if it's present, in preference
to tar.


1.49 20-Feb-1998 hubertf

Enhance look & feel of the generated README.html's.


1.48 20-Feb-1998 hubertf

Recursively print /bin/sh code for all dependent package as well as the
current package (IF called from a package dir and not via bsd.port.subdir.mk;
in the latter case it's assumed that the dependent packages will be scanned
later anyways).

This fixes PR 4992 by Mario Kemper <magick@bundy.lip.owl.de>.


1.47 20-Feb-1998 hubertf

Kill line forgotten during PATH extension (in MAKE_ENV).


1.46 17-Feb-1998 agc

Add a deinstall target, so that packages can be removed easily.

This implementation was taken from FreeBSD.


1.45 13-Feb-1998 agc

When generating the PLIST, if a manual page name has to have .gz added
or removed using sed, don't add the g at the end of the substitution
expression - there will only be one substitution per line.


1.44 09-Feb-1998 hubertf

Fix PR 4884 by replacing STRIP with STRIPFLAG.
This addes yet another step towards bsd.pkg.mk. :)


1.43 02-Feb-1998 hubertf

Introduce TRUE?=/usr/bin/true, and use it.


1.42 30-Jan-1998 agc

Remove the requirement that a LIB_DEPENDS name must have any '.'
characters escaped with a backslash, but recognise the backslashes for
backwards compatibility. When matching names, do any escaping of
the regexp '.' metacharacter automatically, if needed.

When a shared object dependency is printed out, use a form that does
not have the backslashes in it, for readability.

Print out the full pathname of the matching shared object, for clarity.


1.41 28-Jan-1998 hubertf

Replace "<$ARCH"> by "${MACHINE_ARCH}", keep "<$ARCH>"
(in bsd.port.mk) for backward compatibility.


1.40 27-Jan-1998 agc

Rename the `mirror' target to be `mirror-distfiles'. This describes
the action better, and works around problems with the mirror package.

Document the mirror-distfiles target, and also the readme target.


1.39 25-Jan-1998 hubertf

use __ARCH_OK=yes and NO_IGNORE=yes at the mirror-target to get ALL distfiles


1.38 25-Jan-1998 hubertf

Re-move .if!defined(__ARCH_OK) to fix use of NO_IGNORE; document some .endif's


1.37 25-Jan-1998 hubertf

MAINTAINER = packages@NetBSD.ORG


1.36 24-Jan-1998 hubertf

From OpenBSD's bsd.port.mk rlog (Mmm, AnonCVS :-):

revision 1.21
date: 1997/12/20 01:26:57; author: joey; state: Exp; lines: +2 -2
openbsd maintainer changed from imp to me


1.35 23-Jan-1998 hubertf

Echo "" instead of nothing in CKSUMFILES computation..
Fixes PR 4877 by Manuel Bouyer <bouyer@antioche.lip6.fr>


1.34 23-Jan-1998 agc

In the shell script to find an executable upon which this package
depends, break out of the loop when you find one. Also print the name
of the executable found.


1.33 22-Jan-1998 agc

Ignore the return code from rm when removing the ${WRKDIR} symbolic
link, when doing a "make clean" with WRKOBJDIR defined. From Thorsten
Frueauf.


1.32 22-Jan-1998 agc

Add a MIRROR_DISTFILE variable; defaults to "yes", and should be set
to "no" in a package's Makefile when the authors have placed
restrictions on the redistribution of the distfiles. (Thanks to Jason
Thorpe for the idea).

Add a `mirror' target, which will do a "make fetch" if the package's
distfile is allowed to be redistributed. This is for use on sites
which mirror package distfiles. (Thanks to Charles Hannum for the
idea).


1.31 16-Jan-1998 hubertf

Fix comment for FETCH_CMD wrt non-NetBSD-systems


1.30 15-Jan-1998 hubertf

- Our default for FETCH_CMD is ftp, not fetch.
- Document NO_IGNORE, __ARCH_OK
- Make __ARCH_OK overridable, so it can be set to YES e.g. for fetching
all distfiles.
- Move ".ifndef(__ARCH_OK): block, so some targets like clean work
in any case.
- Add LOCALBASE and X11BASE to PATH in MAKE_ENV, CONFIGURE_ENV and
SCRIPT_ENV; this fixes PR 4573


1.29 15-Jan-1998 agc

Move the inclusion of bsd.own.mk back to the correct place in
bsd.port.mk, but this time use a definition before the inclusion,
which stops <bsd.own.mk> defining its own install target when
using the package system.

This makes the package system take notice of the definitions in
/etc/mk.conf


1.28 29-Dec-1997 hubertf

Add us to MASTER_SITE_LOCAL.


1.27 27-Dec-1997 hubertf

MACHINE_ARCH of pmax is "mips"


1.26 21-Dec-1997 hubertf

Fix up documentation (MASTER_SITE_SUBDIR, PATCH_SITE_SUBDIR,
MASTER_SITE_BACKUP).


1.25 19-Dec-1997 hubertf

Now that we have ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles,
add it to MASTER_SITE_BACKUP.


1.24 13-Dec-1997 hubertf

- move definition of ARCH and OPSYS so it is even available if
ONLY_FOR_ARCHS is set
- Usage points to PLIST_SRC


1.23 03-Dec-1997 hubertf

do not depend on gmake being called gmake (pointed out by Matt Green)


1.22 26-Nov-1997 agc

Fix missing backslash when gzipping manual pages.

If we're going to go to the bother of defining LDCONFIG, we might as
well use it.


1.21 22-Nov-1997 hubertf

We use perl 5.004_04 now


1.20 22-Nov-1997 hubertf

Use MI/MD PLIST files pkg/PLIST-{mi,md-{shared,static}}


1.19 21-Nov-1997 agc

Remove the magic control characters in a similar way to Bill Fenner's
patch for bsd.port.subdir.mk.


1.18 19-Nov-1997 agc

Eliminate a nasty and horrible kluge by using the BSD.x11.dist when
checking the directory tree for an X11 package.


1.17 10-Nov-1997 hubertf

Remove unneeded RCS Id


1.16 08-Nov-1997 hubertf

- Not only add $CAT[1-9] to _CATLIST, but also $CAT[NL}
- Fixup documentation for CAT<sect>, CATPREFIX.
(these two changes were accidentally committed to the 1.3 branch
as revisions 1.13.2.3 and 1.13.2.4 before!)


1.15 05-Nov-1997 agc

Let make do the work:

+ set MAKE_PROGRAM variable in bsd.port.mk to either ${GMAKE} or
${MAKE}, and use it in do-build and do-install targets

+ if X11 package, and man pages are installed, add install.man to
${INSTALL_TARGET}, rather than using a separate command to do this.

Also added CATn= blah.0, similar to MANn= blah.1, which installs
pre-formatted man pages, like the ones imake produces.


1.14 28-Oct-1997 agc

When a package depends on an executable from another package,
bsd.port.mk would always find the executable (using which), even if
there wasn't an executable in the $PATH. I've modified bsd.port.mk to
look for the executable directly, and simplified the shell code
somewhat in the process. There may be a lurking bug in shell exit
status handling here.

Noted by matthew green <mrg@madrugada.eterna.com.au> and Chris
Demetriou <cgd@netbsd.org> (PR pkg/4337) but I was too stupid to
realise what was happening. That, and a copy of gmake in
/usr/local/bin.


Revision tags: netbsd-1-3-base
1.13 18-Oct-1997 hubertf

branches: 1.13.2;
- don't clean out dependent packages (requested by thorpej)
- actually document the feature used above (NOCLEANDEPENDS)
- put pkg/MESSAGE file into /var/db/pkg/XXX/+DISPLAY, if
present (from FreeBSD)


1.12 17-Oct-1997 thorpej

Make sure the ${PREFIX} directory exists before invoking mtree.


1.11 09-Oct-1997 agc

s/sed/${SED}/g

Change <$ARCH> into bsd.port.mk's ${ARCH} value (uname -m) when
constructing the derived PLIST, so that we can use packages on
non-i386 NetBSD architectures and have the correct file names in the
installed inventory.


1.10 07-Oct-1997 hubertf

Be correct about manpage compression by regarding MANZ and fixing
PLIST before applying.

It is assumed that ports do install manpages uncompressed, if not
they have to set MANCOMPRESSED. Upon that, the pages will be
(un)compressed according to the setting of MANZ.


1.9 03-Oct-1997 agc

+ Move inclusion of bsd.own.mk to the end of bsd.port.mk.
<bsd.own.mk> defines its own `install' target if none is defined,
which conflicts with the default one we define later on in bsd.port.mk.
This may nuke any WRKOBJDIR definitions (which I have yet to encounter),
but enables "make install" to work as expected.

+ Add temporary mtree file for any X11 packages (like xpm, jpeg etc),
which require a default X11 tree. This will change when we get a NetBSD
x11.dist mtree file.

+ Define SHAREOWN, SHAREGRP and SHAREMODE (in NetBSD) to be the same as
DOCOWN, DOCGRP and DOCMODE respectively.


1.8 01-Oct-1997 hubertf

MACHINE -> MACHINE_ARCH, as pointed out by thorpej.
(Changed in ARCH_ONLY stuff as well as WRKDIR definition)


1.7 28-Sep-1997 hubertf

- Move around .include <bsd.own.mk> so PORTSDIR gets set propperly
- make 'make clean' DTRT when WRKOBJDIR is set


1.6 28-Sep-1997 hubertf

Forgot to include <bsd.own.mk> in last commit
(from OpenBSD)


1.5 28-Sep-1997 hubertf

- Add OpenBSD and FreeBSD Ids in the header
- Changes from FreeBSD's V1.164:
* Warn if mtree-file not found
* On 'make reinstall' gets DEPENDS_TARGET set
to 'reinstall' instead of 'install'
- Changes from OpenBSD's V1.14:
* Documentation and implementation for ONLY_FOR_ARCHS
* Documentation and implementation for WRKOBJDIR
* Documentation on HAVE_MOTIF and MOTIF_STATIC:
set in /etc/mk.conf, not /etc/make.conf
* Set NOMANCOMPRESS=no to still compress man-pages
(should probably be set to 'yes')
* DEF_UMASK=022
* add ${MACHINE} suffix to WRKDIR if OBJMACHINE is set
* .include <bsd.own.mk>


1.4 25-Sep-1997 thorpej

/usr/pkg/src -> /usr/pkgsrc (per discussion w/ agc)


1.3 20-Aug-1997 agc

Don't assume we're on NetBSD when setting LOCALBASE i.e.
test the OSNAME first.

Change the name of the mtree file to match NetBSD's.


1.2 20-Aug-1997 agc

Change paths for NetBSD. We have our PORTSDIR at /usr/pkg/src,
and our PREFIX is /usr/pkg.


1.1 20-Aug-1997 agc

branches: 1.1.1;
Initial revision


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406 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 pgoyette-compat-0728 pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE agc-symver-base tls-maxphys-base yamt-pagecache-base8 yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base bouyer-quota2-nbase bouyer-quota2-base matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE 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 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base mjf-devfs2-base keiichi-mipv6-nbase keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
1.9 14-Apr-1998 agc

Move bsd.port.mk and bsd.port.subdir.mk into pkgsrc/mk (by CVS
repository copy), which is a much better place for them. Update the
Makefile to reflect these changes.


1.8 09-Feb-1998 hubertf

Fix PR 4884 by replacing STRIP with STRIPFLAG.
This addes yet another step towards bsd.pkg.mk. :)


1.7 30-Jan-1998 agc

Echo the directory name when doing a "make readme", so that progress
can be monitored.


1.6 27-Jan-1998 hubertf

add mirror-distfiles target also here


1.5 08-Jan-1998 agc

Add lines so that "make readme" in the top level pkgsrc directory, or
one if the categories directories, will call "make readme" in
any subdirectories.

I thought that this was suggested by Chris Demetriou, but I can't find
any PR backing this up. So my apologies to the person who did suggest
this.


1.4 21-Nov-1997 agc

Modification by Bill Fenner which removes the embedded control
characters, and avoids the wrong interpretation of magic HTML
characters in DESCR files or categories.

Forwarded to me by Chris Demetriou, and refers to PR 4341.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
1.3 25-Sep-1997 thorpej

branches: 1.3.2;
/usr/pkg/src -> /usr/pkgsrc (per discussion w/ agc)


1.2 20-Aug-1997 agc

Change a path for NetBSD. Our PORTSDIR is /usr/pkg/src


1.1 20-Aug-1997 agc

branches: 1.1.1;
Initial revision


1.361 18-Dec-2025 riastradh

bsd.*.mk: Use objcopy without -p to strip debug data.

No need to preserve the date with -p/--preserve-dates -- the only
meaningful effect it has is to cause make(1) to rerun it every time,
because make(1) treats exactly the same date as out-of-date.

Followup after:

PR toolchain/57241: mips64el--netbsd-install core dumps randomly


1.360 17-Dec-2025 riastradh

bsd.prog.mk: Fix parallel builds of debug data.

Previously, we had one rule to generate foo, and another rule to
derive foo.debug from it with objcopy -- and then rewrite foo _in
place_ to strip the debug data with objcopy.

This is wrong -- one rule should never overwrite another rule's
target; this violates the contract with make(1), and can lead it to
run rules in parallel on files that are changing, which in turn can
lead the rules to behave mysteriously or crash.

It's still not clear why in our autobuilds, the only cases where we
saw these crashes were in mips64 builds of programs that use
compat/exec.mk (mainly external/bsd/ipf/bin/ipftest, but also
usr.sbin/crash and usr.bin/systat). But the bug this change fixes is
well-understood, and now someone has observed it in a non-mips build,
so I'm throwing in the towel on figuring out what makes these
particular programs more likely to trigger the problem.

PR toolchain/57241: mips64el--netbsd-install core dumps randomly


1.359 16-Dec-2025 riastradh

openssh: Install libssh.so in /usr/lib/private.

This way it doesn't get exposed to applications accidentally, and we
don't need to worry about breaking ABI when updating openssh in base.

PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib


1.358 16-Dec-2025 riastradh

Add logic for /usr/lib/private libraries.

New variables for makefiles to define:

<bsd.lib.mk> LIBSUBDIR -- If nonempty, install library into
${LIBDIR}/${LIBSUBDIR} instead of ${LIBDIR}. Typically set
either to empty or to `private'.

<bsd.lib.mk> LIBDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking library. Note: Should only be used inside
private libraries, not inside public libraries to link against
private libraries, which can't work -- see comment.

<bsd.prog.mk> PROGDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking program.

(XXX bsd.lib.mk/bsd.prog.mk should figure LIBDPSUBDIRS/PROGDPSUBDIRS
out automatically by LIBDPLIBS/PROGDPLIBS, but for now we don't have
that mechanism -- TBD in subsequent work.)

Libraries that we want to install because we use them in binaries we
ship, but that we want to keep private from applications so we don't
have to worry about ABI breakage or leakage into pkgsrc builds,
should generally set:

LIBSUBDIR= private # Install into /usr/lib/private.
NOCOMPAT= # defined # Don't build compat lib.
NOLINKLIB= # defined # Don't install .so link or .a lib.

(XXX Maybe we should have a `LIBISPRIVATE= installed' or something
for this combination of options, but for now I'm putting in the
minimal mechanism to implement this and we can condense a common
pattern later.)

Programs using the library will also have to set

PROGDPSUBDIRS+= private

so that they will get the rpath /usr/lib/private.

PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib


1.357 19-Oct-2025 riastradh

openssl: Stop dragging libpthread into every libcrypto user.

With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call
to pthread_create without linking against libpthread, so it is not
necessary to link all libcrypto users against libpthread too.

Applications that link against libcrypto but not libpthread can't use
threaded OpenSSL functionality, of course -- OSSL_set_max_threads
will always fail in such applications.

This reverts all the makefile churn that I found for unnecessary
libpthread linkage since the openssl 3.5 import.

PR lib/59685: libcrypto should not depend on libpthread


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.356 19-Jul-2025 christos

branches: 1.356.2;
Everything that uses crypto needs pthreads now.


1.355 28-Jan-2025 christos

no more libbind9


1.354 14-Jan-2025 riastradh

bsd.prog.mk: Indent PROGDPLIBS logic for clarity.

No functional change intended.


1.353 14-Jan-2025 riastradh

bsd.prog.mk: Define and cache LIBDO.${_lib} for PROGDPLIBS.

Don't define PROGDO.${_lib} and then check for BINDO.${_lib}.

LIBDO is what is documented in bsd.README; this makes more sense in
context than PROGDO or BINDO -- LIBDO.foo is the objdir for the
_library_ foo.

Should reduce build cost in submakes for programs that link against
libraries with PROGDPLIBS.


1.352 02-Nov-2024 christos

make zstd a private library (for now)


1.351 31-Oct-2024 christos

Add zstd


1.350 24-Sep-2024 christos

Add some new X libraries, sort again. There are more missing...
(run ./compare-lib-lists after you install the .mk files)


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.349 06-May-2024 mrg

branches: 1.349.2;
use objcopy's --compress-debug-sections when creating debug files.

this reduces the size of the installed files by over half in most cases,
though the debug set size doesn't really change much (which looks like
close to 1GB of space on amd64 with xdebug installed, similar on arm64,
and about 600MB without xdebug.)

tested by running GDB on a few things, seems just as functional, on amd64,
arm64, and slightly on riscv64.

(first attempt for this feature used "gcc -gz=zlib", but that ends up
making CTF unhappy, but fortunately this works in binutils to create
the .debug files separate to any ctf usage of the main file.)


1.348 19-Feb-2024 christos

Add a hook that adds more libraries after PROGDPLIBS


1.347 11-Oct-2023 riastradh

heimdal: No need for -lm, was only added for -lsqlite3.

PR lib/57406

XXX pullup-10


1.346 11-Oct-2023 riastradh

bsd.prog.mk: krb5 stuff no longer needs to link against sqlite3.

(Why is this here? Seems like it should be a .mk fragment under
crypto/external/bsd/heimdal -- that way I would have found it for the
previous commit.)

PR lib/57406

XXX pullup-10


1.345 28-May-2023 lukem

share/mk: finish USE_COMBINE, NOCOMBINE deprecation

Remove the leftover remnants of deprecated USE_COMBINE and NOCOMBINE,
as gcc -combine has been EOL for many years.

Completes the work done by maya@ on 2019-05-10 in bsd.kmodule.mk rev 1.61.


1.344 24-May-2023 lukem

deprecate SHAREDSTRINGS build option

Hasn't worked for at least 20 years (and never in the cross-build environment,
nor did it work with parallel make), and has never been needed in NetBSD as we
don't have the older BSD programs (pascal, pre-nvi ex) that needed mkstr/xstr
on PDP-11.

PR toolchain/35964


1.343 08-May-2023 christos

remove stuff accidentally committed


1.342 07-May-2023 christos

Provide a hook to link in libraries statically in PROGDPLIBS.
OpenSSL protects the symbols in the shared object via a linker
script, but programs and tests need those protected symbols, so
they either must link against the archive, or I need to expose the
symbols. For now, I chose to expose the symbols. Note that we
cannot use -Bstatic -Lpath -llibrary -Bdynamic because this seems
to be broken with collect2 and so we use the path directly.


Revision tags: netbsd-10-base
1.341 14-Jul-2022 mrg

branches: 1.341.2;
add libxcvt.


1.340 28-Nov-2021 christos

When we build against DESTDIR, add the lint library path for DESTDIR during
the link phase for lint.


1.339 23-Aug-2021 mrg

define variables for the libxcb-* libraries.


1.338 15-Aug-2021 christos

Fix sun2 build for ldap/gssapi


1.337 14-Aug-2021 christos

Centralize the ldap libraries


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.336 12-Nov-2020 nia

Revert addition of pthread dependency on sqlite.

It is less trivial than expected and introduced some surprising breakage.


1.335 09-Nov-2020 christos

- make the CTFCONVERT command lines consistent and concise by putting all
the implementation stuff in a variable CTFCONVERT_RUN
- introduce an OBJECT_TARGET variable that contains the output object file
- when we need to run ctfconvert, go through an intermediate ${.TARGET}.o
file, instead of writing directly to ${.TARGET} and then overwriting
${.TARGET} with ctfconvert. This avoids build failures after a build
got interrupted (the "partially built from C" scourge).


1.334 09-Nov-2020 martin

Adapt for sqlite requiring pthreads now


1.333 30-Oct-2020 martin

libsqlite3 now requires -lm


1.332 16-Oct-2020 nia

share/mk: Define some missing X11 libraries.


1.331 15-Jun-2020 christos

Rename blacklist -> blocklist


1.330 30-May-2020 christos

Make libuv private, requested by joerg@


1.329 24-May-2020 christos

Add libuv


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
1.328 04-Apr-2020 christos

Linker semantics have changed; we now don't automatically link dependent
libraries from other DSO's. For example in /usr/bin/passwd:
ld: krb5_passwd.o: undefined reference to symbol \
'UI_UTIL_read_pw_string@@OPENSSL_1_1_0'
ld: /usr/obj/amd64-x86_64/release/lib/libcrypto.so.14: error adding symbols: \
DSO missing from command line


1.327 04-Apr-2020 christos

Fix kerberos libraries order


1.326 04-Apr-2020 christos

Add libgnuctf


1.325 03-Mar-2020 christos

Add fido and cbor


Revision tags: is-mlppp-base phil-wifi-20191119
1.324 18-Nov-2019 christos

Improve the script to check for installed libraries, and fix the wrong
names and obsolete libraries it found.


1.323 27-Aug-2019 kamil

Enhance the support of LLVM sanitizers

Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.

Add bsd.sanitizer.mk to share common code used by programs and libraries.

Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.


1.322 17-Aug-2019 kamil

Add PAXCTL_FLAG rules for MKSANITIZER

Add per-program rules to disable ASLR for ASan, TSan and MSan in all
sanitized programs. This flag is not needed for other supported sanitizers.

Without this change, sanitized init(8) dies early on startup.

Approach originally suggested by <joerg>


1.321 15-Aug-2019 kamil

Add SANITIZER_RENAME_CLASSES in bsd.prog.mk

This adds a more flexible version of SANITIZER_RENAME_SYMBOL.

New symbol allows to specify MKSANITIZER specific renames on per-file and
per-symbol basis.


1.320 10-Aug-2019 christos

Make the X11 library lists consistent again.


Revision tags: netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
1.319 21-Jan-2019 christos

branches: 1.319.2;
Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.318 12-Aug-2018 christos

fix broken library variable definitions (inconsistencies between
bsd.README and bsd.prog.mk)


Revision tags: pgoyette-compat-0728
1.317 25-Jul-2018 kamil

Introduce MKLIBCSANITIZER in the share/mk rules

Add flags that are required to build a program and a dynamically loaded
library.

Propagade LIBCSANITIZERFLAGS to CFLAGS and CXXFLAGS.

LDFLAGS is not changed on purpose, as a libcsanitizer is inside libc
and no external dependencies are needed.

Register NOLIBCSANITIZER, as certain distribution parts will need to be
skipped.


1.316 12-Jul-2018 maxv

Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.


Revision tags: phil-wifi-base
1.315 25-Jun-2018 kamil

branches: 1.315.2;
Add a framework for renaming symbols in libc&co for MKSANITIZER

A new keyword SANITIZER_RENAME_SYMBOL. It's a variable that has specified
a list of symbols to be renamed in a processor in order to remove naming
conflicts with public symbols in libc/m/pthread/rt.

This renaming will occur for libraries and programs.
A symbol with a conflicting 'name', will be renamed to '__mksanitizer_name'.

Based on an idea by <christos>


Revision tags: pgoyette-compat-0625
1.314 21-Jun-2018 kamil

Refactor MKSANITIZER flags in mk rules

Introduce a new variable SANITIZERFLAGS that contains all the sanitizer
specific flags. These flags are designed to be passed to CFLAGS, CXXFLAGS
and LDFLAGS.

Pass SANITIZERFLAGS in bsd.prog.mk rules to CFLAGS, CXXFLAGS and LDFLAGS.

Pass SANITIZERFLAGS in bsd.lib.mk rules to *_pic.a build flags. The *_pic.a
libraries are designed to construct .so libraries. All .so libraries with
few exceptions are expected to be prebuilt with a sanitizer. Another
purpuse of *_pic.a files can be constructing static PIE programs, however
they are not supported as of now and there is no sanitization of static
programs either.

Once MKSTATICPIE will be supported, it will be initially incompatible with
MKSANITIZER.

This change also makes it easier to build other targets like kernel and
kernel modules without userland sanitizers.

No functional change intended for MKSANITIZER=no users.


1.313 02-Jun-2018 christos

Sanitizers don't support static linking.


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
1.312 11-Mar-2018 mrg

define LIBXFONT2.


Revision tags: pgoyette-compat-base
1.311 25-Feb-2018 mrg

branches: 1.311.2;
add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterparts
to bsd.prog.mk. use them instead of hard coding various lists
of libraries for krb5.

this fixes static builds.


1.310 11-Dec-2017 christos

Instead of checking for obj existance which can be empty for shuttle-rule
programs, check for .sh sources.


1.309 10-Dec-2017 christos

don't try to build .debug files for shell scripts.


1.308 10-Oct-2017 christos

Add general {DP,LD}ADD.rump variables


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base
1.307 21-May-2017 riastradh

Remove MKCRYPTO option.

Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export. The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated. I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet... That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.


1.306 21-May-2017 riastradh

Remove some vestiges of MKCRYPTO_IDEA/MKCRYPTO_MDC2.


1.305 21-May-2017 riastradh

Remove MKCRYPTO_RC5. Unconditionally include RC5 in libcrypto.so.

This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate. The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at
<https://www.uspto.gov/patent/laws-and-regulations/patent-term-calculator#heading-5>
(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number filing date
5,724,428 1995-11-01
5,835,600 1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html


Revision tags: prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
1.304 19-Apr-2017 joerg

Add netpgpverify to the library list.


Revision tags: pgoyette-localcount-20170320
1.303 20-Feb-2017 rin

add missing LIBCXX


1.302 08-Feb-2017 kamil

libpthread_dbg(3) deletion from the base distribution

libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>


1.301 29-Jan-2017 christos

add sqlite3 to statically linked libraries for pam.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
1.300 20-Aug-2016 christos

branches: 1.300.2;
unbound additions


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.299 04-Apr-2016 joerg

branches: 1.299.2;
If the per-target LDSTATIC flag is set, don't include the PIE linker
flags as we currently don't support static PIE.


1.298 30-Mar-2016 martin

Pass -pie to cc, not -Wl,-pie. This way we have a chance to fix specs
for obscure corner cases like -pie -fPIE -static (used for
/usr/tests/lib/csu/h_initfini2 if building with MKPIE=yes).
While there also replace -fPIC with -fPIE for the PIE case, even if
it should be mostly equivalent.


1.297 12-Mar-2016 mrg

remove conditionals that are always true with GCC >= 4.8.


1.296 21-Feb-2016 christos

Add NODEBUG


1.295 31-Jan-2016 christos

Introduce NOPIE and NOCTF so that standalone programs build properly.


1.294 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


1.293 07-Nov-2015 joerg

LIBEXECINFO


1.292 07-Jun-2015 matt

Make LIBCRT* depend on the right files if MLIBDIR from MKCOMPAT is defined.


1.291 01-Dec-2014 erh

PR toolchain/9618: add ".d" to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 tls-maxphys-base
1.290 25-Mar-2014 ozaki-r

branches: 1.290.4;
Add MKCTF

This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.


Revision tags: riastradh-drm2-base3
1.289 09-Mar-2014 christos

let's see if the new dwarf library can handle dwarf 4


1.288 02-Mar-2014 christos

If we are compiling with -g and using gcc4.8 and dtrace downgrade
dwarf generation to version 2 for now.


1.287 15-Jan-2014 joerg

-Wl,-pie and -r don't agree with each other, so filter the former out.


1.286 11-Nov-2013 joerg

Relink binaries if crti.o changes.


1.285 29-Sep-2013 christos

Add libxcb


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
1.284 31-May-2013 mrg

add LIBX11_XCB; unfortunately since the library is named with a -
in it, we have to use an ugly hard coded assignment for now.
(could be cleaned up with more make variable magic i'm sure.)


1.283 04-Apr-2013 christos

ldopts should be before ldadd like everywhere else.


Revision tags: agc-symver-base
1.282 14-Feb-2013 christos

Since the libraries are produced with different MK flags than the programs,
we check for existance of the files instead of the MK flags.


1.281 14-Feb-2013 christos

Add PROGDPLIBS


1.280 26-Jan-2013 christos

CTFCONVERT me harder.


Revision tags: yamt-pagecache-base8
1.279 17-Jan-2013 christos

Now that we have separate debug sets, add -g if ${MKDEBUG} is set for
program builds since we don't need to install that symbol files.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
1.278 24-Aug-2012 jmmv

branches: 1.278.2;
Allow DPADD to be specified on a per-program basis.


1.277 23-Aug-2012 joerg

Revert last, it breaks the tricks xsrc uses.


1.276 23-Aug-2012 joerg

Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if
SHLIBDIR differs from /usr/lib.


1.275 08-Aug-2012 christos

add MKRUMP by popular demand.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
1.274 29-Feb-2012 tron

Move "libexpat" from X11 into base which fixes PR lib/40346.
This change was approved by the Core Group.


1.273 21-Feb-2012 matt

Remove another ${SIZE}


1.272 20-Feb-2012 matt

Remove ${SIZE}


1.271 19-Feb-2012 matt

Add support for --combine with gcc.


Revision tags: netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2
1.270 05-Nov-2011 christos

branches: 1.270.2;
Add libtre


Revision tags: yamt-pagecache-base
1.269 16-Oct-2011 christos

branches: 1.269.2;
- no need to special-case libraries with weird characters.
- add a note about adding new libraries.


1.268 16-Oct-2011 christos

fix list of libraries to reflect reality.


1.267 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.266 27-Aug-2011 joerg

Add new "analyze" command to run clang's static analyzer in a directory
on all C/C++ files.


Revision tags: cherry-xenmp-base
1.265 26-Apr-2011 he

The new Heimdal adds -lwind and -lheimbase to the set of libraries,
so define the corresponding LIB* variables.
These are also needed in the PAM_STATIC_* variables, so add them there too.


1.264 11-Apr-2011 joerg

Adjust --sysroot related usage:
-Wl,-rpath does not expand =, so just drop it.

Drop -Wl,-rpath-link entries that duplicate the -Wl,-rpath entries, this
is done implicitly now that ld is built with sysroot support.

Use ${DESTDIR} explicitly for the remaining -Wl,-rpath-link entries.


1.263 10-Apr-2011 joerg

For USETOOLS=yes, use the --sysroot support of the compiler to cut down
the number of hard-coded pathes and magic invocations.


1.262 08-Mar-2011 jmmv

Revert previous (revision 1.261): it broke the build because PROG_CXX is
defined in terms of PROG, so later on we would end up with target duplicates
because both PROG_CXX and PROG were being converted to PROGS_CXX and PROGS.

Did not catch this earlier because the test build I did was not clean and
thus the duplicate targets did not have nasty effects.


1.261 07-Mar-2011 jmmv

Always convert PROG to its plural form independently of whether PROG_CXX
is defined or not. From Garrett Cooper in private mail.


Revision tags: bouyer-quota2-nbase
1.260 20-Feb-2011 jmmv

Define LIBATF_C and LIBATF_CXX to point to their corresponding .a files and
use these to properly set DPADD for test programs.


Revision tags: bouyer-quota2-base
1.259 13-Feb-2011 christos

add saslc


1.258 06-Feb-2011 joerg

Don't use -nostdinc or -nostdinc++ if this is included in a HOSTLIB.


1.257 17-Jan-2011 pooka

branches: 1.257.2;
Add rump bits to DPSRCS so that update builds work correctly.


Revision tags: matt-mips64-premerge-20101231
1.256 13-Dec-2010 pooka

befriend RUMPPRG with CRUNCHEDPRG


1.255 13-Dec-2010 pooka

Define RUMPPRG, which is just like PROG, except it additionally
builds a rump client with the name rump.${PROG}. The rump client
is not installed suid/sgid by default even if BINMODE is defined.


1.254 10-Dec-2010 joerg

Revert last, gcc(1) checks explicitly for -r on some platforms to disable
passing down --relax as well.


1.253 08-Dec-2010 joerg

gcc passes down -r directly to ld, so make it explicitly a linker option.


1.252 08-Dec-2010 joerg

Don't depend on ${CC} passing down -R to ld, use -Wl,-rpath explicitly.


1.251 08-Nov-2010 lukem

Preserve date on original shared library or program when stripping
the debug symbols and adding the debug-link to .debug.
Use '(rm -f file; false)' in the failure path to force failure.
Based on solution proposed by Nicolas Joly on tech-toolchain in July 2010.
Should fix PR toolchain/44046 from Andreas Gustafsson.


1.250 31-Oct-2010 mbalmer

Link Lua to the build and add the resulting files to the distribution sets.
Document the addition of Lua and the change we made to the default settings.


1.249 06-Jul-2010 mrg

remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h


1.248 24-Apr-2010 lukem

When extracting separate debug symbols with MKDEBUG, there's no need
to leave the original file unstripped...


1.247 02-Mar-2010 darran

DTrace: Add CTF generation to the make framework. Only enabled when
MKDTRACE=yes.


1.246 14-Dec-2009 mrg

use "${CC} -r" not "${CC} -Wl,-r" as the latter fools GCC on some targets
and it ends up passing "-r -relax" to ld, which causes ld to barf.


1.245 14-Dec-2009 matt

Merge from matt-nb5-mips64


Revision tags: matt-premerge-20091211
1.244 08-Dec-2009 uebayasi

When PROGS / LIBS are used, you can pass each PROG / LIB specific parameters
to ${LD} via:

${LDADD.${PROG}}
${LDFLAGS.${PROG}}
${LDSTATIC.${PROG}}
${LDADD.${LIB}}
${LDFLAGS.${LIB}}

OTOH you can't pass parameters to ${CC}, because in suffix rules make(1) only
knows the name of ${.IMPSRC} and ${.TARGET}; it's users' responsivility to
define ${CC} parameters to all the sources of a given ${PROG} / ${LIB}.

Should address bin/42381.

(Bug in this commit log was pointed out by mrg@.)


1.243 27-Nov-2009 tsutsui

If CPPFLAGS or CXXFLAGS already contains -nostdinc or -nostdinc++,
don't add ${CPPFLAGS_ISYSTEM} or ${CPPFLAGS_ISYSTEMXX} to refer
${DESTDIR}/usr/include or ${DESTDIR}/usr/include/g++.

This change might cause errors on some MD stand dir, but in that case
each Makefile should be fixed to search proper system include paths
by -Ipath option in own CPPFLAGS.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.242 12-May-2009 plunky

remove libsdp as improved functionality has been enabled in libbluetooth.


1.241 10-Apr-2009 apb

Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links. They have no effect except when using a
metalog, in which case the information is added to the metalog. In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg. This should fix PR 24457 and PR 41155.


1.240 24-Nov-2008 cube

branches: 1.240.2;
Move cleanextra to the very ends in case another included file wants to add
to it even if it was initially empty.


Revision tags: netbsd-5-base matt-mips64-base2
1.239 19-Oct-2008 christos

branches: 1.239.2;
handle assembly files for MKPIE


1.238 16-Oct-2008 christos

Provide a way for a program to override the PIE flags.


1.237 15-Oct-2008 christos

don't compile/link libraries with pie


Revision tags: mjf-devfs2-base
1.236 02-Oct-2008 joerg

Hook up libfetch and pkg_install update.


Revision tags: wrstuden-revivesa-base-3
1.235 09-Sep-2008 joerg

Add MKSTRIPIDENT to remove the RCS IDs from binary programs and shared
libraries for space-constraint systems. The description is based on the
feedback of hubertf@, the logic on input from lukem@

This obsoletes the removal of LIBC_SCCS and SYSLIBC_SCCS for libc builds.


Revision tags: wrstuden-revivesa-base-2
1.234 28-Aug-2008 mrg

update a comment example


1.233 27-Aug-2008 rtr

use ${X11USRLIBDIR} instead of hard-coded /usr/X11R6/lib when building
${LIB.foo} vars


1.232 27-Aug-2008 lukem

Fix problem I introduced in rev 1.231 on 2008/08/25 where ${_PROGLDOPTS}
and -L${_GCC_LIBGCCDIR} were appearing in the link line before ${LDADD},
so -L${DESTDIR}/lib and -L${DESTDIR}/usr/lib were being used before
local -L library paths.
Fixes ntpd/ntpdate failure noticed by Valeriy E. Ushakov <uwe@NetBSD.org>


1.231 25-Aug-2008 lukem

Always link with: -Wl,-rpath-link,${DESTDIR}/usr/lib -L${DESTDIR}/usr/lib
Fixes problem with MKDYNAMICROOT=no triggered by libraries that depend
on other libraries.
Related to PR 33503.

Clean up setting of _CCLINK to always add the appropriate -B options.

Simplify the link rule for a program.


1.230 29-Jul-2008 pooka

Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
1.229 28-May-2008 lukem

add LIBLDAR_R (for completeness)


1.228 22-May-2008 lukem

Add MKLDAP, USE_LDAP, LIBLBER, LIBLDAP


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-pf42-base
1.227 10-Apr-2008 tsutsui

branches: 1.227.2; 1.227.4;
Add libhx509 to PAM_STATIC_LDADD which is required by libkrb5.


1.226 22-Mar-2008 mlelstv

branches: 1.226.2;
Import Heimdal-1.1


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base pc532-eol-2008 matt-armv6-nbase matt-armv6-base hpcarm-cleanup-base
1.225 26-Dec-2007 jmmv

Make the clean target work when OBJS is set but PROG is not, as happens
for example in gnu/lib/crtstuff4. Reported by drochner@.


Revision tags: cube-autoconf-base
1.224 13-Nov-2007 jmmv

Fix typo that prevented MKDEBUG builds to work. Found by drochner@.


1.223 12-Nov-2007 jmmv

Add the ability to build multiple programs from a single directory

This adds support for a new set of variables, PROGS and PROGS_CXX, that
allow the developer to build multiple different programs from a single
source directory.


1.222 04-Nov-2007 tls

Remove MKPRIVATELIB from BIND libraries; move library reachover
directories and Makefiles from src/usr.sbin/bind to src/lib; make
BIND libraries build shared. Saves about 1MB-1.5MB per installed
executable, about 5MB for a base+etc minimal installation of NetBSD.


Revision tags: matt-mips64-base
1.221 29-Jul-2007 joerg

branches: 1.221.4; 1.221.6;
Add build glue for libarchive and update the various sets.


1.220 25-Jan-2007 perry

Before I completely forget the issue, convert "PROG_PAX" to the
better-named "PAXCTL_FLAGS".


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
1.219 11-Nov-2006 christos

don't run paxctl if other commands were specified for that target.


1.218 10-Nov-2006 christos

if ${PROG_PAX} is defined, run paxctl on the binary after linking with
the value of the variable. This way, if you set:

PROG_PAX=+M

in /etc/mk.conf, you get what you deserve.


1.217 22-Oct-2006 pooka

libpuffs


1.216 09-Oct-2006 mrg

- clean up some comments to reality.
- retire LIBDCK, LIBG2C and (long broken) USE_LIBSTDCXX
- in bsd.hostprog.mk's LIBSTDCPP -> LIBSTDCC
- add LIBSUPCXX
- don't default USE_LIBSTDCXX or USE_GCC4 since they are
not used in the tree any where
- same with USE_XF86_4; retire it
- remove _SUPCXX handling in bsd.prog.mk

inspired by PR#26714.


Revision tags: abandoned-netbsd-4-base
1.215 23-Jul-2006 lukem

Implement MKDEBUG:
If "no", don't build and install separate debugging symbols
into /usr/libdata/debug.
Default: no


1.214 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


1.213 09-Jun-2006 christos

PR/33681: Scott Ellis: Building 'bc' with SHAREDSTRINGS=yes fails
We need CPPFLAGS too now.


1.212 11-May-2006 mrg

add support for ${OBJCOPTS} and ${OBJCOPTS}.<lib|prog|fn>.


1.211 20-Mar-2006 christos

There is always one more KRB4 thing to remove. (from Jukka Salmi)


1.210 20-Mar-2006 christos

Remove krb4 variables and libraries (Jukka Salmi)


1.209 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


1.208 20-Jan-2006 christos

Add the world of libraries to the static pam build. Now static pam binaries
work.


1.207 09-Apr-2005 dsl

Report when we link a program into xxx.ro (before being crunched)


Revision tags: 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.206 04-Mar-2005 he

branches: 1.206.2; 1.206.4;
Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications. The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.


1.205 20-Feb-2005 christos

Add libradius


1.204 12-Jan-2005 lukem

If RESCUEDIR is defined, automatically add that to CPPFLAGS


1.203 08-Jan-2005 lukem

Implement <bsd.prog.mk> vars:
LIBASN1 LIBBSDMALLOC LIBG2C LIBPAM LIBSSH


1.202 04-Aug-2004 lukem

Revert most of previous, and move the LIB<libname>?= assignments
back to bsd.prog.mk from bsd.own.mk.

pkgsrc uses <bsd.own.mk>, and setting LIB<libname> in it causes
problems with various package builds.
This should fix PR #26542 submitted by Jim Bernard.

(I'll be implementing the DPADD for shared libraries in a different
manner that generally won't depend upon ${LIB<libname>}.)


1.201 30-Jul-2004 lukem

Move the LIB<libname>?= assignments from bsd.prog.mk to bsd.own.mk so
that they may be used by non PROGs (e.g., LIBs).

Improve some comments.


1.200 10-Jun-2004 lukem

Be consistent in handling YHEADER, similar to Christos' fix in bsd.lib.mk 1.253


1.199 21-May-2004 ross

If you add a library, you need to define its DPADD symbol here.

Add LIBMAGIC.


Revision tags: netbsd-2-0-base
1.198 15-Feb-2004 skrll

branches: 1.198.2;
Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

- creates libgcc, libgcc_eh and libgcc_s

- updates LIBGCC_SPEC to use them appropriately.

There's a hack in here at the moment with respect to libgcc_so in that it
is preferable to link against libgcc_so will only when -shared-libgcc is
specified (the c++ frontend does this automatically.) Configurations where
LINK_EH_SPEC is defined already do this. The gcc configuration for
NetBSD/alpha and another NetBSD platform (I forget which) actually define
LINK_EH_SPEC probably by accident rather than design.

- updates share/mk to use the compiler's knowledge of what needs linking into
libraries and executables. This removes an hppa hack.

- updates the sets for the newly created libgcc* files.

- support for linking against the _pg version of libgcc has been removed.


1.197 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


1.196 27-Jan-2004 lukem

Replace
:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)


1.195 23-Jan-2004 simonb

crt0.o lives in /usr/lib even on a.out.


1.194 16-Nov-2003 lukem

simplify with _MKTARGET_LINK


1.193 11-Nov-2003 dsl

Set MKDEP_SUFFIXES to get additional targets in .depend instead of using
sed in .afterdepend. I don't think .afterdepend is used anywhere any more.


1.192 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.191 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.190 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.189 29-Sep-2003 lukem

Add LIBSTDCXX (for usr/lib/libstdc++.a).
Sync LIB* documentation with reality.


1.188 19-Sep-2003 martin

Drop explicit medlow model and default to -O2 for sparc64.


1.187 14-Sep-2003 lukem

Check ${SHLIBDIR} against "/usr/lib" instead of ${LIBDIR} when determining
if we need to add stuff (usually "/lib") to the rpath-link path before
"/usr/lib". Otherwise, this barfs if LIBDIR != /usr/lib or /lib, and
we're cross-building (e.g., in src/x11)


1.186 13-Sep-2003 erh

Also support per-program LDFLAGS and LDSTATIC.


1.185 13-Sep-2003 erh

Create a way to add additional flags to COPTS, CPPFLAGS, CXXFLAGS and LDADD
for particular libraries or programs by specifying the additions in mk.conf
instead of needing to go edit individual Makefiles.


1.184 12-Sep-2003 lukem

add infrastructure to support reach-over builds of xsrc


1.183 22-Aug-2003 dsl

Add a ${PROG}.ro target that does an 'ld -r' of the program object files.
Allows a much simplified build of 'crunched' binaries since crunchgen can
build prog.ro instead of having to deretmine the names of all the .o files.


1.182 01-Aug-2003 lukem

Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".


1.181 01-Aug-2003 lukem

simplify the ${PROG}: target to reduce duplication between the DESTDIR
and !DESTDIR cases...


1.180 31-Jul-2003 lukem

bsd.dep.mk: add a dependency for *.d on ${SRCS} ${DPSRCS}. this should fix
some build problems where DPSRCS contains .h files that need to exist to
build the .d file.

document that bsd.dep.mk should be included after anything that might
update SRCS or DPSRCS so that the above works correctly, and actually
ensure this is the case.


1.179 31-Jul-2003 lukem

Don't need -R/usr/lib; it will be searched at the end by ld.elf_so anyway.
Noted by matt green <mrg@>


1.178 28-Jul-2003 lukem

be consistent when adding *.y and *.l to DPSRCS


1.177 28-Jul-2003 lukem

replace MKCXXSUPCXX(!=no) with USE_LIBSTDCXX(==no)


1.176 28-Jul-2003 lukem

Change defined(CXX_SUPCXX) to MKCXXSUPCXX != "no".

Clarify that command-line overrides of the MKxxx variables should be
done via the environment rather than make(1) command-line variable
assignment, since the latter doesn't actually work as intended.


1.175 27-Jul-2003 mrg

introduce a new $CPPFLAG_ISYSTEMXX that is used to reference c++ system
includes. for GCC3, set this to -I instead of -isystem.

XXX this should really be either not required or a -isystem-cxx, but for
now this is required to build libstdc++-v3, which otherwise complains
heavily about STL headers not being C code(!)


1.174 26-Jul-2003 mrg

add a new bsd.own.mk variable: CXX_SUPCXX. from bsd.README:
+ CXX_SUPCXX If defined, the support libraries needed for this C++ program
+ are set to `-lsupc++ -lm', rather than `-lstdc++ -lm'.


1.173 20-Jul-2003 lukem

Consistently support the different C++ file extensions: .cc .cpp .cxx .C
Noted by Andrew White in PR toolchain/18246


1.172 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


1.171 16-Jul-2003 itojun

stop installing install libtelnet. build under lib/libtelnet and reference
it from usr.bin/telnet and libexec/telnetd.
(reason for separate build: compiler flags)


1.170 27-Jun-2003 drochner

For consistency, use "-R" instead of "-Wl,-rpath" to pass
a runtime search path to the linker.


1.169 13-Jun-2003 itojun

define LIBEVENT


1.168 11-Jun-2003 msaitoh

catch signal 1,2,3,13 and 15 to clean /tmp/_dependXXX


1.167 31-May-2003 thorpej

If EXTERNAL_TOOLCHAIN is defined, allow the compiler to define the
location of crt{begin,end}{,S}.o and libgcc.a. Encapsulate all of
this logic into the new bsd.gcc.mk, and use it in bsd.prog.mk and
bsd.lib.mk.


1.166 18-May-2003 lukem

make this a no-op if HOSTPROG is defined


1.165 30-Mar-2003 thorpej

If MACHINE_ARCH is powerpc and we HAVE_GCC3, add crtsaveres.o to the
endfile spec.


1.164 22-Feb-2003 uwe

Typo in comment.


1.163 24-Jan-2003 thorpej

Add LIBPTHREAD, LIBPTHREAD_DB, and LIBRT.


Revision tags: fvdl_fs64_base
1.162 22-Nov-2002 thorpej

Split crtbegin/crtend into crti/crtbegin/crtend/crtn. NetBSD-specific
things like the .note.netbsd.ident section are provided by crti/crtn.
crti/crtn also provide the _init() and _fini() routines.

crtbegin/crtend now only provide support for ctors/dtors. This paves
the way to using the "crtstuff" provided with GCC (when we upgrade to
GCC 3.3), which provides, among other things, much better C++/Java
exception handling.


1.161 12-Nov-2002 itohy

MKDYNAMICROOT for a.out


1.160 22-Oct-2002 perry

Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.


1.159 27-Sep-2002 thorpej

Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.


1.158 26-Sep-2002 itojun

MDC2 is a patented algorithm; don't ship it in default libcrypto.
MKCRYPTO_MDC2 will build a separate library, libcrypto_mdc2.


1.157 08-Sep-2002 thorpej

Build a .gdbinit in the objdir when building a program. The .gdbinit
file sets the shared library prefix to ${DESTDIR}, and adds "sources"
directives for each file listed in the GDBINIT Makefile variable.


1.156 09-Aug-2002 thorpej

Add LIBPMC.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.155 27-Mar-2002 eeh

branches: 1.155.2;
Use the medium low model for sparc64 programs that don't 2GB of data segment.


1.154 11-Feb-2002 mycroft

Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)


1.153 07-Feb-2002 pk

Mark installed system libraries as .MADE only if we're actually establishing
their default variable values here.


1.152 04-Feb-2002 christos

s/.NOSUFF/.MADE/


1.151 03-Feb-2002 christos

Apply a .NOSUFF: directive to targets we don't want to have processed by
the suffix rules engine.


1.150 02-Feb-2002 veego

Ups, it is LIBUSBHID and not LIBUSBHIB.


1.149 02-Feb-2002 veego

Change LIBUSB to LIBUSBHIB, reflecting the library name change.


1.148 29-Jan-2002 enami

Mark the targets clean{extra,objs} as PHONY.


1.147 04-Jan-2002 thorpej

For PROG_CXX DESTDIR builds, pull in -lstdc++ and -lm regardless
of GCC version.


1.146 01-Jan-2002 thorpej

Per a suggestion from matthew green, PROG_CXX takes the place of
PROG for C++ programs.


1.145 01-Jan-2002 thorpej

* If PROG_CXX is set by the program's Makefile, use ${CXX} to link
the program rather than ${CC}.
* If HAVE_GCC3 is defined, pull in "-lstdc++ -lm" as additional C++
support libraries for DESTDIR builds.


1.144 28-Dec-2001 lukem

* Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".

- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.

- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so

2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so

3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed


1.143 28-Nov-2001 tv

If DESTDIR is set, do a similar nostdinc dance for the standard C++ include
directory.


1.142 19-Nov-2001 thorpej

Use a little transitional hack to determine if we use -isystem
or -idirafter. Use the former only of USE_NEW_TOOLCHAIN, since
-isystem causes the old toolchain to bomb out when building
libstdc++.


1.141 14-Nov-2001 tv

C/..$/.c/ -> C/\..$/.c/


1.140 14-Nov-2001 tv

Move the DESTDIR-based nostdinc logic to bsd.lib.mk and bsd.prog.mk where
it belongs (with the native target compile rules).


1.139 02-Nov-2001 tv

Use INSTALL_FILE/INSTALL_DIR as appropriate.


1.138 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.137 19-Oct-2001 tv

Add .NOPATH for all files generated from .l or .y files in SRCS. Fixes PRs
bin/14187 and lib/14239.

Also simplify the handling of these transforms to .c and .h files a bit by
leveraging make's builtin macro operators.


1.136 25-Sep-2001 tv

Set .NOPATH on program to build to make sure it goes in .OBJDIR.
Problem noted by <seebs@plethora.net>.


1.135 24-Sep-2001 lukem

fix previous (hi thor!) - $OBJS and $CLEANFILES might be empty, and
rm needs some files to delete...


1.134 24-Sep-2001 tls

Split "cleanprog" target apart: now you can zap only object files or
CLEANFILES (needed to fix crunchgen lossage).


1.133 13-Sep-2001 thorpej

Add LIBPCI.


1.132 14-Aug-2001 tv

Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").


1.131 01-Jun-2001 tv

Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).


1.130 08-May-2001 sommerfeld

Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.


1.129 19-Feb-2001 jmc

Wrap target() checks around afterdepend rule as some Makefiles override this


1.128 26-Jan-2001 itojun

fix typo in LIBSSL decl. it made programs with DPADD+=${LIBSSL} to build
every time we type "make". From: bernd


1.127 14-Jan-2001 christos

use the new .if commands(<target>) directive so that we don't have to
change Makefiles.


1.126 14-Jan-2001 christos

fix thinko: test for the existance of the target before we define it...


1.125 14-Jan-2001 christos

Alter previous redefined target protection. If the ${PROG} target is defined,
add the dependencies as usual, but don't add the commands. This avoids
having to change all the Makefiles that redefine the PROG target.


1.124 14-Jan-2001 christos

allow programs to override the program target.


1.123 08-Jan-2001 mrg

add missing $LIBCRYPTO_RC5 and $LIBCRYPTO_IDEA


1.122 08-Jan-2001 mrg

add missing $LIBSSL


1.121 04-Jan-2001 garbled

Add LIBCDK and LIBFORM definitions


1.120 31-Oct-2000 itojun

add ${LIBINTL} for use with DPADD.


1.119 07-Oct-2000 deberg

fix typos, PR 11159


1.118 25-Jun-2000 erh

For the case when DESTDIR is set: move the -L${DESTDIR}/usr/lib after ${LDADD} so any -L directories set in LDADD are searched first to avoid possibly linking against old versions of libraries.


Revision tags: netbsd-1-5-base
1.117 19-Jun-2000 thorpej

branches: 1.117.2;
Sync up the LIB* list.


1.116 10-Jun-2000 mycroft

Use ${.ALLSRC:T} when doing the generated variable name lookups, so that it
DTRT for generated files in and obj directory (or accessed via .PATH).


1.115 06-Jun-2000 mycroft

Abuse .USE some more.


1.114 06-Jun-2000 mycroft

Minor rearrangement.


1.113 06-Jun-2000 mycroft

Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.


Revision tags: minoura-xpg4dl-base
1.112 14-Apr-2000 mrg

branches: 1.112.2;
use -rpath-link rather than -R when linking objects using a DESTDIR.
this replaces the previous change as that ended up adding
$DESTDIR/usr/lib to the runtime path of every binary created, which
is bogus and dangerous.


1.111 25-Mar-2000 mycroft

When linking with $DESTDIR, use an explicit -R to get library dependencies
correct.


1.110 07-Mar-2000 veego

Remove unused libahdi.
It will be replaced in the future with a more generic libdisklabel.


1.109 05-Feb-2000 jdc

Add libahdi entries.


1.108 23-Jan-2000 eeh

Add some support for FCode binaries.


1.107 22-Jan-2000 mycroft

Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.


1.106 16-Jan-2000 assar

all: depend on ${SCRIPTS} so that they get generated if they need to


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.105 23-Nov-1999 blymn

Added libmenu library.


Revision tags: comdex-fall-1999-base
1.104 14-Sep-1999 perry

branches: 1.104.4;
Add a "dependall" target, which does a "make depend" and then "make all"
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".


1.103 04-Sep-1999 fredb

Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.


1.102 21-Aug-1999 simonb

Add ${INSTPRIV} to ${INSTALL} commands.


1.101 01-Jul-1999 itojun

branches: 1.101.2;
add LIBIPSEC for use from DPADD.


Revision tags: netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.100 12-Feb-1999 lukem

branches: 1.100.2;
* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.99 10-Feb-1999 tv

libbfd_pic.a is no longer installed; remove ${LIBBFD} define.


1.98 04-Feb-1999 christos

PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.


1.97 07-Nov-1998 jonathan

Do DESTDIR support for crtbegin/crtend on all ELF ports (adds mips).


1.96 28-Sep-1998 christos

Use preserve flag in install.


1.95 10-Sep-1998 ross

Define a LIBBZ2?=... for use in DPADD=... lines.


1.94 09-Aug-1998 lukem

add distclean as a synonym for cleandir


1.93 09-Apr-1998 tv

.y.c <sys.mk> rule fixes. Don't create a y.tab.h file unless asked for,
and use smarter creation of the header file.


1.92 01-Apr-1998 tv

Revert. This broke too much in the build tree, and a better solution
needs to be created. (The existing situation breaks a lot too.)


1.91 01-Apr-1998 tv

Fix .y rules to DTRT with possibly generated .h files. See mail on
tech-toolchain for a very detailed explanation of this. In short, add
a .y.h rule identical to the .y.c rule and make the .y.c rule rename
the .h file; also, clean the .h file in CLEANFILES.


1.90 03-Nov-1997 cgd

echo the lint command line when making 'lint'.


1.89 28-Oct-1997 lukem

add ${LIBOBJC}


Revision tags: netbsd-1-3-base
1.88 11-Oct-1997 mycroft

branches: 1.88.2;
Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)


1.87 29-Sep-1997 gwr

Add $LIBBFD


1.86 31-May-1997 cjs

Back out BUILDDIR and NOINSTALL changes.


1.85 26-May-1997 cjs

branches: 1.85.2;
These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.


1.84 18-May-1997 kleink

Add libposix.


1.83 17-May-1997 mycroft

Do LINKS and SYMLINKS after FILES and INCS.


1.82 17-May-1997 mycroft

Remove unneeded .SUFFIXES lines, and move .s and .S closer to .o to give the
right preferences.


1.81 09-May-1997 mycroft

Fix typo in previous.


1.80 09-May-1997 mycroft

Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.


1.79 09-May-1997 mycroft

Remove cruft.


1.78 09-May-1997 mycroft

Oops; rearrange dependencies to get things built early enough.


1.77 09-May-1997 mycroft

Make sure INCS and SRCS are built if necessary.


1.76 08-May-1997 gwr

Set the .NOPATH flag for ${OBJS} (from Christos).


1.75 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.74 07-May-1997 mycroft

Various simplifications.


1.73 07-May-1997 mycroft

Shuffle some .PHONYs around, to work better with `-t'.


1.72 06-May-1997 mycroft

Make most of the install targets .PRECIOUS.


1.71 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.70 18-Apr-1997 christos

Add ${LIBNTP}


1.69 17-Apr-1997 thorpej

- Properly depend on crtbegin.o and crtend.o for platforms that use
them (currently Alpha and PowerPC)
- STRIP -> STRIPFLAG


1.68 03-Apr-1997 mikel

don't allow override of all: target


1.67 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.66 27-Mar-1997 christos

Put the FILES generated rules in a separate .mk file since both bsd.prog.mk
and bsd.lib.mk use them.


1.65 27-Mar-1997 mycroft

Make the SCRIPTS case mimic the FILES case more closely, so we can override
the destination direectory, etc.


1.64 27-Mar-1997 mycroft

Remove knowledge of HIDEGAME from here.


1.63 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.62 22-Mar-1997 perry

Fix SYMLINKS not to include DESTDIR in the link itself


1.61 13-Mar-1997 perry

add SYMLINKS, by analogy to LINKS. Vetted by Christos.


1.60 22-Jan-1997 cgd

if 'clean' is not already defined, rather than simply defining it with
a bunch of rules, define a clean{kmod,lib,prog} target with the rules,
and have both clean and cleandir depend on that. That eliminates a bug
where 'cleandir' in a directory which included e.g. bsd.prog.mk but which
also had subdirs would 'make clean' all the subdirs and then 'make cleandir'
all ofthe subdirs. It also allows Makefiles to add more dependencies
to 'clean' after inclusion of the make template.

If 'clean' is already defined, the behaviour is the same as it used to be.


1.59 20-Dec-1996 cgd

add an afterdepend target (a la the one in bsd.lib.mk) that processes
the .depend file to add <filename>.ln for each <filename>.o as an
object file which has the given dependencies (in addition to
<filename>.po and <filename>.so, which were already there).


1.58 13-Dec-1996 mikel

add missing LIBPCAP definition.


1.57 26-Nov-1996 mrg

add libz and libwrap


1.56 18-Oct-1996 thorpej

Use ${INSTALL} rather than "install".
From Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.55 08-Apr-1996 jtc

Sort LIBFOO definitions and add LIBY; Reported by Mike Long <mike.long@analog.com> in PR #2301.


1.54 22-Oct-1995 christos

Added include file <bsd.sys.mk> that contains lex and yacc "parallel aware"
rules. These rules are not turned on by default; they are enabled by setting
the PARALLEL variable.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.53 25-Jun-1995 cgd

oops; fix an rm that might be empty


1.52 24-Jun-1995 cgd

update lint rules, but keep linting disabled


1.51 10-Jun-1995 mycroft

Define LIBEDIT.


1.50 21-Apr-1995 jtc

.include <bsd.nls.mk> unless NONLS is defined.


1.49 22-Dec-1994 cgd

specify man pages differently, and document how.


1.48 24-Aug-1994 mycroft

Include bsd.own.mk earlier.


1.47 20-Jul-1994 cgd

fix from christos, for progs w/o objects


Revision tags: netbsd-1-0-base
1.46 06-Jul-1994 mycroft

branches: 1.46.2;
Pull libraries from ${DESTDIR} if set. Kill LDONLY, which is unused and
probably not useful anyway.


1.45 30-Jun-1994 cgd

fix modify-info-nothingness-then-substitute probelm that broke genclass build


1.44 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.43 30-Jun-1994 cgd

don't be careless with _SUBDIRUSE


1.42 28-Jun-1994 jtc

Strip *.sh when constructing OBJS from SRCS.
This will allow us to clean up makefiles that build a script by munging
a template (uusched, genclass, neqn, etc.).


1.41 18-Jun-1994 cgd

don't chown the symlink, when HIDEGAME causes a symlink to be made to dm.
4.4-based FS code _follows_ the symlinks on a chown(2) call.


1.40 24-May-1994 cgd

fix the last to do the right thing for dependencies


1.39 24-May-1994 deraadt

LIBSKEY


1.38 22-May-1994 jtc

Single source file programs are now compiled into object files before they
are linked. This change halves the time it takes to rebuild all of the
NetBSD sources when only the C library is "touched"; but only takes about
one percent more disk space.


1.37 06-Apr-1994 chopps

relink (recompile) single source programs when crt0.o is updated.


1.36 24-Mar-1994 mycroft

Remove *.core on clean.


1.35 09-Feb-1994 cgd

kill install -d's.


1.34 28-Jan-1994 cgd

add LIBKVM


1.33 10-Nov-1993 cgd

librpc doesn't exist anymore


1.32 08-Nov-1993 cgd

ad LDSTATIC flag, so static linking can be made one-stop shopping.
use "setenv LDSTATIC" to make *everything* dynamically linked,
setenv LDSTATIC -static for everything statically linked, or unset
it for default behavior.


1.31 07-Oct-1993 cgd

LIBTERM pointed at nothing, but was meant to point to libtermcap.a...


1.30 07-Oct-1993 cgd

always define LIBCRYPT


1.29 17-Aug-1993 mycroft

Make sure we don't recurse into subdirectories if Makefile specified `install'
target. (It's usually blank and is specifically to avoid doing this...)


1.28 15-Aug-1993 mycroft

Automatically include bsd.subdir.mk for backward compatibility.


1.27 15-Aug-1993 mycroft

Don't automatically include bsd.subdir.mk in bsd.prog.mk and bsd.lib.mk.
Put back .MAIN in bsd.man.mk, and be careful not to include ../Makefile.inc
a second time.


1.26 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


1.25 15-Aug-1993 mycroft

Abstract out dependency stuff, and add RCS identifiers.


1.24 15-Aug-1993 mycroft

Create target directories with `install -d', and move `obj' targets into one
file.


1.23 10-Aug-1993 mycroft

Put LINKS handling in `install' target, so it's the last thing executed, and
happens even if `realinstall' is user-defined.


1.22 30-Jul-1993 mycroft

When generating a default OBJS, ignore .h files.


1.21 29-Jul-1993 mycroft

Don't print the `making ...' message if an obj dir already exists.
Also, a minor cleanup.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
1.20 17-Jul-1993 mycroft

Fix C++ dependencies for good. `make depend' is now done in two passes--one
of C files and one for C++ files. No need to specify `-+' in your Makefile,
as it is now done automatically.


1.19 17-Jul-1993 cgd

do c++ dependencies the right way...


1.18 17-Jul-1993 mycroft

Add suffix rules for C++ files.


1.17 04-Jun-1993 brezak

Add LIBRPCSVC variable.


1.16 02-Jun-1993 cgd

add ability to specify c++ dependencies, by setting CFLAGS+=-+ for
the dependency make.


1.15 26-Apr-1993 cgd

added definition for DPADD library variable LIBCRYPT.


1.14 26-Apr-1993 mycroft

Don't redefine `realinstall' target if already defined.


1.13 25-Apr-1993 mycroft

Link with LDFLAGS even if one source module.


1.12 25-Apr-1993 mycroft

Don't lose if we include bsd.prog.mk only to build man pages.


1.11 25-Apr-1993 mycroft

Fix error in last change. (Oops.)


1.10 25-Apr-1993 mycroft

Don't build man pages if NOMAN set.


Revision tags: netbsd-0-8 netbsd-alpha-1
1.9 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


1.8 08-Apr-1993 cgd

try to do the right thing, in terms making directories before we
install into them, and get the manpage cleans _OUT_ of "clean".
they don't belong there, only in cleandir, WFJ be damned.


1.7 08-Apr-1993 cgd

fixed typos...


1.6 08-Apr-1993 cgd

(silently) make sure we have directories before installing


1.5 04-Apr-1993 cgd

make LIBRPC point to the right place


1.4 27-Mar-1993 nate

Fixed the doc macros to call troff, eqn,and tbl instead of ditroff,
deqn, and dtbl.
Fixed make clean to remove the man pages (Bill fixed this in the distribution,
but not in the original source)
Changed install to leave the original file around, by using 'cp' instead of
'mv'. "install -c ..."


1.3 23-Mar-1993 cgd

made .CURDIR be absolute, not relative, thereby eliminating
the need for some of the makefile trickery when making objects,
and fixing a few .PATH bugs


1.2 22-Mar-1993 cgd

fixed "make obj" for cases when sources not in /usr/src/...
if sources not there, it now mkdirs obj, but some trickery
is necessary, to avoid deleting cwd.


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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.13 15-Dec-2013 christos

centralize the rpcgen flags and set for BSD output


Revision tags: 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-6-1-2-RELEASE netbsd-6-0-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 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.12 10-Sep-2011 apb

branches: 1.12.2; 1.12.8;
Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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.11 12-May-2004 christos

Add rules for RPC_CLNTFILES; suggested by Ian Zagorskih


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.10 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.9 19-Oct-2003 lukem

support MAKEVERBOSE


1.8 29-Jul-2003 lukem

just add various files to ${DPSRCS} instead of trying to get
a ${DEPENDSRCS} target to DTRT


1.7 29-Jul-2003 lukem

* move .includes added in rev 1.5 to outside of .if defined(RPC_SVCFILES (oops)
* move ${DEPENDSRCS}: ... to the end of the file


1.6 28-Jul-2003 lukem

Use ${DEPENDSRCS} as a target instead of .depend, now that
<bsd.dep.mk> builds .depend from .dep files.


1.5 14-Jul-2003 lukem

Be consistent with other bsd.*.mk, and pull in <bsd.init.mk> at the
start (which pulls in <bsd.own.mk>), and <bsd.obj.mk> and <bsd.sys.mk>
at the end. These provide the appropriate settings for TOOL_* .


1.4 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.3 19-May-2003 lukem

Remove dependency on ${RPCGEN}:
* Unnecessarily causes lib/librpcsvc (etc) to be rebuilt every time
rpcgen is updated.
* No other "generated" file (.l, .y, ...) depends upon its tool
like this
* As <bsd.own.mk> wasn't being pulled in, the tools/ version
wasn't being used, so a lot of times the dependency was wrong.

Fixes [toolchain/11568] by Bernd Ernesti.


1.2 07-May-2003 yamt

make RPC_XDRFILES depend on files in right directory.


1.1 05-Jan-2003 sommerfeld

Common makefile fragment for invoking rpcgen. See bsd.README for
documentation on the parameters which control this fragment's behavior.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base 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 phil-wifi-20191119
1.1 27-Aug-2019 kamil

branches: 1.1.2; 1.1.6;
Enhance the support of LLVM sanitizers

Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.

Add bsd.sanitizer.mk to share common code used by programs and libraries.

Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
1.8 23-Aug-2012 joerg

Revert last, it breaks the tricks xsrc uses.


1.7 23-Aug-2012 joerg

Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if
SHLIBDIR differs from /usr/lib.


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 netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase 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 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 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-nbase keiichi-mipv6-base pc532-eol-2008 matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
1.6 29-Aug-2007 hira

Use /libexec/ld.elf_so instead of /usr/libexec/ld.elf_so for the
programs which are located in /libexec.


Revision tags: matt-mips64-base netbsd-4-base
1.5 11-Nov-2006 jmmv

branches: 1.5.2; 1.5.4; 1.5.8;
Also use libraries from /lib for binaries installed into /libexec. Needed
by lfs_cleanerd which is about to be moved to this directory.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE abandoned-netbsd-4-base 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.4 12-Mar-2005 lukem

Also set SHLIBDIR to /lib if ${USE_SHLIBDIR} != "no".

This allows <bsd.lib.mk> to correctly set the RPATH of libraries that
use USE_SHLIBDIR=yes to /lib, so that dependent libraries can be found
from /lib when /usr/lib isn't mounted yet.
This was the intention of the _LIBLDOPTS support in <bsd.lib.mk>.

Fixes problem reported by Dan Carosone with when /sbin/cgdconfig is
dynamically linked against libcrypto.so but not libcrypt.so (it was
relying upon libcrypto.so to pull in libcrypt.so).


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.3 02-Jan-2004 lukem

Consistently test all variables that support a "yes"/"no" value with
${VAR} == "no"
or
${VAR} != "no"
(instead of against "yes"). Variables affected:
TOOLCHAIN_MISSING
HAVE_GCC3
USE_TOOLS_TOOLCHAIN
NEED_OWN_INSTALL_TARGET
USE_SHLIBDIR

Improve the documentation.


1.2 28-Jul-2003 lukem

Be consistent how "multiple include protection" is implemented. I.e,

.if !defined(_BSD_foo_MK_)
_BSD_foo_MK_=1

# ...

.endif # !defined(_BSD_foo_MK_)


Revision tags: fvdl_fs64_base
1.1 27-Sep-2002 thorpej

Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.56 10-Jul-2022 rillig

bsd.subdir.mk: replace obscure indirection with direct condition

Since 2008, when make generates the body of a .for loop, it does not
copy the items as raw strings but as expressions of the form ${:U...}.
This prevents syntactical changes from code injection in the body of the
.for loop.

Since then, using .for loop variables in conditions works. Since the
same time, the variable assignment operator '+=' doesn't need to be
protected by a leading space anymore. Even if the item from the .for
loop is 'libc++', the trailing '+' is not parsed as part of the variable
assignment operator, and it never had been parsed this way. The space
probably has been cargo cult programming. The only ambiguous case had
been in a variable assignment, when the variable name ended with a
variable from the .for loop, and the assignment operator was '='. Only
in this case could the parser be tricked into parsing the variable
assignment as 'libc+ +=' instead of the intended 'libc++ ='.


1.55 10-Jul-2022 rillig

bsd.subdir.mk: remove practically dead code

The condition '${dir:H} != ""' is almost always satisfied, since 2001 at
least. The only input for the modifier ':H' that leads to an empty
string is "/". It doesn't make sense though to specify the root
directory as a subdirectory.

While here, remove quotes around the left-hand side of comparisons in
conditions. The quotes have become redundant in 2008, when the .for
loop stopped inserting raw text into the .for loop body.

If the special case for "/" had actually been intended, it should have
been written as the equivalent '.if ${dir} == "/"' instead of hiding
this feature behind an edge case behavior of the modifier ':H'.

Based on the comments, the condition should have been '${dir:M/*}', but
it hadn't been written that way.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
1.54 10-Jun-2018 christos

use SUBDIR.roff suggested by uwe@


1.53 10-Jun-2018 kamil

Fix the MKGROFF=no MKCXX=yes build

Allow to disable building groff. This is a build tool written in C++.

This option is useful with an external toolchain configured for building the
distribution rather than building tools (e.g. C++ lookup paths may differ).

Looks ok by <christos>

Sponsored by <The NetBSD Foundation>


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE 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-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-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 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.52 26-May-2010 uwe

branches: 1.52.44;
Fix typo in comment.


1.51 19-Dec-2009 christos

We mustn't search in the path for ${dir}.${MACHINE}; make sure we only
find the ones relative to ${.CURDIR}.


Revision tags: matt-premerge-20091211
1.50 29-Nov-2009 uebayasi

Remove an unneeded test (.if defined(V)) in .for v in ${V} ... .endfor.
Tested by running build.sh distribution.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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-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
1.49 25-Oct-2008 apb

Add a NOSUBDIR variable for bsd.subdir.mk. If NOSUBDIR is defined
then SUBDIR is ignored.


Revision tags: matt-mips64-base2 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-nbase keiichi-mipv6-base pc532-eol-2008 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 netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base 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-4-base 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.48 13-Apr-2004 lukem

Add MAKEDIRPREFIX shell macro to <bsd.own.mk>.
Usage: ${MAKEDIRTARGET} dir target [params]
Runs "cd $${dir} && ${MAKE} [params] $${target}",
displaying a "pretty" message whilst doing so.

Use MAKEDIRPREFIX to implement the __recurse .USE macro in <bsd.subdir.mk>


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.47 29-Jan-2004 lukem

Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.46 02-Nov-2001 tv

Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.


1.45 04-Oct-2001 tv

Make sure "clean" target is always defined, to compensate for cleandir
now being defined in terms of clean.


1.44 22-Sep-2001 tv

The -m option is automatically propagated by make(1). Don't add yet more
(possibly wrong) `-m' options; this will only make MAKEFLAGS bigger and
bigger with each recursion.


1.43 21-Sep-2001 tv

Allow for recursion speedups by predefining rules for large subtrees which
don't need to run a particular target (such as "includes-games" at top level,
or "includes-sushi" at share/).


1.42 14-Aug-2001 tv

On recursion, don't recurse "clean" if making "cleandir". (Related to
bsd.own.mk change that defined clean as a dependency of cleandir.)


1.41 09-Jan-2001 sommerfeld

Don't send .WAIT into the bitbucket


1.40 01-Jan-2001 sommerfeld

Restore the intermediate subdir-${targ} targets since they're
referenced elsewhere; fixes problem of afterinstall running too soon.


1.39 30-Dec-2000 sommerfeld

Change SUBDIR expansions so that a .WAIT in a subdirs list turns into
.WAIT (rather than a ${targ}-.WAIT) in the ${targ}'s subdir dependancy list.

This allows .WAIT to be used in SUBDIR as a synchronization barrier
for recursive parallel builds.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
1.38 06-Jun-2000 mycroft

Fix some breakage with directory that have no subdirectories.


1.37 06-Jun-2000 mycroft

Oops; fix a subtle bit of semantics that was broken in the previous.


1.36 06-Jun-2000 mycroft

Oops. DTRT with directory names with dashes (e.g. for crypto-*).


1.35 06-Jun-2000 mycroft

A few changes to decrease parsing time and memory usage.


Revision tags: minoura-xpg4dl-base
1.34 16-Apr-2000 mrg

branches: 1.34.2;
fix an error in the previous


1.33 10-Apr-2000 mrg

fix long standing bug in `make build' with $DESTDIR:
- during `make build' after /usr/share/mk has been installed, call
make with `-m $DESTDIR/usr/share/mk'.


1.32 11-Mar-2000 aidan

Allow absolute directories in SUBDIR. There's probably a better fix that
can go in 'make'.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.31 11-Feb-1999 tv

Remove `dirname: all-dirname' compatibility hack. It's been long supposed
to go away, and even commented as such....


1.30 13-Nov-1997 thorpej

Echo the target we're working on while traversing subdirs, so one can
better judge how much longer a build will take. Patch submitted
by Brian Grayson <bgrayson@ece.utexas.edu> in PR #4419.


1.29 27-Oct-1997 drochner

Fix the before/after-install ordering problem in a different way.
The old fix broke with multiple targets on the make command line.


Revision tags: netbsd-1-3-base
1.28 11-Oct-1997 mycroft

branches: 1.28.2;
Don't include bsd.obj.mk in these two files.


1.27 11-Oct-1997 mycroft

Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)


1.26 11-Oct-1997 mycroft

Move the previous to a different place, because `.if !target(...' sucks.


1.25 10-Oct-1997 mycroft

Massively simplify this. Partly from David Holland in PR 3823.


1.24 31-May-1997 cjs

Back out BUILDDIR and NOINSTALL changes.


1.23 27-May-1997 cjs

branches: 1.23.2;
Re-add other folks' changes that I accidently reverted when I did my
build system changes commit.


1.22 26-May-1997 cjs

These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.


1.21 17-May-1997 christos

Add a realinstall target so that we recurse to subdirectories making install,
before the our afterinstall target fires.


1.20 07-May-1997 mycroft

Don't use _SUBDIRUSE outside of bsd.subdir.mk.


1.19 07-May-1997 mycroft

Various simplifications.


1.18 06-May-1997 mycroft

Set the .MAKE attribute for all recursive targets.


1.17 06-May-1997 mycroft

Add a pile of missing .PHONYs.


1.16 16-Apr-1997 christos

Annotate missing directories as [skipped: missing] (from Christoph Badura)


1.15 15-Apr-1997 christos

Skip missing subdirectories to enable builds in partial source trees.
Directories being skipped are mentioned as '===> dir [skipped]'


1.14 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.13 24-Mar-1997 christos

make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation


1.12 21-Mar-1997 cgd

changes to allow "make -j N" to more easily parallelize many subdirs


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.11 04-Apr-1996 jtc

Added new standard target "includes" (used to install header files) to
bsd.subdir.mk. Added some documentation to bsd.README.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.10 24-Jul-1995 cgd

show the directory depth, by printing out the hierarchy name.
Suggested by Ty Sarna, implemented by me. Useful, because it tells you
how deep you are, and allows you to paste the pathname in to 'cd' to the
directory.


1.9 09-Oct-1994 mycroft

Stop if cd fails.


1.8 26-Jul-1994 mycroft

Move the inclusion of bsd.own.mk to a better place.


Revision tags: netbsd-1-0-base
1.7 30-Jun-1994 cgd

branches: 1.7.2;
RCSID frobbing, and minor sanity adjustments.


1.6 30-Jun-1994 cgd

don't be careless with _SUBDIRUSE


1.5 09-Feb-1994 cgd

have _SUBDIRUSE done in 'realinstall', not in 'install' so that
'afterinstall' actually happens *after* the real install!
since this entire section is in a "!target(install)", having
it done the other way was wrong and unnecessary (i.e. the
previous change/comment was bogus).


1.4 17-Aug-1993 mycroft

Make sure we don't recurse into subdirectories if Makefile specified `install'
target. (It's usually blank and is specifically to avoid doing this...)


1.3 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


1.2 15-Aug-1993 mycroft

Abstract out dependency stuff, and add RCS identifiers.


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


1.318 15-Nov-2025 mrg

m68k: default to assember-errors-are-warnings like mips

now that i've fixed or force-ignored the assembler warnings for m68k,
make this a fatal error by default.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.317 13-Jan-2025 riastradh

Switch from -std=gnu99 to -std=gnu11 by default.

This is needed for newer language syntax like u"foo" for UTF-16
string literals in UEFI.

As proposed on tech-kern:

https://mail-index.netbsd.org/tech-kern/2025/01/05/msg029919.html

Some commentators requested -std=c11 instead of -std=gnu11, but that
requires additional work -- some of it is a matter of providing asm
and typeof as aliases for __asm__ and __typeof__, but there's other
issues that need to be resolved too like PR toolchain/58969: use of
alloca is warning, not error, with -std=c11. This is a smaller
incremental change.

PR toolchain/58962: clang build broken by C11 features with -std=gnu99


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.316 13-Feb-2024 christos

branches: 1.316.2;
Allow overriding the language standard to something newer.


1.315 06-Nov-2023 christos

Add -fmacro-prefix-map set like -fdebug-prefix-map (Jan-Benedict Glaw)

See:
https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html\
#index-fmacro-prefix-map
https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html\
#index-fdebug-prefix-map


1.314 03-Jun-2023 lukem

bsd.*.mk: move MKSTRIPSYM default to bsd.own.mk

Add default for MKSTRIPSYM=yes to to bsd.own.mk _MKVARS.no.
Test ${MKSTRIPSYM} != "no".


1.313 29-Apr-2023 christos

Like everywhere else make sure DESTDIR is not empty before using it.
Otherwise if it is empty before we were adding an optargless -d, which
ended up using the next argument (a -Isomething) after the recent change
to xlint.c related to sysroot. This broke using the native tools make
with the cross toolchain (for example typing make in /usr/src/bin/ls)
to build and install a single program.


1.312 22-Jan-2023 rillig

lint: repurpose the '-d' option to specify DESTDIR

Previously, passing '-nostdinc -isystem $dir' only searched the given
directory but not any compiler-specific directories.

Discovered by fontconfig, which includes <stdatomic.h> from C11, which
lives in /usr/include/gcc-10 instead of /usr/include.

Change the preprocessor options to '--sysroot' instead, to align them
with how the compiler is invoked using build.sh.


1.311 06-Jan-2023 christos

Now that the default page size is 4K again for x86_64 with the binutils
change to default to -z separate-code, remove the previous hack.


1.310 30-Dec-2022 christos

PR/57147: Andreas Gustafsson: Work around binutils 2.38+ relro
issue with +2M size in every binary by setting max-page-size. This
is the simplest fix; fixing this properly requires a lot more
surgery, and upstream seems uncertain how to fix it properly.


Revision tags: netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.309 14-Dec-2021 christos

branches: 1.309.2;
Pass W with IDU for lint and deps.


1.308 01-Nov-2021 nia

mk: Add support for conditional compilation of parts of the tree with
partial RELRO when MKRELRO=full is set.

Currently the X server needs to be compiled with only partial RELRO
due to the way certain (but not all - it seems wsfb works with full
RELRO) graphics driver modules are loaded.


1.307 11-Sep-2021 andvar

sysinst/partitions.h: fix typos comments, also fix same typos in other files.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.306 26-Apr-2021 christos

Revert the AFLAGS change since it affects kernels.


1.305 25-Apr-2021 christos

- since we are using regex already, shorten by merging arm and mips entries
- add a MACHINE_MIPS64 macro shorthand
- pass -m{soft,hard}-float to the assembler when we are passing it to the
compiler


1.304 09-Nov-2020 christos

- make the CTFCONVERT command lines consistent and concise by putting all
the implementation stuff in a variable CTFCONVERT_RUN
- introduce an OBJECT_TARGET variable that contains the output object file
- when we need to run ctfconvert, go through an intermediate ${.TARGET}.o
file, instead of writing directly to ${.TARGET} and then overwriting
${.TARGET} with ctfconvert. This avoids build failures after a build
got interrupted (the "partially built from C" scourge).


1.303 05-Sep-2020 mrg

disable -Wabi for GCC 9.


1.302 03-Jul-2020 maxv

Enable trace-cmp.


1.301 15-May-2020 maxv

Don't add KCOV instrumentation on top of the KUBSAN instrumentation,
this is useless and too bloated.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
1.300 04-Apr-2020 maxv

KCOV doesn't depend on specificdata and cpu_intr_p() anymore, so drop
references.


Revision tags: is-mlppp-base
1.299 08-Feb-2020 maxv

Retire KLEAK.

KLEAK was a nice feature and served its purpose; it allowed us to detect
dozens of info leaks on the kernel->userland boundary, and thanks to it we
tackled a good part of the infoleak problem 1.5 years ago.

Nowadays however, we have kMSan, which can detect uninitialized memory in
the kernel. kMSan supersedes KLEAK: it can detect what KLEAK was able to
detect, but in addition, (1) it operates in all of the kernel and not just
the kernel->userland boundary, (2) it requires no user interaction, and (3)
it is deterministic and not statistical.

That makes kMSan the feature of choice to detect info leaks nowadays;
people interested in detecting info leaks should boot a kMSan kernel and
just wait for the magic to happen.

KLEAK was a good ride, and a fun project, but now is time for it to go.

Discussed with several people, including Thomas Barabosch.


1.298 20-Dec-2019 christos

move MV to sys.mk because it is used there. Pointed out by joerg@


1.297 01-Dec-2019 kamil

Disable KCOV instrumentation in x86_machdep.c

This allows to use cpu_intr_p() directly inside KCOV.


Revision tags: phil-wifi-20191119
1.296 15-Nov-2019 maxv

Make kMSan compatible with KCOV. With kMSan we are forced to stay with the
fsanitize flag on subr_kcov.c, which means that kMSan will instrument KCOV.
We add a bunch of __nomsan attributes to reduce this instrumentation, but
it does not remove it completely. That's fine.


1.295 05-Nov-2019 maxv

Add Kernel Concurrency Sanitizer (kCSan) support. This sanitizer allows us
to detect race conditions at runtime. It is a variation of TSan that is
easy to implement and more suited to kernel internals, albeit theoretically
less precise than TSan's happens-before.

We do basically two things:

- On every KCSAN_NACCESSES (=2000) memory accesses, we create a cell
describing the access, and delay the calling CPU (10ms).

- On all memory accesses, we verify if the memory we're reading/writing
is referenced in a cell already.

The combination of the two means that, if for example cpu0 does a read that
is selected and cpu1 does a write at the same address, kCSan will fire,
because cpu1's write collides with cpu0's read cell.

The coverage of the instrumentation is the same as that of kASan. Also, the
code is organized in a way similar to kASan, so it is easy to add support
for more architectures than amd64. kCSan is compatible with KCOV.

Reviewed by Kamil.


1.294 15-Oct-2019 christos

Allow individual lex and yacc sources to override/extend LFLAGS and YFLAGS
respectively.


1.293 05-Oct-2019 uwe

Don't add -Wabi to CXXFLAGS for gcc 8. It warns about differences
from the most up-to-date ABI, which in gcc 8 is used by default.
XXX: This needs a better condition.


Revision tags: netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
1.292 22-May-2019 kamil

branches: 1.292.2;
Allow to use KCOV + kASan together

Stop instrumenting KCOV files with kASan and the other way around.
This fixes booting of the setup of using them together.

In theory the checks could be more fine grained, however there is no good
reason (except extra DIAGNISTIC) for running a kernel sanitizer without
kernel coverage.

Patch by <R3x>


1.291 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


Revision tags: pgoyette-compat-20190127
1.290 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118
1.289 01-Jan-2019 christos

document the elf2foo tools.
The bsd.sys.mk tools are un-prefixed, since the "right" version is installed
for the platform, as opposed to the tools ones which should be able to
co-exist.


1.288 31-Dec-2018 christos

- prefix elf conversion tools with their platform to avoid conflicts
- add arm-elf2aout


Revision tags: pgoyette-compat-1226
1.287 02-Dec-2018 maxv

Introduce KLEAK, a new feature that can detect kernel information leaks.

It works by tainting memory sources with marker values, letting the data
travel through the kernel, and scanning the kernel<->user frontier for
these marker values. Combined with compiler instrumentation and rotation
of the markers, it is able to yield relevant results with little effort.

We taint the pools and the stack, and scan copyout/copyoutstr. KLEAK is
supported on amd64 only for now, but it is not complicated to add more
architectures (just a matter of having the address of .text, and a stack
unwinder).

A userland tool is provided, that allows to execute a command in rounds
and monitor the leaks generated all the while.

KLEAK already detected directly 12 kernel info leaks, and prompted changes
that in total fixed 25+ leaks.

Based on an idea developed jointly with Thomas Barabosch (of Fraunhofer
FKIE).


Revision tags: pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.286 03-Aug-2018 kamil

Allow to overwrite sanitizer flags for userland

Always define -fsanitize=${USE_SANITIZER} and
-fsanitize=${USE_LIBCSANITIZER} before other flags defined with
SANITIZERFLAGS and LIBCSANITIZERFLAGS.

This allows to overwrite rules that are parsed from left to right.
With the current approach it wasn't possible to disable some checks, as
they were reenabled again by the "-fsanitize=" argument.


Revision tags: pgoyette-compat-0728
1.285 25-Jul-2018 kamil

Introduce MKLIBCSANITIZER in the share/mk rules

Add flags that are required to build a program and a dynamically loaded
library.

Propagade LIBCSANITIZERFLAGS to CFLAGS and CXXFLAGS.

LDFLAGS is not changed on purpose, as a libcsanitizer is inside libc
and no external dependencies are needed.

Register NOLIBCSANITIZER, as certain distribution parts will need to be
skipped.


Revision tags: phil-wifi-base pgoyette-compat-0625
1.284 24-Jun-2018 kamil

branches: 1.284.2;
Reset SANITIZERFLAGS when specified NOSANITIZER / MKSANITIZER=no

This allows passing additional sanitizer specifig flags from the ./build.sh
level, like: -V SANITIZERFLAGS="-fsanitize-memory-track-origins" for MSan.


1.283 21-Jun-2018 kamil

Refactor MKSANITIZER flags in mk rules

Introduce a new variable SANITIZERFLAGS that contains all the sanitizer
specific flags. These flags are designed to be passed to CFLAGS, CXXFLAGS
and LDFLAGS.

Pass SANITIZERFLAGS in bsd.prog.mk rules to CFLAGS, CXXFLAGS and LDFLAGS.

Pass SANITIZERFLAGS in bsd.lib.mk rules to *_pic.a build flags. The *_pic.a
libraries are designed to construct .so libraries. All .so libraries with
few exceptions are expected to be prebuilt with a sanitizer. Another
purpuse of *_pic.a files can be constructing static PIE programs, however
they are not supported as of now and there is no sanitization of static
programs either.

Once MKSTATICPIE will be supported, it will be initially incompatible with
MKSANITIZER.

This change also makes it easier to build other targets like kernel and
kernel modules without userland sanitizers.

No functional change intended for MKSANITIZER=no users.


1.282 17-Jun-2018 christos

The compat build plays games with MAKEOBJDIR and unsets MAKEOBJDIRPREFIX.
Keep using our standard NETBSDOBJDIR if it was set.


1.281 13-Jun-2018 christos

Create NETBSDOBJDIR to handle MAKEOBJDIRPREFIX, since that prepends the
prefix to the whole path.
Mention that we cannot handle MAKEOBJDIR


1.280 11-Jun-2018 christos

Handle more objdir variations for MKREPRO (untested)


1.279 02-Jun-2018 christos

Move the RELRO and the SANITIZER stuff outside of the WARNS conditional!


1.278 02-Jun-2018 christos

Add build glue to build all the code with sanitizers: MKSANITIZE.


1.277 24-May-2018 christos

Be more selective about remapping object directories otherwise we pick
objdump and objcopy with the regex.

XXX: pullup-8


Revision tags: pgoyette-compat-0521
1.276 19-May-2018 christos

Need to delete ${DESTDIR} for lint
XXX: pullup-8


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
1.275 02-Feb-2018 mrg

branches: 1.275.2;
convert HAVE_GCC handling to modern GCC release numbering:
- HAVE_GCC=5 is now the default (vs. HAVE_GCC=53 we've been using for
GCC 5.4 and GCC 5.5.)
- remove some more GCC 4.8 code. we don't support GCC 4 here.
- adjust set lists to gcc=5 from gcc=53.

add some basic HAVE_GCC=6 handling (totally unused so far.)


1.274 22-Jan-2018 christos

white space for readability.


1.273 22-Jan-2018 christos

Disgusting and evil hack to elide coverity options that break production
of coverity output when present [userland portion]

- --sysroot
- -fstack-protector
- -std=gnu99
- --nostdinc
- -fPIE

The critical one here being --sysroot because this means that we need to
use the actual system headers while building (or chroot/sandbox appropriately)


1.272 01-Aug-2017 mrg

convert two pairs of MACHINE_ARCH into two single MACHINE_CPU checks.


Revision tags: netbsd-8-0-RC1 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
1.271 20-Apr-2017 ozaki-r

branches: 1.271.4;
Introduce MKSTRIPSYM build option

If it's yes, all local symbols of shared libraries are stripped
(default). If it's no, only temporary local symbols are stripped;
for example, symbols of static functions are kept. Keeping such
symbols is useful on using DTrace for userland libraries and
getting a backtrace from a rump server loading modules (shared
libraries).

Proposed and discussed on tech-kern and tech-toolchain


1.270 22-Mar-2017 chs

provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().


Revision tags: pgoyette-localcount-20170320
1.269 07-Feb-2017 christos

Kernel build objdirs have a kernel name after the objdir. Use a regex for
that. Note that debug-prefix-map and debug-regex-map insert entries in a
linked list in reverse order.


1.268 17-Jan-2017 joerg

Don't randomly break the build and restrict -Wsystem-headers to gcc.


Revision tags: bouyer-socketcan-base
1.267 13-Jan-2017 christos

branches: 1.267.2;
enable again system header warnings now amd64 builds.


1.266 12-Jan-2017 christos

disable until we fix the build.


1.265 12-Jan-2017 christos

PR/51831: Don't suppress warnings coming from system header macro expansions.


1.264 10-Jan-2017 maya

-Wa,--fatal-warnings is a GCC flag and unknown to clang. make it
GCC specific, so we can (try to) build a kernel with higher WARNS
using clang.


Revision tags: pgoyette-localcount-20170107
1.263 24-Dec-2016 christos

Add to lint flags for MKREPRO


1.262 23-Dec-2016 christos

Don't attempt to shorten resolved path names (via realpath) because it could
lead to inconsistencies between different builds.


1.261 21-Dec-2016 christos

wildcard obj dirs


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.260 07-Jul-2016 matt

branches: 1.260.2;
Add placeholder for compiing earmv7* with -mthumb.
Preserve $d/$a/$t for all ARM binaries regardless of endian.


1.259 14-Jun-2016 christos

Add and document MKRELRO and set x86 to partial by default.


1.258 12-Apr-2016 christos

Add --warn-shared-textrel for the linker.


1.257 30-Mar-2016 martin

Pass -pie to cc, not -Wl,-pie. This way we have a chance to fix specs
for obscure corner cases like -pie -fPIE -static (used for
/usr/tests/lib/csu/h_initfini2 if building with MKPIE=yes).
While there also replace -fPIC with -fPIE for the PIE case, even if
it should be mostly equivalent.


1.256 22-Mar-2016 mrg

apply -Wno-error=stack-protector in the same places for GCC 5.3 as 4.8.
fixes sh3 and m68k issues, at least. (vax and or1k are also included.)


1.255 13-Mar-2016 christos

Add NO{SSP,FORTIFY}


1.254 12-Mar-2016 mrg

remove conditionals that are always true with GCC >= 4.8.


1.253 27-Feb-2016 joerg

Avoid syntax errors if HAVE_GCC is not defined.


1.252 20-Feb-2016 christos

Unbreak LLVM MKREPRO=yes builds (since the build system sets MKREPRO now)


1.251 31-Jan-2016 christos

Introduce NOPIE and NOCTF so that standalone programs build properly.


1.250 10-Jan-2016 christos

group by directory.


1.249 10-Jan-2016 dholland

Apparently it's important to do
-Wp,-iremap,${DESTDIR}:
and not
-Wp,-iremap,${DESTDIR}/:/

Why this should matter for strings where the trailing slash is
present, I dunno. But it does.

Fixes the MKREPRO problem where the unfixed path to lfs_accessors.h
appears ina bunch of bins.


1.248 10-Jan-2016 dholland

For MKREPRO, substitute DESTDIR before NETBSDSRCDIR; then it has a
chance of working if DESTDIR is under NETBSDSRCDIR (as happens with
default objdirs when building someplace random other than /usr/src...)


1.247 09-Jan-2016 christos

- use -fdebug-regex-map to remap one style of object dirs. There are others.
- change DESTDIR to nothing so that we don't get // in the front
- apply the mappings to both c and c++


1.246 22-Dec-2015 christos

Add a prefix translation map for debugging symbols. Note the use of variable
indirection so that DW_at_producer that contains the compilation command
remains the same: readelf --debug-dump foo.debug


1.245 03-Sep-2014 matt

Change to support OR1K


1.244 14-Aug-2014 joerg

Use wildcards for stripping/preserving the mapping symbols on ARM and
AArch64. LLVM creates unique symbols in each file of the form $a.n etc.


1.243 14-Aug-2014 matt

Fix typo in OBJCOPYLIBFLAGS_EXTRA for aarch64eb.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
1.242 10-Aug-2014 joerg

branches: 1.242.2;
Put GCC/GAS specific options under ACTIVE_CC == "gcc".


1.241 10-Aug-2014 matt

Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only. While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.


Revision tags: tls-earlyentropy-base
1.240 13-Jun-2014 mrg

remove the build support for GCC 4.1, and any hacks i found for it.

there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)


1.239 27-May-2014 plunky

use -Wno-traditional only for GCC rather than !CLANG


1.238 27-May-2014 plunky

we use C99 syntax but with some GCC extensions, so signal that depending
on the compiler in use


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.237 28-Jan-2014 martin

branches: 1.237.2;
As discussed on tech-toolchain: untill gcc is fixed (or our ABI changed, ...)
make stack protection warnings non-fatal if using gcc 4.8 on sh3/m68k/vax.


1.236 16-Jan-2014 christos

- Add a new bsd.host.mk that contains all the HOST_ variables extracted from
bsd.sys.mk and bsd.own.mk
- Add protection requiring that:
1. bsd.sys.mk is not include from other Makefiles directly
2. bsd.own.mk must be included before bsd.sys.mk since it
sets variables that bsd.sys.mk uses as conditionals.

This is step 1 of removing all variable settings from bsd.sys.mk and
leaving behind only rules. This way, the structure of a standard Makefile
is:
variable overrides

optionally include bsd.own.mk
optionally include bsd.endian.mk

variable settings that use variables defined in bsd.own.mk

include a one or more rule .mk files (such as bsd.prog.mk etc)


1.235 15-Jan-2014 joerg

-shared-libgcc is a GCC option, so only use it for gcc.


1.234 10-Jan-2014 christos

not so fast, let's fix the tree first.


1.233 10-Jan-2014 christos

Add protection against direct inclusion of this file from other Makefiles.
This file is only intended to be included from the other rules files like
bsd.lib.mk or bsd.prog.mk. If you need things to be defined early, use
bsd.own.mk.


1.232 07-Jan-2014 joerg

Non-literal format strings should be an error by default for clang.


1.231 16-Dec-2013 matt

Back out change for bsd.lib.mk which skips objcopy -x for BE ARM.
Change OBJCOPYLIBFLAGS to keep $a/$d/$t symbols on BE ARM.


1.230 06-Nov-2013 christos

turn off another gcc warning for m68k


1.229 28-Oct-2013 mrg

add MKDEPCXX, that is used for C++ files depend creation. also
add some missing ${COPTS.${.IMPSRC:T}} and ${CPUFLAGS.${.IMPSRC:T}}
to the dependancy rules.

this makes it possible to have C++ files .d files created with the
C++ compiler, and with the normal options for this file, which
means that we can build libstdc++-v3 from gcc 4.8.


1.228 26-Oct-2013 mrg

define a HOST_LINK.cc always.


1.227 12-Sep-2013 joerg

Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
1.226 18-Jul-2013 matt

Test BSD makefile about coldfire.
XXX still hate m68k--netbsdelf-coldfire


1.225 17-Jul-2013 martin

Disable -Wconversion for gcc older than 4.5


Revision tags: riastradh-drm2-base
1.224 16-Jul-2013 christos

branches: 1.224.2;
Add -Wconversion for WARNS > 5


Revision tags: agc-symver-base
1.223 27-Jan-2013 christos

Move HAS_SSP and USE_SSP out of bsd.sys.mk. They did not belong there in
the first place. Rename HAS_SSP to HAVE_SSP to match existing practice.


1.222 26-Jan-2013 christos

CTFCONVERT complains and coredumps for c++


1.221 26-Jan-2013 christos

CTFCONVERT me harder.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
1.220 23-Sep-2012 joerg

Revert two unintentional changes from the PPC tests


1.219 23-Sep-2012 joerg

Update LLVM/Clang snapshot to r164464. This adopts the GCC options for
the SSP parameters and a not-yet-default rewrite of SROA.


1.218 05-Sep-2012 riz

branches: 1.218.2;
Remap X11SRCDIR to /usr/xsrc for the MKREPRO=yes case.


1.217 10-Aug-2012 joerg

Make linker warnings fatal by default for Clang, even if not building
GCC.


1.216 25-Jun-2012 abs

Whatever "-Wl,--fatal-warnings" get-out-of-jail-free card gcc-4.5 gets,
give the same treatment to gcc-4.1.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
1.215 20-Mar-2012 matt

Add WARNS=5 to enable -Wold-style-definitions


1.214 17-Mar-2012 christos

allow file-specific lint flag additions


1.213 15-Mar-2012 joerg

Don't error out for non-literal format strings with Clang until the rest
of the __printflike changes are in the tree.


1.212 15-Mar-2012 joerg

Decouple HAVE_LLVM from HAVE_GCC. For GCC, add -Wno-format-zero-length
when -Wformat is used.


Revision tags: netbsd-6-base
1.211 28-Jan-2012 christos

branches: 1.211.2;
Provide a way to override the default objcopy flags for library modules.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.210 31-Oct-2011 chs

branches: 1.210.2;
switch everything except vax to gcc 4.5.
switch m68k to -Os since -O2 produces much bigger code
with gcc 4.5 than it did with gcc 4.1.


1.209 20-Sep-2011 joerg

Decouple clang and gcc handling a bit. Add -Wmissing-noreturn for clang
builds. GCC complains about about non-void functions not returning,
which is quite a bit more bogus, so don't enable it for that.


1.208 23-Aug-2011 christos

add -Wformat=2


1.207 08-Jul-2011 uwe

Augment previous. Use -Wno-uninitialized for sh3 in general, not just
dreamcast. The problem is not sh3 per-se, but the fact that for sh3
we use -Os by default. That causes false positives since gcc doesn't
detect that e.g. a variable is set and used under the same condition
in different "if" statements.

XXX: This should probably check for optimization level instead,
though, for all I know, phase of moon might be a contributing cause
too.

XXX2: MACHINE_CPU is set in bsd.own.mk and is not available here, so
we have to spell the test in terms of MACHINE_ARCH.


1.206 08-Jul-2011 mrg

# XXX GCC 4.5 for dreamcast is extra noisy for cases it should be better with
workaround via: CFLAGS+= -Wno-uninitialized


1.205 29-Jun-2011 mrg

XXX: for now, disable fatal linker warnings for GCC 4.5.


1.204 20-Jun-2011 mrg

remove all the code that supported HAVE_GCC=3. mostly from chuq.


Revision tags: cherry-xenmp-base
1.203 30-May-2011 joerg

branches: 1.203.2;
Reorder CWARNFLAGS and -Werror in CFLAGS to allow CWARNFLAGS and by
extension CWARNFLAGS.${SOURCE} to override it selectively.


1.202 30-May-2011 joerg

Add an alternative to NOGCCERROR for clang.


1.201 26-May-2011 joerg

Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.


1.200 25-May-2011 joerg

Restrict -Wno-non-template-friend and -Wno-pmf-conversions to GCC.


1.199 25-May-2011 joerg

Add support for compiler specific warning flags with
CWARNFLAGS.${COMPILER}


1.198 23-May-2011 joerg

Disable Clang's array boundary checker for now (hits e.g. in GCC and BDB)


1.197 22-May-2011 joerg

Simplify a bit


1.196 22-May-2011 joerg

Split SSP parameters on a per-compiler base


1.195 22-May-2011 joerg

No -Wno-traditional for clang.


1.194 17-May-2011 christos

Enable c99 mode by default.

This has the side effect of complaining for missing prototypes
implicit type declarations and missing return statements.

NB: I've only ran a build on amd64, so other platforms MI code might break.
If you can't wait for me to fix them, revert this commit.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.193 25-Dec-2010 joerg

If MKREPRO, transform ${NETBSDSRCDIR} to /usr/src and ${DESTDIR} to /
for the purpose of the C preprocessor. This avoids leaking the source
path into the final binaries.


1.192 21-Apr-2010 pooka

dial . for operator


1.191 21-Apr-2010 christos

don't try to build PIE binaries when LDSTATIC


1.190 02-Mar-2010 darran

DTrace: Add CTF generation to the make framework. Only enabled when
MKDTRACE=yes.


1.189 15-Dec-2009 mrg

brace a --fatal-warnings with a NOGCCERROR check.


1.188 14-Dec-2009 matt

Merge from matt-nb5-mips64


Revision tags: matt-premerge-20091211
1.187 13-Dec-2009 christos

Don't add the .h rule for yacc if we are not really building (-n)


1.186 30-Nov-2009 uebayasi

Support "extsrc", externally added programs and libraries. Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org. (These sets are not included as TNF releases.)


1.185 12-Nov-2009 tron

Revert SSP changes because at least rmind@, pooka@ and haad@ consider
5% more performance more important than the gain in security.


1.184 12-Nov-2009 tron

Invent a new flag "USE_SSP_DEFAULT" which defines whether we want to use
SSP for building the whole source tree. Set this to "yes" for
NetBSD/amd64 and NetBSD/i386. It is now possible to get the old
behavior (build libs and certain programs with SSP) by setting
"USE_SSP_DEFAULT" to "no".


1.183 12-Nov-2009 tron

Fix broken conditional to get manual builds (not using "build.sh")
working again.


1.182 11-Nov-2009 tron

Enable Stack Smash Protection (SSP) by default for NetBSD/amd64 and
NetBSD/i386 as previously discussed on the "port-amd64" and
"port-i386" mailing lists. No objections from the core team.

Thanks a lot to Tobias Nygren for helping me with the benchmarking
and to Christos Zoulas for fixing SSP problems in cgd(4).


1.181 09-Nov-2009 skrll

IA64 doesn't have SSP.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.180 12-Feb-2009 lukem

Enable -Wsign-compare for WARNS=4 (and above).
Test compiled on i386 and amd64; there may be some stragglers
on other platforms.

Note: -Wall has this by default in gcc4, and we explicitly disable it at
WARNS=1 (i.e., -Wall -Wno-sign-compare). A goal is to reduce the WARNS level
where this feature is enabled, so we can eventually remove -Wno-sign-compare.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base
1.179 26-Oct-2008 apb

branches: 1.179.4; 1.179.8;
Always define TOOL_* variables in bsd.own.mk, not in bsd.sys.mk.

Previously, they were defined in bsd.own.mk if USETOOLS=yes, but in
bsd.sys.mk if USETOOLS!=yes. This caused makefiles that did this:

.include <bsd.own.mk>
FOO != ${TOOL_BAR} args...

to work in the USETOOLS=yes case but not in the USETOOLS!=yes case.


1.178 26-Oct-2008 apb

Set HOST_SH?=/bin/sh unconditionally. Previously, it was conditionally
set to /usr/bin/bash if HOST_CYGWIN was defined, but now build.sh
tries to set HOST_SH appropriately.

Remove the HOST_CYGWIN variable, which was not used for any other purpose.

Document that HOST_SH should be an absolute path.

THis was proposed in tech-toolchain.


1.177 25-Oct-2008 apb

Remove AWK variable, which is no longer used. All previous users
now use TOOL_AWK instead.


Revision tags: matt-mips64-base2
1.176 19-Oct-2008 apb

Define TOOL_AWK.


1.175 19-Oct-2008 christos

handle assembly files for MKPIE


1.174 16-Oct-2008 christos

Provide a way for a program to override the PIE flags.


1.173 15-Oct-2008 christos

don't compile/link libraries with pie


1.172 14-Oct-2008 apb

Use "?=", not "=", to set default values for the TOOL_* variables
added in the previous commit.


1.171 13-Oct-2008 apb

Add missing TOOL_* variables to bsd.sys.mk and document them in
bsd.README. Previously, several of these variables were present in
bsd.own.mk but not in bsd.sys.mk or bsd.README.


1.170 13-Oct-2008 apb

In bsd.sys.mk and bsd.own.mk, sort lists of TOOL_* variables.
In bsd.README, document all TOOL_* variables that are set in bsd.sys.mk.

There are several TOOL_* variables that are set in bsd.own.mk, but not
set in bsd.sys.mk and not documented in bsd.README.


1.169 05-Oct-2008 apb

Remove the definition of HOST_SED. HOST_SED was previously used only in
tools/atf-compile, which has now been adjusted to use TOOL_SED.


Revision tags: mjf-devfs2-base
1.168 26-Sep-2008 apb

Build strfile both as a host tool and as an installed program:
* in games/fortune/strfile/Makefile, build strfile as a
regular program instead of as a host tool;
* add tools/strfile directory to build strfile as a host tool;
* in tools/Makefile, add strfile to SUBDIR list;
* in BSD.*.mk, define TOOL_STRFILE variable;
* in games/fortune/datfiles/Makefile, use TOOL_STRFILE when creating
databases at build time;
* in distrib/sets/lists/games/mi, mention usr/games/strfile.


1.167 19-Sep-2008 christos

support per file lex and yacc prefixes.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
1.166 24-Aug-2008 gmcgarry

Honour HAVE_PCC


1.165 23-Jul-2008 christos

Disable PIE for kernel builds. Some architectures pass -mcmodel to gcc and
this is incompatible with PIE. And we don't really want pic objects in the
kernel


1.164 21-Jul-2008 lukem

If WARNS>0 and !defined(NOGCCERROR), add
-Wa,--fatal-warnings
to CFLAGS to set assembler warnings to be fatal.
(Done via CFLAGS instead of AFLAGS so that all assembling, not just
that of .S/.s files, uses the option.)


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
1.163 30-Apr-2008 garbled

branches: 1.163.2;
Convert prep to use the new unified mkbootimage rather than it's own. This
mkbootimage can be shared by prep, rs6000, and bebox.

TODO: Convert bebox to use this. Needs someone to test.


1.162 22-Apr-2008 tsutsui

Redo a change in rev 1.160 with more proper way:
> Don't make linker warnings fatal on linking static libs since
> there is no proper way to avoid "FOO is a patented algorithm" warnings.

Ok'ed by christos@ and dogcow@ on tech-toolchain, and
tested build.sh build for sun2, news68k, alpha and newsmips.


Revision tags: yamt-pf42-baseX yamt-pf42-base
1.161 15-Apr-2008 tsutsui

branches: 1.161.2;
Backout previous for now. We have to rethink dependency for MKPIC and LDSTATIC.
Pointed out by dogcow@.


1.160 14-Apr-2008 tsutsui

Don't make linker warnings fatal on linking static libs since
there is no proper way to avoid "FOO is a patented algorithm" warnings.
Ok'ed by christos@ on tech-toolchain.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
1.159 03-Mar-2008 lukem

branches: 1.159.2;
Set linker warnings to be fatal if ${WARNS} > 0.


Revision tags: hpcarm-cleanup-base
1.158 09-Jan-2008 simonb

branches: 1.158.2;
Remove support for NetBSD/pc532.


Revision tags: pc532-eol-2008 matt-armv6-base
1.157 28-Dec-2007 christos

add MKPIE


Revision tags: cube-autoconf-base
1.156 12-Nov-2007 jmmv

Add the atf host tools

This adds reachover Makefiles to build the atf tools required during a
cross-build.


Revision tags: matt-armv6-prevmlocking matt-mips64-base
1.155 03-Jun-2007 uwe

branches: 1.155.4;
Stack protector codegen bug on sh3 has been fixed, so drop sh3 from
the list of platforms where we disable ssp.


1.154 03-Jun-2007 christos

we can now compile libc with _FORTIFY_SOURCE


1.153 31-May-2007 uwe

Fix inverted comparison ${MACHINE_ARCH} != "hppa" when checking for
ssp. (hi^2 tls!)


1.152 30-May-2007 uwe

Use matching open and close parens.
Why make doesn't complain about $(foo} ?


1.151 30-May-2007 tls

Fix typo, and eliminate mention of libssp since it's gone.
Move -D_FORTIFY_SOURCE to CPPFLAGS from COPTS.


1.150 30-May-2007 tls

Match usage of FORTIFY_SOURCE on other platforms by not requiring special
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).

Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3). But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.


1.149 30-May-2007 tls

mipsel || mipseb, not mipsel || mipsel


1.148 30-May-2007 tls

Move FORTIFY_SOURCE implementation from the somewhat ill-named "libssp"
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do. Goodbye, libssp
dependency in libraries and executables. Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.


1.147 29-May-2007 tls

Sigh, revert previous and fix right: we don't have MACHINE_CPU in bsd.sys.mk.


1.146 29-May-2007 tls

MACHINE_ARCH -> MACHINE_CPU so excluding mips from SSP/FORT works right.


1.145 29-May-2007 tls

Fix two bugs reported by Simon Burge: 1) USE_FORT and USE_SSP should be
disabled on platforms where GCC doesn't support -fstack-protector. 2) The
libssl Makefile had a hard-coded USE_FORT=yes.


1.144 29-May-2007 tls

Sigh. Fix USE_FORT: do not use /usr/include/ssp from *host* system.


1.143 28-May-2007 tls

Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.


1.142 22-May-2007 tls

Add -D_FORTIFY_SOURCE=2 where it can safely/sanely be used if building
with USE_SSP: not in the kernel, and not in libssp itself.


1.141 14-Jan-2007 apb

Define TOOL_JOIN.


Revision tags: netbsd-4-base
1.140 11-Nov-2006 christos

branches: 1.140.2; 1.140.4;
disable SSP for standalone code.


1.139 10-Nov-2006 christos

add the non tool version of paxctl


1.138 09-Nov-2006 christos

Add ssp glue.


1.137 22-Oct-2006 christos

Add -Wextra -Wno-unused-parameter to WARNS > 2


1.136 08-Oct-2006 elad

PR/28368: Peter Postma: unrecognized option `-Wnetbsd-format-audit'

Apply patch from rivo nurges in #NetBSD-code, thanks!


1.135 09-Sep-2006 simonb

Use -Wno-uninitialized for ns32k. For some reason, gcc on ns32k
doesn't detect initialisation correction in simple "for" loops like:
for (i = 0; i < 10; i++)
var = i;


Revision tags: abandoned-netbsd-4-base
1.134 01-Jul-2006 mrg

-std=gnu99 can be applied with GCC>=3, not MACHINE != vax.


1.133 18-Jun-2006 gdamore

Forgot to commit these for TOOL_SED. Thanks to tsutsui@ for pointing it out.


1.132 02-Jun-2006 mrg

remove support for building (with) GCC 2.95. also:
- always install <stdbool.h>
- don't generate a fake one for vax / gettext.


1.131 22-May-2006 uwe

Enable -Wold-style-cast for sh3 now that its stadarg.h doesn't use LHS casts.


1.130 20-May-2006 christos

Remove -Wno-attribute for gcc4


1.129 11-May-2006 mrg

add support for ${OBJCOPTS} and ${OBJCOPTS}.<lib|prog|fn>.


1.128 07-Apr-2006 mrg

retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3 or 4.


1.127 27-Mar-2006 he

The -Wno-packed switch is a gcc3+ thing, so place it where it won't
be picked up by gcc 2.95.3. Fixes build problem for vax.


1.126 25-Mar-2006 dogcow

Add -Wno-packed, in preparation for gcc4.1.x; unlike most of the other
warnings, it (at best) flags possible underoptimization, and not any
code defects.


1.125 02-Dec-2005 christos

For now, s/c99/gnu99/ for WARNS=4. This is so that alloca() is defined (and
possibly other built-in functions). Another solution would be to add:

#ifdef __GNUC__
#define alloca(a) __builtin_alloca(a)
#else
void *alloca(size_t);
#endif

in stdlib.h, since we have assembly support for some architectures on
non-gcc environments, and we can add the rest.


1.124 02-Sep-2005 jwise

Add proper support for using bsd.hostprog.mk to build c++-based host
programs -- doesn't affect current host tools build (groff is built the
Makefile.gnuhost way).

Provides {.cc,.cpp,.cxx,.C}.lo rule, associated variables, and HOSTPROG_CXX
support (mirroring PROG_CXX in bsd.prog.mk).

Tested with from-scratch `build.sh tools' and full system build.


1.123 09-Aug-2005 he

Disable the C++ warning -Wold-style-cast for sh3 as well, because
that CPU's headers' va_start() uses a cast.

Discussed with christos.


1.122 09-Aug-2005 he

Gcc 2.95.3 doesn't support the -Wabi warning flag, so don't try to use
it there.

The vax port's va_start() macro uses a cast, so for the moment disable
the -Wold-style-cast warning flag for the old GCC as well (as vax is
the only remaining port using this compiler).


1.121 09-Aug-2005 christos

Add CXXFLAGS for WARNS=2


1.120 09-Jul-2005 christos

Add .m in the list of suffixes, otherwise including bsd.sys.mk in a Makefile
treats the .m.o: suffix rule as a target. This broke typing 'make' in
${NETBSDSRC}/sys/kern.


1.119 04-Jun-2005 lukem

Don't add -Wno-uninitialized to CFLAGS if WARNS > 0 and HAVE_GCC != no,
as gcc3 generates much less false positives for -Wuninitalized and I
have found genuine bugs with this warning enabled.
Tested by building a full release of NetBSD/i386.


1.118 31-May-2005 christos

We need a non-tool version of genassym.


1.117 23-May-2005 riz

Provide a default definition of OBJDUMP - bsd.kmod.mk expects it.
Approved by heas.


1.116 05-Apr-2005 tron

Don't use "-std=c99" for NetBSD-vax because gcc 2.95.3 doesn't support it.


Revision tags: netbsd-3-base
1.115 20-Feb-2005 matt

branches: 1.115.2;
Add support for WARNS=4 (-std=c99)


1.114 19-Oct-2004 simonb

Add CPUFLAGS to AFLAGS as well as CFLAGS so that CPUFLAGS is used for
assembly files.


1.113 08-Jun-2004 abs

Add TOOL_SPARKCRC. Need to clean up what happens in the non tools case.


1.112 18-Apr-2004 lukem

add a blank line to improve readability


Revision tags: netbsd-2-0-base
1.111 27-Jan-2004 lukem

branches: 1.111.2;
Replace
:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)


1.110 16-Nov-2003 lukem

.c.lo: support per-target COPTS, CPPFLAGS, CPUFLAGS


1.109 14-Nov-2003 matt

Add a AWK for awk.


1.108 13-Nov-2003 matt

Add a HOST_LN.


1.107 08-Nov-2003 lukem

Remove single suffix inference rules from here; nothing in the tree
relies upon them (AFAICT).

(This fixes the build issue with src/x11, because the .cpp rule in
bsd.x11.mk was being overridden by the .cpp rule here)


1.106 29-Oct-2003 lukem

use ${.PREFIX} instead of ${.TARGET:R}


1.105 21-Oct-2003 lukem

Move the MAKEVERBOSE setup from <bsd.sys.mk> to <bsd.own.mk>, and
change all the variable assignments from = to ?=


1.104 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.103 20-Oct-2003 lukem

Add MAKEVERBOSE pretty versions for .cc .cpp .cxx .C

Fix typo in .l.o and .y.o rule


1.102 19-Oct-2003 lukem

add _MKMSGCREATE.m


1.101 19-Oct-2003 lukem

add _MKMSGINSTALL.m


1.100 19-Oct-2003 lukem

fix _MKSHECHO for MAKEVERBOSE=1


1.99 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.98 19-Oct-2003 lukem

Add rules for .s .s.o .S .S.o to support per-source COPTS,CPUFLAGS,CPPFLAGS
and MAKEVERBOSE


1.97 18-Oct-2003 lukem

implement MAKEVERBOSE for rules which are of the form:
@cmp -s ${.ALLSRC} ${.TARGET} || ( echo cmd && cmd )


1.96 18-Oct-2003 lukem

Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command ("verbose")
This is the default, and is equivalent to the previous behaviour.


1.95 22-Aug-2003 christos

Disable -Wtraditional and explain why.


1.94 28-Jul-2003 lukem

Be consistent how "multiple include protection" is implemented. I.e,

.if !defined(_BSD_foo_MK_)
_BSD_foo_MK_=1

# ...

.endif # !defined(_BSD_foo_MK_)


1.93 22-Jul-2003 lukem

Add source-file-specific variables in <bsd.lib.mk> and <bsd.prog.mk>:

COPTS.<fn> Additional flags to the compiler when creating the C objects
for <fn>.

CPUFLAGS.<fn> Additional flags to the compiler/assembler for <fn>.

CPPFLAGS.<fn> Additional flags to the C pre-processor for <fn>.


(For <fn>.[ly], "<fn>.c" must be used.)


1.92 20-Jul-2003 lukem

add TOOL_STAT for stat(1)


1.91 18-Jul-2003 lukem

Add MKMANZ; if not set to "no", compress the manual pages at installation time.
This replaces the previous .if defined (MANZ) behaviour, although the latter
will set MKMANZ=yes for compatibility purposes.

Don't bother with -P-bou in TOOL_ROFF_HTML; it doesn't appear to be
necessary with groff 1.19.

Fix NOHTML implementation to be consistent with other NOxxx / MKxxx
variables, and expose the user-tweakable MKHTML.


1.90 14-Jul-2003 lukem

use full path in default TOOL_MAKEWHATIS


1.89 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.88 26-Jun-2003 tshiozak

Citrus iconv support(3)
add host tools : mkcsmapper and mkesdb
mkcsmapper - coded character set mapping table compiler
mkesdb - encoding scheme database compiler


1.87 30-May-2003 thorpej

Add a CPUFLAGS variable which can be set by the user's mk.conf or in
the environment:

CPUFLAGS Additional flags to the compiler/assembler to select
CPU instruction set options, CPU tuning options, etc.

Since CPUFLAGS is not implicitly set by any part of the make infrastructure,
it is safe to set in mk.conf, unlike COPTS or DBG.


1.86 18-May-2003 lukem

Add ${TOOL_DB}; db(1) as a (host) tool.

Note: this is the first tool using a "TOOL_" prefix in the make(1) variable;
other similar "non-standard" variable names will be converted in the future.


1.85 08-May-2003 christos

Fix _HOST_CYGWIN lossage.


1.84 08-May-2003 christos

Deal with CYGWIN's sh screwage.


Revision tags: fvdl_fs64_base
1.83 21-Dec-2002 lukem

add SUNLABEL


1.82 25-Nov-2002 thorpej

Add -Wno-sign-compare to CFLAGS.


1.81 20-Jul-2002 mrg

add -Wa,-Av8plus to CFLAGS if we are building for 32bit sparc


1.80 11-Jun-2002 lukem

add CAT here too


1.79 30-May-2002 msaitoh

remove duplicated -Wpointer-arith when WARNS=2


1.78 28-May-2002 bjh21

Add fgen as a host tool, used for sys/arch/sparc/bootblk.


Revision tags: netbsd-1-6-base
1.77 02-May-2002 simonb

branches: 1.77.2;
Make the ELF2ECOFF assignment an "?=" assignment so it won't override the
setting in bsd.own.mk.


1.76 23-Apr-2002 bjh21

Sun Workshop C 5.0 objects to generating object files with suffixes other than
.o. Work around this by generating host object files with a .lo.o suffix and
then renaming to .lo.


1.75 12-Apr-2002 lukem

add ELF2ECOFF


1.74 03-Apr-2002 lukem

add INSTALLBOOT. sort some entries in bsd.sys.mk


1.73 01-Apr-2002 bjh21

Add a default for CAP_MKDB.


1.72 31-Mar-2002 bjh21

Add CKSUM.


1.71 31-Mar-2002 bjh21

Provide a default for PWD_MKDB.


1.70 27-Jan-2002 ross

Drink ALL the Kool-Aid.

(Move -mieee from lib/ to bsd.*.mk; new var MKIEEEFP defaults to yes.)


1.69 25-Jan-2002 lukem

add $PAX to both, and $MAKEFS to bsd.sys.mk


1.68 29-Nov-2001 thorpej

Ah, don't actually need MAKEWHATIS here.


1.67 29-Nov-2001 thorpej

Provide ${MAKEWHATIS}.


1.66 28-Nov-2001 tv

Use :U successfully this time. In an expression such as ${FOO:D:Ubar}, you
end up with empty string if FOO is defined, and `bar' if it is undefined.


1.65 26-Nov-2001 jmc

Revert check for NOGCCERROR back to a .if \!defined as the :U check will break
anyone with NOGCCERROR=1 in their mk.conf


1.64 17-Nov-2001 thorpej

Protect from multiple inclusion.


1.63 17-Nov-2001 thorpej

Make sure MKDEP is defined for the non-USETOOLS case.


1.62 15-Nov-2001 wiz

Re-add check for defined(MKSOFTFLOAT) that got lost in v1.60.
Needed for Makefiles which include bsd.sys.mk, but not bsd.own.mk,
like distrib/macppc/floppies/ramdisk/Makefile.
Okay'd by simonb.


1.61 14-Nov-2001 tv

Move the DESTDIR-based nostdinc logic to bsd.lib.mk and bsd.prog.mk where
it belongs (with the native target compile rules).


1.60 13-Nov-2001 tv

* Use -isystem instead of -idirafter for ${DESTDIR}/usr/include.
* Provide defaults for HOST_AR and HOST_RANLIB.
* Formatting cleanup.


1.59 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


1.58 11-Nov-2001 tv

Provide defaults for MDSETIMAGE and CRUNCHGEN.


1.57 01-Nov-2001 lukem

move -Wwrite-strings to WARNS=3 too ... (yech!)


1.56 01-Nov-2001 lukem

Move -Wcast-qual from WARNS=2 to WARNS=3 (a new level), because it
generates too many false positives that require gross amounts of
workaround, and the other WARNS=2 stuff is quite useful. Per discussion
with simonb & christos.


1.55 19-Oct-2001 tv

Better version of previous. Use an .ifdef in this case, so the rule isn't
even defined without YHEADER. (Otherwise can lead to odd behavior.)


1.54 19-Oct-2001 tv

Make sure .y.h rule knows what to do only if YHEADER is set.


1.53 19-Oct-2001 tv

Simplify many .if's by collapsing to make :D and :U conditionals.


1.52 19-Oct-2001 tv

Simplify and collapse a lot of the gooey .l and .y handling cruft here.
Rather than special-case a bunch of stuff, make this always parallel-safe,
and have make call upon the .l.c/.y.c followed by .c.o/.c.lo transforms,
rather than try to go right from .l/.y to .o/.lo.


1.51 09-Oct-2001 enami

Make mtree a host tool and use it when appropriate.


1.50 08-Sep-2001 christos

Add some more WARNS (commented out since they break things)


1.49 14-Aug-2001 tv

Add a HOST_CXX and HOST_CXXFLAGS (currently needed for compiling groff on
a cross host).


1.48 04-Jul-2001 scw

Check for MKSOFTFLOAT being defined before testing its value.
Needed for crunchgen(1) generated makefiles (e.g. miniroot builds).


1.47 18-Jun-2001 simonb

Add a new make variable "MKSOFTFLOAT". If not set to "no", it adds
"-msoft-float" to COPTS and FOPTS, and possibly builds soft-float
library support (port specific).
Defaults to "no".


1.46 30-Dec-2000 itojun

document host build tools (like rpcgen) in bsd.README. PR 11839


1.45 29-Dec-2000 itojun

document MKLOCALE is not a variable to control build behavior. per PR 11839.


1.44 23-Dec-2000 itojun

declare ${MKLOCALE}. PR11801.


1.43 11-Oct-2000 thorpej

Repair a dual-.if construct that certainly didn't work with
any version of make(1) on my systems...


1.42 10-Oct-2000 is

Format string cleanup, by sommerfeld.


1.41 04-Oct-2000 sommerfeld

If FORMAT_AUDIT is set, and WFORMAT is set and > 1, turn on
-Wnetbsd-format-audit for extra-stringent format checking.
WFORMAT belongs in individual makefiles and/or Makefile.inc files.
FORMAT_AUDIT should go in mk.conf if you're doing format-string auditing.
(set WFORMAT=1 in individual makefiles if a program is
not security critical and is doing bizarre things with
format strings which would be even uglier if rewritten)
FORMAT_AUDIT may go away in time (i.e., default to on)


1.40 25-Jul-2000 cgd

${RPCGEN}, not hard-coded rpcgen


Revision tags: netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.39 09-May-2000 thorpej

branches: 1.39.4;
Make the fact that we disable -Wuninitialized explcicit in the Makefile,
rather than relying on a compiler hack to do it for us.


1.38 01-Feb-2000 tsutsui

STRIPPROG -> STRIP


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
1.37 16-Sep-1999 sommerfeld

Define CONFIG, so it can be overridden for cross-builds.


1.36 21-Aug-1999 sommerfeld

Add OBJCOPY


1.35 08-Jul-1999 christos

Introduce a second level of WARNS for even more paranoia


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.34 31-Jan-1999 mrg

NOGCCERROR disables -Werror.


1.33 01-Nov-1998 lukem

reimplement rev 1.30,1.31 using YPREFIX and LPREFIX instead


1.32 31-Oct-1998 veego

Backout 1.30 and 1.31 which breaks at least libpcap and pppd.


1.31 30-Oct-1998 lukem

simplify YACCPREFIX rule by using `yacc -o ${.TARGET}' instead of
`yacc -b ${.TARGET:R} ; mv ${TARGET:R}.tab.c ${.TARGET}'. fixes
parallel make of foo.y -> foo.c/foo.h as well


1.30 30-Oct-1998 lukem

implement LEXPREFIX and YACCPREFIX, which allow overriding the `yy'
prefix of generated tokens, and `.yy.{c,h}' suffix in filenames.
this solves the problem i had in [misc/1989] (albiet a different way).


1.29 13-Sep-1998 tv

Reorganize comments around .m and .c.lo rules


1.28 27-Aug-1998 tv

Create a STRIPPROG definition to specify a (target) strip program. Later,
STRIPPROG could be used in preference to "-s" on "install".


1.27 26-Aug-1998 tv

Allow -Werror to be turned off with CWARNFLAGS=-Wno-error ...


1.26 25-Aug-1998 tv

Introduce CWARNFLAGS, idea from kernel Makefiles, which goes after "-Wall
..." in the CFLAGS and can be set in directory Makefile or mk.conf.


1.25 25-Aug-1998 tv

Back out previous. -Wuninitialized is disabled in the latest egcs
sources, and -Wno-format-y2k is inserted into the proper Makefiles only
(as this is likely to become a permanent option).


1.24 25-Aug-1998 ross

Add -Wno-uninitialized -Wno-format-y2k, with an attached XXX


1.23 17-Aug-1998 tv

"oops": .c.lo rule missed the "-o ${.TARGET}".


1.22 16-Aug-1998 tv

Add .c.lo, .l.lo, and .y.lo rules for automatic use of ${HOST_COMPILE.c}.


1.21 27-Jul-1998 mycroft

If AUDIT is defined, compile with -D__AUDIT__.


1.20 11-May-1998 thorpej

If DESTDIR is set, tell lint to use "-d ${DESTDIR}/usr/include" (the equiv.
of "-nostdinc -idirafter ${DESTDIR}/usr/include". Fixes PR #5399.


1.19 09-Apr-1998 tv

.y.c <sys.mk> rule fixes. Don't create a y.tab.h file unless asked for,
and use smarter creation of the header file.


1.18 01-Apr-1998 tv

Revert. This broke too much in the build tree, and a better solution
needs to be created. (The existing situation breaks a lot too.)


1.17 01-Apr-1998 tv

Fix .y rules to DTRT with possibly generated .h files. See mail on
tech-toolchain for a very detailed explanation of this. In short, add
a .y.h rule identical to the .y.c rule and make the .y.c rule rename
the .h file; also, clean the .h file in CLEANFILES.


1.16 04-Nov-1997 gwr

Move definitions of: NM, LORDER, TSORT from bsd.sys.mk to sys.mk
so they are more easly used by things like sys/libkern/Makefile.inc
(Besides, all the other tool definitions are in sys.mk)


1.15 04-Nov-1997 gwr

Define LORDER, TSORT


1.14 30-Oct-1997 lukem

remove lint rules for objective c as lint can't cope


1.13 28-Oct-1997 lukem

add default rules for Objective C sources (`.m' suffix):
- sys.mk:
add ${OBJC} and ${OBJCFLAGS} (equivalent to ${CC} and
${CFLAGS} respectively), and ${COMPILE.m} and ${LINK.m} rules
- bsd.sys.mk:
add .m, .m.o, and .m.ln rules (as per the C rules in sys.mk).
it's here, rather than in sys.mk, because `.m' isn't
exclusively used for Objective C files.
- bsd.lib.mk:
add .m.o, .m.po, .m.so, and .m.ln rules (as per C)


Revision tags: netbsd-1-3-base
1.12 12-Oct-1997 mikel

branches: 1.12.2;
add -Wpointer-arith to flags enabled by WARNS


1.11 08-Oct-1997 mycroft

Put the `-nostdinc -idirafter ...' in CPPFLAGS, not CFLAGS.


1.10 26-Sep-1997 christos

PR/4146: Erik Bertelsen: WARNS was not unsettable in Makefiles


1.9 01-Jul-1997 christos

Enable extra warnings if WARNS is set


1.8 31-May-1997 cjs

Back out BUILDDIR and NOINSTALL changes.


1.7 27-May-1997 cjs

branches: 1.7.2;
Put include information in CPPFLAGS only (not in CFLAGS or MKDEPFLAGS).
Add note that CPPFLAGS is (or should be) passed to all programs that
pass input through cpp.


1.6 27-May-1997 cjs

Make sure mkdep gets correct include directories.


1.5 26-May-1997 cjs

Patch for yesterday's batch of `new build system' commits that I forgot
to commit.


1.4 17-Apr-1997 thorpej

Add several HOST_* variables. These identical to their non-HOST_
counterparts, and are used to compile programs that are needed to
compile other programs (see src/bin/sh for an example use). These
facilitate cross-compiling.

Define an NM variable - the program to use for nm(1)


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.3 15-May-1996 scottr

If DESTDIR is defined, look for includes in ${DESTDIR}/usr/include,
instead.


1.2 13-Dec-1995 cgd

add "CFLAGS += -Werror" to bsd.sys.mk, and update various bits of
documentation to explain bsd.sys.mk's purpose more clearly.


1.1 22-Oct-1995 christos

Added include file <bsd.sys.mk> that contains lex and yacc "parallel aware"
rules. These rules are not turned on by default; they are enabled by setting
the PARALLEL variable.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 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 tls-maxphys-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.2 16-Jan-2014 christos

branches: 1.2.4; 1.2.8;
- Add a new bsd.host.mk that contains all the HOST_ variables extracted from
bsd.sys.mk and bsd.own.mk
- Add protection requiring that:
1. bsd.sys.mk is not include from other Makefiles directly
2. bsd.own.mk must be included before bsd.sys.mk since it
sets variables that bsd.sys.mk uses as conditionals.

This is step 1 of removing all variable settings from bsd.sys.mk and
leaving behind only rules. This way, the structure of a standard Makefile
is:
variable overrides

optionally include bsd.own.mk
optionally include bsd.endian.mk

variable settings that use variables defined in bsd.own.mk

include a one or more rule .mk files (such as bsd.prog.mk etc)


1.1 14-Jan-2014 christos

use bsd.syscall.mk


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
1.26 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
1.25 23-Nov-2017 kre

branches: 1.25.2; 1.25.4;
PR lib/52007

Provide a mechanism whereby a test sub-directory can be installed,
without the test being scheduled to run by default (ie: keeping
it out of the Atffile, and Kyuafile if Kyua is enabled.).

The mechanism is perhaps a bit kludgey - anyone with a better idea
how to make it happen, feel free to improve this (the one user as
of about the time of this commit is (or will be) src/tests/lib/Makefile)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE 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 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
1.24 23-Feb-2013 jmmv

branches: 1.24.22;
Autogenerate Kyuafiles next to Atffiles when MKKYUA is set.

This is suboptimal: the current high-level definitions of test programs
in the Makefiles do not carry enough information to support all the
features of Kyuafiles. For example, it is not possible to register test
programs that do *not* use the ATF libraries, which is something that
has been frequently requested around here; nor it is possible to attach
arbitrary metadata to test programs from the Makefile, which is handy
particularly for ATF-less test programs.

For these reasons, consider this a transitional step.

Note that, with this change, you should now be able to use the 'kyua'
tool to run the tests in /usr/tests.


1.23 23-Feb-2013 jmmv

Stop assuming that test programs and directories are the same thing during
Atffile generation.

This is needed to be able to generate Kyuafiles (coming later), as these
clearly differentiate between the definition of test programs and the
recursion into other subdirectories (or files).

In particular: rename ATFFILE_EXTRA_TPS to ATFFILE_EXTRA_SUBDIRS and
change the logic in bsd.test.mk to keep track of subdirectories aside from
_TESTS when creating the Atffile.


1.22 16-Feb-2013 jmmv

Add ATFFILE_EXTRA_TPS.

The new ATFFILE_EXTRA_TPS variable can hold a set of test programs or
subdirectories to be added to the generated Atffile, without needing these
to be built by the current Makefile.

This is to be used in conjunction with MK* knobs and external/ so that
a 3rd-party component can place its tests in the corresponding tests/
directory and have the parent Atffile recognize them.

An alternative would be to use 'tp-glob' in the Atffile and list the names
of the directories/tests that may or may not exist. However, this would
require providing manually-crafted Atffiles -- and because the majority are
auto-generated, there would be some confusion.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
1.21 25-Aug-2012 jmmv

branches: 1.21.2;
Fix "make test" to actually print the desired message when atf-run fails.
It was being skipped due to the set -e in the code snippet and the failure
to properly capture atf-run's exit code.


1.20 24-Aug-2012 jmmv

Make DPADD and LDADD specific to the test programs. This allows mixing
C and C++ test programs in the same Makefile, and prevents regular programs
from being polluted by libraries that they may not need.

Suggested by Garrett Cooper in private mail, although I redid his patch.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase 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 yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.19 10-Sep-2011 apb

branches: 1.19.2;
Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


Revision tags: cherry-xenmp-base
1.18 14-May-2011 jmmv

Remove any stale .fifo files when doing 'test'. These may be leaked if
the user aborts the execution of atf-run with Ctrl+C, which will prevent
a subsequent 'make test' from working at all.


1.17 27-Mar-2011 plunky

if not including <bsd.prog.mk> then we need to clean up our own mess


Revision tags: bouyer-quota2-nbase
1.16 20-Feb-2011 jmmv

Define LIBATF_C and LIBATF_CXX to point to their corresponding .a files and
use these to properly set DPADD for test programs.


Revision tags: bouyer-quota2-base
1.15 16-Feb-2011 jmmv

Miscellaneous improvements from Garrett Cooper:
- Add to variables only once, instead of from within a loop.
- Use :tl instead of :M to match against strings for readability.
- Use CLEANFILES instead of a custom clean target.

Full release built successfully after this change.


1.14 06-Feb-2011 jmmv

Fix the 'test' target to force atf to use its own files from DESTDIR instead
of the installed ones. This is achieved by overriding all ATF_* environment
variables and making them point inside DESTDIR.


Revision tags: matt-mips64-premerge-20101231
1.13 23-Aug-2010 joerg

branches: 1.13.2;
Simplify.


1.12 02-Aug-2010 jmmv

Move the TESTSBASE definition from bsd.test.mk to bsd.own.mk. Per joerg@'s
suggestion.


1.11 13-Jul-2010 jmmv

Implement Atffile automatic generation.

This change adds the ATFFILE variable, which can take the following values:
- yes: The source directory contains a static Atffile to be installed.
- auto: The Atffile is automatically generated.
- no: Do not install any Atffile (replaces the previous NOATFFILE variable).

The ugly bit of this is that I have to add a TESTS_SUBDIRS variable that
lists the subdirectories that contain test cases (so that they can be listed
in the Atffiles, without including auxiliary directories without tests).
This is a subset of SUBDIR.

Addresses a minor part of PR bin/43394.


1.10 18-Jun-2010 jmmv

Prevent build breakage if TESTSDIR is not defined (as in tests/modules/k_helper).


1.9 18-Jun-2010 jmmv

Add a experimental "make test" target

make test may yield misleading results but should work in many cases. This
target is supposed to simplify the execution of tests but does not preclude
developers from running the installed versions.

Addresses PR misc/38326.


1.8 04-Jun-2010 jmmv

Simplify build of shell-based test cases: atf-compile is gone.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base mjf-devfs2-base
1.7 01-May-2008 jmmv

Add support for a TESTS_C variable to make use of the new C-only binding
that comes with atf-0.5. Also fix linkage of C++ tests.


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
1.6 02-Mar-2008 jmmv

branches: 1.6.2; 1.6.4;
Fix build of tests when USETOOLS=no. Reported by veego@ in current-users
and notified to me by martin@.


Revision tags: hpcarm-cleanup-base
1.5 10-Feb-2008 jmmv

branches: 1.5.2;
Allow Makefiles to skip the installation of an Atffile by defining NOATFFILE.
This is to be able to get the definition of TESTSBASE, which maybe should be
part of bsd.own.mk...


1.4 05-Feb-2008 drochner

include bsd.init.mk so that eg USETOOLS is available to
client Makefiles, approved by jmmv


1.3 04-Feb-2008 jmmv

Rebuild shell-based tests if the atf-compile host tool has changed. The
contents of the generated scripts may change (as will happen with ATF 0.4),
so this dependency is important to have. Dunno how to deal with the
non-tools case other than adding an entry in UPDATING, but if you are not
using tools, you can expect all kinds of breakage.


Revision tags: pc532-eol-2008 matt-armv6-base cube-autoconf-base
1.2 21-Nov-2007 jmmv

branches: 1.2.4;
No need to set a value for TESTSDIR any more as this is explicitly set
wherever it is needed.


1.1 12-Nov-2007 jmmv

Add the bsd.test.mk file

This file simplifies the build of test programs, either written in C++
or in sh. It hides the internals of atf, e.g. by silently linking
against -latf or calling atf-compile.

It also takes care of installing an Atffile for each new test directory.


1.164 09-Dec-2025 mrg

update for xorg-server 21.2.21.


1.163 12-Nov-2025 mrg

note xorg-server update


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.162 24-Jun-2025 mrg

branches: 1.162.2;
bump for xorg-server 21.1.18.


1.161 09-Mar-2025 mrg

actually, since Xtrans needs them, add the new -DHAVE_GETADDRINFO,
-DHAVE_INET_NTOP, and -DHAVE_STRUCT_SOCKADDR_STORAGE to X11FLAGS.CONNECTION.

xdm/xinit gains -DHAVE_ASPRINTF.

libX11 gets xim_trans.c compiled properly.


1.160 26-Feb-2025 mrg

note xorg-srever 21.1.16 in current.


1.159 30-Oct-2024 mrg

update for xorg-server 21.1.14


1.158 04-Jul-2024 mrg

bump xorg-server version.


1.157 03-Jul-2024 mrg

avoid an error in the previous with unexpected inputs.


1.156 03-Jul-2024 mrg

add some more transformations for man pages, needed by new appres.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.155 09-May-2024 nia

branches: 1.155.2;
stop using and linking against libXxf86misc

support for this extension was removed from xorg in 2008,
our xorg-server and our xorg-server.old can't use it.


1.154 29-Apr-2024 mrg

xdm(1) was renamed xdm(8) a long while ago. catch up location.

add support for section 8 X manuals. amusingly, we already knew
to convert __adminmansuffix__ into "8", but not how to create
.8 from X .man.


1.153 07-Apr-2024 tsutsui

Use default X11FLAGS to build Xorg servers on vax.

It looks necessary on HAVE_XORG_SERVER_VER=120.


1.152 02-Apr-2024 christos

PR/58104: Kouichi Hashikawa: Use ${TOOL_AWK}


1.151 25-Oct-2023 mrg

bump xorg server version.


1.150 30-Mar-2023 mrg

bump XORG_SERVER_TEENY.


1.149 07-Feb-2023 mrg

bump xorg-server version.


1.148 08-Jan-2023 mrg

bump xorg-server version here.


1.147 21-Dec-2022 mrg

properly prefix ${X11INCDIR} uses with ${DESTDIR}.

this fixes a build issue seen where the host pixman.h was included,
and has been problem ever since tsutsui fixed my original code (from
2008) about 29 months ago. i'm surprised this has not been seen
anywhere else in that time.

XXX: pullup-10


1.146 19-Dec-2022 mrg

bump xorg-server version.


Revision tags: netbsd-10-base
1.145 15-Jul-2022 mrg

branches: 1.145.2;
update for xorg-server 21.1.4.


1.144 15-Jul-2022 mrg

update for xorg-server 21.1.3.


1.143 01-May-2022 uwe

bsd.x11.mk: Add xlocaledir substitution.


1.142 06-Dec-2021 abs

Add Xwsfb X server to pmax build

With the previous tweak to TURBOchannel framebuffers in sys/dev/tc this
should allows pmax to once again run X11.

TODO: Investigate pullup to -9


1.141 24-Aug-2021 mrg

xorg-server is now at 1.20.13.


1.140 11-Jul-2021 mrg

xorg-server is now 1.20.12.


Revision tags: cjep_sun2x-base1
1.139 03-Jun-2021 rin

Switch amiga to Xorg server 1.20; wsfb(4) is only graphic driver both for
1.10 and 1.20 (Xamiga was gone a long ago...), and there is no reason to
stay with 1.10.

At least, 1.20 works fine on wsdisplay(4) at amidisplaycc(4).


Revision tags: cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.138 27-Apr-2021 mrg

branches: 1.138.4;
xorg-server 1.20.11 is now current.


1.137 05-Dec-2020 mrg

bump version for xorg-server 1.20.10.


1.136 10-Aug-2020 mrg

fix various missing transforms for man page, ala PR#55422.

add method to transform both the "__foo__" and "@foo@"
version of various transforms, while upstream are converting
from the former to the latter it seems. convert all the
common transforms to this method.

expand the grep for .pc files to look for missing @foo@
fixes to the man page genration, and ignore a few things
(thanks uwe@ - .IN lines, and stuff between tab(@) and .TE.)

xorg-server __default_font_path__ -> @default_font_path@,
and xfree86 transform xconfigdir, xkbdir, and modulepath
using new both method.


1.135 20-Jul-2020 tsutsui

Fix typos in ${X11INCS.DIX} include paths. PR/55500


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
1.134 23-Feb-2020 mrg

update for xorg-server 1.20.6.


Revision tags: phil-wifi-20191119
1.133 13-Sep-2019 maya

Allow overriding the default man substitutions with X11EXTRAMANTRANSFORMS


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
1.132 10-Jul-2019 mrg

branches: 1.132.2;
break the build if a .pc generation leaves something matching "@.*@".
this is an error in the build that doesn't trigger issues until you
try to integrate with eg, pkgsrc.


Revision tags: phil-wifi-20190609
1.131 01-Jun-2019 mrg

xorg-server 1.20.5 is now current.


1.130 11-Mar-2019 mrg

fix a bunch of man page transforms.

XXX X11MANCPP=yes has only one use left, maybe it can go away!


1.129 03-Mar-2019 mrg

xorg-server 1.20.4 is now current.


Revision tags: pgoyette-compat-20190127
1.128 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118
1.127 03-Jan-2019 mrg

move some defines from xorg-server dix-config.h back into makefiles,
so that Xx68k can build.


1.126 31-Dec-2018 mrg

updates for xorg-server 1.20. don't define stuff here for it.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
1.125 04-Mar-2018 christos

branches: 1.125.2; 1.125.4;
last I checked powerpc64 was 64 bits, so it needs _XSERVER64..


Revision tags: netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 bouyer-socketcan-base pgoyette-localcount-20170107
1.124 14-Dec-2016 scole

branches: 1.124.6;
Make ia64 considered 64bit for the _XSERVER64 define so a release with x11 will at least build.


Revision tags: pgoyette-localcount-20161104
1.123 14-Oct-2016 joerg

Consider aarch64 a 64bit architecture for the purpose of crappy long use
in X.


Revision tags: localcount-20160914
1.122 30-Aug-2016 mrg

move some flags from dix-config.h into X11FLAGS.DIX


1.121 20-Aug-2016 mrg

fix up X11FLAGS.LOADABLE for modern xorg.


1.120 16-Aug-2016 mrg

add a HAVE_XORG_SERVER_VER for use in sets. clean up the x11
defines a little for modern xorg, particularly the version.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.119 29-May-2016 nakayama

branches: 1.119.2;
Add missing transform for xpresent.pc.


1.118 13-Mar-2016 christos

Add NO{SSP,FORTIFY}


1.117 23-Jul-2015 mrg

remove the xfree86 reachover makefiles and the vast majority of
the support in the rest of the source tree.

X11 sets could use some cleaning up perhaps (just deletion, as
we've never really marked the old X11R6 as obsolete for native
xorg using platforms so far either.)


1.116 24-Jun-2015 matt

Support building the xorg X11 libraries under MKCOMPAT.
Add XORG_MACHINE_ARCH to compat's bsd.*.mk
Turn xorg makekeys and makestrs into real host tools which are installed into
${TOOLSDIR}


1.115 23-Feb-2015 jmcneill

Build and install Mesa GBM buffer management library (libgbm).


1.114 30-Dec-2014 mrg

move xorg-server.pc's SDK_REQUIRED_MODULES into the local Makefile.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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 tls-earlyentropy-base tls-maxphys-base
1.113 16-Jul-2014 nakayama

Add new transform for gl.pc.
Now GLX_TLS is "no" since GLX_USE_TLS is not defined.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15
1.112 31-Mar-2014 mrg

branches: 1.112.2;
make pkg-config files be cleaned by "make clean"


1.111 23-Mar-2014 mrg

allow for .pc substitutions to be listed per makefile
(could maybe do per-target, as well.) fix the remaining
substitutions for xcb-proto, fontconfig and xorg-server.

(XXX: move many per-package-specific parts out of
bsd.x11.mk itself, into the relevant Makefile.)


1.110 23-Mar-2014 tron

Fix generation of pkg-config(1) files. Patch from Ryo ONODERA via
"current-users" mailing list.


1.109 20-Mar-2014 mrg

substitute several more values for .pc files:
+ s,@LIBXML2_CFLAGS@,,; \
+ s,@ICONV_CFLAGS@,,; \
+ s,@PACKAGE@,${PKGDIST},; \
+ s,@PKGCONFIG_REQUIRES@,xx,; \
+ s,@PKGCONFIG_REQUIRES_PRIVATELY@,xx,; \
+ s,@ERRORDBDIR@,${X11LIBDIR},; \
+ s,@EXPAT_CFLAGS@,,; \
+ s,@FREETYPE_CFLAGS@,-I${X11ROOTDIR}/include/freetype2 -I${X11ROOTDIR}/include,; \
+ s,@SDK_REQUIRED_MODULES@,xproto >= 7.0.17 randrproto >= 1.2.99.3 renderproto >= 0.11 xextproto >= 7.1.99 inputproto >= 1.9.99.902 kbproto >= 1.0.3 fontsproto," \


Revision tags: riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
1.108 05-Jun-2013 mrg

make .pc files depend upon configure files if they exist. this
will force them to be rebuilt when the version has changed.
this fixes one of the most often broken parts of update builds
after a version update.


1.107 03-Jun-2013 mrg

update to xorg-server 1.10.6.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
1.106 04-Apr-2012 joerg

branches: 1.106.2;
Disable new -Wstring-plus-int warning where needed for now.
Adjust various places that add GCC-only options to check for the active
compiler first.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
1.105 17-Jan-2012 njoly

branches: 1.105.2;
For xkb_base, do not use ${libdir} (xkeyboard-config.pc does not define
it) but its value ${prefix}/lib instead.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.104 29-Sep-2011 dholland

branches: 1.104.2;
Fix the setting of "xcbincludedir" in .pc files (where the xcb XML
files live) so that anything that needs to find them can. Fixes build
of pkgsrc libxcb, not that that in particular is terribly important.


1.103 10-Sep-2011 apb

Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.


1.102 01-Sep-2011 plunky

pcc cpp(1) does not understand the '-undef' and '-traditional' long form
arguments, use $(CC) -E instead of $(CPP) for these


1.101 02-Aug-2011 mrg

updates for xorg-server 1.10.3


1.100 24-Jul-2011 mrg

update to xorg-server 1.9.5


1.99 24-Jul-2011 mrg

updates for freetype 2.4.5


1.98 03-Jul-2011 dholland

Fix the value of "appdefaultdir" that ends up in native X .pc files.
(It should be "app-defaults" but was "app-default", probably because
of a typo; it's been wrong ever since this logic was put in two and a
half years ago, and as app-defaults files are a legacy mechanism it
took this long for anyone to notice.) Should be pulled up to -5.


Revision tags: cherry-xenmp-base
1.97 11-Apr-2011 joerg

Adjust --sysroot related usage:
-Wl,-rpath does not expand =, so just drop it.

Drop -Wl,-rpath-link entries that duplicate the -Wl,-rpath entries, this
is done implicitly now that ld is built with sysroot support.

Use ${DESTDIR} explicitly for the remaining -Wl,-rpath-link entries.


1.96 11-Apr-2011 joerg

GCC 4.1 doesn't have the support code for -I =... yet, so don't use it
for now.


1.95 10-Apr-2011 joerg

For USETOOLS=yes, use the --sysroot support of the compiler to cut down
the number of hard-coded pathes and magic invocations.


1.94 12-Mar-2011 plunky

CLEANFILES is not processed by <bsd.files.mk> so don't assume that
anything assigned there will be cleaned up; handle clean up of the
PKGCONFIG files explicitly. (eg lib/dri/dri.pc was not cleaned)


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.93 08-Dec-2010 joerg

Don't depend on ${CC} passing down -R to ld, use -Wl,-rpath explicitly.


1.92 23-Nov-2010 mrg

- always include <xorg-config.h> for DIX components
- update stuff to xorg-server 1.9.2


1.91 23-Nov-2010 mrg

add transforms for dri.pc.


1.90 22-Oct-2010 yhardy

Fix pkg-config substitution for glu


1.89 17-Aug-2010 christos

PR/43772: enami tsugutomo: __XCONFIGFILEMAN__ is left unexpaneded in
xinit(1)/startx(1)


1.88 15-Aug-2010 mrg

add/fix some transforms for some font, GL and xcb .pc files.

XXX: xcb still has pythondir=@pythondir@ in it.


1.87 18-Jul-2010 mrg

add some more transforms to the hacky ugly sed script for pkg-config files,
and note a few more that are not yet handled but should be.


1.86 12-Jul-2010 kiyohara

Support xserver for prep.
It tested only s3(864).


1.85 17-Jun-2010 mrg

ugh. this needs a real fix, but for now just update it to reality.
the diff -u is more obvious than a description:

-X11FLAGS.VERSION= -DOSMAJORVERSION=1 -DOSMINORVERSION=6 # XXX
+X11FLAGS.VERSION= -DOSMAJORVERSION=5 -DOSMINORVERSION=99 # XXX


1.84 03-Jun-2010 joerg

Needs additional single quotes to keep the double qoutes. Magic...


1.83 02-Jun-2010 joerg

XORGVERSION should be a single quoted expression as it represents a
single argument for .TH


1.82 23-May-2010 veego

Remove a / between a ${DESTDIR}${X11USRLIBDIR} which would result in a
double /


Revision tags: matt-premerge-20091211
1.81 13-Dec-2009 nonaka

The support of X for zaurus is added.


1.80 11-Nov-2009 tron

Enable Stack Smash Protection (SSP) by default for NetBSD/amd64 and
NetBSD/i386 as previously discussed on the "port-amd64" and
"port-i386" mailing lists. No objections from the core team.

Thanks a lot to Tobias Nygren for helping me with the benchmarking
and to Christos Zoulas for fixing SSP problems in cgd(4).


1.79 09-Nov-2009 mrg

update for xorg-server 1.6.5


1.78 22-Aug-2009 mrg

update for xorg-server 1.6.3.


1.77 24-Jul-2009 mrg

we have xorg 1.6.2 now.


1.76 09-Jul-2009 mrg

XORG_CURRENT_VERSION is now 1.6.2.


1.75 23-Jun-2009 mrg

add transforms for new GLU, GLUT and xorg-server pkgconfig files.


1.74 11-Jun-2009 mrg

update XORG_VERSION_CURRENT.
update the pkgconfig sed script to handle newer pixman.

XXX: should make the pkgconfig sed script barf it it ends up leaving
XXX: behind something that looks like "@.*@", i think.


1.73 10-Jun-2009 mrg

don't define FONTCACHE here any more, for Xorg.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
1.72 24-Jan-2009 bouyer

Add support for X11FLAVOUR=xorg to NetBSD/alpha. Tested on PWS500
(ev56, handled as non-BWX by Xorg) and XP1000 (ev6, BWX). Also
tested by Rafael Ruiz on a AlphaStation 255 (thanks !).
non-PCI adapters are not supported; someone should make these work
as a wsfb device.


1.71 09-Nov-2008 mrg

- retire MKXORG from public use
- introduce X11FLAVOUR to choose src/x11 vs src/external/mit/xorg
for the X11 to build if MKX11=yes is set. it takes the values
of either Xorg or XFree86.
- default to Xorg on alpha, i386, macppc, shark, sparc and sparc64
- remove MKXORG_WITH_XSRC_XSERVER, unused and never useful


Revision tags: netbsd-5-base
1.70 25-Oct-2008 apb

branches: 1.70.2;
Use ${TOOL_SED} instead if plain sed in Makefiles.


Revision tags: matt-mips64-base2
1.69 19-Oct-2008 apb

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


1.68 14-Oct-2008 cube

Rework the way manual pages are handled.

- .man.pre files are treated just like .man files.
- Makefiles are offered the choice of using sed or cpp for the
transformation. MKXORG will default to sed, MKX11 to cpp.
- At least for now, versions of packages are not tracked individually.


Revision tags: wrstuden-revivesa-base-3 mjf-devfs2-base
1.67 15-Sep-2008 cube

Play it safe and change the sed script so that -E isn't needed.


1.66 15-Sep-2008 rtr

replace XTHREAD_CFLAGS with _REENTRANT instead of _POSIX_THREAD_SAFE_FUNCTIONS
as is done in pkgsrc.


1.65 15-Sep-2008 cube

Make sure pkgconfig files we install have RPATH directives.

${TOOL_SED} -E is authorized, right? Right?


1.64 13-Sep-2008 cube

Add logic to install pkgconfig files from X.Org sources. Initial idea from
Tyler Retzlaff.

No, this is not code I am going to be proud of. Meanwhile, anyone is
welcome to work on a mknative-xorg script and make sure that outputs across
all archs are consistent, and use it to generate a bunch of other stuff such
as the Imake config file and so on. That will do for now though.


Revision tags: wrstuden-revivesa-base-2
1.63 07-Sep-2008 lukem

Define __appmansuffix__=1 in the man page cpp(1) translation.


1.62 07-Sep-2008 rtr

add XLOCALE.DEFINES for locale path defs, easier to manage them here
than deep in the reachover.


1.61 28-Aug-2008 lukem

Force a failure if both MKX11 and MKXORG are set to != "no".


1.60 28-Aug-2008 mrg

xorg server is version 1.4.2


1.59 02-Aug-2008 mrg

add X11FLAGS.DIX and X11INCS.DIX for use with Xorg.
fix the version to 1.4.2.


1.58 29-Jul-2008 mrg

begin to add support for cross-built Xorg:

- add MKXORG
- default to DRI-on for Xorg
- add paths for 192 Xorg packages that will exist in
xsrc/external/mit/<package>/dist
- add some more X11FLAGS.* variables if MKXORG.

this is somewhat based on the xorg work rtr@ did a couple of years ago.

XXX: seriously need to fix the XORG_RELEASE value, it is still set to
XXX: 6.8.1 from when rtr was working on this.


Revision tags: 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 keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
1.57 08-Mar-2008 phx

branches: 1.57.2; 1.57.6;
Make XFree86 compile for ofppc.
Approved by garbled.


Revision tags: pc532-eol-2008 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
1.56 06-Aug-2007 lukem

branches: 1.56.2; 1.56.6; 1.56.8;
Support MAKEVERBOSE when installing APPDEFS.


1.55 07-Jun-2007 tron

Don't use alloca(3) inside the X11 libraries if we compile with
stack protection. XFree86 can now be buildt fine with "USE_SSP=yes".


1.54 21-Dec-2006 macallan

build XFree86 on shark


Revision tags: abandoned-netbsd-4-base netbsd-4-base
1.53 17-Apr-2006 uwe

branches: 1.53.4;
netwinder uses loadable server modules.

(Oops, forgot to commit this change along with other netwinder
X server commits. Unbreaks builds.)


Revision tags: rtr-xorg-branch-base
1.52 16-Mar-2006 jwise

Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).


1.51 12-Nov-2005 spz

Enable build.sh -x building for the usbtablet driver new in xsrc

distrib/sets/lists/xserver/md.* to list the additional files for XFree86
using ports
share/mk/bsd.x11.mk and x11/... for the actual building

Contributes to closing PR xsrc/23964
Reviewed by tron@NetBSD.org


1.50 01-Oct-2005 macallan

Build XFree86 on NetBSD/sparc.
Tested on Krups and a SPARCbook 3GX
Works only with wscons kernels, currently there's official support on Krups
with igsfb and more or less official support for SPARCbooks with pnozz and
SPARCstations with cgsix.


1.49 06-Apr-2005 martin

Add -fno-merge-constants (as the xsrc build does too) to make the module
loader work with the gcc versions we use now. No idea why i386 apparently
was not affected by this.


1.48 26-Mar-2005 martin

sparc64 needs LOADABLE flags too


1.47 21-Mar-2005 tron

Compile "src/x11" with "-fno-strict-aliasing" because that's what the
native build does.


1.46 19-Mar-2005 hira

Update __vendorversion__ to 4.5.0.


Revision tags: netbsd-3-base
1.45 21-Jan-2005 rtr

branches: 1.45.2;
+ cleanup removal of -DUSE_NBSD_THREADLIB usage


1.44 11-Jan-2005 tron

Don't define "USE_NBSD_THREADLIB" because "threadlib.h" was removed.


1.43 10-Jan-2005 lukem

Only compile in IPv6 support if ${USE_INET6} != "no"

MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).


1.42 02-Dec-2004 fredb

Mirror Rev 1.6 in Imake.rules, addressing PR misc/28444. This implements
Thomas Dickey's idea to work around a standards mandated change to the
C pre-processor to avoid having to change dozens of ancient X man pages,
appending a space to any line in a man page that ends in backslash "\".


1.41 13-Jul-2004 sekiya

branches: 1.41.2;
Enable "loadable module" dlopen() scheme. Necessary to crossbuild the XFree86
server on platforms that are not supported by the Metrolink module loader
(i.e., MIPS).

Enabled for sgimips in bsd.x11.mk.


1.40 29-Apr-2004 lukem

When creating man pages, provide a defintion for __adminmansuffix__.
(This is a new feature in XFree86 4.4.x)


1.39 15-Apr-2004 drochner

always #define __AMD64__ on and64 -- xfree86 depends on it


Revision tags: netbsd-2-0-base
1.38 27-Mar-2004 fredb

branches: 1.38.2;
Update ${X11TOOL_UNXCOMM} to XFree86 4.4.0's "CppSedMagic". From the comments
in Imake.rules:

* Allow XCOMM to be preceded by whitespace and provide a means of generating
* output lines with trailing backslashes.
* Allow XHASH to always be substituted, even in cases where XCOMM isn't.

In particular, this fixes an issue pointed out by wiz on tech-x11, where "@@"
remains unsubstituted for "\" in "startx".


1.37 26-Mar-2004 fredb

Enable IPv6 in XFree86 4.4.0 reachover build. Usage is describe
in "/usr/X11R6/lib/X11/doc/RELNOTES". Note particularly that "tcp",
as in "X -nolisten tcp" or "xhost +tcp/host:0", now means *both*
IP transport protocols. Use "inet" or "inet6", instead, to specify
only one or the other.

XDMCP support for IPv6 -- such as it is -- is disabled, just as
it is in the native, out-of-the-box build. XDM-AUTHORIZATION-1
does not really support IPv6 addresses, in any case. (It is
possible to build "xdm" with -DIPv6, but that presumes support
for IPv6-mapped IPv4 addresses in the default installation, for
one thing, and there are unexplored issues with all that.)


1.36 16-Mar-2004 perry

Handle XHASH properly -- from Nicolas Joly


1.35 14-Mar-2004 matt

Don't use loadable modules for sgimips. XF86 doesn't understand mips
relocs at this time.


1.34 14-Mar-2004 matt

Make the sgimips XF86 server use loadable modules.


1.33 10-Mar-2004 lukem

We're now using XFree86 4.4.0; update manual page generation accordingly.
Noted by Kouichirou Hiratsuka in PR misc/24725.


1.32 10-Mar-2004 rtr

Update reachover to build XSUN for sun3


1.31 04-Mar-2004 rtr

+ += extension flags for dri components if X11DRI != "no"


1.30 11-Feb-2004 rtr

oops, FOOBAR= foo shouldn't be in here


1.29 06-Feb-2004 rtr

PRINTX11VERSION contains command for automated extraction of
major,minor,patch,snap passed to some sourc during build.


1.28 29-Jan-2004 lukem

fix thinko in previous


1.27 29-Jan-2004 lukem

add some missing .PHONYs


1.26 25-Jan-2004 rtr

We always build glx ext, so for 64-bit archs we define -D__GLX_ALIGN64


1.25 20-Jan-2004 jmmv

Fix typo: XFree86XDGA -> XFreeXDGA. This adds support for DGA (as intended).


1.24 18-Jan-2004 rtr

+ escape new lines
+ remove extra ||


1.23 18-Jan-2004 matt

Change _XSERVER64 to depend on MACHINE_ARCH, not MACHINE.
Disable XF86VIDMODE for vax.
Format MACHINE .if's nicer (and alphabetize).


1.22 18-Jan-2004 rtr

Don't build XDGA, VIDMODE and XINPUT extensions for alpha, pmax, acorn32.
XXX There should probably be more archs/machines that do not build these.


1.21 13-Jan-2004 rtr

+ no vid mode ext or dga for amiga
+ amd64 & alpha need X11FLAGS.SERVER+= _XSERVER64
+ pass loadable defines for amd64 & cats


1.20 10-Jan-2004 rtr

control undefine of DDXTIME through Xserver/Makefile.common vars


1.19 10-Jan-2004 fredb

Don't define DDXTIME on mac68k. This will let us use GetTimeInMillis()
of ".../Xserver/os/utils.c", instead of supplying our own home-rolled
(yet identical) function.


1.18 01-Jan-2004 rtr

back out hpcmips changes accidently committed in prev. noticed by lukem@


1.17 01-Jan-2004 rtr

grr typo .manN -> .man.N


1.16 01-Jan-2004 rtr

section 4 and 5 man/cat pages do get installed


1.15 01-Jan-2004 lukem

correct __vendorversion__ to match xsrc/xfree


1.14 26-Dec-2003 rtr

remove endian selection hack - from lukem


1.13 23-Dec-2003 rtr

endian table for X_BYTE_ORDER=


1.12 23-Dec-2003 rtr

sparc64 defines


1.11 20-Dec-2003 rtr

Remove duplicate -DPIXPRIV from X11FLAGS.SERVER
Don't define -DXINPUT -DXFree86XDGA -DXF86VIDMODE -DDXTIME for sparc
Add X11FLAGS.LOADABLE for for module control/module flags.


1.10 08-Dec-2003 rtr

No such thing as NONBINOWN, use NONBINMODE instead.


1.9 26-Nov-2003 jwise

APPDEF files should be installed with mode ${NONBINMODE}, not mode ${BINMODE}.

Picked up via /etc/security:

Checking setuid files and devices:
Setuid additions:
-r-sr-xr-x 1 root wheel 252016 Nov 26 02:27:32 2003 /home/NetBSD/build/dest/i386/usr/X11R6/bin/xterm
-r-sr-xr-x 1 root wheel 4822 Nov 25 23:36:45 2003 /home/NetBSD/build/dest/i386/usr/X11R6/lib/X11/app-defaults/XTerm
-r-sr-xr-x 1 root wheel 828 Nov 25 23:36:45 2003 /home/NetBSD/build/dest/i386/usr/X11R6/lib/X11/app-defaults/XTerm-color


1.8 17-Nov-2003 lukem

Provide X11FLAGS.OS_DEFINES.
Add some comments


1.7 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


1.6 19-Oct-2003 lukem

Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} " ... {$.TARGET}" and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO


1.5 18-Oct-2003 lukem

implement MAKEVERBOSE


1.4 13-Sep-2003 lukem

in cleanx11man, support "MAN defaults to ${PROG}.1"


1.3 13-Sep-2003 lukem

explicitly set BINDIR LIBDIR MANDIR here


1.2 13-Sep-2003 lukem

sanitise ${DESTDIR}${SOMEOTHERVAR}


1.1 12-Sep-2003 lukem

<bsd.x11.mk>: infrastructure to support reach-over builds of xsrc


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base 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 phil-wifi-20191119
1.3 18-Nov-2019 christos

branches: 1.3.4;
Compare libraries that the bsd.prog.mk "knows about" vs the ones we actually
install... Yes, pretty bad right now.


1.2 18-Nov-2019 christos

Improve the script to check for installed libraries, and fix the wrong
names and obsolete libraries it found.


1.1 10-Aug-2019 christos

Add a script to compare the library lists so we can keep them in sync easier.


1.150 20-Oct-2025 nat

New port: mac68ksf - Macintosh 68k softfloat.

This commit is all the Makefile glue for the new port which is the mac68k
port with MKSOFTFLOAT set to "yes".

As posted here:
https://mail-index.netbsd.org/port-mac68k/2025/10/14/msg001037.html


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.149 29-Dec-2023 wiz

Update ARFLAGS for new binutils.

In binutils 2.34, 'l' was a no-op.
In binutils 2.39, it is used to specify library dependencies.

Remove 'l' from ARFLAGS.

From Takahiro Kambe in PR 57565.


Revision tags: netbsd-10-0-RC1 netbsd-10-base
1.148 14-Dec-2021 christos

branches: 1.148.2;
Pass W with IDU for lint and deps.


1.147 28-Nov-2021 rillig

sys.mk: fix duplicate character in character class of LINTFLAGS

The character class contained two times U+0020, which makes one of them
redundant, so remove the character class. PR toolchain/18248 already
contained these two spaces.

Apparently there is no need to support tabs in this place, otherwise
someone would have noticed it in the 17 years since this pattern had
been added in sys.mk 1.83 from 2004-01-27.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
1.146 23-Mar-2021 christos

From Greg A. Woods:
- add LDSTATIC to all the LINK rules, replacing CPPFLAGS which should not be
used
- create new COMPILE_LINK rules that are like LINK rules but have CPPFLAGS
where appropriate


1.145 22-Mar-2021 christos

Fix the shuttle rules by defining a new EXEC_TARGET instead of re-using
OBJECT_TARGET which adds an extra .o sometimes. Noticed by Greg A. Woods


1.144 09-Nov-2020 christos

- make the CTFCONVERT command lines consistent and concise by putting all
the implementation stuff in a variable CTFCONVERT_RUN
- introduce an OBJECT_TARGET variable that contains the output object file
- when we need to run ctfconvert, go through an intermediate ${.TARGET}.o
file, instead of writing directly to ${.TARGET} and then overwriting
${.TARGET} with ctfconvert. This avoids build failures after a build
got interrupted (the "partially built from C" scourge).


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
1.143 08-Feb-2020 maya

Don't special case aarch64 and add -fomit-frame-pointer to builds.

This behaviour is probably due to a past behaviour of clang, where it
always emitted frame pointer code.
This is no longer true for clang on netbsd, and I don't think it was true
for GCC.

Meanwhile, this flag bleeds into pkgsrc where it breaks random packages,
requiring workarounds like lang/ruby*-base/hacks.mk.


1.142 08-Jan-2020 christos

Back out previous. This has no chance to work unless the make variable parsing
is not changed do that instead of scanning for a single character delim ':',
it scans for "?:". This is because !empty(COMPILE.c:M*-pg*) contains a ':'.


1.141 08-Jan-2020 christos

tweak the DBG rule that -fomit-frame-pointer for aarch64 when profiling
(because the compiler complains), to use a match with the compile flags
and *pg*, instead of using a match to a target suffix (which is NetBSD
build-specific). Pointed out by phone@.


1.140 20-Dec-2019 christos

move MV to sys.mk because it is used there. Pointed out by joerg@


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
1.139 07-Apr-2019 christos

branches: 1.139.2;
Add -r so that we get the location of redefinitions


Revision tags: pgoyette-compat-20190127
1.138 21-Jan-2019 christos

Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.137 13-Aug-2018 christos

remove random seed debugging


Revision tags: pgoyette-compat-0728
1.136 10-Jul-2018 christos

Back to always using just the list of sources for the hash. Hopefully this
is reproducible now.


1.135 10-Jul-2018 christos

Build seed fixes:
- use MKREPRO_TIMESTAMP as the seed if available.
- skip relative paths that cannot be normalized if it is not
XXX: pullup-8


1.134 09-Jul-2018 martin

Debug hack: print out full random-seed for C++ compile/link.


Revision tags: phil-wifi-base pgoyette-compat-0625
1.133 22-Jun-2018 maya

branches: 1.133.2;
Add comment describing why we remove -Wsystem-headers, requested by mrg.


1.132 20-Jun-2018 maya

Strip -Wsystem-headers from CXXFLAGS.

GCC's C++ headers are not clean (yet). They are trying, but haven't got there
yet.

Necessary for including <atf-c++.hpp> which uses <sstream>.


Revision tags: pgoyette-compat-0521
1.131 20-May-2018 christos

Also substitute ${X11SRCDIR} for the random seed for reproducible builds so
that the random seed is consistent.
XXX: pullup-8


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
1.130 25-Feb-2018 chs

branches: 1.130.2;
add DTRACE_OPTS and HOST_DTRACE_OPTS to allow disabling various optimizations
that interfere with using dtrace. use them when MKDTRACE=yes.


Revision tags: netbsd-8-0-RC1 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
1.129 30-Mar-2016 martin

branches: 1.129.8;
Remove hacks for ancient vax gcc


1.128 06-Jul-2015 chs

reapply some fixes to make multi-threaded ctfmerge work
that were lost in the overzealous resync with freebsd.
remove the hacks which were applied to work around those problems.


Revision tags: netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
1.127 10-Aug-2014 matt

branches: 1.127.2;
Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only. While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.


Revision tags: tls-earlyentropy-base
1.126 06-Aug-2014 apb

Wrap CTFCONVERT invocations in ${defined(CTFCONVERT):? ... :}
so it performs the test at the time the rule is invoked. We can't
use a ".if defined" test because that would be tested at the time the
sys.mk file is parsed, which may be before CTFCONVERT has been set by
bsd.own.mk.

Remove the now-unnecessary assignment "CTFCONVERT ?= : ctfconvert",
and the similar assignment to CTFMERGE. Now the build logs are not
cluttered by many unnecessary invocations of the ": ctfconvert ..."


1.125 29-Jun-2014 tsutsui

Use "-O2 -fno-reorder-blocks" instead of "-Os" for m68k default optimization.

"-Os" was specfied when gcc 4.5.x was imported and the commit log says
"-O2 produces much bigger code with gcc 4.5 than it did with gcc 4.1"
but "-Os" disables most inline declarations and makes some applications
much slower. "-O2 -fno-reorder-blocks" seems enough to reduce sizes
and disabling -freorder-blocks wouldn't cause particular performance
impact on ancient m68k machines with small cache memories.
See my post on port-m68k@ for more details:
http://mail-index.NetBSD.org/port-m68k/2014/06/22/msg000488.html

No objection in the thread and "seems fine to me" from mrg@.


Revision tags: yamt-pagecache-base9
1.124 18-Apr-2014 christos

Add -g (gnu) so lint recognizes __attribute__


1.123 03-Apr-2014 riastradh

branches: 1.123.2;
By default define CTFCONVERT and CTFMERGE to be no-ops in sys.mk.

Don't test for /usr/bin/ctfconvert or /usr/bin/ctfmerge -- that is
completely bonkers and breaks the build if the host's ctfconvert and
ctfmerge are too old.

Strip the broken conditionals in the .c.o &c. rules.

bsd.own.mk will override CTFCONVERT and CTFMERGE with TOOL_CTFCONVERT
and TOOL_CTFMERGE if MKCTF=yes.

XXX The way CTFCONVERT and CTFMERGE are integrated into the rules is
bogus -- it is not safe to interrupt them. We need some intermediate
object to do this right.

Please let me know if I broke anything with this -- I am not an elvin
or dwarven wizard, nor a dtrace expert. But this has been breaking
builds for ages now and nobody else seems to want to do anything
about it.


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.122 09-Mar-2014 christos

XXX: use only thread for ctfmerge


1.121 09-Mar-2014 christos

Elide ctfmerge bug.


1.120 02-Jan-2014 christos

disable ctf handling for the shuttle .c -> '' rule since we don't create
an object file to work on.


1.119 31-Dec-2013 christos

redo the ctf stuff to handle the USETOOLS=never case correctly and explain
how.


1.118 01-Nov-2013 christos

ignore all -std=gnu patterns not just 99


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
1.117 18-Jul-2013 matt

Test BSD makefile about coldfire.
XXX still hate m68k--netbsdelf-coldfire


Revision tags: riastradh-drm2-base agc-symver-base
1.116 06-Mar-2013 yamt

branches: 1.116.4;
don't make ctfconvert remove original debug info


1.115 26-Jan-2013 christos

CTFCONVERT complains and coredumps for c++


1.114 26-Jan-2013 christos

CTFCONVERT me harder.


Revision tags: yamt-pagecache-base8
1.113 18-Jan-2013 christos

Now that ctf is fixed for at least amd64, go back to an equivalent to the
original functionality, use the tool only if it exists.


1.112 17-Jan-2013 christos

Disable CTF Conversion for now until it is fixed.
- ERROR: ctrl_iface_ap.c: die 2767: failed to get unsigned: No entry found
[dwarf _attrval_unsigned(219)]


1.111 17-Jan-2013 christos

Remove bogus conditionals that were also copied to other files presumably
because they did not work from here, and explain why.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
1.110 06-Oct-2012 christos

old-style-definitions and no-format-zero-length are invalid for c++


1.109 22-Jun-2012 abs

branches: 1.109.2;
Switch -current vax back to gcc 4.1 to match netbsd-6 - until someone has
time to look at the gcc 4.5 codegen issues we should at least have a usable
-current for vax.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
1.108 10-Feb-2012 matt

branches: 1.108.2;
Switch VAX to use GCC 4.5 and GDB 7.
Change VAX to use DBG=-O2 like most other ports.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.107 31-Oct-2011 chs

branches: 1.107.2;
switch everything except vax to gcc 4.5.
switch m68k to -Os since -O2 produces much bigger code
with gcc 4.5 than it did with gcc 4.1.


Revision tags: cherry-xenmp-base
1.106 20-May-2011 joerg

Fully support per-target AFLAGS.


1.105 07-Apr-2011 joerg

Compute the build seed using :hash.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base
1.104 21-Jan-2011 joerg

Switch remaining platforms to modern CPP for assembler.


1.103 17-Jan-2011 joerg

branches: 1.103.2;
Move SPARC and SPARC64 to modern CPP. Update UPDATING note for this and
Alpha.


1.102 16-Jan-2011 joerg

Alpha doesn't need -traditional-cpp for assembler.


1.101 12-Jan-2011 joerg

Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk. Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.


Revision tags: matt-mips64-premerge-20101231
1.100 02-Mar-2010 darran

DTrace: Add CTF generation to the make framework. Only enabled when
MKDTRACE=yes.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE 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 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 mjf-devfs2-base
1.99 07-Sep-2008 kent

Remove -Wno-pointer-sign and -ffreestanding from CXXFLAGS. g++
doesn't support for them.


1.98 04-Aug-2008 joerg

When compiling C++ sources and BUILDSEED is set, pass down
-frandom-seed with a reduced version of .ALLSRC and .TARGET
as argument. This allows bit-identical builds of C++ files.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
1.97 06-May-2008 uwe

branches: 1.97.2;
For sh3 set default DBG to "-Os -freorder-blocks" which is almost like -O2
but without -falign-* that is too zealous for low-memory sh3 machines.


1.96 04-May-2008 tsutsui

There is only one more file which requires HACKS for m68000,
so handle it in each Makefile rather than sys.mk.

These ICEs might be related with GCC Bugzilla Bug 32424
which is not resolved yet even in the upstream.


1.95 27-Apr-2008 tsutsui

Enable gcc optimization on m68000 (sun2) again with minimum hacks.
gcc -O0 generates a bit fat binaries.


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
1.94 09-Feb-2008 mrg

branches: 1.94.4; 1.94.6;
make all sun2 use -O0 and move most of the hacks out into just 3 files.


1.93 09-Jan-2008 simonb

Remove support for NetBSD/pc532.


Revision tags: pc532-eol-2008 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base
1.92 15-Apr-2007 matt

branches: 1.92.4;
-O1 on vax isn't quite enough, add -fgcse -fstrength-reduce -fgcse-after-reload
too. We can build again.


1.91 14-Apr-2007 matt

For now, make vax default to -O not -O2


1.90 08-Apr-2007 scw

Remove support for NetBSD/{,evb}sh5.


1.89 22-Jan-2007 christos

delete "-std=gnu99" from c++ flags. From mrg.


Revision tags: netbsd-4-base
1.88 26-Aug-2006 matt

branches: 1.88.2;
Make sure to compile things at -O2 for mips64e[bl]


Revision tags: abandoned-netbsd-4-base
1.87 25-Jun-2006 lukem

Move LDFLAGS to the CC section instead of the LD section.


1.86 12-May-2006 mrg

like we do for -Wno-traditional, remove -Wstrict-prototypes and
-Wmissing-prototypes from C++ since those are always requird for C++.


1.85 25-Dec-2005 perry

add "S" to LINTFLAGS so that "inline" is accepted by lint


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.84 07-Aug-2004 chs

turn on -O2 for hppa.


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.83 27-Jan-2004 lukem

Replace
:M-[IDU]*
with
:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)


1.82 26-Dec-2003 christos

no-traditional is not a valid warning for c++ programs.


1.81 07-Dec-2003 simonb

Use -O2 for ns32k now.


1.80 08-Nov-2003 lukem

The order of items in .SUFFIXES is extremely important!
Revert part of previous and put `.s .S' before `.c' again.

(Fixes recent libkern lossage.)


1.79 08-Nov-2003 lukem

Trim .SUFFIXES to only contain those used in this file.

Reorder some variables appropriately.

Add chmod a+x in .sh:, as per SUSv3.


1.78 19-Sep-2003 martin

Drop explicit medlow model and default to -O2 for sparc64.


1.77 27-Jul-2003 uwe

Conditions for sh5 when setting DBG to be empty were deleted (moved)
in 1.72, but brought back accidentally in 1.73. That was harmless,
anyway, as sh5 conditions in their new place get matched earlier.


1.76 27-Jul-2003 lukem

be consistent: use ${.TARGET} for $@ and ${.PREFIX} for $*


1.75 18-Jul-2003 lukem

whitespace cleanup


1.74 04-May-2003 fvdl

Default to -O2 for x86_64.


1.73 29-Mar-2003 fvdl

gcc for x86_64 should be safe enough these days to enable -O by default.


1.72 21-Jan-2003 scw

The sh5 toolchain works fine with -O2 now.


Revision tags: fvdl_fs64_base
1.71 26-Nov-2002 thorpej

The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.


1.70 11-Jul-2002 scw

SH5 Makefile Magic.


1.69 01-Jul-2002 fredette

Like on x86_64, don't use -O at all with the hppa compiler.


1.68 04-Jun-2002 thorpej

Don't use -traditional-cpp if HAVE_GCC3.


1.67 04-Jun-2002 thorpej

Add case for armeb.


Revision tags: netbsd-1-6-base
1.66 08-Apr-2002 wiz

branches: 1.66.2;
No more arm32.


1.65 27-Mar-2002 eeh

Reserve %g4 for backwards compatibility with the old ABI.


1.64 24-Mar-2002 bjh21

MACHINE_ARCH == "arm26" hasn't been valid for some time, so don't check
for it.


1.63 19-Dec-2001 tv

Remove -Wa,-Av9a hack from <sys.mk> and relegate it to the places that need
it (kernel and libc).

The current version of the gas assembler in the tree (2.11.2) already
defaults to generating object files for "-Av9 -64", supporting V9
instructions in ELF64 object format. "-Av9a" is only needed for specific
parts of the NetBSD base sources, and not for all third-party code.


1.62 17-Sep-2001 mycroft

Use -O2 on PowerPC.


1.61 23-Jul-2001 matt

Make arm use -O2


1.60 29-Jun-2001 eeh

Tell the assembler to accept UltraSPARC extensions on sparc64.


1.59 19-Jun-2001 fvdl

Add some extra flags for the x86-64 port. Disable -O in sys.mk
(which is where all ports set it); there seem to be some lurking
optimization bugs for the x86-64.


1.58 22-Aug-2000 bjh21

Switch arm26 to -O2. Most of my kernels are compiled with this anyway,
and gcc's code generation should be the same as for arm32, so I think this
is safe.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
1.57 02-May-2000 sjg

Allow optimizer/debug flags to be changed on command line without
breaking everything. Eg. use DBG="-O0 -g" when debugging something.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
1.56 15-Nov-1999 matt

VAX should use -O2. (why don't all ports?)


1.55 13-Nov-1999 jdolecek

merge build rules for files ending .cc and .C
add support for C++ source files ending .cpp and .cxx


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
1.54 10-Mar-1999 mycroft

branches: 1.54.8;
alpha seems to work with -O2...


1.53 24-Feb-1999 drochner

add missing parts of the "mips"->"mipse?" transition


1.52 12-Feb-1999 lukem

* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).


1.51 06-Feb-1999 simonb

Back out previous backout of -O2 in mips. Bug in strtod.c fixed via
Niklas Hallqvist.


1.50 05-Feb-1999 simonb

_Don't_ use -O2 on mips, libc/stdlib/strtod.c breaks


1.49 21-Jan-1999 mycroft

Use -O2 on arm32.


1.48 18-Jan-1999 christos

Add -F to LINTFLAGS so that the full pathname is printed.


1.47 12-Jan-1999 simonb

Use -O2 on mips.


1.46 12-Dec-1998 thorpej

Use -O2 on m68k.


1.45 26-Nov-1998 mycroft

Use -O2 on SPARC.


1.44 22-Nov-1998 mycroft

Use -O2 on i386.


1.43 22-Aug-1998 tv

Fix the .c.a brokenness with libbfd the "right" way - nuke everything but
*o from .ALLSRC.


1.42 22-May-1998 tv

Apply same .c.a workaround from alpha to arm32


1.41 09-Apr-1998 tv

The C++ compiler is "c++", not "g++"; that is more compatible with non-GCC
based C++ compilers.


1.40 09-Apr-1998 tv

.y.c <sys.mk> rule fixes. Don't create a y.tab.h file unless asked for,
and use smarter creation of the header file.


1.39 01-Apr-1998 tv

Revert. This broke too much in the build tree, and a better solution
needs to be created. (The existing situation breaks a lot too.)


1.38 01-Apr-1998 tv

Fix .y rules to DTRT with possibly generated .h files. See mail on
tech-toolchain for a very detailed explanation of this. In short, add
a .y.h rule identical to the .y.c rule and make the .y.c rule rename
the .h file; also, clean the .h file in CLEANFILES.


1.37 05-Nov-1997 thorpej

Fix .c.ln rule: use CPPFLAGS, not CFLAGS.


1.36 04-Nov-1997 gwr

Move definitions of: NM, LORDER, TSORT from bsd.sys.mk to sys.mk
so they are more easly used by things like sys/libkern/Makefile.inc
(Besides, all the other tool definitions are in sys.mk)


1.35 03-Nov-1997 cgd

add '-z' to LINTFLAGS, so that forward structure definions (for pointer
args, etc.), don't cause warnings if the structure isn't ever completely
defined.


1.34 28-Oct-1997 lukem

add default rules for Objective C sources (`.m' suffix):
- sys.mk:
add ${OBJC} and ${OBJCFLAGS} (equivalent to ${CC} and
${CFLAGS} respectively), and ${COMPILE.m} and ${LINK.m} rules
- bsd.sys.mk:
add .m, .m.o, and .m.ln rules (as per the C rules in sys.mk).
it's here, rather than in sys.mk, because `.m' isn't
exclusively used for Objective C files.
- bsd.lib.mk:
add .m.o, .m.po, .m.so, and .m.ln rules (as per C)


Revision tags: netbsd-1-3-base
1.33 31-May-1997 cjs

branches: 1.33.2;
Back out BUILDDIR and NOINSTALL changes.


1.32 27-May-1997 cjs

Put include information in CPPFLAGS only (not in CFLAGS or MKDEPFLAGS).
Add note that CPPFLAGS is (or should be) passed to all programs that
pass input through cpp.


1.31 17-May-1997 mycroft

Remove unneeded .SUFFIXES lines, and move .s and .S closer to .o to give the
right preferences.


1.30 29-Mar-1997 mikel

merge lite-2 changes (mostly SCCSids)


1.29 18-Oct-1996 thorpej

Define an INSTALL make variable, and default it to "install". Suggested
by Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.


1.28 30-Sep-1996 thorpej

Add "-traditional-cpp" to the COMPILE.S command, so that assembler
syntax (specifically, use of # to indicate an immediate value) isn't
misinterpreted as a CPP directive.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
1.27 10-Apr-1996 mycroft

Remove broken hack that attempted to do the same as the previous.


1.26 10-Apr-1996 mycroft

Fix COMPILE.s so the output file is named correctly.


1.25 29-Feb-1996 jtc

Removed special handling of CPPFLAGS if DESTDIR is set. Third party
makefiles may use DESTDIR for something completely different.


1.24 28-Feb-1996 jtc

Default .s.o and .S.o left output in wrong file


1.23 18-Dec-1995 cgd

don't include the .c.a rule on the alpha. see p.r. 1488 for an
example of how make breaks when it's present. In particular, it causes
build of the compiler toolchain to fail if present, which keeps
a complete system from building, on the alpha.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
1.22 24-Sep-1995 christos

- In preparation for parallel makes fix the library rules so that they
don't use a.out as intermediate output.
- Note in the README file that we cannot fix the xstr stuff.
We still need to fix lex and yacc.
- Allow overriding of the variables in sys.mk


1.21 24-Jun-1995 cgd

update lint rules, but keep linting disabled


1.20 26-Jul-1994 mycroft

Move the inclusion of bsd.own.mk to a better place.


Revision tags: netbsd-1-0-base
1.19 06-Jul-1994 mycroft

branches: 1.19.2;
Use CPPFLAGS (previously defined but unused) to yank in include files from
${DESTDIR}/usr/include.


1.18 30-Jun-1994 deraadt

.m4 files are sources too


1.17 30-Jun-1994 cgd

RCSID frobbing, and minor sanity adjustments.


1.16 27-Mar-1994 cgd

add back inclusion of bsd.own.mk


1.15 24-Mar-1994 jtc

Added various COMPILE.? & LINK.? macros and changed suffix rules to use
them (Like Sun & GNU make).


1.14 24-Mar-1994 jtc

Now that single suffix rules work, uncomment them.


1.13 31-Jan-1994 jtc

Moved manpage formatting rules from sys.mk to bsd.man.mk.
Some programs (like ispell) use *.[0-8] for non-manpage things, and having
the manpage rules in sys.mk really messes things up.


1.12 25-Jan-1994 cgd

oops; kill two extra spaces.


1.11 25-Jan-1994 cgd

do the right thing if nroff doesn't work


1.10 30-Dec-1993 jtc

Comment out single suffix rules (until I can get a debugger that works).


1.9 29-Dec-1993 jtc

Added single suffix implicit rules. Rules for *.c & *.f files are required
by POSIX.2 --- I added the others (*.p, *.l, *.y, etc.) to be consistant
with all the other default rules.


1.8 08-Sep-1993 brezak

Add .S.o rule


1.7 15-Aug-1993 mycroft

Makefile: Use `install -d' to create directory.
bsd.dep.mk: Add defaults for `beforedepend' and `afterdepend'.
sys.mk: 8 tabs --> space


1.6 15-Aug-1993 mycroft

Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
1.5 17-Jul-1993 mycroft

Combine some suffix rules.


1.4 17-Jul-1993 mycroft

Add suffix rules for C++ files.


1.3 17-Jun-1993 mycroft

Add global CXX and CXXFLAGS for compiling C++ programs. (These names are used
by some GNU stuff; if you have a better suggestion, please tell me.)


Revision tags: netbsd-0-8 netbsd-alpha-1
1.2 09-Apr-1993 cgd

various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.


1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision