Home | History | Annotate | Download | only in libkern
History log of /src/sys/lib/libkern/Makefile.inc
RevisionDateAuthorComments
 1.50  20-Sep-2025  mrg mark cleankernlib and cleandirkernlib as .MAKE.

fixes a couple of:
nbmake[1]: warning: Invalid internal option "-J" in <..>
problems that appear with "build.sh -U .. kernel=" but not with -u.

solution from rillig@ in private email.
 1.49  30-Aug-2023  christos explicitly pass COPTS
 1.48  19-Jun-2022  rillig libkern: fix wrong escaping in makefile

In the unlikely event that KERNDIR contains a '$' character, that '$'
should not be doubled to '$$'. It only needs the usual shell quoting.
 1.47  30-May-2022  rin Introduce LIBKERN_MD_FLAGS to pass some MD flags for libkern.

This is necessary since libkern is built by coprocess, and
threfore subsets of make(1) variables are passed.
 1.46  22-Sep-2018  rin - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
 1.45  27-May-2018  christos branches: 1.45.2;
- Introduce :q modifier for make variables and make it double escape $'s so
that passing variables to recursive makes with :q works as expected.
- Revert :Q to work as before.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@
XXX: pullup 8
 1.44  29-Oct-2015  mrg branches: 1.44.10; 1.44.16;
remove "@echo done" from 4 rules that don't need it and the random "done"
in my build logs don't help understanding.
 1.43  06-Sep-2015  uebayasi In kernel lib build, print message when things not only start bug also end.
 1.42  12-Dec-2012  matt branches: 1.42.14;
Don't pass down CPUFLAGS since its value is already in CFLAGS.
 1.41  10-Aug-2012  joerg branches: 1.41.2;
Deal with optional HAVE_GCC.
 1.40  20-Dec-2005  christos branches: 1.40.94; 1.40.110; 1.40.118;
Use common sources with userland.
 1.39  11-Dec-2005  christos merge ktrace-lwp.
 1.38  26-Feb-2005  perry branches: 1.38.4;
nuke trailing whitespace
 1.37  07-Nov-2003  dsl branches: 1.37.8; 1.37.10;
Make 'dependall' generate dependencies in these libraries.
 1.36  02-Nov-2002  perry branches: 1.36.6;
Add lint infrastructure
 1.35  21-Nov-2001  jmc Don't make clean and cleandir depend on the lib subdir. Just check for it's
existance before running the submake. This makes it possible to run a
make build (which runs cleandir before make obj) in a r/o source tree
 1.34  05-Dec-2000  sommerfeld branches: 1.34.2; 1.34.4;
Have recursive make invocations depend on the .MAKE pseudo-target so
make knows to handle them specially.
 1.33  01-Feb-2000  tsutsui Revert STRIPPROG -> STRIP
 1.32  19-Jan-2000  tsutsui STRIP -> STRIPPROG
 1.31  07-May-1999  drochner branches: 1.31.2;
