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 SDKLIBFILE
=$(call var2file
,$(shell $(gb_MKTEMP
)),100,\
22 $(foreach lib
,$(gb_SdkLinkLibrary_MODULE_
$*),\
24 $(notdir $(call gb_Library_get_sdk_link_lib
,$(lib
))) \
25 ..
/..
/program
/$(call gb_Library_get_runtime_filename
,$(lib
)))) \
26 && LIBFILE
=$(call var2file
,$(shell $(gb_MKTEMP
)),100,\
27 $(foreach lib
,$(gb_Library_MODULE_
$*),\
29 $(call gb_Library_get_runtime_filename
,$(lib
)))) \
30 && EXEFILE
=$(call var2file
,$(shell $(gb_MKTEMP
)),100,\
31 $(foreach exe
,$(gb_Executable_MODULE_
$*),\
33 $(call gb_Executable_get_filename
,$(exe
)))) \
34 && JARFILE
=$(call var2file
,$(shell $(gb_MKTEMP
)),100,$(gb_Jar_MODULE_
$*)) \
35 && PKGFILE
=$(call var2file
,$(shell $(gb_MKTEMP
)),100,$(gb_Package_MODULE_
$*)) \
36 && $(call gb_ExternalExecutable_get_command
,python
) \
37 $(GBUILDDIR
)/gen-autoinstall.py \
38 '$*' '$(SCP2COMPONENTCONDITION)' \
39 '$(SCP2LIBTEMPLATE)' '$(SCP2EXETEMPLATE)' '$(SCP2JARTEMPLATE)' \
40 '$(SCP2PKGTEMPLATE)' \
41 $${SDKLIBFILE} $${LIBFILE} $${EXEFILE} $${JARFILE} $${PKGFILE} \
43 && rm -f
$${SDKLIBFILE} $${LIBFILE} $${EXEFILE} $${JARFILE} $${PKGFILE}
46 $(call gb_AutoInstall_get_clean_target
,%) :
47 $(call gb_Output_announce
,$*,$(false
),AIL
,3)
48 rm -f
$(call gb_AutoInstall_get_target
,$*)
50 define gb_AutoInstall_AutoInstall
51 $(call gb_AutoInstall_get_target
,all) :|
$(dir $(call gb_AutoInstall_get_target
,all)).
dir
53 $$(eval
$$(call gb_Module_register_target
,$(call gb_AutoInstall_get_target
,all),$(call gb_AutoInstall_get_clean_target
,all)))
54 $(call gb_Helper_make_userfriendly_targets
,all,AutoInstall
)
58 # gb_AutoInstall_add_module module lib_template exe_template jar_template package_template componentcondition
59 define gb_AutoInstall_add_module
60 $(call gb_AutoInstall_get_target
,all) : $(call gb_AutoInstall_get_target
,$(1))
61 $(call gb_AutoInstall_get_clean_target
,all) : $(call gb_AutoInstall_get_clean_target
,$(1))
62 $(call gb_Helper_make_userfriendly_targets
,$(1),AutoInstall
)
64 $(call gb_AutoInstall_get_target
,$(1)) : $(gb_Module_CURRENTMAKEFILE
)
65 $(call gb_AutoInstall_get_target
,$(1)) :|
$(dir $(call gb_AutoInstall_get_target
,$(1))).
dir
66 $(call gb_AutoInstall_get_target
,$(1)) : SCP2LIBTEMPLATE
:= $(2)
67 $(call gb_AutoInstall_get_target
,$(1)) : SCP2EXETEMPLATE
:= $(3)
68 $(call gb_AutoInstall_get_target
,$(1)) : SCP2JARTEMPLATE
:= $(4)
69 $(call gb_AutoInstall_get_target
,$(1)) : SCP2PKGTEMPLATE
:= $(5)
70 $(call gb_AutoInstall_get_target
,$(1)) : SCP2COMPONENTCONDITION
:= $(6)
74 # vim: set shiftwidth=4 tabstop=4 noexpandtab: