Allow a target-specific makesfile to supply a custom rule for dependency file generation in the same way it is done for all other rules.
This commit is contained in:
parent
07a26c584a
commit
859ab1b706
|
@ -119,12 +119,13 @@ ifndef CDEPFLAGS
|
|||
CDEPFLAGS = $(CFLAGS)
|
||||
endif
|
||||
|
||||
ifndef CUSTOM_RULE_C_TO_OBJECTDIR_D
|
||||
$(OBJECTDIR)/%.d: %.c
|
||||
@set -e; rm -f $@; \
|
||||
$(CCDEP) -MM $(CDEPFLAGS) $< > $@.$$$$; \
|
||||
sed 's,\($*\)\.o[ :]*,$(OBJECTDIR)/\1.o $@ : ,g' < $@.$$$$ > $@; \
|
||||
rm -f $@.$$$$
|
||||
|
||||
endif
|
||||
|
||||
# The line below is needed so that GNU make does not remove the
|
||||
# generated file.
|
||||
|
|
Loading…
Reference in a new issue