[Libreoffice-commits] .: 3 commits - Module_ooo.mk solenv/gbuild
Bjoern Michaelsen
bmichaelsen at kemper.freedesktop.org
Sat Apr 16 05:25:51 PDT 2011
Module_ooo.mk | 2 -
solenv/gbuild/LinkTarget.mk | 23 ++++++++++++
solenv/gbuild/Module.mk | 1
solenv/gbuild/extensions/final_ObjectOwner.mk | 47 ++++++++++++++++++++++++++
solenv/gbuild/gbuild.mk | 8 ++++
5 files changed, 80 insertions(+), 1 deletion(-)
New commits:
commit ee6400d227c1e1bf49b34d61b8d0befb11bca23d
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Sat Apr 16 14:25:37 2011 +0200
gb_CHECKOBJECTOWNER=T allows to check for objects linked multiple times
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 49ce493..45df7b2 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -240,6 +240,9 @@ gb_ObjCxxObject_ObjCxxObject =
# LinkTarget class
gb_LinkTarget_DEFAULTDEFS := $(gb_GLOBALDEFS)
+gb_LinkTarget_OBJECTOWNER :=
+gb_LinkTarget_OBJECTS :=
+
# defined by platform
# gb_LinkTarget_CXXFLAGS
# gb_LinkTarget_LDFLAGS
@@ -531,6 +534,11 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : COBJECTS += $(2)
$(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_CObject_get_dep_target,$(2))
endif
+ifeq ($(gb_CHECKOBJECTOWNER),$(true))
+gb_LinkTarget_OBJECTOWNER += $(call gb_CObject_get_target,$(2)):$(1)
+gb_LinkTarget_OBJECTS += $(call gb_CObject_get_target,$(2))
+endif
+
endef
define gb_LinkTarget_add_cxxobject
@@ -546,6 +554,11 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS += $(2)
$(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_CxxObject_get_dep_target,$(2))
endif
+ifeq ($(gb_CHECKOBJECTOWNER),$(true))
+gb_LinkTarget_OBJECTOWNER += $(call gb_CxxObject_get_target,$(2)):$(1)
+gb_LinkTarget_OBJECTS += $(call gb_CxxObject_get_target,$(2))
+endif
+
endef
define gb_LinkTarget_add_objcxxobject
@@ -561,6 +574,11 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : OBJCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_ObjCxxObject_get_dep_target,$(2))
endif
+ifeq ($(gb_CHECKOBJECTOWNER),$(true))
+gb_LinkTarget_OBJECTOWNER += $(call gb_ObjCxxObject_get_target,$(2)):$(1)
+gb_LinkTarget_OBJECTS += $(call gb_ObjCxxObject_get_target,$(2))
+endif
+
endef
define gb_LinkTarget_add_generated_cxx_object
@@ -576,6 +594,11 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_GenCxxObject_get_dep_target,$(2))
endif
+ifeq ($(gb_CHECKOBJECTOWNER),$(true))
+gb_LinkTarget_OBJECTOWNER += $(call gb_GenCxxObject_get_target,$(2)):$(1)
+gb_LinkTarget_OBJECTS += $(call gb_GenCxxObject_get_target,$(2))
+endif
+
endef
define gb_LinkTarget_add_noexception_object
diff --git a/solenv/gbuild/extensions/final_ObjectOwner.mk b/solenv/gbuild/extensions/final_ObjectOwner.mk
new file mode 100644
index 0000000..c00dcb8
--- /dev/null
+++ b/solenv/gbuild/extensions/final_ObjectOwner.mk
@@ -0,0 +1,47 @@
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Bjoern Michaelsen, Canonical Ltd. <bjoern.michaelsen at canonical.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+ifeq ($(gb_CHECKOBJECTOWNER),$(true))
+
+define gb_LinkTarget_check_object_owner
+ifneq (1,$$(words $$(filter $(1):%,$$(gb_LinkTarget_OBJECTOWNER))))
+$$(info \
+ $(patsubst $(WORKDIR)/%,%,$(1))\
+ is linked in by\
+ $$(patsubst $(1):%,%,$$(filter $(1):%,$$(gb_LinkTarget_OBJECTOWNER))))
+gb_CHECKOBJECTOWNER_VALID := $(false)
+endif
+endef
+
+gb_CHECKOBJECTOWNER_VALID := $(true)
+$(foreach object,$(sort $(gb_LinkTarget_OBJECTS)),$(eval $(call gb_LinkTarget_check_object_owner,$(object))))
+ifneq ($(gb_CHECKOBJECTOWNER_VALID),$(true))
+$(eval $(call gb_Output_error,duplicate linked objects))
+endif
+
+endif
+# vim: set noet ts=4 sw=4:
commit 27ab0500f47500e401cde105acc8752f7c06bcb2
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Sat Apr 16 14:17:59 2011 +0200
gbuild support for final extensions
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index eebbb1c..10bf35b 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -224,6 +224,7 @@ ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Mod
$$(eval $$(call gb_Output_error,Corrupted module target stack!3))
endif
+$$(eval $$(gb_Extensions_final_hook))
endef
# vim: set noet sw=4:
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index fb51c54..f9753de 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -279,6 +279,14 @@ ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),)
include $(wildcard $(GBUILDDIR)/extensions/post_*.mk)
endif
+define gb_Extensions_final_hook
+ifneq ($(wildcard $(GBUILDDIR)/extensions/final_*.mk),)
+include $(wildcard $(GBUILDDIR)/extensions/final_*.mk)
+endif
+
+endef
+
+
ifeq ($(SYSTEM_LIBXSLT),YES)
gb_XSLTPROCTARGET :=
gb_XSLTPROC := xsltproc
commit 4f540e9515b6ee2a0274294622dd769150f85f4a
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Sat Apr 16 14:05:12 2011 +0200
add sc to global gbuild build, remove duplicate unotools entry
diff --git a/Module_ooo.mk b/Module_ooo.mk
index 2c9c2b1..63441b7 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
lotuswordpro \
oox \
padmin \
+ sc \
sfx2 \
sot \
svl \
@@ -61,7 +62,6 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
qadevOOo \
sal \
ucb \
- unotools \
))
# vim: set noet ts=4 sw=4:
More information about the Libreoffice-commits
mailing list