Bump version to 6.4.7.2.M8
[LibreOffice.git] / solenv / gbuild / UnoApi.mk
blob5223b22ddc5fdf53ae8301bc92c714d67905c0b1
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 gb_UnoApi_ENABLE_INSTALL := $(and $(filter host,$(gb_Side)),$(filter ODK,$(BUILD_TYPE)))
12 .PHONY : $(call gb_UnoApi_get_clean_target,%)
13 $(call gb_UnoApi_get_clean_target,%) :
14 $(call gb_Helper_abbreviate_dirs,\
15 rm -f $(call gb_UnoApi_get_target,$*))
17 # call gb_UnoApi_UnoApi,api
18 define gb_UnoApi_UnoApi
19 $(call gb_UnoApiTarget_UnoApiTarget,$(1),$(1))
20 $(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget,$(1))
21 ifneq ($(gb_UnoApi_ENABLE_INSTALL),)
22 $(call gb_Package_Package_internal,$(1)_idl,$(SRCDIR))
23 $(call gb_Package_set_outdir,$(1)_idl,$(INSTDIR))
24 endif
26 $(call gb_UnoApi_get_target,$(1)) :| $(dir $(call gb_UnoApi_get_target,$(1))).dir
27 $(call gb_UnoApi_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(1))
28 $(call gb_UnoApi_get_target,$(1)) :| $(call gb_UnoApiHeadersTarget_get_target,$(1))
29 $(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_UnoApiTarget_get_clean_target,$(1))
30 $(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_UnoApiHeadersTarget_get_clean_target,$(1))
32 $(call gb_Deliver_add_deliverable,$(call gb_UnoApi_get_target,$(1)),$(call gb_UnoApiTarget_get_target,$(1)),$(1))
34 $$(eval $$(call gb_Module_register_target,UnoApi_$(1),$(call gb_UnoApi_get_target,$(1)),$(call gb_UnoApi_get_clean_target,$(1))))
35 $(call gb_Helper_make_userfriendly_targets,$(1),UnoApi)
37 endef
39 ifneq ($(gb_UnoApi_ENABLE_INSTALL),)
41 # Create a package of IDL files for putting into SDK.
43 # gb_UnoApi_package_idlfiles api
44 define gb_UnoApi_package_idlfiles
45 $(call gb_UnoApi_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_idl)
46 $(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_idl)
48 endef
50 define gb_UnoApi__add_idlfile
51 $(call gb_Package_add_file,$(1)_idl,$(patsubst $(1)/%,$(SDKDIRNAME)/idl/%,$(2).idl),$(2).idl)
53 endef
55 else # !gb_UnoApi_ENABLE_INSTALL
57 gb_UnoApi_package_idlfiles :=
58 gb_UnoApi__add_idlfile :=
60 endif
62 # For enum types, plain struct types, polymorphic struct type templates,
63 # exception types, interface types, typedefs, and constant groups:
64 define gb_UnoApi_add_idlfiles
65 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
66 $(call gb_UnoApiHeadersTarget_add_headerfiles,$(1),$(2),$(addsuffix .hpp,$(3)))
67 $(call gb_UnoApiHeadersTarget_add_headerfiles,$(1),$(2),$(addsuffix .hdl,$(3)))
68 $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(idl)))
70 endef
72 # For single-interface--based services and interface-based singletons:
73 define gb_UnoApi_add_idlfiles_nohdl
74 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
75 $(call gb_UnoApiHeadersTarget_add_headerfiles,$(1),$(2),$(addsuffix .hpp,$(3)))
76 $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(idl)))
78 endef
80 # For accumulation-based services and service-based singletons:
81 define gb_UnoApi_add_idlfiles_noheader
82 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
83 $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(idl)))
85 endef
87 define gb_UnoApi__use_api
88 $(call gb_UnoApiTarget_use_api,$(1),$(2))
89 $(call gb_UnoApiHeadersTarget_use_api,$(1),$(2))
90 $(call gb_UnoApi_get_target,$(1)) :| $(call gb_UnoApi_get_target,$(2))
92 endef
94 define gb_UnoApi_use_api
95 $(foreach rdb,$(2),$(call gb_UnoApi__use_api,$(1),$(rdb)))
97 endef
99 define gb_UnoApi_set_reference_rdbfile
100 $(call gb_UnoApiTarget_set_reference_rdbfile,$(1),$(2))
102 endef
104 # vim: set noet sw=4 ts=4: