[Libreoffice-commits] core.git: solenv/gbuild
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Mon Aug 26 02:38:22 PDT 2013
solenv/gbuild/Library.mk | 17 ++++++++++++++++-
solenv/gbuild/Package.mk | 10 +++++++++-
2 files changed, 25 insertions(+), 2 deletions(-)
New commits:
commit ee4d7829b7f5c07bd0b46dedc9436c83c7dc17ef
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Aug 23 10:52:46 2013 +0200
introduce gb_Package_PRESTAGEDIR
this introduces a "prestage dir" -- if a file can be found in that
directory, it will be copied over instead of build. Usecases for this
include:
- split builds:
e.g. a part of the LibreOffice gets build by a core package and
"writer" or "calc" package then only builds the additional missing
pieces (while copying existing files from the earlier package build)
please not this does not intend to produce separately installable
instances, only to generate the build in multiple steps, to:
- reduce filesystem usage of one build
- paralellisation: e.g. "writer" and "calc" could build at the same
time on two builders
- restart capability: e.g. if a build breaks in "writer", no need to
rebuild everything (relevant for slow and somewhat more flaky
platforms like arm)
- staged single build:
on a filesystem restrained builder, keeping all the objects around for
the build can be a burden. With this, such builders can do a partial
build (lets say: "make svx"), put the instdir aside, make clean and
continue -- but without needing to keep space for the object files of
the build up to svx.
It need gb_RUNNABLE_INSTDIR -- we are going there anyway, no need to
support other scenarios.
This needs more dependency breaking for most scenarios but a:
export gb_RUNNABLE_INSTDIR=T
make
cp -a instdir instdir_prestage
make clean
make sw.all
make sw.clean
export gb_Package_PRESTAGEDIR=`readlink -f instdir_prestage/unxlngx6.pro`
cd sw && make build # this does no compiles, it just copies
Change-Id: I22d4208b2fad0d8fc59426ba4c8c52122876f646
Reviewed-on: https://gerrit.libreoffice.org/5591
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 17163a1..e8cd313 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -55,10 +55,24 @@ $$(eval $$(call gb_Output_info,Currently known libraries are: $(sort $(gb_Librar
$$(eval $$(call gb_Output_error,Library $(1) must be registered in Repository.mk))
endif
$(call gb_Library_get_target,$(1)) : SOVERSION :=
-$(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktargetname,$(1)))
+
+$(if $(gb_Package_PRESTAGEDIR),\
+ $(if $(wildcard $(gb_Package_PRESTAGEDIR)/$(call gb_Library_get_instdir,$(1))/$(call gb_Library_get_runtime_filename,$(1))),\
+ $(call gb_Library__Library_impl_copy,$(0),$(call gb_Library_get_instdir,$(1))/$(call gb_Library_get_runtime_filename,$(1))),\
+ $(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktargetname,$(1)))\
+ ),
+ $(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktargetname,$(1)))\
+)
endef
+define gb_Library__Library_impl_copy
+$(call gb_Package_Package,Library_Copy_$(1),$(gb_Package_PRESTAGEDIR))
+$(call gb_Package_set_outdir,Library_Copy_$(1),$(INSTDIR))
+$(call gb_Package_add_file,Library_Copy_$(1),$(2),$(2))
+$(OUTDIR)/lib/$(notdir $(2)) : $(INSTDIR)/$(2)
+endef
+
define gb_Library__Library_impl
$(call gb_LinkTarget_LinkTarget,$(2),Library_$(1))
$(call gb_LinkTarget_set_targettype,$(2),Library)
@@ -80,6 +94,7 @@ $(if $(filter $(call gb_Library_get_layer,$(1)):%,$(gb_Library_LAYER_DIRS)),\
endif
$$(eval $$(call gb_Module_register_target,$(call gb_Library__get_final_target,$(1)),$(call gb_Library_get_clean_target,$(1))))
+
$(call gb_Helper_make_userfriendly_targets,$(1),Library,$(call gb_Library__get_final_target,$(1)))
$(call gb_Deliver_add_deliverable,$(call gb_Library_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 52f82f1..2a1fd53 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -49,7 +49,15 @@ $(OUTDIR)/inc/% :
define gb_PackagePart_PackagePart
$(4)/$(1) : $(2) | $(dir $(4)/$(1)).dir
$(2) :| $(3)
-$(call gb_Deliver_add_deliverable,$(4)/$(1),$(2),$(3))
+
+$(if $(gb_Package_PRESTAGEDIR),\
+ $(if $(wildcard $(gb_Package_PRESTAGEDIR)/$(1)),\
+ $(call gb_Deliver_add_deliverable,$(4)/$(1),$(gb_Package_PRESTAGEDIR)/$(1),$(3)),\
+ $(call gb_Deliver_add_deliverable,$(4)/$(1),$(2),$(3)) \
+ ),\
+ $(call gb_Deliver_add_deliverable,$(4)/$(1),$(2),$(3)) \
+)
+
endef
More information about the Libreoffice-commits
mailing list