diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-11-13 02:12:48 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-11-14 16:45:02 +0100 |
commit | 04dead1c6b9fd8ea24b27d2c5824ae889a2fac66 (patch) | |
tree | d6eded8f961d23f042e012f0644dac1fe2b0a32b /solenv | |
parent | 75748b5c800cea2170e9bb26430ff6a9fc55c608 (diff) |
make l10n buildable separately
- this renames the 'almost' module target to non-l10n
- and adds a l10n target which is intended to only build l10n parts of
the product
- packagers should then be able to build l10n and non-l10n parts of the
product independently, thus:
- enable quicker rebuilds
- distribution of load
- updates to l10n without a full rebuild
- security fixes to binaries without rebuilding all l10n
- the new targets are called build-l10n-only and build-non-l10n-only
- note this is not intended to move a concept of split packages
upstream -- while this exsists in distros, the number of test
scenarios for this would explode upstream
Change-Id: Ib8ccc9bc52718d9b0ebbfee76ad93dc29c260863
Conflicts:
filter/Module_filter.mk
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/Module.mk | 58 | ||||
-rw-r--r-- | solenv/gbuild/TargetLocations.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/UnpackedTarball.mk | 2 |
3 files changed, 53 insertions, 10 deletions
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk index 8105c1fb3f1b..382062f8070c 100644 --- a/solenv/gbuild/Module.mk +++ b/solenv/gbuild/Module.mk @@ -40,6 +40,7 @@ gb_Module_ALLMODULES := gb_Module_MODULELOCATIONS := gb_Module_TARGETSTACK := +gb_Module_L10NTARGETSTACK := gb_Module_CHECKTARGETSTACK := gb_Module_SLOWCHECKTARGETSTACK := gb_Module_SUBSEQUENTCHECKTARGETSTACK := @@ -53,8 +54,8 @@ gb_Module_CLEANTARGETSTACK := # on $(MAKEFILE_LIST). gb_Module_CURRENTMAKEFILE := -$(call gb_Module_get_almost_target,%) : - $(call gb_Output_announce,$*,$(true),ALM,5) +$(call gb_Module_get_nonl10n_target,%) : + $(call gb_Output_announce,$*,$(true),BIN,5) -$(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $@) && \ touch $@) @@ -64,7 +65,14 @@ $(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_almost_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_nonl10n_target,$*) $(call gb_Module_get_l10n_target,$*) $(call gb_Module_get_check_target,$*) $(call gb_Module_get_slowcheck_target,$*) $(call gb_Module_get_subsequentcheck_target,$*) + +$(call gb_Module_get_l10n_target,%) : + $(call gb_Output_announce,$*,$(true),LOC,5) + $(call gb_Output_announce_title,module $* done.) + -$(call gb_Helper_abbreviate_dirs,\ + mkdir -p $(dir $@) && \ + touch $@) $(call gb_Module_get_check_target,%) : $(call gb_Output_announce,$*,$(true),CHK,5) @@ -94,7 +102,7 @@ $(call gb_Module_get_target,%) : mkdir -p $(dir $@) && \ touch $@) -.PHONY : all build unitcheck slowcheck subsequentcheck clean check debugrun help showmodules translations +.PHONY : all build build-l10n-only build-non-l10n-only unitcheck slowcheck subsequentcheck clean check debugrun help showmodules translations .DEFAULT_GOAL := all all : build $(if $(CROSS_COMPILING),,unitcheck $(if $(gb_PARTIAL_BUILD),,slowcheck)) @@ -110,6 +118,18 @@ build : $(call gb_Output_announce_title,build done.) $(call gb_Output_announce_bell) +build-l10n-only : + $(call gb_Output_announce,top level modules: $(foreach module,$(filter-out deliverlog $(WORKDIR)/bootstrap,$^),$(notdir $(module))),$(true),LOC,6) + $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),LOC,6) + $(call gb_Output_announce_title,l10n done.) + $(call gb_Output_announce_bell) + +build-non-l10n-only : + $(call gb_Output_announce,top level modules: $(foreach module,$(filter-out deliverlog $(WORKDIR)/bootstrap,$^),$(notdir $(module))),$(true),NLC,6) + $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),BIN,6) + $(call gb_Output_announce_title,non-l10n done.) + $(call gb_Output_announce_bell) + unitcheck : $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),CHK,6) $(call gb_Output_announce_title,all unittests checked.) @@ -167,6 +187,7 @@ define gb_Module_Module gb_Module_ALLMODULES += $(1) gb_Module_MODULELOCATIONS += $(1):$(dir $(realpath $(lastword $(MAKEFILE_LIST)))) gb_Module_TARGETSTACK := $(call gb_Module_get_target,$(1)) $(gb_Module_TARGETSTACK) +gb_Module_L10NTARGETSTACK := $(call gb_Module_get_l10n_target,$(1)) $(gb_Module_L10NTARGETSTACK) gb_Module_CHECKTARGETSTACK := $(call gb_Module_get_check_target,$(1)) $(gb_Module_CHECKTARGETSTACK) gb_Module_SLOWCHECKTARGETSTACK := $(call gb_Module_get_slowcheck_target,$(1)) $(gb_Module_SLOWCHECKTARGETSTACK) gb_Module_SUBSEQUENTCHECKTARGETSTACK := $(call gb_Module_get_subsequentcheck_target,$(1)) $(gb_Module_SUBSEQUENTCHECKTARGETSTACK) @@ -206,9 +227,19 @@ endif endef define gb_Module_add_target +$(if $(filter AllLang% Dictionary%,$(2)),$(warning target $(2) should be a l10n target)) $(call gb_Module__read_targetfile,$(1),$(2),target) -$(call gb_Module_get_almost_target,$(1)) : $$(gb_Module_CURRENTTARGET) +$(call gb_Module_get_nonl10n_target,$(1)) : $$(gb_Module_CURRENTTARGET) +$(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) + +endef + +define gb_Module_add_l10n_target +$(if $(filter AllLang% Dictionary%,$(2)),,$(warning target $(2) should not be a l10n target)) +$(call gb_Module__read_targetfile,$(1),$(2),target) + +$(call gb_Module_get_l10n_target,$(1)) : $$(gb_Module_CURRENTTARGET) $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) endef @@ -244,11 +275,13 @@ endef define gb_Module_add_moduledir include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK)) +$(call gb_Module_get_l10n_target,$(1)) : $$(firstword $$(gb_Module_L10NTARGETSTACK)) $(call gb_Module_get_check_target,$(1)) : $$(firstword $$(gb_Module_CHECKTARGETSTACK)) $(call gb_Module_get_slowcheck_target,$(1)) : $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK)) $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) $(call gb_Module_get_clean_target,$(1)) : $$(firstword $$(gb_Module_CLEANTARGETSTACK)) gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK)) +gb_Module_L10NTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_L10NTARGETSTACK)),$$(gb_Module_L10NTARGETSTACK)) gb_Module_CHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CHECKTARGETSTACK)),$$(gb_Module_CHECKTARGETSTACK)) gb_Module_SLOWCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK)),$$(gb_Module_SLOWCHECKTARGETSTACK)) gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) @@ -257,11 +290,17 @@ 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)) +$(call gb_Module_get_target,$(1)) : $(call gb_Module_get_nonl10n_target,$(1)) $(foreach target,$(2),$(call gb_Module_add_target,$(1),$(target))) endef +define gb_Module_add_l10n_targets +$(call gb_Module_get_target,$(1)) : $(call gb_Module_get_l10n_target,$(1)) +$(foreach target,$(2),$(call gb_Module_add_l10n_target,$(1),$(target))) + +endef + gb_Module_add_targets_for_build = $(call gb_Module_add_targets,$(1),$(2)) define gb_Module_add_check_targets @@ -291,7 +330,9 @@ endif include $(1) -build : $$(firstword $$(gb_Module_TARGETSTACK)) +build : build-non-l10n-only build-l10n-only +build-non-l10n-only : $$(firstword $$(gb_Module_TARGETSTACK)) +build-l10n-only : $$(firstword $$(gb_Module_L10NTARGETSTACK)) unitcheck : $$(firstword $$(gb_Module_CHECKTARGETSTACK)) slowcheck : $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK)) subsequentcheck : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) @@ -302,12 +343,13 @@ $$(eval $$(call gb_Output_error,Corrupted module target stack! $(gb_Module_TARGE endif gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK)) +gb_Module_L10NTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_L10NTARGETSTACK)),$$(gb_Module_L10NTARGETSTACK)) gb_Module_CHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CHECKTARGETSTACK)),$$(gb_Module_CHECKTARGETSTACK)) gb_Module_SLOWCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK)),$$(gb_Module_SLOWCHECKTARGETSTACK)) gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK)) -ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Module_SLOWCHECKTARGETSTACK),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),) +ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Module_SLOWCHECKTARGETSTACK),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK),$$(gb_Module_L10NTARGETSTACK)),) $$(eval $$(call gb_Output_error,Corrupted module target stack!3)) endif diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index ebd4960a0d6c..8976f446ad4e 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -113,7 +113,8 @@ gb_LinkTarget_get_dep_target = \ gb_LinkTarget_get_clean_target = \ $(WORKDIR)/Clean/LinkTarget/$(call gb_LinkTarget__get_workdir_linktargetname,$(1)) gb_LinkTarget_get_target = $(lastword $(subst <>, ,$(1))) -gb_Module_get_almost_target = $(WORKDIR)/Module/almost/$(1) +gb_Module_get_nonl10n_target = $(WORKDIR)/Module/nonl10n/$(1) +gb_Module_get_l10n_target = $(WORKDIR)/Module/l10n/$(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) diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk index a07368b18bf9..066f8ff88827 100644 --- a/solenv/gbuild/UnpackedTarball.mk +++ b/solenv/gbuild/UnpackedTarball.mk @@ -243,7 +243,7 @@ $(if $(findstring in,$(5)), $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_IS_BIN_TARBALL := YES $(call gb_ExternalProject_get_state_target,$(1),%) : UNPACKED_IS_BIN_TARBALL := YES) $(if $(findstring out,$(5)),$(call gb_Module_get_target,$(4)) : $(gb_UnpackedTarget_TARFILE_LOCATION)/$(6) -$(gb_UnpackedTarget_TARFILE_LOCATION)/$(6) : $(call gb_Module_get_almost_target,$(4)) +$(gb_UnpackedTarget_TARFILE_LOCATION)/$(6) : $(call gb_Module_get_nonl10n_target,$(4)) $$(call gb_Output_announce,$(6),$(true),PKB,3) if test ! -f "$$@" ; then cd $(call gb_UnpackedTarball_get_dir,) && $(GNUTAR) -czf "$$@" $(1)/ || $(GNUTAR) -czf "$$@" $(1)/ ; else touch "$$@" ; fi) |