[Libreoffice-commits] .: 3 commits - Makefile solenv/gbuild solenv/inc tail_build/prj

Bjoern Michaelsen bmichaelsen at kemper.freedesktop.org
Wed Apr 25 02:30:29 PDT 2012


 Makefile                      |    8 ++++++++
 solenv/gbuild/LinkTarget.mk   |   10 +++++-----
 solenv/gbuild/Module.mk       |    8 +++++++-
 solenv/gbuild/gbuild.help.txt |    1 +
 solenv/inc/gbuildbridge.mk    |    8 ++++++--
 tail_build/prj/makefile.mk    |    3 +++
 6 files changed, 30 insertions(+), 8 deletions(-)

New commits:
commit d09182127bd215236c71796f349e2226cb712700
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Tue Apr 24 15:55:37 2012 +0200

    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

diff --git a/Makefile b/Makefile
index eb800e4..9c18cd9 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 529d6e2..88b8dbc 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 700891c..bd1791f 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
commit 8b5a984d45005d3df1c89eae897d6e04612625d8
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Tue Apr 24 15:44:43 2012 +0200

    do not always build each and every cxx gbuild knows about unconditionally

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 98d7565..aa279bf 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -154,7 +154,7 @@ $(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%)
 	$(call gb_CObject__command,$@,$*,$<,$(call gb_CObject_get_dep_target,$*))
 
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_CObject_get_dep_target,%) : $(call gb_CObject_get_target,%)
+$(call gb_CObject_get_dep_target,%) :
 	$(if $(wildcard $@),touch $@,\
 	  $(call gb_Object__command_dep,$@,$(call gb_CObject_get_target,$*)))
 
@@ -171,7 +171,7 @@ $(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%)
 	$(call gb_CxxObject__command,$@,$*,$<,$(call gb_CxxObject_get_dep_target,$*))
 
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_CxxObject_get_dep_target,%) : $(call gb_CxxObject_get_target,%)
+$(call gb_CxxObject_get_dep_target,%) :
 	$(if $(wildcard $@),touch $@,\
 	  $(call gb_Object__command_dep,$@,$(call gb_CxxObject_get_target,$*)))
 
@@ -189,7 +189,7 @@ $(call gb_GenCObject_get_target,%) : $(call gb_GenCObject_get_source,%)
 	$(call gb_CObject__command,$@,$*,$<,$(call gb_GenCObject_get_dep_target,$*))
 
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_GenCObject_get_dep_target,%) : $(call gb_GenCObject_get_target,%)
+$(call gb_GenCObject_get_dep_target,%) :
 	$(if $(wildcard $@),touch $@,\
 	  $(call gb_Object__command_dep,$@,$(call gb_GenCObject_get_target,$*)))
 
@@ -207,7 +207,7 @@ $(call gb_GenCxxObject_get_target,%) : $(call gb_GenCxxObject_get_source,%)
 	$(call gb_CxxObject__command,$@,$*,$<,$(call gb_GenCxxObject_get_dep_target,$*))
 
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_GenCxxObject_get_dep_target,%) : $(call gb_GenCxxObject_get_target,%)
+$(call gb_GenCxxObject_get_dep_target,%) :
 	$(if $(wildcard $@),touch $@,\
 	  $(call gb_Object__command_dep,$@,$(call gb_GenCxxObject_get_target,$*)))
 
@@ -289,7 +289,7 @@ $(call gb_AsmObject_get_target,%) : $(call gb_AsmObject_get_source,$(SRCDIR),%)
 	$(call gb_AsmObject__command,$@,$*,$<,$(call gb_AsmObject_get_dep_target,$*))
 
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_AsmObject_get_dep_target,%) : $(call gb_AsmObject_get_target,%)
+$(call gb_AsmObject_get_dep_target,%) :
 	$(if $(wildcard $@),touch $@,\
 	  $(call gb_Object__command_dep,$@,$(call gb_AsmObject_get_target,$*)))
 
commit 1c8195944a253d3eab0fd2d022cc64dd62c04390
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Tue Apr 24 12:17:27 2012 +0200

    add showmodules target to gbuild

diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 4d55916..e75444f 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 dev-install
+.PHONY : build all clean unitcheck slowcheck subsequentcheck dev-install showmodules
 .DEFAULT_GOAL := all
 
 ifeq ($(strip $(gb_PARTIALBUILD)),)
@@ -174,6 +174,10 @@ dev-install :
 	ln -s $(DEVINSTALLDIR)/opt/ $(SRCDIR)/install
 	$(info $(gb_Module_DEVINSTALLHINT))
 
+showmodules :
+	$(info $(strip $(gb_Module_ALLMODULES)))
+	@true 
+
 define gb_Module_Module
 gb_Module_ALLMODULES += $(1)
 gb_Module_MODULELOCATIONS += $(1):$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
@@ -206,6 +210,7 @@ endif
 
 endef
 
+ifneq (showmodules,$(MAKECMDGOALS))
 define gb_Module_add_target
 $(call gb_Module__read_targetfile,$(1),$(2),target)
 
@@ -237,6 +242,7 @@ $(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/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 6506022..8ec1539 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -35,6 +35,7 @@ AVAILABLE TARGETS
        check            run unit tests and if in toplevel subsequentcheck
        clean            remove all generated files
        showdeliverables show the targets delivered to OUTDIR and their source
+       showmodules      show the modules that would be loaded
        debugrun         starts the dev-install instance and allows tests to be run
                         against it
        <module>         build the named module


More information about the Libreoffice-commits mailing list