diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2013-01-09 21:37:10 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2013-01-10 14:43:32 +0100 |
commit | 26637fe8f241c6ae00f8fdcd5d2a647c7c3cb411 (patch) | |
tree | 5b13050212d6528d3464d05692a5becaba655cb8 /solenv | |
parent | remove effectively unused gb_PARTIALBUILD (diff) | |
download | core-26637fe8f241c6ae00f8fdcd5d2a647c7c3cb411.tar.gz core-26637fe8f241c6ae00f8fdcd5d2a647c7c3cb411.zip |
optimize for build targets in one place
Change-Id: Ib886a323c1ade6dcd455a44d3dfc6702086416e3
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/Module.mk | 9 | ||||
-rw-r--r-- | solenv/gbuild/extensions/post_SpeedUpTargets.mk | 34 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.mk | 10 |
3 files changed, 25 insertions, 28 deletions
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk index 0f985bbffa9c..d20176a3db25 100644 --- a/solenv/gbuild/Module.mk +++ b/solenv/gbuild/Module.mk @@ -89,7 +89,7 @@ $(call gb_Module_get_target,%) : mkdir -p $(dir $@) && \ touch $@) -.PHONY : build all clean unitcheck slowcheck subsequentcheck showmodules translations +.PHONY : all build unitcheck slowcheck subsequentcheck clean check debugrun help showmodules translations .DEFAULT_GOAL := all all : build unitcheck @@ -130,6 +130,9 @@ check : unitcheck slowcheck debugrun : $(call gb_Module_DEBUGRUNCOMMAND) +help : + @cat $(SRCDIR)/solenv/gbuild/gbuild.help.txt + showmodules : $(info $(strip $(gb_Module_ALLMODULES))) @true @@ -184,9 +187,6 @@ endif endef -gb_FULL_BUILD := $(if $(filter showmodules translations,$(MAKECMDGOALS)),$(false),$(true)) - -ifeq ($(gb_FULL_BUILD),$(true)) define gb_Module_add_target $(call gb_Module__read_targetfile,$(1),$(2),target) @@ -220,7 +220,6 @@ $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET) $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) endef -endif define gb_Module_add_moduledir include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk b/solenv/gbuild/extensions/post_SpeedUpTargets.mk index 6175cbc04453..406a69eab374 100644 --- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk +++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk @@ -25,23 +25,31 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. - -# speed up if no target need to parse all modules -gb_SpeedUpTargets_WRAPPEDBUILD:= ifneq ($(strip $(MAKECMDGOALS)),) -ifeq ($(filter-out id tags docs distro-pack-install fetch help debugrun $(SRCDIR)/config_host.mk,$(MAKECMDGOALS)),) -gb_SpeedUpTargets_WRAPPEDBUILD:=T +# speed up depending on the target +gb_SpeedUpTargets_LEVEL_3 := debugrun help translations +gb_SpeedUpTargets_LEVEL_2 := showmodules $(gb_SpeedUpTargets_LEVEL_3) +gb_SpeedUpTargets_LEVEL_1 := clean showdeliverables $(gb_SpeedUpTargets_LEVEL_2) + +ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_1),$(MAKECMDGOALS)),,T)) +gb_FULLDEPS := + +ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_2),$(MAKECMDGOALS)),,T)) +gb_Module_add_target := +gb_Module_add_check_target := +gb_Module_add_slowcheck_target := +gb_Module_add_subsequentcheck_target := + +# Turns of check in bridges/Module_bridges.mk: +gb_STRIPPED_BUILD := $(true) + +ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_3),$(MAKECMDGOALS)),,T)) +gb_Module_add_moduledir := + +endif endif endif -ifneq ($(strip $(gb_SpeedUpTargets_WRAPPEDBUILD)),) -gb_Module_add_target= -gb_Module_add_check_target= -gb_Module_add_slowcheck_target= -gb_Module_add_subsequentcheck_target= -gb_Module_add_moduledir= -gb_FULLDEPS= endif # vim:set shiftwidth=4 softtabstop=4 noexpandtab: - diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index eebcfe9b0578..1c092eda6c70 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -154,13 +154,8 @@ endif ifneq ($(nodep),) gb_FULLDEPS := $(false) else -# for clean, setuplocal and removelocal goals we switch off dependencies -ifneq ($(filter clean setuplocal removelocal showdeliverables help debugrun,$(MAKECMDGOALS)),) -gb_FULLDEPS := $(false) -else gb_FULLDEPS := $(true) endif -endif ifneq ($(strip $(patches)$(PATCHES)),) gb_KEEP_PRISTINE := $(true) @@ -355,9 +350,4 @@ endif endef -.PHONY: help -help: - @cat $(SRCDIR)/solenv/gbuild/gbuild.help.txt - @true - # vim: set noet sw=4: |