1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# AutoInstallLibs class
$(dir $(call gb_AutoInstallLibs_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
$(call gb_AutoInstallLibs_get_target,%) : $(SRCDIR)/Repository.mk $(GBUILDDIR)/AutoInstallLibs.mk
$(call gb_Output_announce,$*,$(true),AIN,3)
echo "/* autogenerated installs for group $* */" > $@
echo "#define auto_$*_ALL \ " >> $@
$(foreach lib,$(gb_Library_MODULE_$*),\
echo " auto_$*_lib_$(lib), \ " >> $@;)
$(foreach exe,$(gb_Executable_MODULE_$*),\
echo " auto_$*_exe_$(exe), \ " >> $@;)
echo "" >> $@
$(foreach lib,$(gb_Library_MODULE_$*),\
echo "$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib)))" >> $@;)
$(foreach exe,$(gb_Executable_MODULE_$*),\
echo "$(SCP2EXETEMPLATE)(auto_$*_exe_$(exe),$(exe)$(gb_Executable_EXT))" >> $@;)
$(call gb_AutoInstallLibs_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),AIL,3)
rm -f $(call gb_AutoInstallLibs_get_target,$*)
define gb_AutoInstallLibs_AutoInstallLibs
$(call gb_AutoInstallLibs_get_target,all) :| $(dir $(call gb_AutoInstallLibs_get_target,all)).dir
$$(eval $$(call gb_Module_register_target,$(call gb_AutoInstallLibs_get_target,all),$(call gb_AutoInstallLibs_get_clean_target,all)))
$(call gb_Helper_make_userfriendly_targets,all,AutoInstallLibs)
endef
# gb_AutoInstallLibs_add_module module lib_template optional:exe_template
define gb_AutoInstallLibs_add_module
$(call gb_AutoInstallLibs_get_target,all) : $(call gb_AutoInstallLibs_get_target,$(1))
$(call gb_AutoInstallLibs_get_clean_target,all) : $(call gb_AutoInstallLibs_get_clean_target,$(1))
$(call gb_Helper_make_userfriendly_targets,$(1),AutoInstallLibs)
$(call gb_AutoInstallLibs_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE)
$(call gb_AutoInstallLibs_get_target,$(1)) :| $(dir $(call gb_AutoInstallLibs_get_target,$(1))).dir
$(call gb_AutoInstallLibs_get_target,$(1)) : SCP2LIBTEMPLATE := $(2)
$(call gb_AutoInstallLibs_get_target,$(1)) : SCP2EXETEMPLATE := $(3)
endef
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
|