summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-18 17:47:43 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-18 17:50:39 +0200
commitbaefe3a7251c25c7b5c83c7e75dc79970d6bbfc0 (patch)
tree4725203d9631ed38ff5397b79480e8457951b2a9
parent80583d1c6dbca9e3f8fd49588be3d888f9c6083b (diff)
gbuild: fix build of installation set with missing .ui translations
As demonstrated by commit b875362cd576b29aee4da899335b8d8f6c74d192, scp2 will reference all languages' UIConfig zip file, but gbuild only builds those that have existing input files from translations; tweak UIConfig class to always build a zip file, and the Zip command to work with no inputs as well, which requires a little hack. Change-Id: If6dbb07aa856c94802b9abdcaa20ba03e59d37fa
-rw-r--r--solenv/gbuild/UIConfig.mk4
-rw-r--r--solenv/gbuild/Zip.mk20
-rw-r--r--solenv/gbuild/empty.zipbin0 -> 22 bytes
3 files changed, 15 insertions, 9 deletions
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 7fdb7e1d8152..0946925cbca6 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -225,6 +225,8 @@ $(call gb_Postprocess_register_target,AllUIConfigs,UIConfig,$(1))
endef
define gb_UIConfig__UIConfig_for_lang
+$(call gb_UIConfig_get_target,$(1)) : $(call gb_Zip_get_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)))
+$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)))
$(call gb_Zip_Zip_internal,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)),$(gb_UILocalizeTarget_WORKDIR)/$(1))
$(call gb_Zip_add_commandoptions,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)),--suffixes .ui)
$(call gb_Zip_get_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2))) : $(SRCDIR)/solenv/gbuild/UIConfig.mk
@@ -258,8 +260,6 @@ endef
#
# gb_UIConfig__add_uifile_for_lang target file lang
define gb_UIConfig__add_uifile_for_lang
-$(call gb_UIConfig_get_target,$(1)) : $(call gb_Zip_get_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(3)))
-$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(3)))
$(call gb_Zip_add_file,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(3)),$(notdir $(2))/$(3).ui)
$(call gb_Zip_add_dependency,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(3)),$(call gb_UILocalizeTarget_get_target,$(1)/$(notdir $(2))))
$(call gb_Zip_set_install_name,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(3)),$(INSTROOT)/$(gb_UIConfig_INSTDIR)/$(1)/ui/res/$(3).zip)
diff --git a/solenv/gbuild/Zip.mk b/solenv/gbuild/Zip.mk
index a675766bb10b..b8f76d98f321 100644
--- a/solenv/gbuild/Zip.mk
+++ b/solenv/gbuild/Zip.mk
@@ -40,16 +40,22 @@ $(dir $(call gb_Zip_get_target,%))%/.dir :
# rule to create zip package in workdir
# --filesync makes sure that all files in the zip package will be removed that no longer are in $(FILES)
+# if there are no files, zip fails; copy empty zip file to target in that case
$(call gb_Zip_get_target,%) :
$(call gb_Output_announce,$*,$(true),ZIP,3)
- $(if $(FILES),$(call gb_Helper_abbreviate_dirs,\
- RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
+ $(call gb_Helper_abbreviate_dirs,\
+ $(if $(FILES),\
+ RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
$(FILES)) && \
- cd $(LOCATION) && cat $${RESPONSEFILE} | tr "[:space:]" "\n" | $(gb_Zip_ZIPCOMMAND) -@rX --filesync --must-match $(call gb_Zip_get_target,$*) && \
- rm -f $${RESPONSEFILE} && \
- touch $@ \
- $(if $(INSTALL_NAME),&& cp $(call gb_Zip_get_target,$*) $(INSTALL_NAME)) \
- ))
+ cd $(LOCATION) && \
+ cat $${RESPONSEFILE} | tr "[:space:]" "\n" | \
+ $(gb_Zip_ZIPCOMMAND) -@rX --filesync --must-match \
+ $(call gb_Zip_get_target,$*) && \
+ rm -f $${RESPONSEFILE} && \
+ touch $@\
+ , cp $(SRCDIR)/solenv/gbuild/empty.zip $@)\
+ $(if $(INSTALL_NAME),&& cp $(call gb_Zip_get_target,$*) $(INSTALL_NAME)) \
+ )
# the preparation target is here to ensure proper ordering of actions in cases
# when we want to, e.g., create a zip from files created by a custom target
diff --git a/solenv/gbuild/empty.zip b/solenv/gbuild/empty.zip
new file mode 100644
index 000000000000..15cb0ecb3e21
--- /dev/null
+++ b/solenv/gbuild/empty.zip
Binary files differ