Repository.mk | 1 + solenv/gbuild/AllLangPackage.mk | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-)
New commits: commit 4a89e3fec30b854dd0d767dfb775451d01f1eaf9 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu May 24 10:46:43 2018 +0200 Properly handle language-specific parts of --with-help=html media/ sub-tree ...that previously ended up in language-independent parts of installation sets. The structure of that media/ tree doesn't allow to directly mis-use the existing AllLangPackage machinery (which expects the language to be encoded in the first pathname segment within the tree; and which is already mis-used for the helpcontent2/AllLangPackage_html_lang.mk parts). So introduce gb_AllLangPackage_add_files_for_lang that allows to specify the language explicitly, independent of where it is encoded in the pathname (if at all). The underlying gb_AllLangPackage_add_file sets a gb_AllLangPackage_ALLDIRS that is used by `make packageinfo`, which may need further fixing by anybody actually using that target; see the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2018-May/080242.html> "Broken --with-help=html `make packageinfo`". All files in $(SRCDIR)/helpcontent2/source/media/ must now explicitly be listed in either helpcontent2/Package_html_media.mk (for the language-independent files) or helpcontent2/AllLangPackage_html_media_lang.mk (for the language- specific files). Also note the two TODOs in helpcontent2/AllLangPackage_html_media_lang.mk. What is not quite right yet is that content from helpcontent2/AllLangPackage_html_lang.mk and helpcontent2/AllLangPackage_html_media_lang.mk is ending up in both per-language helpcontent installation sets (as intended, via the instructions in helpcontent2/CustomTarget_html.mk) and per-language languagepack installation sets (which is unintended). This needs to be fixed with a follow-up commit. This is the core part of a commit spanning core and helpcontent2. Change-Id: Ib29e52cf8a3ca7bcd234a8f6919c8eac6157cdbf diff --git a/Repository.mk b/Repository.mk index b69650c0d62b..be1879cdfc71 100644 --- a/Repository.mk +++ b/Repository.mk @@ -961,6 +961,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\ $(if $(ENABLE_HTMLHELP),\ helpcontent2_html_dynamic \ helpcontent2_html_media \ + helpcontent2_html_icon-themes \ helpcontent2_html_static \ ) \ )) diff --git a/solenv/gbuild/AllLangPackage.mk b/solenv/gbuild/AllLangPackage.mk index 6076a83bccb0..f0cf1c92e70c 100644 --- a/solenv/gbuild/AllLangPackage.mk +++ b/solenv/gbuild/AllLangPackage.mk @@ -63,15 +63,15 @@ endef # Add a file to one of the child packages. # -# The language is taken from the first component of the file name. The +# If 'lang' is empty, the language is taken from the first component of the 'source' file name. The # file is only added if there is a package defined for the language # (i.e., if we are building with the language). # -# gb_AllLangPackage_add_file target destination source +# gb_AllLangPackage_add_file target destination source lang gb_AllLangPackage_ALLDIRS := define gb_AllLangPackage_add_file gb_AllLangPackage_ALLDIRS := $(sort $(gb_AllLangPackage_ALLDIRS) $(patsubst %$(3),%,$(2))) -$(call gb_AllLangPackage__add_file,$(1),$(2),$(3),$(firstword $(subst /, ,$(3)))) +$(call gb_AllLangPackage__add_file,$(1),$(2),$(3),$(or $(4),$(firstword $(subst /, ,$(3))))) endef @@ -84,6 +84,13 @@ $(foreach file,$(3),$(call gb_AllLangPackage_add_file,$(1),$(2)/$(file),$(file)) endef +# gb_AllLangPackage_add_files_for_lang target lang destination-dir file(s) +define gb_AllLangPackage_add_files_for_lang +$(if $(strip $(3)),,$(call gb_Output_error,gb_AllLangPackage_add_files: destination dir cannot be empty)) +$(foreach file,$(4),$(call gb_AllLangPackage_add_file,$(1),$(3)/$(file),$(file),$(2))) + +endef + # Add several files to the child packages at once. # # The files are placed into subdir under the language-dependent path. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits