[PATCH] gbuild: pass config. file to HelpTarget explicitly

David Tardon (via Code Review) gerrit at gerrit.libreoffice.org
Sun Apr 14 10:49:09 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3383

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/83/3383/1

gbuild: pass config. file to HelpTarget explicitly

This is preparation for delivering HelpTarget files as a Package, which
would not be possible with the previous impl.

Change-Id: Ia79effcb77aaa7054987879c394cb277e377c9d8
---
M solenv/gbuild/AllLangHelp.mk
M solenv/gbuild/HelpTarget.mk
2 files changed, 17 insertions(+), 15 deletions(-)



diff --git a/solenv/gbuild/AllLangHelp.mk b/solenv/gbuild/AllLangHelp.mk
index 95cdd8c..d154de2 100644
--- a/solenv/gbuild/AllLangHelp.mk
+++ b/solenv/gbuild/AllLangHelp.mk
@@ -51,7 +51,6 @@
 # gb_AllLangHelp_AllLangHelp__one_lang module lang helpname zipname
 define gb_AllLangHelp_AllLangHelp__one_lang
 $(call gb_HelpTarget_HelpTarget,$(3),$(1),$(2))
-$(call gb_HelpTarget_set_configdir,$(3),$(gb_AllLangHelp_AUXDIR))
 $(call gb_HelpTarget_set_helpdir,$(3),$(gb_AllLangHelp_HELPDIR))
 
 $(call gb_HelpTarget_get_outdir_target,$(4)) : $(call gb_HelpTarget_get_target,$(3))
@@ -156,6 +155,7 @@
 define gb_AllLangHelp__use_linked_module
 $(call gb_HelpTarget_use_linked_module,$(call gb_AllLangHelp__get_helpname,$(1),$(3)),$(call gb_AllLangHelp__get_helpname,$(2),$(3)))
 $(call gb_HelpTarget_set_indexed,$(call gb_AllLangHelp__get_helpname,$(1),$(3)))
+$(call gb_HelpTarget_set_configfile,$(call gb_AllLangHelp__get_helpname,$(1),$(3)),$(gb_AllLangHelp_AUXDIR)/$(3)/$(1))
 
 endef
 
diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index 9fd03b8..70ff4ca 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -273,11 +273,11 @@
 	-o $(WORKDIR)/dummy.zip \
 	-src $(HELP_SRCDIR) \
 	-zipdir $(HELP_WORKDIR) \
-	-compact $(gb_HelpLinkTarget_COMPACTTARGET)
+	-compact $(gb_HelpLinkTarget_COMPACTTARGET) \
 	-idxcaption $(gb_HelpLinkTarget_IDXCAPTIONTARGET) \
 	-idxcontent $(gb_HelpLinkTarget_IDXCONTENTTARGET) \
 	-sty $(gb_HelpLinkTarget_EMBEDTARGET) \
-	$(if $(and $(HELP_CONFIGDIR),$(HELP_INDEXED)),-add $(HELP_MODULE).cfg $(HELP_CONFIGDIR)/$(HELP_LANG)/$(HELP_MODULE).cfg) \
+	$(if $(HELP_CONFIGFILE),-add $(HELP_MODULE).cfg $(HELP_CONFIGFILE)) \
 	$(if $(HELP_TREE),-add $(HELP_MODULE).tree $(HELP_TREE)) \
 	$(foreach file,$(HELP_ADD_FILES),-add $(notdir $(file)) $(file)) \
 	$(foreach extra,$(HELP_EXTRA_ADD_FILES),-add $(subst $(COMMA), ,$(extra))) \
@@ -313,7 +313,7 @@
 # gb_HelpLinkTarget_HelpLinkTarget name module lang workdir
 define gb_HelpLinkTarget_HelpLinkTarget
 $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_ADD_FILES :=
-$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGDIR :=
+$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGFILE :=
 $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_EXTRA_ADD_FILES :=
 $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_FILES :=
 $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_INDEXED :=
@@ -329,9 +329,10 @@
 
 endef
 
-# gb_HelpLinkTarget_set_configdir target configdir
-define gb_HelpLinkTarget_set_configdir
-$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGDIR := $(2)
+# gb_HelpLinkTarget_set_configfile target configfile
+define gb_HelpLinkTarget_set_configfile
+$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGFILE := $(2)
+$(call gb_HelpLinkTarget_get_target,$(1)) : $(2)
 
 endef
 
@@ -511,8 +512,7 @@
 $(call gb_Output_announce,$(2),$(true),HLP,4)
 cd $(call gb_HelpTarget_get_workdir,$(2)) && \
 $(gb_HelpJarTarget_COMMAND) -q -0 -rX --filesync --must-match $(1) \
-	$(HELP_PACK_FILES) \
-	$(if $(and $(HELP_CONFIGDIR),$(HELP_INDEXED)),$(HELP_MODULE).cfg)
+	$(HELP_PACK_FILES)
 endef
 
 $(dir $(call gb_HelpTarget_get_target,%)).dir :
@@ -551,7 +551,6 @@
 #
 # gb_HelpTarget_HelpTarget target module lang
 define gb_HelpTarget_HelpTarget
-$(call gb_HelpTarget_get_target,$(1)) : HELP_CONFIGDIR :=
 $(call gb_HelpTarget_get_target,$(1)) : HELP_MODULE := $(2)
 $(call gb_HelpTarget_get_target,$(1)) : HELP_INDEXED :=
 $(call gb_HelpTarget_get_target,$(1)) : HELP_LANG := $(3)
@@ -610,11 +609,14 @@
 
 endef
 
-# gb_HelpTarget_set_configdir target configdir
-define gb_HelpTarget_set_configdir
-$(call gb_HelpLinkTarget_set_configdir,$(1),$(SRCDIR)/$(2))
-
-$(call gb_HelpTarget_get_target,$(1)) : HELP_CONFIGDIR := $(SRCDIR)/$(2)
+# Set config. file used for the help module.
+#
+# The configfile is relative to $(SRCDIR) and without extension.
+#
+# gb_HelpTarget_set_configfile target configfile
+define gb_HelpTarget_set_configfile
+$(call gb_HelpLinkTarget_set_configfile,$(1),$(SRCDIR)/$(2).cfg)
+$(call gb_HelpTarget__add_file,$(1),$(call gb_HelpTarget__get_module,$(1)).cfg)
 
 endef
 

-- 
To view, visit https://gerrit.libreoffice.org/3383
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia79effcb77aaa7054987879c394cb277e377c9d8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: David Tardon <dtardon at redhat.com>



More information about the LibreOffice mailing list