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
14 # Major Contributor(s):
15 # Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
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.
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)
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))
43 $(call gb_Package_Package_internal
,$(1)_par
,$(call gb_InstallModuleTarget_get_workdir
,$(1)))
45 $(call gb_InstallModule_get_target
,$(1)) : $(call gb_InstallModuleTarget_get_target
,$(1))
46 $(call gb_InstallModule_get_target
,$(1)) : $(call gb_Package_get_target
,$(1)_par
)
47 $(call gb_InstallModule_get_target
,$(1)) :|
$(dir $(call gb_InstallModule_get_target
,$(1))).
dir
48 $(call gb_InstallModule_get_clean_target
,$(1)) : $(call gb_InstallModuleTarget_get_clean_target
,$(1))
49 $(call gb_InstallModule_get_clean_target
,$(1)) : $(call gb_Package_get_clean_target
,$(1)_par
)
51 $$(eval
$$(call gb_Module_register_target
,$(call gb_InstallModule_get_target
,$(1)),$(call gb_InstallModule_get_clean_target
,$(1))))
55 define gb_InstallModule_set_include
56 $(call gb_InstallModuleTarget_set_include
,$(1),$(2))
60 define gb_InstallModule_add_defs
61 $(call gb_InstallModuleTarget_add_defs
,$(1),$(2))
65 define gb_InstallModule_define_if_set
66 $(call gb_InstallModuleTarget_define_if_set
,$(1),$(2))
70 define gb_InstallModule_define_value_if_set
71 $(call gb_InstallModuleTarget_define_value_if_set
,$(1),$(2))
75 define gb_InstallModule_define_mingw_dll_if_set
76 $(call gb_InstallModuleTarget_define_mingw_dll_if_set
,$(1),$(2))
80 define gb_InstallModule_use_package
81 $(call gb_InstallModuleTarget_use_package
,$(1),$(2))
85 define gb_InstallModule_use_packages
86 $(call gb_InstallModuleTarget_use_packages
,$(1),$(2))
90 define gb_InstallModule__add_scpfile_impl
91 $(call gb_Package_add_file
,$(1)_par
,par
/osl
/$(notdir $(2)),$(2))
95 define gb_InstallModule__add_scpfile
96 $(call gb_InstallModule__add_scpfile_impl
,$(1),$(dir $(2))$(notdir $(call gb_ScpTarget_get_target
,$(2))))
100 define gb_InstallModule__add_scpfiles
101 $(foreach scpfile
,$(2),$(call gb_InstallModule__add_scpfile
,$(1),$(scpfile
)))
105 define gb_InstallModule_add_scpfile
106 $(call gb_InstallModuleTarget_add_scpfile
,$(1),$(2))
107 $(call gb_InstallModule__add_scpfile
,$(1),$(2))
111 define gb_InstallModule_add_scpfiles
112 $(call gb_InstallModuleTarget_add_scpfiles
,$(1),$(2))
113 $(call gb_InstallModule__add_scpfiles
,$(1),$(2))
117 define gb_InstallModule_add_localized_scpfile
118 $(call gb_InstallModuleTarget_add_localized_scpfile
,$(1),$(2))
119 $(call gb_InstallModule__add_scpfile
,$(1),$(2))
123 define gb_InstallModule_add_localized_scpfiles
124 $(call gb_InstallModuleTarget_add_localized_scpfiles
,$(1),$(2))
125 $(call gb_InstallModule__add_scpfiles
,$(1),$(2))
129 define gb_InstallModule_add_template
130 $(call gb_InstallModuleTarget_add_template
,$(1),$(2))
134 define gb_InstallModule_add_templates
135 $(call gb_InstallModuleTarget_add_templates
,$(1),$(2))
139 # vim: set shiftwidth=4 tabstop=4 noexpandtab: