diff options
author | ru <ru@FreeBSD.org> | 2006-10-13 22:28:14 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-10-13 22:28:14 +0000 |
commit | ca460b4ef0f730d7ab73444c6f815e05cee9b6aa (patch) | |
tree | b5d0aa6bf1e677f85ca9028580cdbc5438126def /sys/conf | |
parent | 47f75c2b668957a401bcd3460e828ad3a4f785a0 (diff) | |
download | FreeBSD-src-ca460b4ef0f730d7ab73444c6f815e05cee9b6aa.zip FreeBSD-src-ca460b4ef0f730d7ab73444c6f815e05cee9b6aa.tar.gz |
- Remove include links only when .depend is also removed, so that
"make depend; make clean; make -n" works.
- Preseve kernel's .depend if it already exists and its creation
is interrupted.
Reported/reviewed by: bde
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/kern.post.mk | 7 | ||||
-rw-r--r-- | sys/conf/kmod.mk | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index bbadb1e..0b6c40b 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -121,7 +121,7 @@ kernel-clean: linterrs makelinks tags vers.c \ vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ - ${CLEAN} ${_ILINKS} + ${CLEAN} lint: ${LNFILES} ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \ @@ -153,7 +153,7 @@ kernel-depend: .depend SRCS= assym.s vnode_if.h ${BEFORE_DEPEND} ${CFILES} \ ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} -.depend: ${SRCS} +.depend: .PRECIOUS ${SRCS} rm -f .newdep ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | \ MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} @@ -184,8 +184,9 @@ ${_ILINKS}: ${ECHO} ${.TARGET} "->" $$path ; \ ln -s $$path ${.TARGET} +# .depend needs include links so we remove them only together. kernel-cleandepend: - rm -f .depend + rm -f .depend ${_ILINKS} links: egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 2a49aa6..8e72d21 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -246,7 +246,7 @@ ${_ILINKS}: ${ECHO} ${.TARGET} "->" $$path ; \ ln -sf $$path ${.TARGET} -CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} ${_ILINKS} +CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} .if defined(DEBUG_FLAGS) CLEANFILES+= ${FULLPROG} ${PROG}.symbols @@ -435,6 +435,11 @@ lint: ${SRCS} .include <bsd.dep.mk> +cleandepend: cleanilinks +# .depend needs include links so we remove them only together. +cleanilinks: + rm -f ${_ILINKS} + .if !exists(${.OBJDIR}/${DEPENDFILE}) ${OBJS}: ${SRCS:M*.h} .endif |