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 $(call gb_Pyuno_get_final_target
,%) :
29 .PHONY
: $(call gb_Pyuno_get_clean_target
,%)
30 $(call gb_Pyuno_get_clean_target
,%) :
31 $(call gb_Output_announce
,$*,$(false
),PYU
,3)
32 rm -f
$(call gb_Pyuno_get_target
,$*) $(call gb_Pyuno_get_final_target
,$*)
34 gb_Pyuno_get_packagename
= Pyuno
/$(1)
36 # gb_Pyuno_Pyuno component
38 $(call gb_Package_Package_internal
,$(call gb_Pyuno_get_packagename
,$(1)),$(2))
40 $(call gb_Pyuno_get_final_target
,$(1)) : $(call gb_Pyuno_get_target
,$(1))
41 $(call gb_Pyuno_get_target
,$(1)) : $(call gb_Package_get_target
,$(call gb_Pyuno_get_packagename
,$(1)))
42 $(call gb_Pyuno_get_target
,$(1)) :|
$(dir $(call gb_Pyuno_get_target
,$(1))).
dir
43 $(call gb_Pyuno_get_clean_target
,$(1)) : $(call gb_Package_get_clean_target
,$(call gb_Pyuno_get_packagename
,$(1)))
45 $$(eval
$$(call gb_Module_register_target
,$(call gb_Pyuno_get_final_target
,$(1)),$(call gb_Pyuno_get_clean_target
,$(1))))
46 $(call gb_Helper_make_userfriendly_targets
,$(1),Pyuno
,$(call gb_Pyuno_get_final_target
,$(1)))
50 # gb_Pyuno_add_file component destination source
51 define gb_Pyuno_add_file
52 $(call gb_Package_add_file
,$(call gb_Pyuno_get_packagename
,$(1)),$(LIBO_LIB_PYUNO_FOLDER
)/$(2),$(3))
56 # gb_Pyuno_add_files component destdir source
57 define gb_Pyuno_add_files
58 $(foreach file
,$(3),$(call gb_Pyuno_add_file
,$(1),$(if
$(strip $(2)),$(strip $(2))/)$(file
),$(file
)))
62 gb_Pyuno__COMPONENTPREFIX
:= vnd.openoffice.pymodule
:
64 define gb_Pyuno_set_componentfile_full
65 $(call gb_ComponentTarget_ComponentTarget
,$(2),$(3),$(4))
66 $(call gb_Pyuno_get_final_target
,$(1)) : $(call gb_ComponentTarget_get_target
,$(2))
67 $(call gb_ComponentTarget_get_target
,$(2)) : $(call gb_Pyuno_get_target
,$(1))
68 $(call gb_Pyuno_get_clean_target
,$(1)) : $(call gb_ComponentTarget_get_clean_target
,$(2))
72 # Set .component file for the component.
73 define gb_Pyuno_set_componentfile
74 $(call gb_Pyuno_set_componentfile_full
,$(1),$(2),$(gb_Pyuno__COMPONENTPREFIX
),$(1))
78 # vim:set shiftwidth=4 tabstop=4 noexpandtab: