In section 4.13, we have the following example: ---------------------------------------------------------- %.d: %.c @set -e; rm -f $@; \ $(CC) -M $(CPPFLAGS) $< > $...@.$$$$; \ sed ’s,\($*\)\.o[ :]*,\1.o $@ : ,g’ < $...@.$$$$ > $@; \ rm -f $...@.$$$$ ---------------------------------------------------------- Under what conditions this implicit rule is executed? Would you please give an example?
Why the 'sed' command is necessary? and why we need to have the following rule: main.o main.d : main.c defs.h Can the command, 'sed' be replaced with: cp $...@.$$$$ $@ (I mean we have one .d file for each .c file and it will be included, why we need a rule like main.d : main.c defs.h? This rule is without recipe and what is it supposed to do?) _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
