From d54de77e23c945c5d34e7d9e04fefece29f9f7e2 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Sat, 2 Jan 2010 14:07:55 -0800 Subject: makefile: add depfile regeneration rule Due to earlier changes, this rule is only executed when the .d file exists but it's out-of-date. For initial .d generation, the object compilation rule is executed instead. Signed-off-by: Steven Noonan --- crawl-ref/source/makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crawl-ref/source/makefile') diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index a023a4286c..15f3643d2a 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -876,6 +876,9 @@ endif $(OBJECTS:%.o=%.cc): $(CC_DEP) $(TILEDEFHDRS) $(CONTRIB_LIBS) +%.d: %.cc .cflags + $(QUIET_DEPEND)$(CXX) -MM $(ALL_CFLAGS) $< > $*.d + %.o: %.m .cflags $(QUIET_CC)$(CC) $(ALL_CFLAGS) -Wp,-MD,$*.d -c $< -o $*.o -- cgit v1.2.3-54-g00ecf