> I was thinking to build the objects but not the dependencies. We do a lot > of one-time only builds, where we don't need dependencies at all.
In that case, leave out the include of any .d whose .o doesn't exist; you fatuously know you need to build the .o, so you don't need to know its dependencies. <code> src = various.c obj = $(src:.c=.o) # etc. dep = $(patsubst %.o %.d, $(wildcard $(obj))) ifneq (,$(dep)) -include $(dep) endif </code> If you *also* build .d as a side-effect of building each .o, you'll have all needed .d files in time for the next build. Eddy. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make