mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Add {kernel,module}-{depend,clean,cleandepend,tags,install,reinstall}
targets. The {depend,clean,cleandepend,tags,install,reinstall} targets are composits of the {kernel,module}-* targets (based on NO_MODULES).
This commit is contained in:
parent
4bd7627e1d
commit
7dfe885ec1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60492
@ -107,6 +107,13 @@ SYSTEM_DEP+= $S/conf/ldscript.$M
|
||||
.PHONY: all modules
|
||||
all: ${KERNEL}
|
||||
|
||||
depend: kernel-depend
|
||||
clean: kernel-clean
|
||||
cleandepend: kernel-cleandepend
|
||||
tags: kernel-tags
|
||||
install install.debug: kernel-install
|
||||
reinstall reinstall.debug: kernel-reinstall
|
||||
|
||||
.if !defined(DEBUG)
|
||||
FULLKERNEL= ${KERNEL}
|
||||
.else
|
||||
@ -121,14 +128,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||
${SYSTEM_LD}
|
||||
${SYSTEM_LD_TAIL}
|
||||
|
||||
.if !defined(NO_MODULES) && exists($S/modules)
|
||||
all: modules
|
||||
|
||||
modules:
|
||||
@mkdir -p ${.OBJDIR}/modules
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj all
|
||||
.endif
|
||||
|
||||
.if !exists(.depend)
|
||||
${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/}
|
||||
.endif
|
||||
@ -138,16 +137,13 @@ ${mfile:T:S/.m$/.h/}: ${mfile}
|
||||
perl5 $S/kern/makeobjops.pl -h ${mfile}
|
||||
.endfor
|
||||
|
||||
clean:
|
||||
kernel-clean:
|
||||
rm -f *.o *.so *.So *.ko *.s eddep errs genassym \
|
||||
${FULLKERNEL} ${KERNEL} 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/} \
|
||||
${CLEAN}
|
||||
.if !defined(NO_MODULES) && exists($S/modules)
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} clean
|
||||
.endif
|
||||
|
||||
#lint: /tmp param.c
|
||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||
@ -233,7 +229,7 @@ __reml.S: $S/$M/$M/divrem.m4
|
||||
|
||||
${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
|
||||
|
||||
depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \
|
||||
kernel-depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \
|
||||
${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \
|
||||
${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/}
|
||||
rm -f .newdep
|
||||
@ -242,16 +238,9 @@ 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($S/modules)
|
||||
@mkdir -p ${.OBJDIR}/modules
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj depend
|
||||
.endif
|
||||
|
||||
cleandepend:
|
||||
kernel-cleandepend:
|
||||
rm -f .depend
|
||||
.if !defined(NO_MODULES) && exists($S/modules)
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandepend
|
||||
.endif
|
||||
|
||||
links:
|
||||
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
|
||||
@ -261,14 +250,14 @@ links:
|
||||
sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
|
||||
sh makelinks && rm -f dontlink
|
||||
|
||||
tags:
|
||||
kernel-tags:
|
||||
@[ -f .depend ] || { echo "you must make depend first"; exit 1; }
|
||||
sh $S/conf/systags.sh
|
||||
rm -f tags1
|
||||
sed -e 's, ../, ,' tags > tags1
|
||||
|
||||
install install.debug:
|
||||
@if [ ! -f ${KERNEL}${.TARGET:S/install//} ] ; then \
|
||||
kernel-install kernel-install.debug:
|
||||
@if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \
|
||||
echo "You must build a kernel first." ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@ -277,21 +266,48 @@ install install.debug:
|
||||
mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
|
||||
.endif
|
||||
install -c -m 555 -o root -g wheel -fschg \
|
||||
${KERNEL}${.TARGET:S/install//} ${DESTDIR}/${KERNEL}
|
||||
${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL}
|
||||
|
||||
kernel-reinstall kernel-reinstall.debug:
|
||||
install -c -m 555 -o root -g wheel -fschg \
|
||||
${KERNEL}${.TARGET:S/reinstall//} ${DESTDIR}/${KERNEL}
|
||||
|
||||
.if !defined(NO_MODULES) && exists($S/modules)
|
||||
all: modules
|
||||
depend: modules-depend
|
||||
clean: modules-clean
|
||||
cleandepend: modules-cleandepend
|
||||
tags: modules-tags
|
||||
install install.debug: modules-install
|
||||
reinstall reinstall.debug: modules-reinstall
|
||||
.endif
|
||||
|
||||
modules:
|
||||
@mkdir -p ${.OBJDIR}/modules
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj all
|
||||
|
||||
modules-depend:
|
||||
@mkdir -p ${.OBJDIR}/modules
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} obj depend
|
||||
|
||||
modules-clean:
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} clean
|
||||
|
||||
modules-cleandepend:
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandepend
|
||||
|
||||
modules-tags:
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} tags
|
||||
|
||||
modules-install modules-install.debug:
|
||||
.if !defined(NO_MODULES_OLD)
|
||||
mkdir -p ${DESTDIR}/modules.old
|
||||
cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old
|
||||
.endif
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/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($S/modules)
|
||||
modules-reinstall modules-reinstall.debug:
|
||||
cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install
|
||||
.endif
|
||||
|
||||
config.o:
|
||||
${NORMAL_C}
|
||||
|
Loading…
Reference in New Issue
Block a user