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/.
12 $(dir $(call gb_AutoInstall_get_target
,%)).
dir :
13 $(if
$(wildcard $(dir $@
)),,mkdir
-p
$(dir $@
))
15 $(call gb_AutoInstall_get_target
,%) : $(GBUILDDIR
)/AutoInstall.mk \
16 $(SRCDIR
)/Repository.mk
$(SRCDIR
)/RepositoryExternal.mk \
17 $(BUILDDIR
)/config_host.mk \
18 $(GBUILDDIR
)/gen-autoinstall.py \
19 $(call gb_ExternalExecutable_get_dependencies
,python
)
20 $(call gb_Output_announce
,$*,$(true
),AIN
,3)
21 $(call gb_Trace_StartRange
,$*,AIN
)
22 SDKLIBFILE
=$(call gb_var2file
,$(shell $(gb_MKTEMP
)),\
23 $(foreach lib
,$(gb_SdkLinkLibrary_MODULE_
$*),\
25 $(notdir $(call gb_Library_get_sdk_link_lib
,$(lib
))) \
26 ..
/..
/program
/$(call gb_Library_get_runtime_filename
,$(lib
)))) \
27 && LIBFILE
=$(call gb_var2file
,$(shell $(gb_MKTEMP
)),\
28 $(foreach lib
,$(gb_Library_MODULE_
$*),\
30 $(call gb_Library_get_runtime_filename
,$(lib
)))) \
31 && EXEFILE
=$(call gb_var2file
,$(shell $(gb_MKTEMP
)),\
32 $(foreach exe
,$(gb_Executable_MODULE_
$*),\
34 $(call gb_Executable_get_filename
,$(exe
)))) \
35 && JARFILE
=$(call gb_var2file
,$(shell $(gb_MKTEMP
)),$(gb_Jar_MODULE_
$*)) \
36 && PKGFILE
=$(call gb_var2file
,$(shell $(gb_MKTEMP
)),$(gb_Package_MODULE_
$*)) \
37 && $(call gb_ExternalExecutable_get_command
,python
) \
38 $(GBUILDDIR
)/gen-autoinstall.py \
39 '$*' '$(SCP2COMPONENTCONDITION)' \
40 '$(SCP2LIBTEMPLATE)' '$(SCP2EXETEMPLATE)' '$(SCP2JARTEMPLATE)' \
41 '$(SCP2PKGTEMPLATE)' \
42 $${SDKLIBFILE} $${LIBFILE} $${EXEFILE} $${JARFILE} $${PKGFILE} \
44 && rm -f
$${SDKLIBFILE} $${LIBFILE} $${EXEFILE} $${JARFILE} $${PKGFILE}
45 $(call gb_Trace_EndRange
,$*,AIN
)
48 $(call gb_AutoInstall_get_clean_target
,%) :
49 $(call gb_Output_announce
,$*,$(false
),AIL
,3)
50 rm -f
$(call gb_AutoInstall_get_target
,$*)
52 define gb_AutoInstall_AutoInstall
53 $(call gb_AutoInstall_get_target
,all) :|
$(dir $(call gb_AutoInstall_get_target
,all)).
dir
55 $$(eval
$$(call gb_Module_register_target
,$(call gb_AutoInstall_get_target
,all),$(call gb_AutoInstall_get_clean_target
,all)))
56 $(call gb_Helper_make_userfriendly_targets
,all,AutoInstall
)
60 # gb_AutoInstall_add_module module lib_template exe_template jar_template package_template componentcondition
61 define gb_AutoInstall_add_module
62 $(call gb_AutoInstall_get_target
,all) : $(call gb_AutoInstall_get_target
,$(1))
63 $(call gb_AutoInstall_get_clean_target
,all) : $(call gb_AutoInstall_get_clean_target
,$(1))
64 $(call gb_Helper_make_userfriendly_targets
,$(1),AutoInstall
)
66 $(call gb_AutoInstall_get_target
,$(1)) : $(gb_Module_CURRENTMAKEFILE
)
67 $(call gb_AutoInstall_get_target
,$(1)) :|
$(dir $(call gb_AutoInstall_get_target
,$(1))).
dir
68 $(call gb_AutoInstall_get_target
,$(1)) : SCP2LIBTEMPLATE
:= $(2)
69 $(call gb_AutoInstall_get_target
,$(1)) : SCP2EXETEMPLATE
:= $(3)
70 $(call gb_AutoInstall_get_target
,$(1)) : SCP2JARTEMPLATE
:= $(4)
71 $(call gb_AutoInstall_get_target
,$(1)) : SCP2PKGTEMPLATE
:= $(5)
72 $(call gb_AutoInstall_get_target
,$(1)) : SCP2COMPONENTCONDITION
:= $(6)
76 # vim: set shiftwidth=4 tabstop=4 noexpandtab: