summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-03-03 09:11:08 +0100
committerDavid Tardon <dtardon@redhat.com>2013-03-03 09:28:31 +0100
commit3c82b95d92151be365f673c04c78ad1368b928d9 (patch)
treeed592fa80eafe5fdaa16db0615370f4096bd63cc /solenv
parent66298dbfa765bded7c0ffb5097fbf4cde1f35b8d (diff)
use pattern rule for Postprocess
Change-Id: Ib8d2ddb2efaef26a0a2aba36e9e1c67b1fb019d7
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/AllLangResTarget.mk4
-rw-r--r--solenv/gbuild/Executable.mk4
-rw-r--r--solenv/gbuild/Library.mk4
-rw-r--r--solenv/gbuild/Module.mk4
-rw-r--r--solenv/gbuild/Package.mk4
-rw-r--r--solenv/gbuild/Postprocess.mk34
-rw-r--r--solenv/gbuild/gbuild.mk2
7 files changed, 36 insertions, 20 deletions
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index b06a8da104d1..6bb25468d1da 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -482,8 +482,4 @@ $(foreach lang,$(gb_AllLangResTarget_LANGS),\
endef
-$(call gb_Postprocess_get_target,AllResources) :
- $(call gb_Output_announce,All resources: $^,$(true),ALL)
- $(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 5c071a5c8dfc..1560e700ca54 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -169,8 +169,4 @@ $(call gb_Executable_get_runtime_target,$(1)) : $(2)
endef
-$(call gb_Postprocess_get_target,AllExecutables) :
- $(call gb_Output_announce,All executables: $^,$(true),ALL)
- $(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 235315ad7287..116d5c462a95 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -235,8 +235,4 @@ $(eval $(foreach method,\
$(call gb_Library__forward_to_Linktarget,$(method))\
))
-$(call gb_Postprocess_get_target,AllLibraries) :
- $(call gb_Output_announce,All libraries: $^,$(true),ALL)
- $(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 9f545a49537c..926aeae8996f 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -291,8 +291,4 @@ endif
$$(eval $$(gb_Extensions_final_hook))
endef
-$(call gb_Postprocess_get_target,AllModulesButInstsetNative) :
- $(call gb_Output_announce,All modules but instset: $(subst $(WORKDIR)/Module/,,$^),$(true),ALL)
- $(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index a5e011819b1d..6642a892a3d4 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -134,8 +134,4 @@ $(call gb_Package_get_preparation_target,$(1)) :| $(call gb_ExternalProject_get_
endef
-$(call gb_Postprocess_get_target,AllPackages) :
- $(call gb_Output_announce,All packages: $^,$(true),ALL)
- $(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/Postprocess.mk b/solenv/gbuild/Postprocess.mk
new file mode 100644
index 000000000000..6dd16a99a2cb
--- /dev/null
+++ b/solenv/gbuild/Postprocess.mk
@@ -0,0 +1,34 @@
+# -*- 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/.
+#
+
+$(dir $(call gb_Postprocess_get_target,%)).dir :
+ $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(call gb_Postprocess_get_target,%) :
+ $(call gb_Output_announce,$(POSTPROCESS_INFO): $(if $(POSTPROCESS_PREFIX),$(subst $(POSTPROCESS_PREFIX),,$^),$^),$(true),ALL)
+ touch $@
+
+define gb_Postprocess_Postprocess
+$(call gb_Postprocess_get_target,$(1)) : POSTPROCESS_INFO := $(2)
+$(call gb_Postprocess_get_target,$(1)) : POSTPROCESS_PREFIX := $(3)
+
+$(call gb_Postprocess_get_target,$(1)) :| $(dir $(call gb_Postprocess_get_target,$(1))).dir
+
+endef
+
+define gb_Postprocess_make_targets
+$(call gb_Postprocess_Postprocess,AllExecutables,All executables)
+$(call gb_Postprocess_Postprocess,AllLibraries,All libraries)
+$(call gb_Postprocess_Postprocess,AllModulesButInstsetNative,All modules but instset,$(WORKDIR)/Module/)
+$(call gb_Postprocess_Postprocess,AllPackages,All packages)
+$(call gb_Postprocess_Postprocess,AllResources,All resources)
+
+endef
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index b65325466f4e..f9ce8d6d6694 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -344,9 +344,11 @@ include $(foreach class, \
InstallModule \
InstallScript \
AutoInstallLibs \
+ Postprocess \
,$(GBUILDDIR)/$(class).mk)
$(eval $(call gb_Helper_process_executable_registrations))
+$(eval $(call gb_Postprocess_make_targets))
# optional extensions that should never be essential
ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),)