diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2022-01-05 11:56:30 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2022-01-07 02:51:50 +0100 |
commit | 32bf2040bfa9d76731fc7c679845eb3835dde8a3 (patch) | |
tree | a5be8c64485195e5bf6bb07e2003cdf33ae6485c /solenv | |
parent | d3308503a8c320b4a1c3f6156a6b7e6a71a5806d (diff) |
gbuild: fix actually used libraries for mergelib
Just the $(filter $(gb_MERGEDLIBS),$(2)) in the "if" was wrong,
but reformat and add a comment to make the code easier to read.
This way we correctly header-depend on all requested libraries,
but just export-depend on the real libraries.
And actually use gb_LinkTarget__is_build_lib in the ifeq, as
otherwise the build now fails for the reduced dependencies.
Change-Id: I24d5701891324f5055c9dfa535bd854d09fbb905
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127994
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 52eabb9e5b96..ce60b462ecee 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -1246,7 +1246,8 @@ $(foreach lib,$(2),$(call gb_LinkTarget__lib_dummy_depend,$(lib))) endef # libraries which are merged but need to be built for gb_BUILD_HELPER_TOOLS -gb_BUILD_HELPER_LIBS := basegfx \ +gb_BUILD_HELPER_LIBS := $(foreach lib, \ + basegfx \ comphelper \ cppu \ cppuhelper \ @@ -1260,6 +1261,7 @@ gb_BUILD_HELPER_LIBS := basegfx \ ucbhelper \ unoidl \ xmlreader \ + , $(call gb_Library__get_workdir_linktargetname,$(lib))) # tools libmerged depends on, so they link against gb_BUILD_HELPER_LIBS gb_BUILD_HELPER_TOOLS := $(foreach exe,\ @@ -1271,12 +1273,12 @@ gb_BUILD_HELPER_TOOLS := $(foreach exe,\ # call gb_LinkTarget__is_build_lib,linktargetname define gb_LinkTarget__is_build_lib -$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(foreach lib,$(gb_BUILD_HELPER_LIBS),$(call gb_Library__get_workdir_linktargetname,$(lib)))),$(true),$(false)) +$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call gb_BUILD_HELPER_LIBS)),$(true)) endef # call gb_LinkTarget__is_build_tool,linktargetname define gb_LinkTarget__is_build_tool -$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call gb_BUILD_HELPER_TOOLS)),$(true),$(false)) +$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call gb_BUILD_HELPER_TOOLS)),$(true)) endef define gb_LinkTarget__is_merged @@ -1295,15 +1297,14 @@ $$(eval $$(call gb_Output_error,Cannot link against plugin library/libraries '$$ endif endif -ifeq ($(call gb_LinkTarget__is_build_tool,$(1)),$(true)) +ifeq ($(call gb_LinkTarget__is_build_tool,$(1))$(call gb_LinkTarget__is_build_lib,$(1)),$(true)) $(call gb_LinkTarget__use_libraries,$(1),$(2),$(2),$(4)) else +# $$(3) = Always just depend on non-merged libs. If any dependency is merged, but you aren't, also depend on "merged". $(call gb_LinkTarget__use_libraries,$(1),$(2),$(strip \ - $(if $(filter $(gb_MERGEDLIBS),$(2)), \ - $(if $(call gb_LinkTarget__is_merged,$(1)), \ - $(filter $(gb_MERGEDLIBS),$(2)), merged)) \ - $(filter-out $(gb_MERGEDLIBS),$(2)) \ - ),$(4)) + $(filter-out $(gb_MERGEDLIBS),$(2)) \ + $(if $(filter $(gb_MERGEDLIBS),$(2)),$(if $(call gb_LinkTarget__is_merged,$(1)),,merged)) \ + ),$(4)) endif endef |