help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help adding automatic prerequisite generation


From: Ron
Subject: Need help adding automatic prerequisite generation
Date: 13 Jul 2004 10:59:25 -0700

I followed the suggestion in the gmake manual and added this pattern
rule
%.d: %.c
        @set -e; rm -f $@; \
         $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
         sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
         rm -f $@.$$$$


and also the include from the manual
include $(sources:.c=.d)

It works find for making the dependency files however now all targets
try to build these files.  I have certain targets "clean", "pristine"
and a few special targets for which I do not need or even want the
dependency files included.

How can I pevent this include from happening when I don't want it to ?

Cheers,
Ron


reply via email to

[Prev in Thread] Current Thread [Next in Thread]