Restore cleaning of auto-generated kobj files after the recent MFILES
changes. Use the list of MFILES found by find to identify the set of possible auto-generated files and add the intersection of this set and SRCS to CLEANFILES. Submitted by: imp (previous version), sbruno Differential Revision: https://reviews.freebsd.org/D4336
This commit is contained in:
parent
945ceaafbc
commit
2cd2ff0e26
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291614
@ -206,9 +206,8 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
|
||||
SYSTEM_DEP+= ${LDSCRIPT}
|
||||
|
||||
# Calculate path for .m files early, if needed.
|
||||
.if !defined(_MPATH)
|
||||
.if !defined(__MPATH)
|
||||
__MPATH!=find ${S:tA}/ -name \*_if.m
|
||||
_MPATH=${__MPATH:H:O:u}
|
||||
.endif
|
||||
|
||||
# MKMODULESENV is set here so that port makefiles can augment
|
||||
@ -227,7 +226,7 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}"
|
||||
.if defined(DEBUG)
|
||||
MKMODULESENV+= DEBUG_FLAGS="${DEBUG}"
|
||||
.endif
|
||||
MKMODULESENV+= _MPATH="${_MPATH}"
|
||||
MKMODULESENV+= __MPATH="${__MPATH}"
|
||||
|
||||
# Architecture and output format arguments for objdump to convert image to
|
||||
# object file
|
||||
|
@ -370,14 +370,18 @@ vnode_if_typedef.h:
|
||||
.endif
|
||||
|
||||
# Build _if.[ch] from _if.m, and clean them when we're done.
|
||||
.if !defined(_MPATH)
|
||||
.if !defined(__MPATH)
|
||||
__MPATH!=find ${SYSDIR:tA}/ -name \*_if.m
|
||||
_MPATH=${__MPATH:H:O:u}
|
||||
.endif
|
||||
_MFILES=${__MPATH:T:O}
|
||||
_MPATH=${__MPATH:H:O:u}
|
||||
.PATH.m: ${_MPATH}
|
||||
.for _i in ${SRCS:M*_if.[ch]}
|
||||
#removes too much, comment out until it's more constrained.
|
||||
#CLEANFILES+= ${_i}
|
||||
_MATCH=M${_i:R:S/$/.m/}
|
||||
_MATCHES=${_MFILES:${_MATCH}}
|
||||
.if !empty(_MATCHES)
|
||||
CLEANFILES+= ${_i}
|
||||
.endif
|
||||
.endfor # _i
|
||||
.m.c: ${SYSDIR}/tools/makeobjops.awk
|
||||
${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c
|
||||
|
Loading…
Reference in New Issue
Block a user