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) \
20 .PHONY
: $(call gb_InternalUnoApi_get_clean_target
,%)
21 $(call gb_InternalUnoApi_get_clean_target
,%) :
22 $(call gb_Output_announce
,$*,$(false
),UNI
,5) \
23 $(call gb_Helper_abbreviate_dirs
,\
24 rm -f
$(call gb_InternalUnoApi_get_target
,$*))
26 define gb_InternalUnoApi_InternalUnoApi
27 $(call gb_UnoApiTarget_UnoApiTarget
,$(1),$(2))
28 $(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget
,$(1))
30 $(call gb_InternalUnoApi_get_target
,$(1)) : $(call gb_UnoApiTarget_get_target
,$(1))
31 $(call gb_InternalUnoApi_get_target
,$(1)) :|
$(dir $(call gb_InternalUnoApi_get_target
,$(1))).
dir
32 $(call gb_InternalUnoApi_get_clean_target
,$(1)) : $(call gb_UnoApiHeadersTarget_get_clean_target
,$(1))
34 $$(eval
$$(call gb_Module_register_target
,$(call gb_InternalUnoApi_get_target
,$(1)),$(call gb_InternalUnoApi_get_clean_target
,$(1))))
35 $(call gb_Helper_make_userfriendly_targets
,$(1),InternalUnoApi
)
39 define gb_InternalUnoApi_add_idlfile
40 $(call gb_UnoApiTarget_add_idlfile
,$(1),$(2),$(3))
44 define gb_InternalUnoApi_add_idlfiles
45 $(call gb_UnoApiTarget_add_idlfiles
,$(1),$(2),$(3))
49 define gb_InternalUnoApi__use_api
50 $(call gb_UnoApiTarget_use_api
,$(1),$(2))
51 $(call gb_UnoApiHeadersTarget_use_api
,$(1),$(2))
52 $(call gb_InternalUnoApi_get_target
,$(1)) : $(call gb_UnoApiTarget_get_target
,$(2))
56 define gb_InternalUnoApi_use_api
57 $(foreach rdb
,$(2),$(call gb_InternalUnoApi__use_api
,$(1),$(rdb
)))
61 # Express that the rdb $(2) depends on rdb $(3).
63 # This information is already available in the UnoApiTarget definition
64 # for $(2), but this may not be loaded if we are building from a
65 # different module. Thus, this is a necessary hack to make generation of
66 # headers on demand work.
68 # I suppose it would be possible to store the list of required rdbs for
69 # a rdb to a file and then load it when headers' generation is requested,
70 # but it feels like overkill...
71 define gb_InternalUnoApi_define_api_dependency
72 $(call gb_UnoApiHeadersTarget_use_api
,$(2),$(3))
76 define gb_InternalUnoApi_define_api_dependencies
77 $(foreach dep
,$(3),$(call gb_InternalUnoApi_define_api_dependency
,$(1),$(2),$(dep
)))
81 # vim: set noet sw=4 ts=4: