summaryrefslogtreecommitdiff
path: root/solenv/gbuild/AutoInstall.mk
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-06-10 00:56:28 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2013-06-10 20:03:02 +0200
commit7a878f9c5fde18e1e86ee0784d9a7f1252700e74 (patch)
tree994b8e6787c4f93a1e1d75f37e61b790f16e03a6 /solenv/gbuild/AutoInstall.mk
parent74f5df9bacf50464affdf48c0ea0fbfa01f28728 (diff)
gbuild: s/AutoInstallLibs/AutoInstall/g
Change-Id: I582a841ea3b2a882cbdc1556058b007a8667024a
Diffstat (limited to 'solenv/gbuild/AutoInstall.mk')
-rw-r--r--solenv/gbuild/AutoInstall.mk55
1 files changed, 55 insertions, 0 deletions
diff --git a/solenv/gbuild/AutoInstall.mk b/solenv/gbuild/AutoInstall.mk
new file mode 100644
index 000000000000..518d06e71e02
--- /dev/null
+++ b/solenv/gbuild/AutoInstall.mk
@@ -0,0 +1,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/.
+#
+
+# AutoInstall class
+
+$(dir $(call gb_AutoInstall_get_target,%)).dir :
+ $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(call gb_AutoInstall_get_target,%) : $(SRCDIR)/Repository.mk $(GBUILDDIR)/AutoInstall.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_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 optional:exe_template
+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)
+
+endef
+
+# vim: set shiftwidth=4 tabstop=4 noexpandtab: