diff options
author | David Tardon <dtardon@redhat.com> | 2013-04-14 19:19:40 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-04-15 05:26:21 +0000 |
commit | d23f8bb0caf814684a4b5820f8d4d1389d9dda14 (patch) | |
tree | 47e28440587876a43c1b368dc5768d7d479e2f82 /solenv/gbuild/HelpTarget.mk | |
parent | cc1c050390ee68105f2f67edf3b6005880861c9b (diff) |
gbuild: deliver help files as packages
Change-Id: I52904567d0c7434af3f013cad7c3d9a8a67ac9f2
Reviewed-on: https://gerrit.libreoffice.org/3384
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'solenv/gbuild/HelpTarget.mk')
-rw-r--r-- | solenv/gbuild/HelpTarget.mk | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk index 70ff4ca124a9..5606fc048d3d 100644 --- a/solenv/gbuild/HelpTarget.mk +++ b/solenv/gbuild/HelpTarget.mk @@ -477,11 +477,13 @@ endef # 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))) gb_HelpTarget__test_default_lang = $(filter $(gb_HelpTarget_DEFAULT_LANG),$(1)) @@ -508,11 +510,9 @@ $(if $(call gb_HelpTarget__is_default_lang,$(1)) \ ) 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 @@ $(call gb_HelpTarget_get_linked_target,%) : 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_clean_target,%) : $(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 @@ $(call gb_HelpTarget_get_clean_target,%) : # 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 @@ $(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpTreeTarget_get_clean 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 @@ -644,8 +647,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)) $(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpIndexTarget_get_clean_target,$(1)) |