Deleted Added
full compact
kern.post.mk (233578) kern.post.mk (237090)
1# $FreeBSD: head/sys/conf/kern.post.mk 233578 2012-03-27 21:23:56Z peter $
1# $FreeBSD: head/sys/conf/kern.post.mk 237090 2012-06-14 19:30:31Z dougb $
2
3# Part of a unified Makefile for building kernels. This part includes all
4# the definitions that need to be after all the % directives except %RULES
5# and ones that act like they are part of %RULES.
6#
7# Most make variables should not be defined in this file. Instead, they
8# should be defined in the kern.pre.mk so that port makefiles can
9# override or augment them.

--- 21 unchanged lines hidden (view full) ---

31.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules)
32${target}: modules-${target}
33modules-${target}:
34 cd $S/modules; ${MKMODULESENV} ${MAKE} \
35 ${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
36.endif
37.endfor
38
2
3# Part of a unified Makefile for building kernels. This part includes all
4# the definitions that need to be after all the % directives except %RULES
5# and ones that act like they are part of %RULES.
6#
7# Most make variables should not be defined in this file. Instead, they
8# should be defined in the kern.pre.mk so that port makefiles can
9# override or augment them.

--- 21 unchanged lines hidden (view full) ---

31.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules)
32${target}: modules-${target}
33modules-${target}:
34 cd $S/modules; ${MKMODULESENV} ${MAKE} \
35 ${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
36.endif
37.endfor
38
39# Handle out of tree ports
39# Handle ports (as defined by the user) that build kernel modules
40.if !defined(NO_MODULES) && defined(PORTS_MODULES)
40.if !defined(NO_MODULES) && defined(PORTS_MODULES)
41PORTSMODULESENV=SYSDIR=${SYSDIR}
41#
42# The ports tree needs some environment variables defined to match the new kernel
43#
44# Ports search for some dependencies in PATH, so add the location of the installed files
45LOCALBASE?= /usr/local
46# SRC_BASE is how the ports tree refers to the location of the base source files
47.if !defined(SRC_BASE)
48SRC_BASE!= realpath "${SYSDIR:H}/"
49.endif
50# OSVERSION is used by some ports to determine build options
51.if !defined(OSRELDATE)
52# Definition copied from src/Makefile.inc1
53OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
54 ${MAKEOBJDIRPREFIX}${SRC_BASE}/include/osreldate.h
55.endif
56# Keep the related ports builds in the obj directory so that they are only rebuilt once per kernel build
57WRKDIRPREFIX?= ${MAKEOBJDIRPREFIX}${SRC_BASE}/sys/${KERNCONF}
58PORTSMODULESENV=\
59 PATH=${PATH}:${LOCALBASE}/bin:${LOCALBASE}/sbin \
60 SRC_BASE=${SRC_BASE} \
61 OSVERSION=${OSRELDATE} \
62 WRKDIRPREFIX=${WRKDIRPREFIX}
42.for __target in all install reinstall clean
43${__target}: ports-${__target}
44ports-${__target}:
45.for __i in ${PORTS_MODULES}
46 cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/}
47.endfor
48.endfor
49.endif

--- 236 unchanged lines hidden ---
63.for __target in all install reinstall clean
64${__target}: ports-${__target}
65ports-${__target}:
66.for __i in ${PORTS_MODULES}
67 cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/}
68.endfor
69.endfor
70.endif

--- 236 unchanged lines hidden ---