[Libreoffice-commits] core.git: solenv/gbuild
Norbert Thiebaud
nthiebaud at gmail.com
Thu Jul 18 23:20:42 PDT 2013
solenv/gbuild/Module.mk | 21 ++++++++++++++-------
solenv/gbuild/TargetLocations.mk | 1 +
2 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit 75681099758e5a03b7cf95ce056634093e7acfb6
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Jul 7 16:44:45 2013 -0500
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 at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 4bc5246..3477790 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
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index fe665e4..9f8ce63 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -144,6 +144,7 @@ gb_PythonTest_get_target = $(WORKDIR)/PythonTest/$(1)/done
gb_LinkTarget_get_headers_target = $(WORKDIR)/Headers/$(1)
gb_LinkTarget_get_target = $(WORKDIR)/LinkTarget/$(1)
gb_LinkTarget_get_objects_list = $(WORKDIR)/LinkTarget/$(1).objectlist
+gb_Module_get_almost_target = $(WORKDIR)/Module/almost/$(1)
gb_Module_get_check_target = $(WORKDIR)/Module/check/$(1)
gb_Module_get_slowcheck_target = $(WORKDIR)/Module/slowcheck/$(1)
gb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1)
More information about the Libreoffice-commits
mailing list