Some years ago I developed my own style for GNU makefiles from scratch, without 
reference to existing technology. In more recent years I've come across other 
styles of writing makefiles, and advice for developing them.

My style uses a pattern rule like this

%.d %.o: %.c

and the -MMD switch to the GNU C compiler to create dependencies and object 
files at the same time. This seems a lot more reliable and performs better than 
the other styles I have seen. Compilation is forced by the inclusion of the .d 
files rather than the target. I use MAKECMDGOALS to stop inclusion of the .d 
files when making clean.

Has anyone else considered or experimented with this style?
If so do they like it or have they rejected it?
If they have rejected it for what reason?


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to