Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / solenv / gbuild / InstallModule.mk
blobcb37a49625c44de872a6701ff8ee976aa790c68b
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) 2012 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 # InstallModule class
30 $(dir $(call gb_InstallModule_get_target,%))%/.dir :
31 $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
33 $(call gb_InstallModule_get_target,%) :
34 $(call gb_Output_announce,$*,$(true),IMO,3)
35 touch $@
37 $(call gb_InstallModule_get_clean_target,%) :
38 $(call gb_Output_announce,$*,$(false),IMO,3)
39 rm -f $(call gb_InstallModule_get_target,$*)
41 define gb_InstallModule_InstallModule
42 $(call gb_InstallModuleTarget_InstallModuleTarget,$(1))
44 $(call gb_InstallModule_get_target,$(1)) : $(call gb_InstallModuleTarget_get_target,$(1))
45 $(call gb_InstallModule_get_target,$(1)) :| $(dir $(call gb_InstallModule_get_target,$(1))).dir
46 $(call gb_InstallModule_get_clean_target,$(1)) : $(call gb_InstallModuleTarget_get_clean_target,$(1))
48 $$(eval $$(call gb_Module_register_target,$(call gb_InstallModule_get_target,$(1)),$(call gb_InstallModule_get_clean_target,$(1))))
50 endef
52 define gb_InstallModule_add_defs
53 $(call gb_InstallModuleTarget_add_defs,$(1),$(2))
55 endef
57 define gb_InstallModule_define_if_set
58 $(call gb_InstallModuleTarget_define_if_set,$(1),$(2))
60 endef
62 define gb_InstallModule_define_value_if_set
63 $(call gb_InstallModuleTarget_define_value_if_set,$(1),$(2))
65 endef
67 define gb_InstallModule_define_mingw_dll_if_set
68 $(call gb_InstallModuleTarget_define_mingw_dll_if_set,$(1),$(2))
70 endef
72 define gb_InstallModule_add_scpfile
73 $(call gb_InstallModuleTarget_add_scpfile,$(1),$(2))
75 endef
77 define gb_InstallModule_add_scpfiles
78 $(call gb_InstallModuleTarget_add_scpfiles,$(1),$(2))
80 endef
82 define gb_InstallModule_add_localized_scpfile
83 $(call gb_InstallModuleTarget_add_localized_scpfile,$(1),$(2))
85 endef
87 define gb_InstallModule_add_localized_scpfiles
88 $(call gb_InstallModuleTarget_add_localized_scpfiles,$(1),$(2))
90 endef
92 define gb_InstallModule_add_template
93 $(call gb_InstallModuleTarget_add_template,$(1),$(2))
95 endef
97 define gb_InstallModule_add_templates
98 $(call gb_InstallModuleTarget_add_templates,$(1),$(2))
100 endef
102 # vim: set shiftwidth=4 tabstop=4 noexpandtab: