bump product version to 4.1.6.2
[LibreOffice.git] / solenv / gbuild / CliUnoApi.mk
blob63ba9e75ffec3e19083ccfa4df6c11403d78f849
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/.
10 # CliUnoApiTarget class
12 gb_CliUnoApiTarget_EXT := $(gb_CliAssembly_POLICYEXT)
14 gb_CliUnoApiTarget_DEPS := $(call gb_Executable_get_runtime_dependencies,climaker)
15 gb_CliUnoApiTarget_COMMAND := $(call gb_Executable_get_command,climaker)
17 define gb_CliUnoApiTarget__command
18 $(call gb_Output_announce,$(2),$(true),CLI,4)
19 $(call gb_Helper_abbreviate_dirs,\
20 $(gb_CliUnoApiTarget_COMMAND) \
21 --out $(1) \
22 --assembly-company "LibreOffice" \
23 --assembly-description "This assembly contains metadata for the LibreOffice API." \
24 --assembly-version $(CLI_UNOAPI_VERSION) \
25 --keyfile $(CLI_UNOAPI_KEYFILE) \
26 $(foreach api,$(CLI_UNOAPI_DEPS),-X $(api)) \
27 $(foreach assembly,$(CLI_UNOAPI_ASSEMBLIES),-r $(assembly)) \
28 $(CLI_UNOAPI_API) \
30 endef
32 $(dir $(call gb_CliUnoApiTarget_get_target,%)).dir :
33 $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
35 $(dir $(call gb_CliUnoApiTarget_get_target,%))%/.dir :
36 $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
38 $(call gb_CliUnoApiTarget_get_target,%) : $(gb_CliUnoApiTarget_DEPS)
39 $(call gb_CliUnoApiTarget__command,$@,$*,$<)
41 .PHONY : $(call gb_CliUnoApiTarget_get_clean_target,%)
42 $(call gb_CliUnoApiTarget_get_clean_target,%) :
43 $(call gb_Output_announce,$*,$(false),CLI,4)
44 $(call gb_Helper_abbreviate_dirs,\
45 rm -f $(call gb_CliUnoApiTarget_get_target,$*) \
48 define gb_CliUnoApiTarget_CliUnoApiTarget
49 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_API :=
50 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_ASSEMBLIES :=
51 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_DEPS :=
52 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_KEYFILE :=
53 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_VERSION :=
55 $(call gb_CliUnoApiTarget_get_target,$(1)) :| $(dir $(call gb_CliUnoApiTarget_get_target,$(1))).dir
57 endef
59 define gb_CliUnoApiTarget_set_keyfile
60 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_KEYFILE := $(2)
61 $(call gb_CliUnoApiTarget_get_target,$(1)) : $(2)
63 endef
65 define gb_CliUnoApiTarget_set_version
66 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_VERSION := $(2)
68 endef
70 define gb_CliUnoApiTarget_wrap_api
71 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_API := $(call gb_UnoApiTarget_get_target,$(2))
72 $(call gb_CliUnoApiTarget_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(2))
74 endef
76 define gb_CliUnoApiTarget__use_api
77 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_DEPS += $(2)
78 $(call gb_CliUnoApiTarget_get_target,$(1)) : $(2)
80 endef
82 define gb_CliUnoApiTarget_use_api
83 $(foreach api,$(2),$(call gb_CliUnoApiTarget__use_api,$(1),$(call gb_UnoApiTarget_get_target,$(api))))
85 endef
87 define gb_CliUnoApiTarget_use_assembly
88 $(call gb_CliUnoApiTarget_get_target,$(1)) : CLI_UNOAPI_ASSEMBLIES += $(call gb_CliUnoApi_get_target,$(2))
89 $(call gb_CliUnoApiTarget_get_target,$(1)) : $(call gb_CliUnoApi_get_target,$(2))
91 endef
93 define gb_CliUnoApiTarget_use_assemblies
94 $(foreach assembly,$(2),$(call gb_CliUnoApiTarget_use_assembly,$(1),$(assembly)))
96 endef
98 # CliUnoApi class
100 gb_CliUnoApi_EXT := $(gb_CliUnoApiTarget_EXT)
101 gb_CliUnoApi_KEYFILE_DEFAULT := $(gb_CliAssembly_KEYFILE_DEFAULT)
103 # Create a CLI library for UNO API
105 # gb_CliUnoApi_CliUnoApi target
106 define gb_CliUnoApi_CliUnoApi
107 $(call gb_CliUnoApiTarget_CliUnoApiTarget,$(1))
108 $(call gb_CliAssembly_CliAssembly,$(1))
110 $(call gb_CliUnoApiTarget_set_keyfile,$(1),$(gb_CliUnoApi_KEYFILE_DEFAULT))
112 $(call gb_CliUnoApi_get_target,$(1)) : $(call gb_CliUnoApiTarget_get_target,$(1))
113 $(call gb_CliUnoApi_get_target,$(1)) :| $(call gb_CliAssembly_get_target,$(1))
114 $(call gb_CliUnoApi_get_target,$(1)) :| $(dir $(call gb_CliUnoApi_get_target,$(1))).dir
115 $(call gb_CliUnoApi_get_clean_target,$(1)) : $(call gb_CliUnoApiTarget_get_clean_target,$(1))
116 $(call gb_CliUnoApi_get_clean_target,$(1)) : $(call gb_CliAssembly_get_clean_target,$(1))
118 $(call gb_Deliver_add_deliverable,$(call gb_CliUnoApi_get_target,$(1)),$(call gb_CliUnoApiTarget_get_target,$(1)),$(1))
120 $$(eval $$(call gb_Module_register_target,$(call gb_CliUnoApiTarget_get_target,$(1)),$(call gb_CliUnoApiTarget_get_clean_target,$(1))))
121 $(call gb_Helper_make_userfriendly_targets,$(1),CliUnoApiTarget)
123 endef
125 define gb_CliUnoApi_set_configfile
126 $(call gb_CliAssembly_set_configfile,$(1),$(2))
128 endef
130 define gb_CliUnoApi_set_keyfile
131 $(call gb_CliUnoApiTarget_set_keyfile,$(1),$(2))
132 $(call gb_CliAssembly_set_keyfile,$(1),$(2))
134 endef
136 define gb_CliUnoApi_set_assembly_version
137 $(call gb_CliUnoApiTarget_set_version,$(1),$(2))
139 endef
141 define gb_CliUnoApi_set_policy
142 $(call gb_CliAssembly_set_policy,$(1),$(2),$(3))
144 endef
146 define gb_CliUnoApi_wrap_api
147 $(call gb_CliUnoApiTarget_wrap_api,$(1),$(2))
149 endef
151 define gb_CliUnoApi_use_api
152 $(call gb_CliUnoApiTarget_use_api,$(1),$(2))
154 endef
156 define gb_CliUnoApi_use_assembly
157 $(call gb_CliUnoApiTarget_use_assembly,$(1),$(2))
159 endef
161 define gb_CliUnoApi_use_assemblies
162 $(call gb_CliUnoApiTarget_use_assemblies,$(1),$(2))
164 endef
166 # vim: set noet sw=4 ts=4: