[Libreoffice-commits] core.git: solenv/gbuild

Michael Stahl mstahl at redhat.com
Sat Nov 2 22:25:19 CET 2013


 solenv/gbuild/LinkTarget.mk |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

New commits:
commit 35210e2272081cef47ec63cca933e0c55424e6cb
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sat Nov 2 16:16:21 2013 +0100

    gbuild: LinkTarget: improve gb_LinkTarget__get_headers_check
    
    Can actually error out early in some cases of partial build with missing
    deps from other modules; probably better than trying to build
    (Static)Library with bogus vars.
    
    Change-Id: I4e2cbd42d3c84b9bc87607d263f3d80ba7914302

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index d804824..8e7e002 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -815,6 +815,14 @@ define gb_PrintDeps_info
 $(info LibraryDep: $(1) links against $(2))
 endef
 
+# avoid problem when a module is built partially but other modules that define
+# needed libraries is not yet built: prevent invocation of pattern rule
+# for library with invalid parameters by depending on the header target
+define gb_LinkTarget__lib_dummy_depend
+$(call gb_Library_get_target,$(1)) :| $(call gb_Library_get_headers_target,$(1))
+
+endef
+
 # call gb_LinkTarget__use_libraries,linktarget,requestedlibs,actuallibs,linktargetmakefilename
 define gb_LinkTarget__use_libraries
 
@@ -834,6 +842,7 @@ $(call gb_LinkTarget_get_target,$(1)) : \
 	$(foreach lib,$(3),$(call gb_Library_get_exports_target,$(lib)))
 $(call gb_LinkTarget_get_headers_target,$(1)) : \
 	$(foreach lib,$(2),$(call gb_Library_get_headers_target,$(lib)))
+$(foreach lib,$(2),$(call gb_LinkTarget__lib_dummy_depend,$(lib)))
 
 endef
 
@@ -894,6 +903,15 @@ $$(call gb_Output_error,\
  gb_LinkTarget_add_linked_static_libs: use gb_LinkTarget_use_static_libraries instead.)
 endef
 
+# avoid problem when a module is built partially but other modules that define
+# needed static libraries is not yet built: prevent invocation of pattern rule
+# for static library with invalid parameters by depending on the header target
+define gb_LinkTarget__static_lib_dummy_depend
+$(call gb_StaticLibrary_get_target,$(1)) :| \
+	$(call gb_StaticLibrary_get_headers_target,$(1))
+
+endef
+
 # for a StaticLibrary, dependent libraries are not actually linked in
 # call gb_LinkTarget_use_static_libraries,linktarget,staticlibs
 define gb_LinkTarget_use_static_libraries
@@ -902,6 +920,7 @@ $(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS += $$(if $$(filter-ou
 $(call gb_LinkTarget_get_target,$(1)) : $(foreach lib,$(2),$(call gb_StaticLibrary_get_target,$(lib)))
 $(call gb_LinkTarget_get_headers_target,$(1)) : \
 	$(foreach lib,$(2),$(call gb_StaticLibrary_get_headers_target,$(lib)))
+$(foreach lib,$(2),$(call gb_LinkTarget__static_lib_dummy_depend,$(lib)))
 
 endef
 


More information about the Libreoffice-commits mailing list