summaryrefslogtreecommitdiff
path: root/solenv/gbuild/Pyuno.mk
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-04-11 16:20:36 +0200
committerDavid Tardon <dtardon@redhat.com>2013-04-13 09:26:17 +0200
commitd01478a87aaf7c61d6be5d6eae9812c218497239 (patch)
tree2f3e9d42b875c0c34418d7aac957371bdbb18ff5 /solenv/gbuild/Pyuno.mk
parent47f9150848d0829fc2cf257ccb48a0ced9d28bec (diff)
install Pyuno using Package
Change-Id: Iabc029091096c82ff2dc79f0fad8f2bf9ee89514
Diffstat (limited to 'solenv/gbuild/Pyuno.mk')
-rw-r--r--solenv/gbuild/Pyuno.mk29
1 files changed, 19 insertions, 10 deletions
diff --git a/solenv/gbuild/Pyuno.mk b/solenv/gbuild/Pyuno.mk
index 3384eed85d16..6ec1d498c446 100644
--- a/solenv/gbuild/Pyuno.mk
+++ b/solenv/gbuild/Pyuno.mk
@@ -25,34 +25,43 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
+$(dir $(call gb_Pyuno_get_target,%)).dir :
+ $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(dir $(call gb_Pyuno_get_target,%))%/.dir :
+ $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
$(call gb_Pyuno_get_target,%) :
$(call gb_Output_announce,$*,$(true),PYU,3)
- mkdir -p $(dir $@) && touch $@
+ touch $@
.PHONY : $(call gb_Pyuno_get_clean_target,%)
$(call gb_Pyuno_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),PYU,3)
- rm -f $(call gb_Pyuno_get_target,$*) $(call gb_Pyuno_get_outdir_target,$*)
+ rm -f $(call gb_Pyuno_get_target,$*)
+
+gb_Pyuno_get_packagename = Pyuno/$(1)
define gb_Pyuno_Pyuno
-$(call gb_Zip_Zip_internal_nodeliver,Pyuno/$(1),$(2))
+$(call gb_Package_Package_internal,$(call gb_Pyuno_get_packagename,$(1)),$(2))
+$(call gb_Package_set_outdir,$(call gb_Pyuno_get_packagename,$(1)),$(INSTDIR))
+
+$(call gb_Pyuno_get_target,$(1)) : $(call gb_Package_get_target,$(call gb_Pyuno_get_packagename,$(1)))
+$(call gb_Pyuno_get_target,$(1)) :| $(dir $(call gb_Pyuno_get_target,$(1))).dir
+$(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(call gb_Pyuno_get_packagename,$(1)))
+
$$(eval $$(call gb_Module_register_target,$(call gb_Pyuno_get_target,$(1)),$(call gb_Pyuno_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),Pyuno)
-$(call gb_Deliver_add_deliverable,$(call gb_Pyuno_get_outdir_target,$(1)),$(call gb_Zip_get_target,Pyuno/$(1)),$(1))
-$(call gb_Pyuno_get_target,$(1)) : $(call gb_Pyuno_get_outdir_target,$(1))
-$(call gb_Pyuno_get_outdir_target,$(1)) : $(call gb_Zip_get_target,Pyuno/$(1))
-$(call gb_Pyuno_get_outdir_target,$(1)) :| $(dir $(call gb_Pyuno_get_outdir_target,$(1))).dir
-$(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,Pyuno/$(1))
endef
define gb_Pyuno_add_file
-$(call gb_Zip_add_file,Pyuno/$(1),$(2))
+$(call gb_Package_add_file,$(call gb_Pyuno_get_packagename,$(1)),$(gb_Pyuno_PROGRAMDIRNAME)/$(2),$(3))
endef
define gb_Pyuno_add_files
-$(foreach file,$(2),$(call gb_Pyuno_add_file,$(1),$(file)))
+$(foreach file,$(3),$(call gb_Pyuno_add_file,$(1),$(if $(strip $(2)),$(strip $(2))/)$(file),$(file)))
endef