summaryrefslogtreecommitdiffstats
path: root/sys/conf/kern.post.mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-10-13 22:28:14 +0000
committerru <ru@FreeBSD.org>2006-10-13 22:28:14 +0000
commitca460b4ef0f730d7ab73444c6f815e05cee9b6aa (patch)
treeb5d0aa6bf1e677f85ca9028580cdbc5438126def /sys/conf/kern.post.mk
parent47f75c2b668957a401bcd3460e828ad3a4f785a0 (diff)
downloadFreeBSD-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/kern.post.mk')
-rw-r--r--sys/conf/kern.post.mk7
1 files changed, 4 insertions, 3 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 | \
OpenPOWER on IntegriCloud