Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3384
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/84/3384/1
gbuild: deliver help files as packages
Change-Id: I52904567d0c7434af3f013cad7c3d9a8a67ac9f2
---
M scp2/inc/macros.inc
M scp2/macros/macro.pl
M scp2/source/base/file_base.scp
M scp2/source/calc/file_calc.scp
M scp2/source/draw/file_draw.scp
M scp2/source/impress/file_impress.scp
M scp2/source/math/file_math.scp
M scp2/source/ooo/file_ooo.scp
M scp2/source/writer/file_writer.scp
M solenv/gbuild/AllLangHelp.mk
M solenv/gbuild/HelpTarget.mk
M solenv/gbuild/TargetLocations.mk
12 files changed, 46 insertions(+), 60 deletions(-)
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 7ae0b4e..6ff7959 100755
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -56,6 +56,7 @@
#define READMETXTFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
#define READMEFILENAME(name,lang) STRING(CONCAT2(name,lang))
#define EXTRAFILENAME(name,lang) STRING(CONCAT3(name,lang,.zip))
+#define EXTRAFILELISTNAME(prefix,name,lang) STRING(CONCAT4(prefix,name,lang,.filelist))
#define CONFIGLANGFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
#define SCP2_OOO_BIN_DIR gid_Brand_Dir_Program
@@ -81,13 +82,13 @@
Styles = (ARCHIVE)
#ifdef WITH_HELPPACK_INTEGRATION
-#define ARCHIVE_TXT_FILE_BODY_HELPPACK \
+#define FILELIST_TXT_FILE_BODY_HELPPACK \
TXT_FILE_BODY; \
- Styles = (ARCHIVE,FORCEHELPPACK,LANGUAGEMODULE)
+ Styles = (FILELIST,FORCEHELPPACK,LANGUAGEMODULE)
#else
-#define ARCHIVE_TXT_FILE_BODY_HELPPACK \
+#define FILELIST_TXT_FILE_BODY_HELPPACK \
TXT_FILE_BODY; \
- Styles = (ARCHIVE,HELPPACK,LANGUAGEMODULE)
+ Styles = (FILELIST,HELPPACK,LANGUAGEMODULE)
#endif
#define PACKED_LIB_FILE_BODY \
diff --git a/scp2/macros/macro.pl b/scp2/macros/macro.pl
index dc5d2a9..2ad3fad 100644
--- a/scp2/macros/macro.pl
+++ b/scp2/macros/macro.pl
@@ -169,7 +169,7 @@
next if ( $poorhelplocalizations{$lang} );
print OUTFILE ";" unless $first;
$first = 0;
- print OUTFILE "\\\n\tName ($lang) = EXTRAFILENAME(name,_$lang)";
+ print OUTFILE "\\\n\tName ($lang) = EXTRAFILELISTNAME(HelpTarget/,name,/$lang)";
}
print OUTFILE "\n\n";
}
diff --git a/scp2/source/base/file_base.scp b/scp2/source/base/file_base.scp
index f684e1d..fb1a230 100644
--- a/scp2/source/base/file_base.scp
+++ b/scp2/source/base/file_base.scp
@@ -66,10 +66,9 @@
#if defined WITH_HELP
File gid_File_Help_Sdatabase_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(sdatabase);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/calc/file_calc.scp b/scp2/source/calc/file_calc.scp
index f598556..8f5dfbb 100644
--- a/scp2/source/calc/file_calc.scp
+++ b/scp2/source/calc/file_calc.scp
@@ -71,10 +71,9 @@
#if defined WITH_HELP
File gid_File_Help_Scalc_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(scalc);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/draw/file_draw.scp b/scp2/source/draw/file_draw.scp
index 676112f..4b7c4db 100644
--- a/scp2/source/draw/file_draw.scp
+++ b/scp2/source/draw/file_draw.scp
@@ -36,10 +36,9 @@
#if defined WITH_HELP
File gid_File_Help_Sdraw_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(sdraw);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/impress/file_impress.scp b/scp2/source/impress/file_impress.scp
index 88cbf69..f2eebf0 100644
--- a/scp2/source/impress/file_impress.scp
+++ b/scp2/source/impress/file_impress.scp
@@ -57,10 +57,9 @@
#if defined WITH_HELP
File gid_File_Help_Simpress_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(simpress);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/math/file_math.scp b/scp2/source/math/file_math.scp
index acbb3c9..aa0fcb3 100644
--- a/scp2/source/math/file_math.scp
+++ b/scp2/source/math/file_math.scp
@@ -52,10 +52,9 @@
#if defined WITH_HELP
File gid_File_Help_Smath_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(smath);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index c5b8fc4..8a308d8 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -396,22 +396,20 @@
#if defined WITH_HELP
File gid_File_Help_Common_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(shared);
- Patchfiles = ();
End
File gid_File_Help_Sbasic_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(sbasic);
- Patchfiles = ();
End
File gid_File_Help_Schart_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(schart);
End
#endif
diff --git a/scp2/source/writer/file_writer.scp b/scp2/source/writer/file_writer.scp
index d02047f..a7cd9ed 100644
--- a/scp2/source/writer/file_writer.scp
+++ b/scp2/source/writer/file_writer.scp
@@ -49,10 +49,9 @@
#if defined WITH_HELP
File gid_File_Help_Swriter_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(swriter);
- Patchfiles = ();
End
#endif
diff --git a/solenv/gbuild/AllLangHelp.mk b/solenv/gbuild/AllLangHelp.mk
index d154de2..16fcc67 100644
--- a/solenv/gbuild/AllLangHelp.mk
+++ b/solenv/gbuild/AllLangHelp.mk
@@ -30,7 +30,6 @@
endef
gb_AllLangHelp__get_helpname = $(1)/$(2)
-gb_AllLangHelp__get_zipname = $(1)_$(2)
$(dir $(call gb_AllLangHelp_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
@@ -45,22 +44,18 @@
$(call gb_AllLangHelp_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),ALH,5)
$(call gb_Helper_abbreviate_dirs,\
- rm -f $(call gb_AllLangHelp_get_target,$*) $(HELP_DELIVERABLES) \
+ rm -f $(call gb_AllLangHelp_get_target,$*) \
)
-# gb_AllLangHelp_AllLangHelp__one_lang module lang helpname zipname
+# gb_AllLangHelp_AllLangHelp__one_lang module lang helpname
define gb_AllLangHelp_AllLangHelp__one_lang
$(call gb_HelpTarget_HelpTarget,$(3),$(1),$(2))
$(call gb_HelpTarget_set_helpdir,$(3),$(gb_AllLangHelp_HELPDIR))
-$(call gb_HelpTarget_get_outdir_target,$(4)) : $(call gb_HelpTarget_get_target,$(3))
-$(call gb_HelpTarget_get_outdir_target,$(4)) :| $(dir $(call
gb_HelpTarget_get_outdir_target,$(4))).dir
-$(call gb_AllLangHelp_get_target,$(1)) : $(call gb_HelpTarget_get_outdir_target,$(4))
$(call gb_AllLangHelp_get_target,$(1)) : $(call gb_HelpTarget_get_target,$(3))
+$(call gb_AllLangHelp_get_target,$(1)) : $(call gb_Package_get_target,$(call
gb_HelpTarget_get_packagename,$(3)))
$(call gb_AllLangHelp_get_clean_target,$(1)) : $(call gb_HelpTarget_get_clean_target,$(3))
-$(call gb_AllLangHelp_get_clean_target,$(1)) : HELP_DELIVERABLES += $(call
gb_HelpTarget_get_outdir_target,$(4))
-
-$(call gb_Deliver_add_deliverable,$(call gb_HelpTarget_get_outdir_target,$(4)),$(call
gb_HelpTarget_get_target,$(3)),$(1))
+$(call gb_AllLangHelp_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(call
gb_HelpTarget_get_packagename,$(3)))
endef
@@ -68,11 +63,9 @@
#
# gb_AllLangHelp_AllLangHelp module
define gb_AllLangHelp_AllLangHelp
-$(call gb_AllLangHelp_get_clean_target,$(1)) : HELP_DELIVERABLES :=
-
$(foreach lang,$(gb_AllLangHelp_LANGS),\
$(if $(call gb_AllLangHelp__translation_exists,$(lang)),\
- $(call gb_AllLangHelp_AllLangHelp__one_lang,$(1),$(lang),$(call
gb_AllLangHelp__get_helpname,$(1),$(lang)),$(call gb_AllLangHelp__get_zipname,$(1),$(lang)))))
+ $(call gb_AllLangHelp_AllLangHelp__one_lang,$(1),$(lang),$(call
gb_AllLangHelp__get_helpname,$(1),$(lang)))))
$(call gb_AllLangHelp_get_target,$(1)) :| $(dir $(call gb_AllLangHelp_get_target,$(1))).dir
diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index 70ff4ca..5606fc0 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -477,10 +477,12 @@
# class HelpTarget
# Creates one language version of a help module.
+#
+# Provides a filelist called HelpTarget/<name>, that is not built by
+# default (i.e., the user of HelpTarget has to explicitly depend on the
+# Package).
gb_HelpTarget_DEFAULT_LANG := en-US
-
-gb_HelpTarget_COMMAND := zip
gb_HelpTarget__get_module = $(patsubst %/$(call gb_HelpTarget__get_lang,$(1)),%,$(1))
gb_HelpTarget__get_lang = $(lastword $(subst /, ,$(1)))
@@ -508,11 +510,9 @@
)
endef
-define gb_HelpTarget__get_command
+define gb_HelpTarget__command
$(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)
+touch $@
endef
$(dir $(call gb_HelpTarget_get_target,%)).dir :
@@ -532,7 +532,7 @@
touch $@
$(call gb_HelpTarget_get_target,%) :
- $(call gb_HelpTarget__get_command,$@,$*)
+ $(call gb_HelpTarget__command,$@,$*)
.PHONY : $(call gb_HelpTarget_get_clean_target,%)
$(call gb_HelpTarget_get_clean_target,%) :
@@ -545,6 +545,8 @@
$(call gb_HelpTarget_get_workdir,$*) \
)
+gb_HelpTarget_get_packagename = HelpTarget/$(1)
+
# Create a help target.
#
# depend on makefile to re-build filelist when files are removed
@@ -552,28 +554,29 @@
# gb_HelpTarget_HelpTarget target module lang
define gb_HelpTarget_HelpTarget
$(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)
-$(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)) : $(gb_Module_CURRENTMAKEFILE)
-$(call gb_HelpTarget__HelpTarget_impl,$(1),$(2),$(3),$(call gb_HelpTarget_get_workdir,$(1)))
+$(call gb_HelpTarget__HelpTarget_impl,$(1),$(2),$(3),$(call gb_HelpTarget_get_workdir,$(1)),$(call
gb_HelpTarget_get_packagename,$(1)))
endef
-# gb_HelpTarget__HelpTarget_impl target module lang workdir
+# gb_HelpTarget__HelpTarget_impl target module lang workdir package
define gb_HelpTarget__HelpTarget_impl
$(if $(call gb_HelpTarget__test_default_lang,$(3)),,$(call
gb_HelpTarget__HelpTarget_impl_lang,$(1),$(2),$(3),$(4)))
$(call gb_HelpLinkTarget_HelpLinkTarget,$(1),$(2),$(3),$(4))
$(call gb_HelpIndexTarget_HelpIndexTarget,$(1),$(2),$(3),$(4))
$(call gb_HelpJarTarget_HelpJarTarget,$(1),$(2),$(4))
+$(call gb_Package_Package_internal,$(5),$(4))
+$(call gb_Package_set_outdir,$(5),$(INSTDIR))
$(call gb_HelpTarget_get_linked_target,$(1)) : $(call gb_HelpTarget_get_translation_target,$(1))
$(call gb_HelpLinkTarget_get_target,$(1)) : $(call gb_HelpTarget_get_linked_target,$(1))
$(call gb_HelpLinkTarget_get_target,$(1)) :| $(call gb_HelpTarget_get_workdir,$(1))/.dir
$(call gb_HelpTarget_get_target,$(1)) : $(call gb_HelpLinkTarget_get_target,$(1))
+$(call gb_Package_get_preparation_target,$(5)) : $(call gb_HelpTarget_get_target,$(1))
$(call gb_HelpTarget_get_linked_target,$(1)) :| $(dir $(call
gb_HelpTarget_get_linked_target,$(1))).dir
$(call gb_HelpTarget_get_target,$(1)) :| $(dir $(call gb_HelpTarget_get_target,$(1))).dir
@@ -596,16 +599,16 @@
endef
-# Add index files into the zip.
+# Get list of the various index files.
#
# gb_HelpTarget__add_index_files target module
define gb_HelpTarget__get_index_files
-$(foreach suffix,.db .ht .idxl .key,$(addsuffix $(suffix),$(call gb_HelpTarget__get_module,$(1))))
+$(foreach suffix,.db .ht .idxl/_0.cfs .idxl/segments_3 .idxl/segments.gen .key,$(addsuffix
$(suffix),$(call gb_HelpTarget__get_module,$(1))))
endef
# gb_HelpTarget__add_file target file
define gb_HelpTarget__add_file
-$(call gb_HelpTarget_get_target,$(1)) : HELP_PACK_FILES += $(2)
+$(call gb_Package_add_file,$(call gb_HelpTarget_get_packagename,$(1)),help/$(call
gb_HelpTarget__get_lang,$(1))/$(2),$(2))
endef
@@ -643,8 +646,6 @@
define gb_HelpTarget_set_indexed
$(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)
$(call gb_HelpIndexTarget_get_target,$(1)) : $(call gb_HelpLinkTarget_get_target,$(1))
$(call gb_HelpTarget_get_target,$(1)) : $(call gb_HelpIndexTarget_get_target,$(1))
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index f56d9b2..5338fd3 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -36,7 +36,6 @@
gb_Executable_get_target = $(OUTDIR)/bin/$(1)$(gb_Executable_EXT)
gb_Executable_get_target_for_build = $(OUTDIR_FOR_BUILD)/bin/$(1)$(gb_Executable_EXT_for_build)
gb_Extension_get_target = $(OUTDIR)/bin/$(1).oxt
-gb_HelpTarget_get_outdir_target = $(OUTDIR)/pck/$(1).zip
gb_Pagein_get_outdir_target = $(OUTDIR)/bin/pagein-$(1)
gb_PackagePart_get_destinations = \
$(INSTDIR) \
--
To view, visit https://gerrit.libreoffice.org/3384
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52904567d0c7434af3f013cad7c3d9a8a67ac9f2
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: David Tardon <dtardon@redhat.com>
Context
- [PATCH] gbuild: deliver help files as packages · David Tardon (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.