[Libreoffice-commits] .: solenv/gbuild

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Tue Jun 5 12:15:03 PDT 2012


 solenv/gbuild/platform/com_GCC_class.mk |   24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

New commits:
commit b1ad78d25c298e4f9b24ef7a761c9bba1f34c2ed
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jun 5 14:13:14 2012 -0500

    Do not build c/cxx .d file when --disable-dependency-tracking
    
    --disable-dependency-tracking is for build environment that
    always do make clea + make to build
    These do not need the dependency information and therefore
    can save the expenses of tracking them.
    the gc c/cxx compile command was using -MMD etc.. systematically.
    this patch take gb_FULLDEPS value into account to avoid
    -MMD when not necessary
    
    Change-Id: Ic5c3c368c81da2b260a4fcdf03fdc01b45a9cb1f

diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index b864ba4..478d5fd 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -20,6 +20,14 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
+ifeq ($(gb_FULLDEPS),$(true))
+gb_ccx_dep_generation_options=-MMD -MT $(1) -MP -MF $(4)_
+gb_cxx_dep_copy=&& 	mv $(4)_ $(4)
+else
+gb_ccx_dep_generation_options=
+gb_cxx_dep_copy=
+endif
+
 # AsmObject class
 
 gb_AsmObject_get_source = $(1)/$(2).s
@@ -54,11 +62,11 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(T_CFLAGS) \
 		-c $(3) \
 		-o $(1) \
-		-MMD -MT $(1) \
-		-MP -MF $(4)_ \
+		$(gb_ccx_dep_generation_options) \
 		-I$(dir $(3)) \
-		$(INCLUDE) && \
-	mv $(4)_ $(4))
+		$(INCLUDE) \
+	    $(gb_ccx_dep_copy) \
+		)
 endef
 
 # CxxObject class
@@ -75,11 +83,11 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(T_CXXFLAGS) \
 		-c $(3) \
 		-o $(1) \
-		-MMD -MT $(1) \
-		-MP -MF $(4)_ \
+	    $(gb_ccx_dep_generation_options) \
 		-I$(dir $(3)) \
-		$(INCLUDE_STL) $(INCLUDE) && \
-	mv $(4)_ $(4))
+		$(INCLUDE_STL) $(INCLUDE) \
+	    $(gb_ccx_dep_copy) \
+		)
 endef
 
 define gb_SrsPartTarget__command_dep


More information about the Libreoffice-commits mailing list