summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-12-05 13:04:05 +0000
committerMichael Meeks <michael.meeks@suse.com>2011-12-05 20:53:24 +0000
commit41b8bad143c06bc5419783b9f3cf5685aa3eea63 (patch)
tree440af2f411acfd9bbf43c6d3f33da0a94ae3b4d0 /solenv
parentfb7f82382bd317dd12913a6d7a3a5e4be6a6671c (diff)
wizards: completely work python wizard packaging and registration
Also improve exception handling and error printing in pythonloader Allow registration of explicit .py components - the only method that works
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/Pyuno.mk28
-rw-r--r--solenv/gbuild/TargetLocations.mk1
2 files changed, 24 insertions, 5 deletions
diff --git a/solenv/gbuild/Pyuno.mk b/solenv/gbuild/Pyuno.mk
index b8eb04ec39ba..57c55714e173 100644
--- a/solenv/gbuild/Pyuno.mk
+++ b/solenv/gbuild/Pyuno.mk
@@ -23,26 +23,39 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
+gb_Pyuno_ZIPCOMMAND := zip $(if $(findstring s,$(MAKEFLAGS)),-q)
gb_Pyuno__get_outdir_path = $(patsubst $(OUTDIR)/%,%,$(gb_Helper_OUTDIRLIBDIR))/pyuno/$(1)
$(call gb_Pyuno_get_target,%) :
$(call gb_Output_announce,$*,$(true),PYU,3)
mkdir -p $(dir $@) && touch $@
+$(call gb_Pyuno_get_target_zip,%) : $(call gb_Package_get_target,%_pyuno)
+ $(call gb_Output_announce,$*,$(true),PYZIP,3)
+ cd $(gb_Helper_OUTDIRLIBDIR)/pyuno && \
+ $(gb_Pyuno_ZIPCOMMAND) -rX --filesync \
+ $(call gb_Pyuno_get_target_zip,$*) \
+ $(PYZFILES)
+
.PHONY : $(call gb_Pyuno_get_clean_target,%)
$(call gb_Pyuno_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),PYU,3)
- rm -f $@
+ rm -f $@ $(gb_Pyuno_get_target_zip,$*)
define gb_Pyuno_Pyuno
+$(call gb_Pyuno_get_target_zip,$(1)) : PYZFILES :=
$(call gb_Package_Package,$(1)_pyuno,$(2))
$$(eval $$(call gb_Module_register_target,$(call gb_Pyuno_get_target,$(1)),$(call gb_Pyuno_get_clean_target,$(1))))
-$(call gb_Pyuno_get_target,$(1)) : $(call gb_Package_get_target,$(1)_pyuno)
-$(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_pyuno)
+$(call gb_Pyuno_get_target,$(1)) : \
+ $(call gb_Package_get_target,$(1)_pyuno) \
+ $(call gb_Pyuno_get_target_zip,$(1))
+$(call gb_Pyuno_get_clean_target,$(1)) : \
+ $(call gb_Package_get_clean_target,$(1)_pyuno)
endef
define gb_Pyuno_add_file
+$(call gb_Pyuno_get_target_zip,$(1)) : PYZFILES += $(2)
$(call gb_Package_add_file,$(1)_pyuno,$(call gb_Pyuno__get_outdir_path,$(2)),$(2))
endef
@@ -54,11 +67,16 @@ endef
gb_Pyuno__COMPONENTPREFIX := vnd.openoffice.pymodule:
-define gb_Pyuno_set_componentfile
-$(call gb_ComponentTarget_ComponentTarget,$(2),$(gb_Pyuno__COMPONENTPREFIX),$(1))
+define gb_Pyuno_set_componentfile_full
+$(call gb_ComponentTarget_ComponentTarget,$(2),$(3),$(4))
$(call gb_Pyuno_get_target,$(1)) : $(call gb_ComponentTarget_get_outdir_target,$(2))
$(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_ComponentTarget_get_clean_target,$(2))
endef
+define gb_Pyuno_set_componentfile
+$(call gb_Pyuno_set_componentfile_full,$(1),$(2),$(gb_Pyuno__COMPONENTPREFIX),$(1))
+
+endef
+
# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 20af9ebdc61c..d51b8eda539f 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -104,6 +104,7 @@ gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o
gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
gb_Package_get_target = $(WORKDIR)/Package/$(1)
gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1)
+gb_Pyuno_get_target_zip = $(OUTDIR)/bin/$(1).zip
gb_RdbTarget_get_target = $(WORKDIR)/RdbTarget/$(1).rdb
gb_ResTarget_get_imagelist_target = $(WORKDIR)/ResTarget/$(1).ilst
gb_ResTarget_get_target = $(WORKDIR)/ResTarget/$(1).res