diff options
author | obrien <obrien@FreeBSD.org> | 2000-05-27 21:50:15 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-05-27 21:50:15 +0000 |
commit | d25477b7e72ae75cf5a184d6605b231845cb375a (patch) | |
tree | 048de23c321d672983581a040d6a60b3c0d2dba8 | |
parent | db6962481cacec46fc07117c32341a958f65fd56 (diff) | |
download | FreeBSD-src-d25477b7e72ae75cf5a184d6605b231845cb375a.zip FreeBSD-src-d25477b7e72ae75cf5a184d6605b231845cb375a.tar.gz |
MFA: 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).
-rw-r--r-- | sys/conf/Makefile.i386 | 90 | ||||
-rw-r--r-- | sys/conf/Makefile.powerpc | 90 |
2 files changed, 112 insertions, 68 deletions
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 74ade06..9517a54 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -107,6 +107,13 @@ SYSTEM_DEP+= $S/conf/ldscript.$M 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,15 +128,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${SYSTEM_LD} ${SYSTEM_LD_TAIL} -.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules) -all: modules - -modules: - @mkdir -p ${.CURDIR}/modules - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} obj - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} all -.endif - .if !exists(.depend) ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} .endif @@ -139,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(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} clean -.endif #lint: /tmp param.c # @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ @@ -189,7 +184,7 @@ genassym.o: $S/$M/$M/genassym.c ${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 @@ -198,17 +193,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(${.CURDIR}/../../modules) - @mkdir -p ${.CURDIR}/modules - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} obj - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} depend -.endif -cleandepend: +kernel-cleandepend: rm -f .depend -.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} cleandepend -.endif links: egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ @@ -218,14 +205,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 @@ -234,18 +221,53 @@ 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} -.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} install -.endif + ${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL} -reinstall reinstall.debug: +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(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} install + ${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL} + +.if !defined(NO_MODULES) && exists($S/modules) +all: modules +depend: modules-depend +clean: modules-clean +cleandepend: modules-cleandepend +cleandir: modules-cleandir +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-cleandir: + cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandir + +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 + +modules-reinstall modules-reinstall.debug: + cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + config.o: ${NORMAL_C} diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 74ade06..9517a54 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -107,6 +107,13 @@ SYSTEM_DEP+= $S/conf/ldscript.$M 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,15 +128,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${SYSTEM_LD} ${SYSTEM_LD_TAIL} -.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules) -all: modules - -modules: - @mkdir -p ${.CURDIR}/modules - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} obj - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} all -.endif - .if !exists(.depend) ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} .endif @@ -139,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(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} clean -.endif #lint: /tmp param.c # @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ @@ -189,7 +184,7 @@ genassym.o: $S/$M/$M/genassym.c ${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 @@ -198,17 +193,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(${.CURDIR}/../../modules) - @mkdir -p ${.CURDIR}/modules - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} obj - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} depend -.endif -cleandepend: +kernel-cleandepend: rm -f .depend -.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} cleandepend -.endif links: egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ @@ -218,14 +205,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 @@ -234,18 +221,53 @@ 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} -.if !defined(NO_MODULES) && exists(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} install -.endif + ${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL} -reinstall reinstall.debug: +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(${.CURDIR}/../../modules) - cd ${.CURDIR}/../../modules && env MAKEOBJDIRPREFIX=${.CURDIR}/modules ${MAKE} install + ${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL} + +.if !defined(NO_MODULES) && exists($S/modules) +all: modules +depend: modules-depend +clean: modules-clean +cleandepend: modules-cleandepend +cleandir: modules-cleandir +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-cleandir: + cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} cleandir + +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 + +modules-reinstall modules-reinstall.debug: + cd $S/modules && env MAKEOBJDIRPREFIX=${.OBJDIR}/modules ${MAKE} install + config.o: ${NORMAL_C} |