[Libreoffice-commits] core.git: 4 commits - solenv/gbuild

Michael Stahl mstahl at redhat.com
Fri Nov 8 18:56:11 CET 2013


 solenv/gbuild/AllLangResTarget.mk |    4 +++-
 solenv/gbuild/Extension.mk        |    4 ++--
 solenv/gbuild/HelpTarget.mk       |   12 ++++++------
 solenv/gbuild/SdiTarget.mk        |    2 +-
 4 files changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 63ce8673cff538a49165259e0579f122b5879444
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 18:28:46 2013 +0100

    gbuild: Extension: avoid re-build on missing translation description.xml
    
    Change-Id: I6292f4ec235f8880176c2671ec7c8533168cdbeb

diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index 8ec2fc4..419deb6 100644
--- a/solenv/gbuild/Extension.mk
+++ b/solenv/gbuild/Extension.mk
@@ -131,9 +131,9 @@ $(if $(filter nodeliver,$(3)),,$(call gb_Extension__Extension_deliver,$(1),Exten
 
 ifneq ($(strip $(gb_WITH_LANG)),)
 $(call gb_Extension_get_target,$(1)) : \
-	POFILES := $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po)
+	POFILES := $(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po))
 $(call gb_Extension_get_workdir,$(1))/description.xml : \
-	$(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po)
+	$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po))
 $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po) :
 endif
 
commit 7217ad84a3dc3984ec943409d09a35d545f93632
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 18:20:40 2013 +0100

    gbuild: HelpTarget: avoid spurious rebuilds on missing translation
    
    ... if the darn files are allowed to be missing, use wildcard to avoid
    dependencies on them.
    
    Change-Id: I36a83413f8fb65b081681a8f351ec6afcf15fe6d

diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index d3ae728..748eb88 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -81,11 +81,10 @@ $(call gb_HelpTranslatePartTarget_get_clean_target,%) :
 # gb_HelpTranslatePartTarget_HelpTranslatePartTarget target lang dir
 define gb_HelpTranslatePartTarget_HelpTranslatePartTarget
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) : HELP_LANG := $(2)
-$(call gb_HelpTranslatePartTarget_get_target,$(1)) : POFILES := $(gb_POLOCATION)/$(2)/$(3).po
+$(call gb_HelpTranslatePartTarget_get_target,$(1)) : POFILES := $(3)
 
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE)
-$(call gb_HelpTranslatePartTarget_get_target,$(1)) : $(gb_POLOCATION)/$(2)/$(3).po
-$(gb_POLOCATION)/$(2)/$(3).po :
+$(call gb_HelpTranslatePartTarget_get_target,$(1)) : $(3)
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) :| $(dir $(call gb_HelpTranslatePartTarget_get_target,$(1))).dir
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) :| $(call gb_HelpTranslatePartTarget_get_workdir,$(1))/.dir
 
@@ -137,9 +136,10 @@ $(call gb_HelpTranslateTarget_get_target,$(1)) :| $(dir $(call gb_HelpTranslateT
 
 endef
 
+# use wildcard to avoid spurious rebuilds if translation is missing
 # gb_HelpTranslateTarget__make_part module part lang dir
 define gb_HelpTranslateTarget__make_part
-$(call gb_HelpTranslatePartTarget_HelpTranslatePartTarget,$(2),$(3),$(patsubst %/,%,$(4)))
+$(call gb_HelpTranslatePartTarget_HelpTranslatePartTarget,$(2),$(3),$(wildcard $(gb_POLOCATION)/$(3)/$(patsubst %/,%,$(4)).po))
 
 $(call gb_HelpTranslateTarget_get_target,$(1)) : $(call gb_HelpTranslatePartTarget_get_target,$(2))
 $(call gb_HelpTranslateTarget_get_clean_target,$(1)) : $(call gb_HelpTranslatePartTarget_get_clean_target,$(2))
@@ -244,13 +244,13 @@ endef
 define gb_HelpTreeTarget__set_pofiles
 $(call gb_HelpTreeTarget_get_target,$(1)) : POFILES := $(2)
 $(call gb_HelpTreeTarget_get_target,$(1)) : $(2)
-$(2) :
 
 endef
 
+# use wildcard to avoid spurious rebuilds if translation is missing
 # gb_HelpTreeTarget_set_treefile target treefile
 define gb_HelpTreeTarget_set_treefile
-$(call gb_HelpTreeTarget__set_pofiles,$(1),$(gb_POLOCATION)/$(lastword $(subst /, ,$(1)))/$(patsubst %/,%,$(dir $(2))).po)
+$(call gb_HelpTreeTarget__set_pofiles,$(1),$(wildcard $(gb_POLOCATION)/$(lastword $(subst /, ,$(1)))/$(patsubst %/,%,$(dir $(2))).po))
 
 $(call gb_HelpTreeTarget_get_target,$(1)) : HELP_TREE := $(SRCDIR)/$(2).tree
 $(call gb_HelpTreeTarget_get_target,$(1)) : $(SRCDIR)/$(2).tree
commit 967391dca2fd8f30e38598433b2d2153020988d5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 18:10:58 2013 +0100

    gbuild: AllLangResTarget: avoid spurious rebuilds on missing translation
    
    ... if the darn files are allowed to be missing, use wildcard to avoid
    dependencies on them.
    
    Change-Id: I5232efcb17342d0b2a1e909da6449b08c4148245

diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index 24bd656..c1bf16a 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -62,8 +62,10 @@ $(call gb_SrsPartMergeTarget_get_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY)
 		$(call gb_SrsPartMergeTarget__command,$@,$*,$<),\
 		mkdir -p $(dir $@) && cp $< $@)
 
+# translations are optional - use "wildcard" to avoid spurious re-builds
+# when they don't exist
 define gb_SrsPartMergeTarget_SrsPartMergeTarget
-$(call gb_SrsPartMergeTarget__SrsPartMergeTarget_impl,$(1),$(if $(2),$(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po)))
+$(call gb_SrsPartMergeTarget__SrsPartMergeTarget_impl,$(1),$(if $(2),$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po))))
 endef
 
 define gb_SrsPartMergeTarget__SrsPartMergeTarget_impl
commit 8c766a4993e56bd453dfe18b36c5ea76915afe1c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 17:31:34 2013 +0100

    gbuild: SdiTarget: .hxx file is always out-of-date
    
    ... so touch it to avoid that, just to avoid the "true" rule from being
    invoked every time.
    
    Change-Id: I6f27c6e4b0d071b9877a38dc1f4cd3c3eb10bfc0

diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index 28943be..a877695 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -40,7 +40,7 @@ $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi $(gb_SdiTarget_SVIDLDEPS)
 
 # rule necessary to rebuild cxx files that include the header
 $(call gb_SdiTarget_get_target,%.hxx) : $(call gb_SdiTarget_get_target,%)
-	@true
+	touch $@
 
 ifeq ($(gb_FULLDEPS),$(true))
 $(dir $(call gb_SdiTarget_get_dep_target,%)).dir :


More information about the Libreoffice-commits mailing list