From df7b8637051250b09e1d80c29b563022b64822a2 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 24 May 2013 15:49:11 +0200 Subject: [PATCH] gbuild: allow to call Postprocess targets from top level Change-Id: Id2755144f5942b4aeaaca8ef6dad0fcb11ddf76a --- Makefile.in | 1 + solenv/gbuild/Postprocess.mk | 10 ++++++++++ solenv/gbuild/TargetLocations.mk | 1 + 3 files changed, 12 insertions(+) diff --git a/Makefile.in b/Makefile.in index 26a00ad58f09..f746fe3f64a2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -119,6 +119,7 @@ gbuild_TARGETS := AllLangHelp \ Package \ PackageSet \ Pagein \ + Postprocess \ Pyuno \ PythonTest \ Rdb \ diff --git a/solenv/gbuild/Postprocess.mk b/solenv/gbuild/Postprocess.mk index 7e6eec0b5fce..2e08cb1e94b6 100644 --- a/solenv/gbuild/Postprocess.mk +++ b/solenv/gbuild/Postprocess.mk @@ -14,17 +14,27 @@ $(call gb_Postprocess_get_target,%) : $(call gb_Output_announce,$(POSTPROCESS_INFO): $(if $(POSTPROCESS_PREFIX),$(subst $(POSTPROCESS_PREFIX),,$^),$^),$(true),ALL) touch $@ +.PHONY : $(call gb_Postprocess_get_clean_target,%) +$(call gb_Postprocess_get_clean_target,%) : + $(call gb_Output_announce,$(POSTPROCESS_INFO): $(if $(POSTPROCESS_PREFIX),$(subst $(POSTPROCESS_PREFIX),,$^),$^),$(false),ALL) + rm -f $(call gb_Postprocess_get_target,$*) + 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_clean_target,$(1)) : POSTPROCESS_INFO := $(2) +$(call gb_Postprocess_get_clean_target,$(1)) : POSTPROCESS_PREFIX := $(subst $(WORKDIR),$(WORKDIR)/Clean,$(3)) $(call gb_Postprocess_get_target,$(1)) :| $(dir $(call gb_Postprocess_get_target,$(1))).dir +$(call gb_Helper_make_userfriendly_targets,$(1),Postprocess) + endef # gb_Postprocess_register_target category class targetname define gb_Postprocess_register_target $(call gb_Postprocess_get_target,$(1)) : $(call gb_$(2)_get_target,$(3)) +$(call gb_Postprocess_get_clean_target,$(1)) : $(call gb_$(2)_get_clean_target,$(3)) endef diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 6246eb3d3615..9dd059fae5e9 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -299,6 +299,7 @@ $(eval $(call gb_Helper_make_clean_targets,\ Package \ PackageSet \ Pagein \ + Postprocess \ PrecompiledHeader \ PropertiesTranslateTarget \ Pyuno \