summaryrefslogtreecommitdiffstats
path: root/sys/conf/kmod.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/kmod.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/kmod.mk')
-rw-r--r--sys/conf/kmod.mk7
1 files changed, 6 insertions, 1 deletions
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
OpenPOWER on IntegriCloud