diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /solenv/gbuild/AutoInstall.mk | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | solenv/gbuild/AutoInstall.mk | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/solenv/gbuild/AutoInstall.mk b/solenv/gbuild/AutoInstall.mk new file mode 100644 index 000000000..aee2750e9 --- /dev/null +++ b/solenv/gbuild/AutoInstall.mk @@ -0,0 +1,76 @@ +# -*- 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/. +# + +# AutoInstall class + +$(dir $(call gb_AutoInstall_get_target,%)).dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + +$(call gb_AutoInstall_get_target,%) : $(GBUILDDIR)/AutoInstall.mk \ + $(SRCDIR)/Repository.mk $(SRCDIR)/RepositoryExternal.mk \ + $(BUILDDIR)/config_host.mk \ + $(GBUILDDIR)/gen-autoinstall.py \ + $(call gb_ExternalExecutable_get_dependencies,python) + $(call gb_Output_announce,$*,$(true),AIN,3) + $(call gb_Trace_StartRange,$*,AIN) + SDKLIBFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),100,\ + $(foreach lib,$(gb_SdkLinkLibrary_MODULE_$*),\ + $(lib) \ + $(notdir $(call gb_Library_get_sdk_link_lib,$(lib))) \ + ../../program/$(call gb_Library_get_runtime_filename,$(lib)))) \ + && LIBFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),100,\ + $(foreach lib,$(gb_Library_MODULE_$*),\ + $(lib) \ + $(call gb_Library_get_runtime_filename,$(lib)))) \ + && EXEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),100,\ + $(foreach exe,$(gb_Executable_MODULE_$*),\ + $(exe) \ + $(call gb_Executable_get_filename,$(exe)))) \ + && JARFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),100,$(gb_Jar_MODULE_$*)) \ + && PKGFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),100,$(gb_Package_MODULE_$*)) \ + && $(call gb_ExternalExecutable_get_command,python) \ + $(GBUILDDIR)/gen-autoinstall.py \ + '$*' '$(SCP2COMPONENTCONDITION)' \ + '$(SCP2LIBTEMPLATE)' '$(SCP2EXETEMPLATE)' '$(SCP2JARTEMPLATE)' \ + '$(SCP2PKGTEMPLATE)' \ + $${SDKLIBFILE} $${LIBFILE} $${EXEFILE} $${JARFILE} $${PKGFILE} \ + > $@ \ + && rm -f $${SDKLIBFILE} $${LIBFILE} $${EXEFILE} $${JARFILE} $${PKGFILE} + $(call gb_Trace_EndRange,$*,AIN) + + +$(call gb_AutoInstall_get_clean_target,%) : + $(call gb_Output_announce,$*,$(false),AIL,3) + rm -f $(call gb_AutoInstall_get_target,$*) + +define gb_AutoInstall_AutoInstall +$(call gb_AutoInstall_get_target,all) :| $(dir $(call gb_AutoInstall_get_target,all)).dir + +$$(eval $$(call gb_Module_register_target,$(call gb_AutoInstall_get_target,all),$(call gb_AutoInstall_get_clean_target,all))) +$(call gb_Helper_make_userfriendly_targets,all,AutoInstall) + +endef + +# gb_AutoInstall_add_module module lib_template exe_template jar_template package_template componentcondition +define gb_AutoInstall_add_module +$(call gb_AutoInstall_get_target,all) : $(call gb_AutoInstall_get_target,$(1)) +$(call gb_AutoInstall_get_clean_target,all) : $(call gb_AutoInstall_get_clean_target,$(1)) +$(call gb_Helper_make_userfriendly_targets,$(1),AutoInstall) + +$(call gb_AutoInstall_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE) +$(call gb_AutoInstall_get_target,$(1)) :| $(dir $(call gb_AutoInstall_get_target,$(1))).dir +$(call gb_AutoInstall_get_target,$(1)) : SCP2LIBTEMPLATE := $(2) +$(call gb_AutoInstall_get_target,$(1)) : SCP2EXETEMPLATE := $(3) +$(call gb_AutoInstall_get_target,$(1)) : SCP2JARTEMPLATE := $(4) +$(call gb_AutoInstall_get_target,$(1)) : SCP2PKGTEMPLATE := $(5) +$(call gb_AutoInstall_get_target,$(1)) : SCP2COMPONENTCONDITION := $(6) + +endef + +# vim: set shiftwidth=4 tabstop=4 noexpandtab: |