Guest User

Untitled

a guest
Apr 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. gb_Pyuno_ZIPCOMMAND := zip $(if $(findstring s,$(MAKEFLAGS)),-q)
  2. gb_Pyuno__get_outdir_path = $(patsubst $(OUTDIR)/%,%,$(gb_Helper_OUTDIRLIBDIR))/pyuno/$(1)
  3.  
  4. $(call gb_Pyuno_get_target,%) :
  5. $(call gb_Output_announce,$*,$(true),PYU,3)
  6. mkdir -p $(dir $@) && touch $@
  7.  
  8. $(call gb_Pyuno_get_target_zip,%) : $(call gb_Package_get_target,%_pyuno)
  9. cd $(gb_Helper_OUTDIRLIBDIR)/pyuno && \
  10. $(gb_Pyuno_ZIPCOMMAND) -rX --filesync \
  11. $(call gb_Pyuno_get_target_zip,$*) \
  12. $(FILES)
  13.  
  14. .PHONY : $(call gb_Pyuno_get_clean_target,%)
  15. $(call gb_Pyuno_get_clean_target,%) :
  16. $(call gb_Output_announce,$*,$(false),PYU,3)
  17. rm -f $@
  18.  
  19. define gb_Pyuno_Pyuno
  20. $(call gb_Pyuno_get_target_zip,$(1)) : FILES :=
  21. $(call gb_Package_Package,$(1)_pyuno,$(2))
  22. $$(eval $$(call gb_Module_register_target,$(call gb_Pyuno_get_target,$(1)),$(call gb_Pyuno_get_clean_target,$(1))))
  23. $(call gb_Pyuno_get_target,$(1)) : \
  24. $(call gb_Package_get_target,$(1)_pyuno) \
  25. $(call gb_Pyuno_get_target_zip,$(1))
  26. $(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_pyuno)
  27.  
  28. endef
  29.  
  30. define gb_Pyuno_add_file
  31. $(call gb_Pyuno_get_target_zip,$(1)) : FILES += $(2)
  32. $(call gb_Package_add_file,$(1)_pyuno,$(call gb_Pyuno__get_outdir_path,$(2)),$(2))
  33.  
  34. endef
  35.  
  36. define gb_Pyuno_add_files
  37. $(foreach file,$(2),$(call gb_Pyuno_add_file,$(1),$(file)))
  38.  
  39. endef
  40.  
  41. gb_Pyuno__COMPONENTPREFIX := vnd.openoffice.pymodule:
  42.  
  43. define gb_Pyuno_set_componentfile
  44. $(call gb_ComponentTarget_ComponentTarget,$(2),$(gb_Pyuno__COMPONENTPREFIX),$(1))
  45. $(call gb_Pyuno_get_target,$(1)) : $(call gb_ComponentTarget_get_outdir_target,$(2))
  46. $(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_ComponentTarget_get_clean_target,$(2))
  47.  
  48. endef
  49.  
  50. # vim:set shiftwidth=4 tabstop=4 noexpandtab:
Add Comment
Please, Sign In to add comment