summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-09-11 10:35:19 +0200
committerJose <jose@zeroc.com>2014-09-11 10:35:19 +0200
commit529d3e18ab3d40d4596e298494900014fbfeaaef (patch)
treeaed7b10383e25fe033faf6fcae8aa2fbb0b71f17 /cpp
parentFixed (ICE-5672) Makedist.py does not handle git version with 4 degrees. (diff)
downloadice-529d3e18ab3d40d4596e298494900014fbfeaaef.tar.bz2
ice-529d3e18ab3d40d4596e298494900014fbfeaaef.tar.xz
ice-529d3e18ab3d40d4596e298494900014fbfeaaef.zip
Fix dependencies causing C++ rebuilds
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/Make.rules13
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
index 32892bdee14..3a70797da45 100644
--- a/cpp/config/Make.rules
+++ b/cpp/config/Make.rules
@@ -341,9 +341,17 @@ ifneq ($(SLICE_OBJS),)
-include $(addprefix .depend/, $(SLICE_OBJS:.o=.ice.d))
endif
+#
+# If dependencies has non been created yet make all OBJS depend
+# on all SRCS, Slice generated files will be created before C++
+# compilation starts and avoid problems with parallel make
+#
ifneq ($(OBJS),)
+ifneq ($(shell test -d .depend && echo 0), 0)
+$(OBJS):$(OBJS:.o=.cpp)
+else
-include $(addprefix .depend/, $(OBJS:.o=.d))
-$(OBJS): $(OBJS:.o=.cpp)
+endif
endif
all:: $(TARGETS)
@@ -393,7 +401,8 @@ $(HDIR)/%.h %.cpp: $(SDIR)/%.ice $(SLICE2CPP) $(SLICEPARSERLIB)
clean::
-rm -f $(TARGETS)
- -rm -f core *.o *.bak .depend/*.d
+ -rm -f core *.o *.bak
+ -rm -rf .depend
ifneq ($(SLICE_OBJS),)
clean::