office-gobmx/solenv/gbuild/AutoInstallLibs.mk
Bjoern Michaelsen 87a9d8fdc6 handle more than one lib correctly :/
Change-Id: I1c6478e0ed69c7678598eb0d65cd5043d6c8dd99
2013-02-15 20:44:04 +01:00

38 lines
1.5 KiB
Makefile

# -*- 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/.
#
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
# AutoInstallLibs class
$(dir $(call gb_AutoInstallLibs_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
$(call gb_AutoInstallLibs_get_target,%) :
$(call gb_Output_announce,$*,$(true),AIL,3)
echo "/* autogenerated library installs for group $(INSTALLMODULE) */" > $@
$(call gb_Output_info,install module: $(INSTALLMODULE) contents: $(gb_Library_MODULE_$(INSTALLMODULE)))
$(foreach lib,$(gb_Library_MODULE_$(INSTALLMODULE)),\
echo "$(call SCP2TEMPLATE,$(lib))" >> $@;)
$(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,$(1)) : $(gb_Helper_PHONY) | $(dir $(call gb_AutoInstallLibs_get_target,$(1))).dir
$(call gb_AutoInstallLibs_get_target,$(1)) : INSTALLMODULE = $(2)
$(call gb_AutoInstallLibs_get_target,$(1)) : SCP2TEMPLATE = $(3)
$$(eval $$(call gb_Module_register_target,$(call gb_AutoInstallLibs_get_target,$(1)),$(call gb_AutoInstallLibs_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),AutoInstallLibs)
endef
# vim: set shiftwidth=4 tabstop=4 noexpandtab: