Bump for 3.6-28
[LibreOffice.git] / solenv / gbuild / Pyuno.mk
blob9ad8b3622afd10fae21ff7de89f0a39ea057f337
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License or as specified alternatively below. You may obtain a copy of
7 # the License at http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # Major Contributor(s):
15 # Copyright (C) 2011 Red Hat, Inc., David Tardon <dtardon@redhat.com>
16 # (initial developer)
18 # All Rights Reserved.
20 # For minor contributions see the git repository.
22 # Alternatively, the contents of this file may be used under the terms of
23 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 # instead of those above.
28 $(call gb_Pyuno_get_target,%) :
29 $(call gb_Output_announce,$*,$(true),PYU,3)
30 mkdir -p $(dir $@) && touch $@
32 .PHONY : $(call gb_Pyuno_get_clean_target,%)
33 $(call gb_Pyuno_get_clean_target,%) :
34 $(call gb_Output_announce,$*,$(false),PYU,3)
35 rm -f $(call gb_Pyuno_get_target,$*) $(call gb_Pyuno_get_outdir_target,$*)
37 define gb_Pyuno_Pyuno
38 $(call gb_Zip_Zip,Pyuno/$(1),$(2))
39 $$(eval $$(call gb_Module_register_target,$(call gb_Pyuno_get_target,$(1)),$(call gb_Pyuno_get_clean_target,$(1))))
40 $(call gb_Pyuno_get_target,$(1)) : $(call gb_Pyuno_get_outdir_target,$(1))
41 $(call gb_Pyuno_get_outdir_target,$(1)) : $(call gb_Zip_get_target,Pyuno/$(1))
42 $(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,Pyuno/$(1))
44 endef
46 define gb_Pyuno_add_file
47 $(call gb_Zip_add_file,Pyuno/$(1),$(2))
49 endef
51 define gb_Pyuno_add_files
52 $(foreach file,$(2),$(call gb_Pyuno_add_file,$(1),$(file)))
54 endef
56 gb_Pyuno__COMPONENTPREFIX := vnd.openoffice.pymodule:
58 define gb_Pyuno_set_componentfile_full
59 $(call gb_ComponentTarget_ComponentTarget,$(2),$(3),$(4))
60 $(call gb_Pyuno_get_target,$(1)) : $(call gb_ComponentTarget_get_outdir_target,$(2))
61 $(call gb_Pyuno_get_clean_target,$(1)) : $(call gb_ComponentTarget_get_clean_target,$(2))
63 endef
65 define gb_Pyuno_set_componentfile
66 $(call gb_Pyuno_set_componentfile_full,$(1),$(2),$(gb_Pyuno__COMPONENTPREFIX),$(1))
68 endef
70 # vim:set shiftwidth=4 tabstop=4 noexpandtab: