[Libreoffice-commits] core.git: config_host.mk.in configure.ac desktop/Pagein_common.mk Library_urelibs.mk Repository.mk RepositoryModule_host.mk scp2/InstallModule_ure.mk scp2/source solenv/gbuild

Matúš Kukan matus.kukan at gmail.com
Wed Apr 10 13:59:24 PDT 2013


 Library_urelibs.mk                             |   32 +++++++++++++++++++++++++
 Repository.mk                                  |    1 
 RepositoryModule_host.mk                       |    1 
 config_host.mk.in                              |    1 
 configure.ac                                   |    1 
 desktop/Pagein_common.mk                       |    1 
 scp2/InstallModule_ure.mk                      |    1 
 scp2/source/ooo/ure.scp                        |   12 ++++++++-
 solenv/gbuild/Library.mk                       |    4 +--
 solenv/gbuild/LinkTarget.mk                    |   25 ++++++++++++++-----
 solenv/gbuild/Pagein.mk                        |    2 -
 solenv/gbuild/extensions/pre_MergedLibsList.mk |   15 +++++++++++
 12 files changed, 85 insertions(+), 11 deletions(-)

New commits:
commit 3fdb77f0827d374a7fa2f1e232920b6174d6b44b
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Tue Apr 9 17:34:43 2013 +0200

    add new urelibs library merging some libraries from ure/lib/
    
    There is no configure switch for this, URELIBS must be set.
    
    This commit changes strategy to link also libraries being merged.
    We need them for build tools like idlc, cppumaker, .., so the tools can
    link against them now. This avoids circular dependencies.
    
    Change-Id: Ic49e18ecbeaff84d4f5a7fafe8b1fbf45ed18c9b

diff --git a/Library_urelibs.mk b/Library_urelibs.mk
new file mode 100644
index 0000000..64089f3
--- /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 b45782c..bb73ddc 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 be634fd..24f1b4d 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 5556e31..ec1542a 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 1274a52..512db80 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 e320d1b..f13ac72 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 4a5d9cd..f985816 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 9c9ce85..5e6d681 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 a6d15a6..8db3cf0 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 ec5631d..811f298 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 10ba33e..455e93c 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 194c93c..28558fb 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:


More information about the Libreoffice-commits mailing list