summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.dep.mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-02-24 17:18:55 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-02-24 17:18:55 +0000
commit3f106747381c9937af2f72a652f657f92cbeca70 (patch)
tree1dd259cd25ebba0f8b517690adcaba607550a09e /share/mk/bsd.dep.mk
parent1f44f0aab0a9eaa57d54449fa37c42cd0ce13f89 (diff)
downloadFreeBSD-src-3f106747381c9937af2f72a652f657f92cbeca70.zip
FreeBSD-src-3f106747381c9937af2f72a652f657f92cbeca70.tar.gz
Follow-up r295667 with fixes for SRCS defined.
cleandepend should always remove CLEANDEPEND* if they are not empty, but bsd.dep.mk should not add the tags entries unless SRCS is defined as it did before. The .depend file itself it still always removed to avoid accidentally keeping a stale one around as done in r295666. Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'share/mk/bsd.dep.mk')
-rw-r--r--share/mk/bsd.dep.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 6f27d7e..2c4acd2 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -268,6 +268,7 @@ afterdepend:
.endif
.endif
+.if defined(SRCS)
.if ${CTAGS:T} == "gtags"
CLEANDEPENDFILES+= GPATH GRTAGS GSYMS GTAGS
.if defined(HTML)
@@ -276,15 +277,16 @@ CLEANDEPENDDIRS+= HTML
.else
CLEANDEPENDFILES+= tags
.endif
+.endif
.if !target(cleandepend)
cleandepend:
-.if defined(SRCS)
+.if !empty(CLEANDEPENDFILES)
rm -f ${CLEANDEPENDFILES}
+.endif
.if !empty(CLEANDEPENDDIRS)
rm -rf ${CLEANDEPENDDIRS}
.endif
.endif
-.endif
.if !target(checkdpadd) && (defined(DPADD) || defined(LDADD))
_LDADD_FROM_DPADD= ${DPADD:R:T:C;^lib(.*)$;-l\1;g}
OpenPOWER on IntegriCloud