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

Michael Stahl mstahl at redhat.com
Tue Mar 26 14:46:34 PDT 2013


 solenv/gbuild/HelpTarget.mk |   30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 55c6a38177d3d72166f5b6d47f5385d19b68e69a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Mar 26 22:36:22 2013 +0100

    gbuild: HelpTarget: use zip --filesync --must-match
    
    Change-Id: Id4e6633effcaf97aa61692ce1713f509031acada

diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index d45ea10..c7b9d62 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -447,7 +447,7 @@ gb_HelpJarTarget_COMMAND := zip
 define gb_HelpJarTarget__get_command
 $(call gb_Output_announce,$*,$(true),HEJ,3)
 cd $(HELP_WORKDIR) && \
-$(gb_HelpJarTarget_COMMAND) -q -0 -rX $(HELP_MODULE).jar text/$(HELP_MODULE) && \
+$(gb_HelpJarTarget_COMMAND) -q -0 -rX --filesync --must-match $(HELP_MODULE).jar text/$(HELP_MODULE) && \
 touch $@
 endef
 
@@ -510,7 +510,7 @@ endef
 define gb_HelpTarget__get_command
 $(call gb_Output_announce,$(2),$(true),HLP,4)
 cd $(call gb_HelpTarget_get_workdir,$(2)) && \
-$(gb_HelpJarTarget_COMMAND) -q -0 -rX $(1) \
+$(gb_HelpJarTarget_COMMAND) -q -0 -rX --filesync --must-match $(1) \
 	$(HELP_PACK_FILES) \
 	$(if $(and $(HELP_CONFIGDIR),$(HELP_INDEXED)),$(HELP_MODULE).cfg)
 endef
commit 9132a8d167f4df2799cd4b6011ff1672eeb7687d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Mar 26 22:33:51 2013 +0100

    gbuild: HelpTarget: delete index files before creating them
    
    ... because they are not overwritten, just new ones are created with
    different names, which is why i've got a 20 meg en-US.zip here with
    about 30 _?.cfs files, all alike.
    
    Change-Id: Ib4d055e1bcfd097dfbbef727a4bcfe2c63d57342

diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index 06967af..d45ea10 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -260,8 +260,11 @@ gb_HelpLinkTarget_DEPS := \
 	$(gb_HelpLinkTarget_IDXCAPTIONTARGET) \
 	$(gb_HelpLinkTarget_IDXCONTENTTARGET)
 
+# first delete the index stuff since when it is generated an existing _0.cfs
+# will not be overwritten; instead a new _1.cfs etc. created until disk is full
 define gb_HelpLinkTarget__command
 $(call gb_Output_announce,$(2),$(true),HLK,3)
+	$(if $(HELP_INDEXED),rm -rf $(addprefix $(HELP_WORKDIR)/,$(HELP_INDEXED)) && \)
 RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\
 	-lang $(HELP_LANG) \
 	-mod $(HELP_MODULE) \
@@ -345,9 +348,9 @@ $(call gb_HelpLinkTarget_get_target,$(1)) : $(2)
 
 endef
 
-# gb_HelpLinkTarget_set_indexed target
+# gb_HelpLinkTarget_set_indexed target indexfiles
 define gb_HelpLinkTarget_set_indexed
-$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_INDEXED := $(true)
+$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_INDEXED := $(2)
 
 endef
 
@@ -597,12 +600,8 @@ endef
 # Add index files into the zip.
 #
 # gb_HelpTarget__add_index_files target module
-define gb_HelpTarget__add_index_files
-$(call gb_HelpTarget__add_file,$(1),$(2).db)
-$(call gb_HelpTarget__add_file,$(1),$(2).ht)
-$(call gb_HelpTarget__add_file,$(1),$(2).idxl)
-$(call gb_HelpTarget__add_file,$(1),$(2).key)
-
+define gb_HelpTarget__get_index_files
+$(foreach suffix,.db .ht .idxl .key,$(addsuffix $(suffix),$(call gb_HelpTarget__get_module,$(1))))
 endef
 
 # gb_HelpTarget__add_file target file
@@ -640,8 +639,8 @@ endef
 #
 # gb_HelpTarget_set_indexed target
 define gb_HelpTarget_set_indexed
-$(call gb_HelpLinkTarget_set_indexed,$(1))
-$(call gb_HelpTarget__add_index_files,$(1),$(call gb_HelpTarget__get_module,$(1)))
+$(call gb_HelpLinkTarget_set_indexed,$(1),$(call gb_HelpTarget__get_index_files,$(1)))
+$(foreach file,$(call gb_HelpTarget__get_index_files,$(1)),$(call gb_HelpTarget__add_file,$(1),$(file)))
 
 $(call gb_HelpTarget_get_target,$(1)) : HELP_INDEXED := $(true)
 
commit 5684da4051d891f7c70627c6b43bd6e85ba4c9e5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Mar 26 17:56:08 2013 +0100

    gbuild: HelpTarget: handle incremental build with removed files
    
    ... by depending on the Makefile.
    
    Change-Id: I598f794a829599b0cf6b7f1f856ee645942dd7aa

diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index 4a46497..06967af 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -73,6 +73,7 @@ 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)) : $(lastword $(MAKEFILE_LIST))
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) : $(gb_POLOCATION)/$(2)/$(3).po
 $(gb_POLOCATION)/$(2)/$(3).po :
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) :| $(dir $(call gb_HelpTranslatePartTarget_get_target,$(1))).dir
@@ -304,8 +305,11 @@ $(call gb_HelpLinkTarget_get_clean_target,%) :
 
 # Create a help linking target.
 #
+# depend on makefile to re-build when files are removed
+#
 # gb_HelpLinkTarget_HelpLinkTarget name module lang workdir
 define gb_HelpLinkTarget_HelpLinkTarget
+$(call gb_HelpLinkTarget_get_target,$(1)) : $(lastword $(MAKEFILE_LIST))
 $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_ADD_FILES :=
 $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGDIR :=
 $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_EXTRA_ADD_FILES :=
@@ -540,6 +544,8 @@ $(call gb_HelpTarget_get_clean_target,%) :
 
 # Create a help target.
 #
+# depend on makefile to re-build filelist when files are removed
+#
 # gb_HelpTarget_HelpTarget target module lang
 define gb_HelpTarget_HelpTarget
 $(call gb_HelpTarget_get_target,$(1)) : HELP_CONFIGDIR :=
@@ -549,6 +555,7 @@ $(call gb_HelpTarget_get_target,$(1)) : HELP_LANG := $(3)
 $(call gb_HelpTarget_get_target,$(1)) : HELP_PACK_FILES :=
 
 $(call gb_HelpTarget_get_translation_target,$(1)) : HELP_FILES :=
+$(call gb_HelpTarget_get_translation_target,$(1)) : $(lastword $(MAKEFILE_LIST))
 
 $(call gb_HelpTarget__HelpTarget_impl,$(1),$(2),$(3),$(call gb_HelpTarget_get_workdir,$(1)))
 


More information about the Libreoffice-commits mailing list