summaryrefslogtreecommitdiff
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
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
-rw-r--r--Makefile8
-rw-r--r--solenv/inc/gbuildbridge.mk8
-rw-r--r--tail_build/prj/makefile.mk3
3 files changed, 17 insertions, 2 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
diff --git a/solenv/inc/gbuildbridge.mk b/solenv/inc/gbuildbridge.mk
index 529d6e2f27a5..88b8dbcab5f5 100644
--- a/solenv/inc/gbuildbridge.mk
+++ b/solenv/inc/gbuildbridge.mk
@@ -30,12 +30,16 @@ TARGET=prj
.INCLUDE : settings.mk
+.IF "$(GBUILDTARGET)" == ""
+GBUILDTARGET=all slowcheck
+.END
+
.IF "$(depend)" != ""
all:
.ELIF "$(VERBOSE)"!=""
all:
- cd $(PRJ) && $(GNUMAKE) -r -j$(GMAKE_MODULE_PARALLELISM) all slowcheck
+ cd $(PRJ) && $(GNUMAKE) -r -j$(GMAKE_MODULE_PARALLELISM) $(GBUILDTARGET)
.ELSE
all:
- @cd $(PRJ) && $(GNUMAKE) -rs -j$(GMAKE_MODULE_PARALLELISM) all slowcheck
+ @cd $(PRJ) && $(GNUMAKE) -rs -j$(GMAKE_MODULE_PARALLELISM) $(GBUILDTARGET)
.END
diff --git a/tail_build/prj/makefile.mk b/tail_build/prj/makefile.mk
index 700891c52136..bd1791f29564 100644
--- a/tail_build/prj/makefile.mk
+++ b/tail_build/prj/makefile.mk
@@ -1,2 +1,5 @@
GMAKE_MODULE_PARALLELISM := $(GMAKE_PARALLELISM) # tail_build is special!
+.IF "$(gb_TAILBUILDTARGET)" != ""
+GBUILDTARGET=$(gb_TAILBUILDTARGET)
+.END
.INCLUDE : gbuildbridge.mk