Add CLEANDEPEND[FILES|DIRS] and simplify the tags cleanup to use it.
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
b601b230d8
commit
ae038fc336
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295667
@ -5,6 +5,11 @@
|
||||
#
|
||||
# +++ variables +++
|
||||
#
|
||||
# CLEANDEPENDDIRS Additional directories to remove for the cleandepend
|
||||
# target.
|
||||
#
|
||||
# CLEANDEPENDFILES Additional files to remove for the cleandepend target.
|
||||
#
|
||||
# CTAGS A tags file generation program [gtags]
|
||||
#
|
||||
# CTAGSFLAGS Options for ctags(1) [not set]
|
||||
@ -27,7 +32,8 @@
|
||||
# +++ targets +++
|
||||
#
|
||||
# cleandepend:
|
||||
# Remove depend and tags file
|
||||
# remove ${CLEANDEPENDFILES}; remove ${CLEANDEPENDDIRS} and all
|
||||
# contents.
|
||||
#
|
||||
# depend:
|
||||
# Make the dependencies for the source files, and store
|
||||
@ -59,7 +65,7 @@ DEPENDFILE?= .depend
|
||||
.if ${MK_DIRDEPS_BUILD} == "no"
|
||||
.MAKE.DEPENDFILE= ${DEPENDFILE}
|
||||
.endif
|
||||
DEPENDFILES= ${DEPENDFILE} ${DEPENDFILE}.*
|
||||
CLEANDEPENDFILES= ${DEPENDFILE} ${DEPENDFILE}.*
|
||||
|
||||
# Keep `tags' here, before SRCS are mangled below for `depend'.
|
||||
.if !target(tags) && defined(SRCS) && !defined(NO_TAGS)
|
||||
@ -252,16 +258,20 @@ afterdepend:
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${CTAGS:T} == "gtags"
|
||||
CLEANDEPENDFILES+= GPATH GRTAGS GSYMS GTAGS
|
||||
.if defined(HTML)
|
||||
CLEANDEPENDDIRS+= HTML
|
||||
.endif
|
||||
.else
|
||||
CLEANDEPENDFILES+= tags
|
||||
.endif
|
||||
.if !target(cleandepend)
|
||||
cleandepend:
|
||||
.if defined(SRCS)
|
||||
.if ${CTAGS:T} == "gtags"
|
||||
rm -f ${DEPENDFILES} GPATH GRTAGS GSYMS GTAGS
|
||||
.if defined(HTML)
|
||||
rm -rf HTML
|
||||
.endif
|
||||
.else
|
||||
rm -f ${DEPENDFILES} tags
|
||||
rm -f ${CLEANDEPENDFILES}
|
||||
.if !empty(CLEANDEPENDDIRS)
|
||||
rm -rf ${CLEANDEPENDDIRS}
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user