diff options
author | obrien <obrien@FreeBSD.org> | 2000-09-05 22:37:46 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-09-05 22:37:46 +0000 |
commit | 6de7dfbb5addebdbd6fd8b8b3907632862b2f4ba (patch) | |
tree | a46fa7d5e288c56eba81ee5cbf9d55936212d11c /sys/conf | |
parent | 508fb708e11430ef70bfe03c5cc9002582a3d79d (diff) | |
download | FreeBSD-src-6de7dfbb5addebdbd6fd8b8b3907632862b2f4ba.zip FreeBSD-src-6de7dfbb5addebdbd6fd8b8b3907632862b2f4ba.tar.gz |
The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/Makefile.alpha | 62 | ||||
-rw-r--r-- | sys/conf/Makefile.i386 | 61 | ||||
-rw-r--r-- | sys/conf/Makefile.pc98 | 59 | ||||
-rw-r--r-- | sys/conf/Makefile.powerpc | 61 | ||||
-rw-r--r-- | sys/conf/kmod.mk | 2 |
5 files changed, 138 insertions, 107 deletions
diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha index 1798e88..ba2ed6a 100644 --- a/sys/conf/Makefile.alpha +++ b/sys/conf/Makefile.alpha @@ -20,7 +20,9 @@ %VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf +KERNEL_KO?= kernel.ko KERNEL?= kernel +KODIR?= /boot/${KERNEL} STD8X16FONT?= iso .if !defined(S) @@ -107,7 +109,7 @@ SYSTEM_DEP+= $S/conf/ldscript.$M %CLEAN .PHONY: all modules -all: ${KERNEL} +all: ${KERNEL_KO} depend: kernel-depend clean: kernel-clean @@ -117,11 +119,11 @@ install install.debug: kernel-install reinstall reinstall.debug: kernel-reinstall .if !defined(DEBUG) -FULLKERNEL= ${KERNEL} +FULLKERNEL= ${KERNEL_KO} .else -FULLKERNEL= ${KERNEL}.debug -${KERNEL}: ${FULLKERNEL} - ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL} +FULLKERNEL= ${KERNEL_KO}.debug +${KERNEL_KO}: ${FULLKERNEL} + ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} .endif ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @@ -141,7 +143,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ - ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \ + ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks param.c \ setdef[01].c setdefs.h tags \ vers.c vnode_if.c vnode_if.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ @@ -267,20 +269,30 @@ kernel-install kernel-install.debug: echo "You must activate /boot/device.hints in loader.conf." ; \ exit 1 ; \ fi - @if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \ + @if [ ! -f ${KERNEL_KO}${.TARGET:S/kernel-install//} ] ; then \ echo "You must build a kernel first." ; \ exit 1 ; \ fi -.if exists(${DESTDIR}/${KERNEL}) - -chflags noschg ${DESTDIR}/${KERNEL} - mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old +.if exists(${DESTDIR}/${KODIR}) +.if exists(${DESTDIR}/${KODIR}.old) + @-chflags -R noschg ${DESTDIR}/${KODIR}.old + -rm -rf ${DESTDIR}/${KODIR}.old .endif + mv ${DESTDIR}/${KODIR} ${DESTDIR}/${KODIR}.old +.endif + mkdir -p ${KODIR} + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ - ${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL} + ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}/${KODIR} kernel-reinstall kernel-reinstall.debug: + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ - ${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL} + ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KODIR} .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) all: modules @@ -292,35 +304,33 @@ install install.debug: modules-install reinstall reinstall.debug: modules-reinstall .endif +MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${DESTDIR}/${KODIR} + modules: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj all + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj depend + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} clean + cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandepend + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend + +modules-cleandir: + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} tags + cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: -.if !defined(NO_MODULES_OLD) - if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \ - mkdir -p ${DESTDIR}/modules.old ; \ - cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old ; \ - fi; -.endif - mkdir -p ${DESTDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index acf5001..6f940fe 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -20,7 +20,9 @@ %VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf +KERNEL_KO?= kernel.ko KERNEL?= kernel +KODIR?= /boot/${KERNEL} STD8X16FONT?= iso .if !defined(S) @@ -107,7 +109,7 @@ SYSTEM_DEP+= $S/conf/ldscript.$M .PHONY: all modules -all: ${KERNEL} +all: ${KERNEL_KO} depend: kernel-depend clean: kernel-clean @@ -117,11 +119,11 @@ install install.debug: kernel-install reinstall reinstall.debug: kernel-reinstall .if !defined(DEBUG) -FULLKERNEL= ${KERNEL} +FULLKERNEL= ${KERNEL_KO} .else -FULLKERNEL= ${KERNEL}.debug -${KERNEL}: ${FULLKERNEL} - ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL} +FULLKERNEL= ${KERNEL_KO}.debug +${KERNEL_KO}: ${FULLKERNEL} + ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} .endif ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @@ -141,7 +143,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ - ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \ + ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks param.c \ setdef[01].c setdefs.h tags \ vers.c vnode_if.c vnode_if.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ @@ -222,20 +224,30 @@ kernel-install kernel-install.debug: echo "You must activate /boot/device.hints in loader.conf." ; \ exit 1 ; \ fi - @if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \ + @if [ ! -f ${KERNEL_KO}${.TARGET:S/kernel-install//} ] ; then \ echo "You must build a kernel first." ; \ exit 1 ; \ fi -.if exists(${DESTDIR}/${KERNEL}) - -chflags noschg ${DESTDIR}/${KERNEL} - mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old +.if exists(${DESTDIR}/${KODIR}) +.if exists(${DESTDIR}/${KODIR}.old) + @-chflags -R noschg ${DESTDIR}/${KODIR}.old + -rm -rf ${DESTDIR}/${KODIR}.old .endif + mv ${DESTDIR}/${KODIR} ${DESTDIR}/${KODIR}.old +.endif + mkdir -p ${KODIR} + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ - ${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL} + ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}/${KODIR} kernel-reinstall kernel-reinstall.debug: + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ - ${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL} + ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KODIR} .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) all: modules @@ -248,38 +260,33 @@ install install.debug: modules-install reinstall reinstall.debug: modules-reinstall .endif +MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${DESTDIR}/${KODIR} + modules: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj all + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj depend + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} clean + cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandepend + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandir + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} tags + cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: -.if !defined(NO_MODULES_OLD) - if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \ - mkdir -p ${DESTDIR}/modules.old; \ - cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old; \ - fi; -.endif - mkdir -p ${DESTDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98 index 7eab4e6..dcaf606 100644 --- a/sys/conf/Makefile.pc98 +++ b/sys/conf/Makefile.pc98 @@ -22,7 +22,9 @@ %VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf +KERNEL_KO?= kernel.ko KERNEL?= kernel +KODIR?= /boot/${KERNEL} #STD8X16FONT?= iso .if !defined(S) @@ -109,7 +111,7 @@ SYSTEM_DEP+= $S/conf/ldscript.$M .PHONY: all modules -all: ${KERNEL} +all: ${KERNEL_KO} depend: kernel-depend clean: kernel-clean @@ -119,11 +121,11 @@ install install.debug: kernel-install reinstall reinstall.debug: kernel-reinstall .if !defined(DEBUG) -FULLKERNEL= ${KERNEL} +FULLKERNEL= ${KERNEL_KO} .else -FULLKERNEL= ${KERNEL}.debug -${KERNEL}: ${FULLKERNEL} - ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL} +FULLKERNEL= ${KERNEL_KO}.debug +${KERNEL_KO}: ${FULLKERNEL} + ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} .endif ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @@ -143,7 +145,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ - ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \ + ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks param.c \ setdef[01].c setdefs.h tags \ vers.c vnode_if.c vnode_if.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ @@ -225,18 +227,28 @@ kernel-install kernel-install.debug: echo "You must activate /boot/device.hints in loader.conf." ; \ exit 1 ; \ fi - @if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \ + @if [ ! -f ${KERNEL_KO}${.TARGET:S/kernel-install//} ] ; then \ echo "You must build a kernel first." ; \ exit 1 ; \ fi -.if exists(${DESTDIR}/${KERNEL}) - -chflags noschg ${DESTDIR}/${KERNEL} - mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old +.if exists(${DESTDIR}/${KODIR}) +.if exists(${DESTDIR}/${KODIR}.old) + @-chflags -R noschg ${DESTDIR}/${KODIR}.old + -rm -rf ${DESTDIR}/${KODIR}.old .endif + mv ${DESTDIR}/${KODIR} ${DESTDIR}/${KODIR}.old +.endif + mkdir -p ${KODIR} + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ - ${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL} + ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}/${KODIR} kernel-reinstall kernel-reinstall.debug: + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ ${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL} @@ -251,38 +263,33 @@ install install.debug: modules-install reinstall reinstall.debug: modules-reinstall .endif +MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${DESTDIR}/${KODIR} + modules: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj all + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj depend + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} clean + cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandepend + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandir + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} tags + cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: -.if !defined(NO_MODULES_OLD) - if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \ - mkdir -p ${DESTDIR}/modules.old; \ - cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old; \ - fi; -.endif - mkdir -p ${DESTDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index acf5001..6f940fe 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -20,7 +20,9 @@ %VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf +KERNEL_KO?= kernel.ko KERNEL?= kernel +KODIR?= /boot/${KERNEL} STD8X16FONT?= iso .if !defined(S) @@ -107,7 +109,7 @@ SYSTEM_DEP+= $S/conf/ldscript.$M .PHONY: all modules -all: ${KERNEL} +all: ${KERNEL_KO} depend: kernel-depend clean: kernel-clean @@ -117,11 +119,11 @@ install install.debug: kernel-install reinstall reinstall.debug: kernel-reinstall .if !defined(DEBUG) -FULLKERNEL= ${KERNEL} +FULLKERNEL= ${KERNEL_KO} .else -FULLKERNEL= ${KERNEL}.debug -${KERNEL}: ${FULLKERNEL} - ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL} +FULLKERNEL= ${KERNEL_KO}.debug +${KERNEL_KO}: ${FULLKERNEL} + ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} .endif ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @@ -141,7 +143,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ - ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \ + ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks param.c \ setdef[01].c setdefs.h tags \ vers.c vnode_if.c vnode_if.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ @@ -222,20 +224,30 @@ kernel-install kernel-install.debug: echo "You must activate /boot/device.hints in loader.conf." ; \ exit 1 ; \ fi - @if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \ + @if [ ! -f ${KERNEL_KO}${.TARGET:S/kernel-install//} ] ; then \ echo "You must build a kernel first." ; \ exit 1 ; \ fi -.if exists(${DESTDIR}/${KERNEL}) - -chflags noschg ${DESTDIR}/${KERNEL} - mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old +.if exists(${DESTDIR}/${KODIR}) +.if exists(${DESTDIR}/${KODIR}.old) + @-chflags -R noschg ${DESTDIR}/${KODIR}.old + -rm -rf ${DESTDIR}/${KODIR}.old .endif + mv ${DESTDIR}/${KODIR} ${DESTDIR}/${KODIR}.old +.endif + mkdir -p ${KODIR} + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ - ${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL} + ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}/${KODIR} kernel-reinstall kernel-reinstall.debug: + @if [ -f ${DESTDIR}/${KODIR}/${KERNEL_KO} ] ; then \ + chflags noschg ${DESTDIR}/${KODIR}/${KERNEL_KO} ; \ + fi install -c -m 555 -o root -g wheel -fschg \ - ${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL} + ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KODIR} .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) all: modules @@ -248,38 +260,33 @@ install install.debug: modules-install reinstall reinstall.debug: modules-reinstall .endif +MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${DESTDIR}/${KODIR} + modules: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj all + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj depend + cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} clean + cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandepend + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandir + cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} tags + cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: -.if !defined(NO_MODULES_OLD) - if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \ - mkdir -p ${DESTDIR}/modules.old; \ - cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old; \ - fi; -.endif - mkdir -p ${DESTDIR}/modules - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: - cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 803593b..f1d598a 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -13,7 +13,7 @@ # # KMOD The name of the kernel module to build. # -# KMODDIR Base path for kernel modules (see kld(4)). [/modules] +# KMODDIR Base path for kernel modules (see kld(4)). [/boot/kernel] # # KMODOWN KLD owner. [${BINOWN}] # |