Library_merged.mk | 47 -------------------------------------------- RepositoryModule_host.mk | 17 +++++++++------ solenv/gbuild/LinkTarget.mk | 14 ++++++++++--- 3 files changed, 21 insertions(+), 57 deletions(-)
New commits: commit b6be3d3db3ffbc4c1a4528a8dc17aa95084e12ca Author: Matúš Kukan <matus.ku...@collabora.com> Date: Mon Dec 15 13:49:08 2014 +0100 gbuild: Do not require gb_Library_use_externals for libmerged Instead, automatically get the externals when parsing other makefiles. This commit fixes the build and hopefully avoids problems in future because people didn't know they had to add externals for libmerged too. Similar should be done for other functions like add_libs... Change-Id: I5aea4c43f4b6838092ada81c310ef1100f241108 diff --git a/Library_merged.mk b/Library_merged.mk index 90f30a1..8431efc 100644 --- a/Library_merged.mk +++ b/Library_merged.mk @@ -35,60 +35,13 @@ $(eval $(call gb_Library_use_static_libraries,merged,\ $(if $(filter unx,$(GUIBASE)),headless) \ )) -$(eval $(call gb_Library_use_externals,merged,\ - icu_headers \ - icui18n \ - icuuc \ - boost_headers \ - boostdatetime \ - $(call gb_Helper_optional,DESKTOP,clucene) \ - $(call gb_Helper_optional,COLLADA2GLTF,collada2gltf) \ - cups \ - curl \ - dbus \ - expat \ - gconf \ - gio \ - glew \ - graphite \ - $(if $(ENABLE_GTK),gtk) \ - harfbuzz \ - hunspell \ - jpeg \ - lcms2 \ - $(call gb_Helper_optional,LIBATOMIC_OPS,libatomic_ops) \ - libeot \ - liblangtag \ - libxml2 \ - libxslt \ - mesa_headers \ - mythes \ - nss3 \ - $(call gb_Helper_optional,COLLADA2GLTF,opencollada_parser) \ - $(call gb_Helper_optional,COLLADA2GLTF,png) \ - telepathy \ - zlib \ -)) - ifeq (ALL,$(MERGELIBS)) $(eval $(call gb_Library_use_static_libraries,merged,\ ulingu \ )) -$(eval $(call gb_Library_use_externals,merged,\ - cppunit \ - hyphen \ - libexslt \ - libexttextcat \ - $(if $(filter-out ANDROID IOS,$(OS)),openldap) \ - $(call gb_Helper_optional,PYUNO,python) \ -)) endif ifeq ($(GUIBASE),unx) -$(eval $(call gb_Library_use_externals,merged,\ - fontconfig \ - freetype \ -)) $(eval $(call gb_Library_add_libs,merged,\ -lX11 \ -lXext \ diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index a3567c4..f6a9c6e 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -11,6 +11,16 @@ $(eval $(call gb_Module_Module,libreoffice)) +# This makefile needs to be read first because some variables like T_LIBS +# for libmerged are cleared there and then later we append stuff to it +# through e.g. gb_Library_use_external for various libraries in libmerged. +ifneq ($(MERGELIBS),) +$(eval $(call gb_Module_add_targets,libreoffice,\ + Library_merged \ + $(if $(URELIBS),Library_urelibs) \ +)) +endif + $(eval $(call gb_Module_add_moduledirs,libreoffice,\ accessibility \ android \ @@ -155,13 +165,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ xmlsecurity \ )) -ifneq ($(MERGELIBS),) -$(eval $(call gb_Module_add_targets,libreoffice,\ - Library_merged \ - $(if $(URELIBS),Library_urelibs) \ -)) -endif - # Especially when building everything with symbols, the linking of the largest # libraries takes enormous amounts of RAM. To prevent annoying OOM situations # etc., try to prevent linking these in parallel by adding artificial build diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 9478130..e59b425 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -853,6 +853,10 @@ define gb_LinkTarget__is_build_tool $(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call gb_BUILD_HELPER_TOOLS)),$(true),$(false)) endef +define gb_LinkTarget__is_merged +$(filter $(1),$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_linktarget,$(lib)))) +endef + # call gb_LinkTarget_use_libraries,linktarget,libs define gb_LinkTarget_use_libraries ifneq (,$$(filter-out $(gb_Library_KNOWNLIBS),$(2))) @@ -865,7 +869,7 @@ $(call gb_LinkTarget__use_libraries,$(1),$(2),$(2),$(4)) else $(call gb_LinkTarget__use_libraries,$(1),$(2),$(strip \ $(if $(filter $(gb_MERGEDLIBS),$(2)), \ - $(if $(filter $(1),$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_linktarget,$(lib)))), \ + $(if $(call gb_LinkTarget__is_merged,$(1)), \ $(filter $(gb_MERGEDLIBS),$(2)), merged)) \ $(if $(filter $(gb_URELIBS),$(2)), \ $(if $(filter $(1),$(foreach lib,$(gb_URELIBS),$(call gb_Library_get_linktarget,$(lib)))), \ @@ -1328,11 +1332,15 @@ $(call gb_LinkTarget_get_target,$(1)) :| \ endef # this forwards to functions that must be defined in RepositoryExternal.mk. -# call gb_LinkTarget_use_external,library,external +# Automatically forward for libmerged library too when linktarget is merged. +# +# call gb_LinkTarget_use_external,linktarget,external define gb_LinkTarget_use_external $(if $(filter undefined,$(origin gb_LinkTarget__use_$(2))),\ $(error gb_LinkTarget_use_external: unknown external: $(2)),\ - $(call gb_LinkTarget__use_$(2),$(1))) + $(if $(call gb_LinkTarget__is_merged,$(1)),$(call gb_LinkTarget__use_$(2),$(call gb_Library_get_linktarget,merged))) \ + $(call gb_LinkTarget__use_$(2),$(1)) \ +) endef # $(call gb_LinkTarget_use_externals,library,externals)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits