- 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
This commit is contained in:
parent
6a7d6d5826
commit
74465532f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163332
@ -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 | \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user