diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-03-23 15:58:00 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-03-23 16:26:56 +0100 |
commit | f605cfc73d918c5ba38c988619e0a52472a589d8 (patch) | |
tree | 3d94ea33d5bfc41a9c05b1fe9517a9b74062d220 /Makefile.in | |
parent | f7859e52829a44e04692653079aea3a5df4579da (diff) |
make it possible to build without the obnoxious forced -j to make
Rework --with-parallelism to not add any extra -j to make if 0
or --without is used. This requires explicit -j usage, which
- builds even compilerplugins in parallel
- builds 'make -C sw/' in parallel (since you don't forget the -j)
- avoids jobserver disabling if -j is explicitly passed to the toplevel make
IMO this is just a relic of the old build system and the option should
be dumped altogether, but I don't feel like arguing right now.
Change-Id: I71479391bcfc84aa5e9fd9696880702da496d45c
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in index 64aea5adf56f..27c3e69aa6fd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -55,6 +55,8 @@ include $(BUILDDIR)/config_$(gb_Side).mk export GMAKE_OPTIONS?=-r$(if $(verbose)$(VERBOSE),,s)$(value $(MAKEFLAGS)) +PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),) + # # Partial Build # @@ -62,13 +64,13 @@ define gb_Top_GbuildModuleRules .PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).showdeliverables $(1).subsequentcheck $(1): bootstrap fetch - cd $(SRCDIR)/$(2) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) + cd $(SRCDIR)/$(2) && $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $(1).build $(1).check $(1).clean $(1).showdeliverables $(1).subsequentcheck: - cd $(SRCDIR)/$(2) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@) + cd $(SRCDIR)/$(2) && $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@) $(1).all: bootstrap fetch - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)) + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)) endef @@ -121,7 +123,7 @@ gbuild_TARGETS := AllLangHelp \ # build a generic gbuild target $(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)): - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@ + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@ # # Clean @@ -221,15 +223,15 @@ build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset) ifneq ($(filter-out WNT MACOSX IOS ANDROID,$(OS)),) mkdir -p $(INSTDIR) && install-gdb-printers -a $(INSTDIR) -c endif - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal) + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal) ifeq ($(OS),IOS) - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) ios + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios endif build-non-l10n-only build-l10n-only build-nocheck check debugrun help slowcheck translations unitcheck subsequentcheck packageinfo: build cross-toolset: bootstrap fetch - $(GNUMAKE) gb_Side=build -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools + $(GNUMAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools # |