summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Library_urelibs.mk32
-rw-r--r--Repository.mk1
-rw-r--r--RepositoryModule_host.mk1
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac1
-rw-r--r--desktop/Pagein_common.mk1
-rw-r--r--scp2/InstallModule_ure.mk1
-rwxr-xr-xscp2/source/ooo/ure.scp12
-rw-r--r--solenv/gbuild/Library.mk4
-rw-r--r--solenv/gbuild/LinkTarget.mk25
-rw-r--r--solenv/gbuild/Pagein.mk2
-rw-r--r--solenv/gbuild/extensions/pre_MergedLibsList.mk15
12 files changed, 85 insertions, 11 deletions
diff --git a/Library_urelibs.mk b/Library_urelibs.mk
new file mode 100644
index 000000000000..64089f382beb
--- /dev/null
+++ b/Library_urelibs.mk
@@ -0,0 +1,32 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,urelibs))
+
+# gb_URELIBS is defined in solenv/gbuild/extensions/pre_MergedLibsList.mk
+$(eval $(call gb_Library_use_library_objects,urelibs,\
+ $(gb_URELIBS) \
+))
+
+$(eval $(call gb_Library_use_static_libraries,urelibs,\
+ findsofficepath \
+))
+
+$(eval $(call gb_Library_use_externals,urelibs,\
+ libxml2 \
+))
+
+$(eval $(call gb_Library_add_libs,urelibs,\
+ $(if $(filter $(OS),LINUX), \
+ -ldl \
+ -lpthread \
+ ) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/Repository.mk b/Repository.mk
index b45782c8e35c..bb73ddc8d72e 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -442,6 +442,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
sunpro5_uno \
unoidl \
unsafe_uno \
+ urelibs \
xmlreader \
))
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index be634fddb2ae..24f1b4d44ff4 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -240,6 +240,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
ifeq ($(MERGELIBS),TRUE)
$(eval $(call gb_Module_add_targets,libreoffice,\
Library_merged \
+ Library_urelibs \
))
endif
diff --git a/config_host.mk.in b/config_host.mk.in
index 5556e31ca976..ec1542a57fac 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -528,6 +528,7 @@ export TYPO_EXTENSION_PACK=@TYPO_EXTENSION_PACK@
export UNIXWRAPPERNAME=@UNIXWRAPPERNAME@
export UNOWINREG_DLL=@UNOWINREG_DLL@
export UPD=@UPD@
+export URELIBS=@URELIBS@
export USE_FT_EMBOLDEN=@USE_FT_EMBOLDEN@
export USE_XINERAMA=@USE_XINERAMA@
export use_shl_version=@use_shl_version@
diff --git a/configure.ac b/configure.ac
index 1274a520c472..512db8012811 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11642,6 +11642,7 @@ else
AC_MSG_RESULT([no])
fi
AC_SUBST(MERGELIBS)
+AC_SUBST([URELIBS])
# ===================================================================
# Create hardlinks on deliver instead of copying for smaller size and speed up
diff --git a/desktop/Pagein_common.mk b/desktop/Pagein_common.mk
index e320d1b70686..f13ac72675a9 100644
--- a/desktop/Pagein_common.mk
+++ b/desktop/Pagein_common.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Pagein_Pagein,common))
# sorted in approx. reverse load order (ld.so.1)
$(eval $(call gb_Pagein_add_objects,common,\
$(if $(MERGELIBS),merged) \
+ $(if $(URELIBS),urelibs) \
i18nlangtag \
$(if $(findstring YES,$(SYSTEM_ICU)),,\
icui18n \
diff --git a/scp2/InstallModule_ure.mk b/scp2/InstallModule_ure.mk
index 4a5d9cdd56b4..f98581695375 100644
--- a/scp2/InstallModule_ure.mk
+++ b/scp2/InstallModule_ure.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_InstallModule_InstallModule,scp2/ure))
$(eval $(call gb_InstallModule_define_if_set,scp2/ure,\
SYSTEM_LIBXML \
+ URELIBS \
))
$(eval $(call gb_InstallModule_define_value_if_set,scp2/ure,\
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 9c9ce858339c..5e6d681512a3 100755
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -291,7 +291,14 @@ File gid_File_Dl_Xmlreader
Styles = (PACKED);
End
-
+#ifdef URELIBS
+File gid_File_Dl_Urelibs
+ LIB_FILE_BODY;
+ Dir = SCP2_URE_DL_DIR;
+ Name = SCP2_URE_DL_NORMAL("urelibs");
+ Styles = (PACKED);
+End
+#endif
#ifdef AIX
Unixlink gid_Unixlink_File_Dl_Store
@@ -1007,6 +1014,9 @@ Module gid_Module_Root_Ure_Hidden
gid_Unixlink_File_Dl_Store,
gid_File_Dl_Unoidl,
gid_File_Dl_Xmlreader,
+#ifdef URELIBS
+ gid_File_Dl_Urelibs,
+#endif
gid_File_Dl_Jvmaccess,
gid_Unixlink_File_Dl_Jvmaccess,
gid_File_Dl_Jvmfwk,
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index a6d15a6f42fc..8db3cf04adc4 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -116,7 +116,7 @@ endef
# gb_Library__get_final_target has been invented for that purpose...
define gb_Library_set_componentfile
$(call gb_Library_get_target,$(gb_Library__get_name)) : \
- COMPONENT := $$(if $$(and $$(COMPONENT),$(filter-out $(gb_MERGEDLIBS),$(1))),\
+ COMPONENT := $$(if $$(and $$(COMPONENT),$(filter-out $(gb_MERGEDLIBS) $(gb_URELIBS),$(1))),\
$$(call gb_Output_error,$(1) already has a component file $$(COMPONENT)))$(2)
$(call gb_ComponentTarget_ComponentTarget,$(2),\
$(call gb_Library__get_componentprefix,$(gb_Library__get_name)),\
@@ -129,7 +129,7 @@ $(call gb_Library_get_clean_target,$(gb_Library__get_name)) : \
$(call gb_ComponentTarget_get_clean_target,$(2))
endef
-gb_Library__get_name = $(if $(filter $(1),$(gb_MERGEDLIBS)),merged,$(1))
+gb_Library__get_name = $(if $(filter $(1),$(gb_MERGEDLIBS)),merged,$(if $(filter $(1),$(gb_URELIBS)),urelibs,$(1)))
gb_Library__get_componentprefix = \
$(call gb_Library__get_layer_componentprefix,$(call \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index ec5631d680b8..811f2982b63d 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -442,10 +442,8 @@ mv $${TEMPFILE} $(call gb_LinkTarget_get_objects_list,$(2))
endef
-# If object files from this library are merged, create just empty file
$(call gb_LinkTarget_get_target,%) : $(call gb_LinkTarget_get_headers_target,%) $(gb_Helper_MISCDUMMY)
- $(if $(filter $*,$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_linktargetname,$(lib)))), \
- echo > $@, $(call gb_LinkTarget__command,$@,$*))
+ $(call gb_LinkTarget__command,$@,$*)
$(call gb_LinkTarget__command_objectlist,$@,$*)
ifeq ($(gb_FULLDEPS),$(true))
@@ -824,8 +822,8 @@ define gb_LinkTarget__use_libraries
# used by bin/module-deps.pl
ifneq ($(ENABLE_PRINT_DEPS),)
-# exclude libraries in Library_merged
-ifeq ($(filter $(1),$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_linktargetname,$(lib)))),)
+# exclude libraries in Library_merged Librery_urelibs
+ifeq ($(filter $(1),$(foreach lib,$(gb_MERGEDLIBS) $(gb_URELIBS),$(call gb_Library_get_linktargetname,$(lib)))),)
$$(eval $$(call gb_PrintDeps_info,$(4),$(3)))
endif
endif
@@ -838,18 +836,31 @@ $(call gb_LinkTarget_get_external_headers_target,$(1)) : \
endef
+define gb_Linktarget__is_build_tool
+$(if $(filter $(1),$(addprefix Executable/,cppumaker idlc regcompare regmerge)),$(true),$(false))
+endef
+
define gb_LinkTarget_use_libraries
ifneq (,$$(filter-out $(gb_Library_KNOWNLIBS),$(2)))
$$(eval $$(call gb_Output_info,currently known libraries are: $(sort $(gb_Library_KNOWNLIBS)),ALL))
$$(eval $$(call gb_Output_error,Cannot link against library/libraries $$(filter-out $(gb_Library_KNOWNLIBS),$(2)). Libraries must be registered in Repository.mk))
endif
+ifeq ($(call gb_Linktarget__is_build_tool,$(1)),$(true))
+$(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_linktargetname,$(lib)))),, merged)) \
- $(filter-out $(gb_MERGEDLIBS),$(2)) \
+ $(if $(filter $(1),$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_linktargetname,$(lib)))), \
+ $(filter $(gb_MERGEDLIBS),$(2)), merged)) \
+ $(if $(filter $(gb_URELIBS),$(2)), \
+ $(if $(filter $(1),$(foreach lib,$(gb_URELIBS),$(call gb_Library_get_linktargetname,$(lib)))), \
+ $(filter $(gb_URELIBS),$(2)), urelibs)) \
+ $(filter-out $(gb_MERGEDLIBS) $(gb_URELIBS),$(2)) \
),$(4))
+endif
endef
define gb_LinkTarget_add_linked_static_libs
diff --git a/solenv/gbuild/Pagein.mk b/solenv/gbuild/Pagein.mk
index 10ba33ead22b..455e93ca70aa 100644
--- a/solenv/gbuild/Pagein.mk
+++ b/solenv/gbuild/Pagein.mk
@@ -66,7 +66,7 @@ $(call gb_Pagein_get_outdir_target,$(1)) :| $(dir $(call gb_Pagein_get_outdir_ta
endef
define gb_Pagein_add_object
-$(call gb_Pagein_get_target,$(1)) : OBJECTS += $(filter-out $(gb_MERGEDLIBS),$(2))
+$(call gb_Pagein_get_target,$(1)) : OBJECTS += $(filter-out $(gb_URELIBS) $(gb_MERGEDLIBS),$(2))
endef
diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index 194c93ce25af..28558fb1f531 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -143,6 +143,21 @@ gb_MERGEDLIBS := \
xo \
xstor \
+ifneq (,$(URELIBS))
+gb_URELIBS := \
+ cppu \
+ cppuhelper \
+ $(if $(filter TRUE,$(SOLAR_JAVA)),jvmaccess) \
+ $(if $(filter TRUE,$(SOLAR_JAVA)),jvmfwk) \
+ reg \
+ sal \
+ salhelper \
+ store \
+ unoidl \
+ xmlreader \
+
+endif
+
endif
# vim: set noet sw=4 ts=4: