diff options
author | Thiago Macieira <thiago@macieira.org> | 2013-10-04 09:54:17 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-04 09:54:38 -0700 |
commit | 9035e1b53cb97464662343012da47f9cb13a5124 (patch) | |
tree | c9d4c0237178658ad202273b193efcd48f54822a | |
parent | 36c28089dbae3ed2fa395c0882994db1dbfe0cab (diff) | |
download | subsurface-9035e1b53cb97464662343012da47f9cb13a5124.tar.gz |
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 <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | Rules.mk | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 $@ $< |