[Libreoffice-commits] .: solenv/gbuild

Michael Stahl mst at kemper.freedesktop.org
Thu Jun 7 05:09:37 PDT 2012


 solenv/gbuild/InstallModule.mk  |    2 +-
 solenv/gbuild/InternalUnoApi.mk |    6 +++++-
 solenv/gbuild/Package.mk        |   11 ++++++++---
 solenv/gbuild/UnoApi.mk         |    4 ++--
 4 files changed, 16 insertions(+), 7 deletions(-)

New commits:
commit 31a353719851b08664b7f13ca59f39a993e66ba6
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jun 7 14:04:06 2012 +0200

    gbuild: introduce gb_Package_Package_internal:
    
    The gb_InternalUnoApi_set_xmlfile function creates a new package, which
    registers at the current Module, overwriting the InternalUnoApi targets set
    there and causing make clean not to clean the InternalUnoApi.
    
    Change-Id: I46e9b4437788a479701187334325fe1e065e612c

diff --git a/solenv/gbuild/InstallModule.mk b/solenv/gbuild/InstallModule.mk
index c04e151..f1b9dbe 100644
--- a/solenv/gbuild/InstallModule.mk
+++ b/solenv/gbuild/InstallModule.mk
@@ -40,7 +40,7 @@ $(call gb_InstallModule_get_clean_target,%) :
 
 define gb_InstallModule_InstallModule
 $(call gb_InstallModuleTarget_InstallModuleTarget,$(1))
-$(call gb_Package_Package,$(1)_par,$(call gb_InstallModuleTarget_get_workdir,$(1)))
+$(call gb_Package_Package_internal,$(1)_par,$(call gb_InstallModuleTarget_get_workdir,$(1)))
 
 $(call gb_InstallModule_get_target,$(1)) : $(call gb_InstallModuleTarget_get_target,$(1))
 $(call gb_InstallModule_get_target,$(1)) : $(call gb_Package_get_target,$(1)_par)
diff --git a/solenv/gbuild/InternalUnoApi.mk b/solenv/gbuild/InternalUnoApi.mk
index f5c2aa2..a32984f 100644
--- a/solenv/gbuild/InternalUnoApi.mk
+++ b/solenv/gbuild/InternalUnoApi.mk
@@ -113,8 +113,12 @@ endef
 
 define gb_InternalUnoApi_set_xmlfile
 $(call gb_UnoApiTarget_set_xmlfile,$(1)_out,$(2))
-$(call gb_Package_Package,$(1)_xml,$(SRCDIR))
+$(call gb_Package_Package_internal,$(1)_xml,$(SRCDIR))
 $(call gb_Package_add_file,$(1)_xml,xml/$(notdir $(2)),$(2))
+$(call gb_InternalUnoApi_get_target,$(1)) :| \
+	$(call gb_Package_get_target,$(1)_xml)
+$(call gb_InternalUnoApi_get_clean_target,$(1)) : \
+	$(call gb_Package_get_clean_target,$(1)_xml)
 
 endef
 
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 02d447c..e1d199e 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -67,15 +67,20 @@ $(call gb_Package_get_target,%) :
 	$(call gb_Output_announce,$*,$(true),PKG,2)
 	mkdir -p $(dir $@) && touch $@
 
-
-define gb_Package_Package
+# for other targets that want to create Packages, does not register at Module
+define gb_Package_Package_internal
 gb_Package_SOURCEDIR_$(1) := $(2)
 $(call gb_Package_get_clean_target,$(1)) : FILES := $(call gb_Package_get_target,$(1)) $(call gb_Package_get_preparation_target,$(1))
-$$(eval $$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1))))
 $(call gb_Package_get_target,$(1)) : $(call gb_Package_get_preparation_target,$(1))
 
 endef
 
+define gb_Package_Package
+$(call gb_Package_Package_internal,$(1),$(2))
+$$(eval $$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1))))
+
+endef
+
 define gb_Package_add_file
 $(call gb_Package_get_target,$(1)) : $(OUTDIR)/$(2)
 $(call gb_Package_get_clean_target,$(1)) : FILES += $(OUTDIR)/$(2)
diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 6455999..3619e9a 100644
--- a/solenv/gbuild/UnoApi.mk
+++ b/solenv/gbuild/UnoApi.mk
@@ -33,8 +33,8 @@ $(call gb_UnoApi_get_clean_target,%) :
 define gb_UnoApi_UnoApi
 $(call gb_UnoApiTarget_UnoApiTarget,$(1))
 $(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget,$(1))
-$(call gb_Package_Package,$(1)_idl,$(SRCDIR))
-$(call gb_Package_Package,$(1)_inc,$(call gb_UnoApiHeadersTarget_get_dir,$(1)))
+$(call gb_Package_Package_internal,$(1)_idl,$(SRCDIR))
+$(call gb_Package_Package_internal,$(1)_inc,$(call gb_UnoApiHeadersTarget_get_dir,$(1)))
 
 $(call gb_UnoApiTarget_set_root,$(1),UCR)
 


More information about the Libreoffice-commits mailing list