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_Rdb__get_install_target
= $(INSTROOT
)/$(LIBO_ETC_FOLDER
)/services
/$(1).rdb
12 define gb_Rdb__command
13 $(call gb_Helper_abbreviate_dirs
,\
14 RESPONSEFILE
=$(call var2file
,$(shell $(call gb_MKTEMP
)),70,\
16 $(foreach component
,$(COMPONENTS
),\
17 <filename
>$(call gb_ComponentTarget_get_target
,$(component
))</filename
>) \
19 mkdir
-p
$(dir $@
) && \
20 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
-o
$(1) \
21 $(SRCDIR
)/solenv
/bin
/packcomponents.xslt
$$RESPONSEFILE && \
25 $(call gb_Rdb_get_target
,%) :|
$(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
26 $(call gb_Output_announce
,$*,$(true
),RDB
,1)
27 $(call gb_Rdb__command
,$@
,$*,$?
,$^
)
29 .PHONY
: $(call gb_Rdb_get_clean_target
,%)
30 $(call gb_Rdb_get_clean_target
,%) :
31 $(call gb_Output_announce
,$*,$(false
),RDB
,1)
32 $(call gb_Helper_abbreviate_dirs
,\
33 rm -f
$(call gb_Rdb__get_install_target
,$*) $(call gb_Rdb_get_target
,$*))
35 define gb_Rdb__Rdb_impl
36 $(call gb_Rdb_get_target
,$(1)) : COMPONENTS
:=
37 $(call gb_Rdb_get_target
,$(1)) : $(gb_Module_CURRENTMAKEFILE
)
38 $$(eval
$$(call gb_Module_register_target
,$(2),$(call gb_Rdb_get_clean_target
,$(1))))
39 $(call gb_Helper_make_userfriendly_targets
,$(1),Rdb
,$(2))
44 $(call gb_Rdb__Rdb_impl
,$(1),$(call gb_Rdb_get_target
,$(1)))
48 # FIXME this needs some layer-like thing for the special case in URE
49 define gb_Rdb_Rdb_install
50 $(call gb_Rdb__Rdb_impl
,$(1),$(if
$(2),$(INSTROOT
)/$(2),$(call gb_Rdb__get_install_target
,$(1))))
51 $(call gb_Helper_install_final
, \
52 $(if
$(2),$(INSTROOT
)/$(2),$(call gb_Rdb__get_install_target
,$(1))), \
53 $(call gb_Rdb_get_target
,$(1)))
57 define gb_Rdb_add_component
58 $(call gb_Rdb_get_target
,$(1)) : $(call gb_ComponentTarget_get_target
,$(2))
59 $(call gb_Rdb_get_target
,$(1)) : COMPONENTS
+= $(2)
63 define gb_Rdb_add_components
64 $(foreach component
,$(2),$(call gb_Rdb_add_component
,$(1),$(component
)))
68 # vim: set noet sw=4 ts=4: