summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-04-24 15:55:37 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-04-25 11:28:35 +0200
commitd09182127bd215236c71796f349e2226cb712700 (patch)
tree4a929dbc7e65d04a5f620905fa6e6792b48f8efa /Makefile
parent8b5a984d45005d3df1c89eae897d6e04612625d8 (diff)
build to tail_build with partial build in tail_build
- instead on lots of recursive build.pl modules to iterate through we build all tail_build up to the requested module inside one tail_build when doing a "make foo.all" - advantage: speeding up because getting rid of lots of recursive makes with artificial module barriers, forcing almost sequential execution: build, link, unittest with lots of cpu-idling at each module-end - disadvantage: all shared dependencies of tail_build are now build for a (sub)module of tail_build. This is transitional as we migrate more stuff into tail_build and there are good dependencies inside tail_build - "make foo.all" now only executes slowcheck now for foo, not for all the deps
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index eb800e425c2f..9c18cd9907ab 100644
--- a/Makefile
+++ b/Makefile
@@ -241,15 +241,23 @@ xpdf\
xsltml\
zlib\
+gb_TAILBUILDMODULES := $(shell make -f $(SRCDIR)/tail_build/Makefile showmodules)
+
define gbuild_module_rules
.PHONY: $(1) $(1).all $(1).clean $(1).deliver
$(1): bootstrap fetch
cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) gb_PARTIALBUILD=T
+ifeq ($(filter $(1),$(gb_TAILBUILDMODULES)),)
$(1).all: bootstrap fetch
cd $(1) && unset MAKEFLAGS && \
$(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM)
+else
+$(1).all: bootstrap fetch
+ cd tail_build && unset MAKEFLAGS && export gb_TAILBUILDTARGET="$(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1)" && \
+ $(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM)
+endif
$(1).clean:
cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) clean gb_PARTIALBUILD=T