Build libraries for kernel/standalone code from within their compilation
directories and use .PATH to lookup the source files.
(Formerly, the libs were built from the source dirs, with MAKEOBJDIR
set to the compilation directory.)
This solves 2 problems:
-"mkdep" and "make" are now consistent about the file lookup, this fixes
bad interactions with amd reported in PR bin/7374 (Arne Juul) and
lossage reported by Andrew Gillham ("obj" dirs and relative paths still
don't work well together)
-kernel compile trees can be moved around without forcing a new
"make depend" - fixing PR kern/4021 by Martin Husemann
 1.30  15-Oct-1998  drochner branches: 1.30.8;
change handling of libkern:
-sys/lib/libkern builds as library per default (as it was documented all
the time)
-ports able to LKM set "KERN_AS=obj" explicitely in their Makefiles
 1.29  05-Sep-1998  lukem distclean is a synonym for cleandir
 1.28  07-Feb-1998  cgd make sure that LORDER, TSORT, AR, NM, RANLIB, and SIZE are correctly
and consistently set when doing kernel library builds.
 1.27  04-Nov-1997  gwr Pass down the values of: AR NM RANLIB
(Fixes PR#4426 from SAITOH Masanobu)
Also pass down LORDER TSORT.
 1.26  07-Mar-1997  thorpej branches: 1.26.8;
Allow depend target to be parallized, from Andrew Wheadon
<andrew@wipux2.wifo.uni-mannheim.de>, PR #3257.
 1.25  16-Feb-1997  cgd allow includers to specify library-specific CPP flags via ${LIB}MISCCPPFLAGS
 1.24  23-Jan-1997  cgd branches: 1.24.4;
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.

Variables used by these Makefile.inc's are:

S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.

(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
 1.23  26-Dec-1996  christos PR/2981: use ${VAR:Q} instead of '${VAR}' to avoid quoting problems
 1.22  30-Sep-1996  ws Allow compilation of libkern as library for standalone programs
 1.21  23-Sep-1996  ghudson Handle relative paths to the source directory if they begin with a '.'.
 1.20  09-Sep-1996  mycroft Pass $STRIP to the sub-make.
 1.19  10-Aug-1996  mycroft Add anchors so that only exactly `-I. is modified.
 1.18  10-Aug-1996  mycroft Convert the -I. to -I${.OBJDIR}, so that the `machine symlink is available.
 1.17  08-Aug-1996  mycroft We dont need to pass down COMPATDIR and KERNDIR.
 1.16  08-Aug-1996  mycroft Run the child make in the source directory, so that nothing here needs to be
changed when the compile directory is outside the source tree.
 1.15  20-May-1996  mrg use ' not " when passing variables to a sub-make. pr#1199/pr#1296
 1.14  11-May-1996  mycroft Make `make depend' work for libraries.
 1.13  02-Feb-1996  mycroft Simplify, and add support for passing CPPFLAGS.
 1.12  07-Oct-1995  mycroft Build libkern as one .o file, so that all symbols defined therein are
always available to loadable modules.
 1.11  26-Jun-1995  christos Add the ability to override KERNREL and KERNDST.
 1.10  24-Jun-1995  christos Build libkern in the kernel compilation directory, like libcompat.
 1.9  31-Dec-1994  mycroft Only build the version of the library that's needed.
 1.8  26-Oct-1994  cgd new RCS ID format.
 1.7  09-Jan-1994  ws Use $(MAKE) instead of make
 1.6  28-Dec-1993  davidb Changed to use make's new .OBJDIR
 1.5  22-Dec-1993  cgd use ${MAKE} rather than "make", as suggested by Roland McGrath
 1.4  23-Oct-1993  cgd branches: 1.4.2;
use obj.${MACHINE} dirs to compile into
 1.3  13-Oct-1993  cgd punt on doing minimal work in favor of less output in 'happy' case.
 1.2  13-Oct-1993  cgd add a bunch of .NOTMAINs
 1.1  13-Oct-1993  cgd slight cleanup, and ... (gasp) add comments
 1.4.2.2  28-Dec-1993  davidb Changes from main branch:
Use make's new .OBJDIR
Changed make to $(MAKE)
 1.4.2.1  23-Oct-1993  davidb file Makefile.inc was added on branch magnum on 1993-12-28 12:24:33 +0000
 1.24.4.1  12-Mar-1997  is Merge in changes from The Trunk
 1.26.8.1  12-Nov-1997  thorpej Sync w/ trunk.
 1.30.8.1  21-Jun-1999  thorpej Sync w/ -current.
 1.31.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.31.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.34.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.34.2.2  11-Nov-2002  nathanw Catch up to -current
 1.34.2.1  08-Jan-2002  nathanw Catch up to -current.
 1.36.6.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.36.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.36.6.1  03-Aug-2004  skrll Sync with HEAD
 1.37.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.37.8.1  29-Apr-2005  kent sync with -current
 1.38.4.1  21-Jun-2006  yamt sync with head.
 1.40.118.1  06-Dec-2012  matt Don't pass CPUFLAGS down since its value is in CFLAGS
 1.40.110.2  16-Jan-2013  yamt sync with (a bit old) head
 1.40.110.1  30-Oct-2012  yamt sync with head
 1.40.94.1  21-Aug-2009  matt Pass LDFLAGS
 1.41.2.1  25-Feb-2013  tls resync with head
 1.42.14.2  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.42.14.1  22-Sep-2015  skrll Sync with HEAD
 1.44.16.2  30-Sep-2018  pgoyette Ssync with HEAD
 1.44.16.1  25-Jun-2018  pgoyette Sync with HEAD
 1.44.10.1  09-Jun-2018  martin Pull up following revision(s) (requested by christos in ticket #870):

sys/lib/libgnuefi/Makefile.inc: revision 1.5
external/mit/xorg/xorg-pkg-ver.mk: revision 1.9
sys/arch/i386/stand/lib/Makefile.inc: revision 1.17
sys/compat/common/Makefile.inc: revision 1.25
usr.bin/make/unit-tests/varquote.exp: revision 1.1, 1.2
sys/lib/libsa/Makefile.inc: revision 1.24
usr.bin/make/var.c: revision 1.220
sys/arch/ia64/stand/efi/libefi/Makefile.inc: revision 1.5
sys/arch/hppa/spmath/Makefile.inc: revision 1.10
usr.bin/make/unit-tests/varquote.mk: revision 1.1, 1.2
usr.bin/make/unit-tests/Makefile: revision 1.53
sys/lib/libkern/Makefile.inc: revision 1.45
sys/arch/acorn32/stand/lib/Makefile.inc: revision 1.4
sys/arch/m68k/fpsp/Makefile.inc: revision 1.21
usr.bin/make/make.1: revision 1.273
sys/lib/libz/Makefile.inc: revision 1.17

- Introduce :q modifier for make variables and make it double escape $'s so
that passing variables to recursive makes with :q works as expected.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@

XXX: pullup 8
 1.45.2.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed