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:
oliverschmidt 2006-12-31 14:16:32 +00:00
parent 07a26c584a
commit 859ab1b706

View file

@ -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.