If .MAKE.DEPENDFILE_DEFAULT is not machine qualified, and we
find oursleves creating a machine qualified .MAKE.DEPENDFILE which is identical to a default which exists - skip it. This allows us to create Makefile.depend.host where it matters, while leveraging Makefile.depend where it is sufficient.
This commit is contained in:
parent
00140433d2
commit
0a7402f278
@ -276,6 +276,10 @@ CAT_DEPEND ?= .depend
|
|||||||
# .depend may contain things we don't want.
|
# .depend may contain things we don't want.
|
||||||
# The sed command at the end of the stream, allows for the filters
|
# The sed command at the end of the stream, allows for the filters
|
||||||
# to output _{VAR} tokens which we will turn into proper ${VAR} references.
|
# to output _{VAR} tokens which we will turn into proper ${VAR} references.
|
||||||
|
# Note: if we have a non-machine qualified .MAKE.DEPENDFILE_DEFAULT
|
||||||
|
# which exists and _DEPENDFILE does not yet and is machine qualified;
|
||||||
|
# compare new _DEPENDFILE to default and if they are the same we do
|
||||||
|
# not need _DEPENDFILE.
|
||||||
${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS}
|
${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS}
|
||||||
@(echo '# Autogenerated - do NOT edit!'; echo; \
|
@(echo '# Autogenerated - do NOT edit!'; echo; \
|
||||||
echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \
|
echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \
|
||||||
@ -288,6 +292,9 @@ ${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@}
|
|||||||
echo '# local dependencies - needed for -jN in clean tree'; \
|
echo '# local dependencies - needed for -jN in clean tree'; \
|
||||||
[ -s ${CAT_DEPEND} ] && { grep : ${CAT_DEPEND} | grep -v '[/\\]'; }; \
|
[ -s ${CAT_DEPEND} ] && { grep : ${CAT_DEPEND} | grep -v '[/\\]'; }; \
|
||||||
echo '.endif' ) | sed 's,_\([{(]\),$$\1,g' > $@.new${.MAKE.PID}
|
echo '.endif' ) | sed 's,_\([{(]\),$$\1,g' > $@.new${.MAKE.PID}
|
||||||
|
.if ${.MAKE.DEPENDFILE_DEFAULT:E} != ${MACHINE} && ${@:E} == ${MACHINE} && !exists($@) && exists(${@:H}/${.MAKE.DEPENDFILE_DEFAULT:T})
|
||||||
|
@cmp -s ${@:H}/${.MAKE.DEPENDFILE_DEFAULT:T} $@.new${.MAKE.PID} && rm $@.new${.MAKE.PID}; :
|
||||||
|
.endif
|
||||||
@${InstallNew}; InstallNew -s $@.new${.MAKE.PID}
|
@${InstallNew}; InstallNew -s $@.new${.MAKE.PID}
|
||||||
|
|
||||||
.endif # meta2deps failed
|
.endif # meta2deps failed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user