Cause modules to build with the kernel build. Modules are removed

from the sys Makefile's SUBDIRs.  This is conditioned in make.conf by the
NO_MODULES variable and the existence of the modules directory.  The
actual location of the modules is not modified.  Changes in Makefiles
only, this does not affect Peter's recent changes.

Reviewed by:	Peter Wemm, who warned me I would get some flack, and
		he had the good idea for the NO_MODULES variable.
This commit is contained in:
Chuck Robey 2000-05-02 02:26:04 +00:00
parent e381b06c73
commit 10ae1068e5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59884
6 changed files with 56 additions and 3 deletions

View File

@ -46,6 +46,7 @@
#NO_BIND= true # do not build BIND
#NO_FORTRAN= true # do not build g77 and related libraries
#NO_MAILWRAPPER=true # do not build the mailwrapper(8) MTA selector
#NO_MODULES= true # do not build modules with the kernel
#NO_OBJC= true # do not build Objective C support
#NO_OPENSSH= true # do not build OpenSSH
#NO_OPENSSL= true # do not build OpenSSL (implies NO_OPENSSH)

View File

@ -46,6 +46,7 @@
#NO_BIND= true # do not build BIND
#NO_FORTRAN= true # do not build g77 and related libraries
#NO_MAILWRAPPER=true # do not build the mailwrapper(8) MTA selector
#NO_MODULES= true # do not build modules with the kernel
#NO_OBJC= true # do not build Objective C support
#NO_OPENSSH= true # do not build OpenSSH
#NO_OPENSSL= true # do not build OpenSSL (implies NO_OPENSSH)

View File

@ -3,9 +3,6 @@
# The boot loader
SUBDIR= boot
# KLD modules build for both a.out and ELF
SUBDIR+=modules
HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
.include <bsd.subdir.mk>

View File

@ -119,6 +119,9 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
@echo linking ${.TARGET}
${SYSTEM_LD}
${SYSTEM_LD_TAIL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} all
.endif
.if !exists(.depend)
${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/}
@ -136,6 +139,9 @@ clean:
vers.c vnode_if.c vnode_if.h \
${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
${CLEAN}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} clean
.endif
#lint: /tmp param.c
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
@ -230,9 +236,15 @@ depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \
mkdep -a -f .newdep ${ASM_CFLAGS} ${SFILES} ${SYSTEM_SFILES}
rm -f .depend
mv -f .newdep .depend
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} depend
.endif
cleandepend:
rm -f .depend
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} cleandepend
.endif
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
@ -259,10 +271,16 @@ install install.debug:
.endif
install -c -m 555 -o root -g wheel -fschg \
${KERNEL}${.TARGET:S/install//} ${DESTDIR}/${KERNEL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} install
.endif
reinstall reinstall.debug:
install -c -m 555 -o root -g wheel -fschg \
${KERNEL}${.TARGET:S/reinstall//} ${DESTDIR}/${KERNEL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} install
.endif
config.o:
${NORMAL_C}

View File

@ -118,6 +118,9 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
@echo linking ${.TARGET}
${SYSTEM_LD}
${SYSTEM_LD_TAIL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} all
.endif
.if !exists(.depend)
${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/}
@ -135,6 +138,9 @@ clean:
vers.c vnode_if.c vnode_if.h \
${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
${CLEAN}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} clean
.endif
#lint: /tmp param.c
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
@ -184,9 +190,15 @@ depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \
mkdep -a -f .newdep ${ASM_CFLAGS} ${SFILES} ${SYSTEM_SFILES}
rm -f .depend
mv -f .newdep .depend
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} depend
.endif
cleandepend:
rm -f .depend
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} cleandepend
.endif
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
@ -213,10 +225,16 @@ install install.debug:
.endif
install -c -m 555 -o root -g wheel -fschg \
${KERNEL}${.TARGET:S/install//} ${DESTDIR}/${KERNEL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} install
.endif
reinstall reinstall.debug:
install -c -m 555 -o root -g wheel -fschg \
${KERNEL}${.TARGET:S/reinstall//} ${DESTDIR}/${KERNEL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} install
.endif
config.o:
${NORMAL_C}

View File

@ -118,6 +118,9 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
@echo linking ${.TARGET}
${SYSTEM_LD}
${SYSTEM_LD_TAIL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} all
.endif
.if !exists(.depend)
${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/}
@ -135,6 +138,9 @@ clean:
vers.c vnode_if.c vnode_if.h \
${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
${CLEAN}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} clean
.endif
#lint: /tmp param.c
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
@ -184,9 +190,15 @@ depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \
mkdep -a -f .newdep ${ASM_CFLAGS} ${SFILES} ${SYSTEM_SFILES}
rm -f .depend
mv -f .newdep .depend
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} depend
.endif
cleandepend:
rm -f .depend
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} cleandepend
.endif
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
@ -213,10 +225,16 @@ install install.debug:
.endif
install -c -m 555 -o root -g wheel -fschg \
${KERNEL}${.TARGET:S/install//} ${DESTDIR}/${KERNEL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} install
.endif
reinstall reinstall.debug:
install -c -m 555 -o root -g wheel -fschg \
${KERNEL}${.TARGET:S/reinstall//} ${DESTDIR}/${KERNEL}
.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules)
cd ${.CURDIR}/../../modules && ${MAKE} install
.endif
config.o:
${NORMAL_C}