poppler: Upgrade 24.05.0
[LibreOffice.git] / solenv / gbuild / InternalUnoApi.mk
blobdae0cb503c488145354338c29dd3f90bc5dc973c
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 $(dir $(call gb_InternalUnoApi_get_target,%)).dir :
11 $(if $(wildcard $(dir $@)),,mkdir -p $(dir $(@)))
13 $(dir $(call gb_InternalUnoApi_get_target,%))%/.dir :
14 $(if $(wildcard $(dir $@)),,mkdir -p $(dir $(@)))
16 $(call gb_InternalUnoApi_get_target,%) :
17 $(call gb_Output_announce,$*,$(true),UNI,5) \
18 $(call gb_Trace_MakeMark,$*,UNI)
19 touch $@
21 .PHONY : $(call gb_InternalUnoApi_get_clean_target,%)
22 $(call gb_InternalUnoApi_get_clean_target,%) :
23 $(call gb_Output_announce,$*,$(false),UNI,5) \
24 $(call gb_Helper_abbreviate_dirs,\
25 rm -f $(call gb_InternalUnoApi_get_target,$*))
27 define gb_InternalUnoApi_InternalUnoApi
28 $(call gb_UnoApiTarget_UnoApiTarget,$(1),$(2))
29 $(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget,$(1))
31 $(call gb_InternalUnoApi_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(1))
32 $(call gb_InternalUnoApi_get_target,$(1)) :| $(dir $(call gb_InternalUnoApi_get_target,$(1))).dir
33 $(call gb_InternalUnoApi_get_clean_target,$(1)) : $(call gb_UnoApiHeadersTarget_get_clean_target,$(1))
35 $$(eval $$(call gb_Module_register_target,$(call gb_InternalUnoApi_get_target,$(1)),$(call gb_InternalUnoApi_get_clean_target,$(1))))
36 $(call gb_Helper_make_userfriendly_targets,$(1),InternalUnoApi)
38 endef
40 define gb_InternalUnoApi_add_idlfile
41 $(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
43 endef
45 define gb_InternalUnoApi_add_idlfiles
46 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
48 endef
50 define gb_InternalUnoApi__use_api
51 $(call gb_UnoApiTarget_use_api,$(1),$(2))
52 $(call gb_UnoApiHeadersTarget_use_api,$(1),$(2))
53 $(call gb_InternalUnoApi_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(2))
55 endef
57 define gb_InternalUnoApi_use_api
58 $(foreach rdb,$(2),$(call gb_InternalUnoApi__use_api,$(1),$(rdb)))
60 endef
62 # Express that the rdb $(2) depends on rdb $(3).
64 # This information is already available in the UnoApiTarget definition
65 # for $(2), but this may not be loaded if we are building from a
66 # different module. Thus, this is a necessary hack to make generation of
67 # headers on demand work.
69 # I suppose it would be possible to store the list of required rdbs for
70 # a rdb to a file and then load it when headers' generation is requested,
71 # but it feels like overkill...
72 define gb_InternalUnoApi_define_api_dependency
73 $(call gb_UnoApiHeadersTarget_use_api,$(2),$(3))
75 endef
77 define gb_InternalUnoApi_define_api_dependencies
78 $(foreach dep,$(3),$(call gb_InternalUnoApi_define_api_dependency,$(1),$(2),$(dep)))
80 endef
82 # vim: set noet sw=4 ts=4: