[Libreoffice-commits] core.git: extras/CustomTarget_tploffimisc.mk

Laurent BP (via logerrit) logerrit at kemper.freedesktop.org
Sun May 5 20:23:47 UTC 2019


 extras/CustomTarget_tploffimisc.mk |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 74ac288132de7046ce25eb4539be6b9a25138399
Author:     Laurent BP <laurent.balland-poirier at laposte.net>
AuthorDate: Sun Apr 28 14:30:51 2019 +0200
Commit:     Laurent BP <laurent.balland-poirier at laposte.net>
CommitDate: Sun May 5 22:23:05 2019 +0200

    tdf#125010 No compression to mimetype in templates
    
    For Offimisc Writer template
    zip mimetype file with -0 option
    --filesync option must be removed as it remove mimetype
    remove unused test of exiting files
    restore script extras_Tploffimisc_make_file_deps
    
    Change-Id: I7851635f483d10bcf179b568250be31d763d60b9
    Reviewed-on: https://gerrit.libreoffice.org/71473
    Tested-by: Jenkins
    Reviewed-by: Laurent BP <laurent.balland-poirier at laposte.net>

diff --git a/extras/CustomTarget_tploffimisc.mk b/extras/CustomTarget_tploffimisc.mk
index 1d684d89de5d..79d4262ff466 100644
--- a/extras/CustomTarget_tploffimisc.mk
+++ b/extras/CustomTarget_tploffimisc.mk
@@ -27,10 +27,6 @@ extras_OFFIMISC_XMLFILES := \
 extras_TPLOFFIMISC_MIMETYPEFILES := $(foreach atexts,$(extras_TEMPLATES_OFFIMISC),$(atexts)/mimetype)
 
 
-ifneq ($(sort $(foreach file,$(extras_OFFIMISC_XMLFILES),$(wordlist 1, 1, $(subst /, ,$(file))))),$(sort $(extras_TEMPLATES_OFFIMISC)))
-$(call gb_Output_error,defined template text do not match existing directories)
-endif
-
 $(call gb_CustomTarget_get_target,extras/source/templates/offimisc) : \
 	$(foreach atexts,$(extras_TEMPLATES_OFFIMISC),$(call gb_CustomTarget_get_workdir,extras/source/templates/offimisc)/$(atexts).ott)
 
@@ -67,7 +63,8 @@ $(call gb_CustomTarget_get_workdir,extras/source/templates/offimisc)/%.ott :
 	$(call gb_Output_announce,$*.ott,$(true),ZIP,2)
 	$(call gb_Helper_abbreviate_dirs,\
 		cd $(EXTRAS_OFFIMISC_DIR) && \
-		zip -qrX --filesync --must-match $@ $(EXTRAS_OFFIMISC_FILES) \
+		zip -q0X --filesync --must-match $@ $(EXTRAS_OFFIMISC_MIMEFILES_FILTER) && \
+		zip -qrX --must-match $@ $(EXTRAS_OFFIMISC_XMLFILES_FILTER) \
 	)
 
 define extras_Tploffimisc_make_file_deps
@@ -82,14 +79,16 @@ $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
 	| $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
 
 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
-	EXTRAS_OFFIMISC_FILES := $(foreach file,$(filter $(3)/%,$(extras_TPLOFFIMISC_MIMETYPEFILES) $(extras_OFFIMISC_XMLFILES)),$(subst $(3)/,,$(file)))
+	EXTRAS_OFFIMISC_MIMEFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_TPLOFFIMISC_MIMETYPEFILES)),$(subst $(3)/,,$(file)))
+$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
+	EXTRAS_OFFIMISC_XMLFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_OFFIMISC_XMLFILES)),$(subst $(3)/,,$(file)))
 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
 	EXTRAS_OFFIMISC_DIR := $(call gb_CustomTarget_get_workdir,$(1))/$(3)
 
 endef
 
 $(eval $(foreach file,$(extras_TPLOFFIMISC_MIMETYPEFILES) $(extras_OFFIMISC_XMLFILES),\
-	$(call extras_Tploffimisc_make_zip_deps,extras/source/templates/offimisc,$(file)) \
+	$(call extras_Tploffimisc_make_file_deps,extras/source/templates/offimisc,$(file)) \
 ))
 
 $(eval $(foreach atexts,$(extras_TEMPLATES_OFFIMISC),\


More information about the Libreoffice-commits mailing list