1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 # Handles creation and delivery of Python UNO components.
14 # Provides one filelist, called Pyuno/<name>.
16 $(dir $(call gb_Pyuno_get_target
,%)).
dir :
17 $(if
$(wildcard $(dir $@
)),,mkdir
-p
$(dir $@
))
19 $(dir $(call gb_Pyuno_get_target
,%))%/.
dir :
20 $(if
$(wildcard $(dir $@
)),,mkdir
-p
$(dir $@
))
22 $(call gb_Pyuno_get_target
,%) :
23 $(call gb_Output_announce
,$*,$(true
),PYU
,3)
26 .PHONY
: $(call gb_Pyuno_get_clean_target
,%)
27 $(call gb_Pyuno_get_clean_target
,%) :
28 $(call gb_Output_announce
,$*,$(false
),PYU
,3)
29 rm -f
$(call gb_Pyuno_get_target
,$*)
31 gb_Pyuno_get_packagename
= Pyuno
/$(1)
33 # gb_Pyuno_Pyuno component
35 $(call gb_Package_Package_internal
,$(call gb_Pyuno_get_packagename
,$(1)),$(2))
36 $(call gb_Package_set_outdir
,$(call gb_Pyuno_get_packagename
,$(1)),$(INSTDIR
))
38 $(call gb_Pyuno_get_target
,$(1)) : $(call gb_Package_get_target
,$(call gb_Pyuno_get_packagename
,$(1)))
39 $(call gb_Pyuno_get_target
,$(1)) :|
$(dir $(call gb_Pyuno_get_target
,$(1))).
dir
40 $(call gb_Pyuno_get_clean_target
,$(1)) : $(call gb_Package_get_clean_target
,$(call gb_Pyuno_get_packagename
,$(1)))
42 $$(eval
$$(call gb_Module_register_target
,$(call gb_Pyuno_get_target
,$(1)),$(call gb_Pyuno_get_clean_target
,$(1))))
43 $(call gb_Helper_make_userfriendly_targets
,$(1),Pyuno
)
47 # gb_Pyuno_add_file component destination source
48 define gb_Pyuno_add_file
49 $(call gb_Package_add_file
,$(call gb_Pyuno_get_packagename
,$(1)),$(gb_PROGRAMDIRNAME
)/$(2),$(3))
53 # gb_Pyuno_add_files component destdir source
54 define gb_Pyuno_add_files
55 $(foreach file
,$(3),$(call gb_Pyuno_add_file
,$(1),$(if
$(strip $(2)),$(strip $(2))/)$(file
),$(file
)))
59 gb_Pyuno__COMPONENTPREFIX
:= vnd.openoffice.pymodule
:
61 define gb_Pyuno_set_componentfile_full
62 $(call gb_ComponentTarget_ComponentTarget
,$(2),$(3),$(4))
63 $(call gb_Pyuno_get_target
,$(1)) : $(call gb_ComponentTarget_get_outdir_target
,$(2))
64 $(call gb_Pyuno_get_clean_target
,$(1)) : $(call gb_ComponentTarget_get_clean_target
,$(2))
68 # Set .component file for the component.
69 define gb_Pyuno_set_componentfile
70 $(call gb_Pyuno_set_componentfile_full
,$(1),$(2),$(gb_Pyuno__COMPONENTPREFIX
),$(1))
74 # vim:set shiftwidth=4 tabstop=4 noexpandtab: