diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-07 16:44:45 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-19 06:20:18 +0000 |
commit | 75681099758e5a03b7cf95ce056634093e7acfb6 (patch) | |
tree | 58ce83a33a5366db7cf2ebac4105a795141b05fb /solenv/gbuild/Module.mk | |
parent | 2ea2648bdc63a9f3b29b2ff4f377aedb45cc45fd (diff) |
gbuild: add an intermediary 'almost' target to Module
This patch is a preparation work for a later patch. that introduce
automatic creation and reuse of binary package.
In order to be able to run a task after every target of a module
have been completed, but without the need to enumerate them all
to that post-module task, an extra intermediary 'target' is introduced
the 'almost' target.
every registered target of a module are depeendencies of 'almost'
and the old done-target for the module now has almsot as dependency
It then become possible to declare a target that is a dependencies of
'done' and has 'almost' as dependencies to guaranty that
this target will be run after the module'w work is completed.
Change-Id: Ifa2bc66e3a5554bf5e85785e1582c57fd62ada5c
Reviewed-on: https://gerrit.libreoffice.org/4763
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'solenv/gbuild/Module.mk')
-rw-r--r-- | solenv/gbuild/Module.mk | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk index 4bc52464fd9e..3477790a526b 100644 --- a/solenv/gbuild/Module.mk +++ b/solenv/gbuild/Module.mk @@ -53,12 +53,18 @@ gb_Module_CLEANTARGETSTACK := # on $(MAKEFILE_LIST). gb_Module_CURRENTMAKEFILE := +$(call gb_Module_get_almost_target,%) : + $(call gb_Output_announce,$*,$(false),ALM,5) + -$(call gb_Helper_abbreviate_dirs,\ + mkdir -p $(dir $@) && \ + touch $@) + .PHONY : $(call gb_Module_get_clean_target,%) $(call gb_Module_get_clean_target,%) : $(call gb_Output_announce,$*,$(false),MOD,5) $(call gb_Output_announce_title,module $* cleared.) -$(call gb_Helper_abbreviate_dirs,\ - rm -f $(call gb_Module_get_target,$*) $(call gb_Module_get_check_target,$*) $(call gb_Module_get_slowcheck_target,$*) $(call gb_Module_get_subsequentcheck_target,$*)) + rm -f $(call gb_Module_get_target,$*) $(call gb_Module_get_almost_target,$*) $(call gb_Module_get_check_target,$*) $(call gb_Module_get_slowcheck_target,$*) $(call gb_Module_get_subsequentcheck_target,$*)) $(call gb_Module_get_check_target,%) : $(call gb_Output_announce,$*,$(true),CHK,5) @@ -98,7 +104,7 @@ build-tools : $(gb_BUILD_TOOLS) $(call gb_Output_announce_title,build-tools done.) $(call gb_Output_announce_bell) -build : +build : $(call gb_Output_announce,top level modules: $(foreach module,$(filter-out deliverlog $(WORKDIR)/bootstrap,$^),$(notdir $(module))),$(true),ALL,6) $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),ALL,6) $(call gb_Output_announce_title,build done.) @@ -115,13 +121,13 @@ slowcheck : $(call gb_Output_announce_bell) # removing the dependency on build for now until we can make a full build with gbuild -#subsequentcheck : all -subsequentcheck : +#subsequentcheck : all +subsequentcheck : $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),SCK,6) $(call gb_Output_announce_title,all subsequent tests checked.) $(call gb_Output_announce_bell) -clean : +clean : $(call gb_Output_announce,top level modules: $(foreach module,$^,$(notdir $(module))),$(false),ALL,6) $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(false),ALL,6) $(call gb_Output_announce_title,all cleared.) @@ -139,7 +145,7 @@ help : showmodules : $(info $(strip $(gb_Module_ALLMODULES))) - @true + @true translations : $(WORKDIR)/pot.done @@ -199,7 +205,7 @@ endef define gb_Module_add_target $(call gb_Module__read_targetfile,$(1),$(2),target) -$(call gb_Module_get_target,$(1)) : $$(gb_Module_CURRENTTARGET) +$(call gb_Module_get_almost_target,$(1)) : $$(gb_Module_CURRENTTARGET) $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) endef @@ -244,6 +250,7 @@ gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTA endef define gb_Module_add_targets +$(call gb_Module_get_target,$(1)) : $(call gb_Module_get_almost_target,$(1)) $(foreach target,$(2),$(call gb_Module_add_target,$(1),$(target))) endef |