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))
28 $(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget
,$(1))
30 $(call gb_UnoApiTarget_set_root
,$(1),UCR
)
32 $(call gb_InternalUnoApi_get_target
,$(1)) : $(call gb_UnoApiTarget_get_target
,$(1))
33 $(call gb_InternalUnoApi_get_target
,$(1)) :|
$(dir $(call gb_InternalUnoApi_get_target
,$(1))).
dir
34 $(call gb_InternalUnoApi_get_clean_target
,$(1)) : $(call gb_UnoApiHeadersTarget_get_clean_target
,$(1))
36 $$(eval
$$(call gb_Module_register_target
,$(call gb_InternalUnoApi_get_target
,$(1)),$(call gb_InternalUnoApi_get_clean_target
,$(1))))
37 $(call gb_Helper_make_userfriendly_targets
,$(1),InternalUnoApi
)
41 define gb_InternalUnoApi_add_idlfile
42 $(call gb_UnoApiTarget_add_idlfile
,$(1),$(2),$(3))
46 define gb_InternalUnoApi_add_idlfiles
47 $(call gb_UnoApiTarget_add_idlfiles
,$(1),$(2),$(3))
51 define gb_InternalUnoApi__use_api
52 $(call gb_UnoApiTarget_use_api
,$(1),$(2))
53 $(call gb_UnoApiHeadersTarget_use_api
,$(1),$(2))
54 $(call gb_InternalUnoApi_get_target
,$(1)) : $(call gb_UnoApiTarget_get_target
,$(2))
58 define gb_InternalUnoApi_use_api
59 $(foreach rdb
,$(2),$(call gb_InternalUnoApi__use_api
,$(1),$(rdb
)))
63 # Express that the rdb $(2) depends on rdb $(3).
65 # This information is already available in the UnoApiTarget definition
66 # for $(2), but this may not be loaded if we are building from a
67 # different module. Thus, this is a necessary hack to make generation of
68 # headers on demand work.
70 # I suppose it would be possible to store the list of required rdbs for
71 # a rdb to a file and then load it when headers' generation is requested,
72 # but it feels like overkill...
73 define gb_InternalUnoApi_define_api_dependency
74 $(call gb_UnoApiHeadersTarget_use_api
,$(2),$(3))
78 define gb_InternalUnoApi_define_api_dependencies
79 $(foreach dep
,$(3),$(call gb_InternalUnoApi_define_api_dependency
,$(1),$(2),$(dep
)))
83 define gb_InternalUnoApi_set_include
84 $(call gb_UnoApiTarget_set_include
,$(1),$(2))
88 # vim: set noet sw=4 ts=4: