From 9035e1b53cb97464662343012da47f9cb13a5124 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 4 Oct 2013 09:54:17 -0700 Subject: Fix build: don't recompile all C++ every time This was caused by the %.o: %.cpp rule depending on "uicables". Since it's a phony target, the file never exists, so make will always try to rebuild it. Regardless of whether anything got run because of that, the target will then be "newer" than the .o file that was being considered. Therefore, make thought it had to recompile again. Fix it by skipping the intermediate, phony target and telling make that the C++ objects depend directly on the header files. Signed-off-by: Thiago Macieira Signed-off-by: Dirk Hohndel --- Rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rules.mk b/Rules.mk index 30e2e216a..ce1ba59d7 100644 --- a/Rules.mk +++ b/Rules.mk @@ -185,7 +185,7 @@ MOCFLAGS = $(filter -I%, $(CXXFLAGS) $(EXTRA_FLAGS)) $(filter -D%, $(CXXFLAGS) $ @mkdir -p .dep/$(@D) $(COMPILE_PREFIX)$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep -c -o $@ $< -%.o: %.cpp uicables +%.o: %.cpp $(UIC_HEADERS) @$(PRETTYECHO) ' CXX' $< @mkdir -p .dep/$(@D) $(COMPILE_PREFIX)$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) -I.uic -Iqt-ui -MD -MF .dep/$@.dep -c -o $@ $< -- cgit v1.2.3-70-g09d2