1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
4 # This file is part of the LibreOffice project.
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
14 # gb_Extension_LICENSEFILE_DEFAULT
16 gb_Extension__get_preparation_target
= $(WORKDIR
)/Extension
/$(1).prepare
18 gb_Extension_ZIPCOMMAND
:= zip
$(if
$(findstring s
,$(MAKEFLAGS
)),-q
)
19 gb_Extension_XRMEXDEPS
:= $(call gb_Executable_get_runtime_dependencies
,xrmex
)
20 gb_Extension_XRMEXCOMMAND
:= $(call gb_Executable_get_command
,xrmex
)
22 gb_Extension_PROPMERGEDEPS
:= $(call gb_Executable_get_runtime_dependencies
,propex
)
23 gb_Extension_PROPMERGECOMMAND
:= $(call gb_Executable_get_command
,propex
)
25 gb_Extension_TREEXDEPS
:= $(call gb_Executable_get_runtime_dependencies
,treex
)
26 gb_Extension_TREEXCOMMAND
:= $(call gb_Executable_get_command
,treex
)
28 gb_Extension_HELPEXDEPS
:= $(call gb_Executable_get_runtime_dependencies
,helpex
)
29 gb_Extension_HELPEXCOMMAND
:= $(call gb_Executable_get_command
,helpex
)
30 gb_Extension_HELPINDEXERDEPS
:= $(call gb_Executable_get_runtime_dependencies
,HelpIndexer
)
31 gb_Extension_HELPINDEXERCOMMAND
:= $(call gb_Executable_get_command
,HelpIndexer
)
32 gb_Extension_HELPLINKERDEPS
:= $(call gb_Executable_get_runtime_dependencies
,HelpLinker
)
33 gb_Extension_HELPLINKERCOMMAND
:= $(call gb_Executable_get_command
,HelpLinker
)
34 # does not contain en-US because it is special cased in gb_Extension_Extension
35 gb_Extension_TRANS_LANGS
:= $(filter-out en-US
,$(gb_WITH_LANG
))
36 gb_Extension_ALL_LANGS
:= en-US
$(gb_Extension_TRANS_LANGS
)
38 # target ensuring delivery of the extension to instdir
39 gb_Extension__get_final_target
= $(WORKDIR
)/Extension
/$(1).final
41 # Substitute platform or copy if no platform has been set
42 define gb_Extension__subst_platform
45 -e
's/@PLATFORM@/$(PLATFORM)/' \
46 -e
's/@EXEC_EXTENSION@/$(gb_Executable_EXT)/' \
47 -e
's/@SHARED_EXTENSION@/$(gb_Library_DLLEXT)/' \
52 $(call gb_Extension_get_workdir
,%)/.
dir :
53 $(if
$(wildcard $(dir $@
)),,mkdir
-p
$(dir $@
))
55 # remove extension directory in workdir and oxt file in workdir
56 $(call gb_Extension_get_clean_target
,%) :
57 $(call gb_Output_announce
,$*,$(false
),OXT
,3)
58 $(call gb_Helper_abbreviate_dirs
,\
59 rm -f
-r
$(call gb_Extension_get_workdir
,$*) && \
60 rm -f
$(call gb_Extension__get_preparation_target
,$*) \
61 $(call gb_Extension_get_target
,$*) \
64 $(call gb_Extension__get_final_target
,%) :
65 $(call gb_Helper_abbreviate_dirs
,\
66 mkdir
-p
$(dir $@
) && touch
$@
)
68 # preparation target to delay adding files produced by e.g. UnpackedTarball
69 $(call gb_Extension__get_preparation_target
,%) :
70 $(call gb_Helper_abbreviate_dirs
,\
71 mkdir
-p
$(dir $@
) && touch
$@
)
73 ifeq ($(strip $(gb_WITH_LANG
)),)
74 $(call gb_Extension_get_workdir
,%)/description.xml
: $(gb_Helper_LANGSTARGET
)
75 $(call gb_Output_announce
,$*/description.xml
,$(true
),CPY
,3)
76 $(call gb_Helper_abbreviate_dirs
,\
77 mkdir
-p
$(call gb_Extension_get_workdir
,$*) && \
78 cp
-f
$(LOCATION
)/description.xml
$@
)
80 $(call gb_Extension_get_workdir
,%)/description.xml
: $(gb_Extension_XRMEXDEPS
) $(gb_Helper_LANGSTARGET
)
81 $(call gb_Output_announce
,$*/description.xml
,$(true
),XRM
,3)
82 MERGEINPUT
=$(call var2file
,$(shell $(gb_MKTEMP
)),100,$(POFILES
)) && \
83 $(call gb_Helper_abbreviate_dirs
,\
84 mkdir
-p
$(call gb_Extension_get_workdir
,$*) && \
85 $(gb_Extension_XRMEXCOMMAND
) \
86 -i
$(filter %.xml
,$^
) \
94 # rule to create oxt package in workdir
95 # --filesync makes sure that all files in the oxt package will be removed that no longer are in $(FILES)
96 $(call gb_Extension_get_target
,%) : \
97 $(call gb_Extension_get_workdir
,%)/description.xml
98 $(call gb_Output_announce
,$*,$(true
),OXT
,3)
99 $(call gb_Helper_abbreviate_dirs
,\
100 mkdir
-p
$(call gb_Extension_get_rootdir
,$*)/META-INF \
101 $(if
$(LICENSE
),$(call gb_Extension_get_rootdir
,$*)/registration
) && \
102 $(call gb_Extension__subst_platform
,$(call gb_Extension_get_workdir
,$*)/description.xml
,$(call gb_Extension_get_rootdir
,$*)/description.xml
) && \
103 $(call gb_Extension__subst_platform
,$(LOCATION
)/META-INF
/manifest.xml
,$(call gb_Extension_get_rootdir
,$*)/META-INF
/manifest.xml
) && \
104 $(if
$(LICENSE
),cp
-f
$(LICENSE
) $(call gb_Extension_get_rootdir
,$*)/registration
&&) \
105 $(if
$(and
$(gb_Extension_TRANS_LANGS
),$(DESCRIPTION
)),cp
$(foreach lang
,$(gb_Extension_TRANS_LANGS
),$(call gb_Extension_get_workdir
,$*)/description-
$(lang
).txt
) $(call gb_Extension_get_rootdir
,$*) &&) \
106 cd
$(call gb_Extension_get_rootdir
,$*) && \
107 ZIPFILES
=$(call var2file
,$(shell $(gb_MKTEMP
)),500,$(sort $(FILES
))) && \
108 $(gb_Extension_ZIPCOMMAND
) -rX
--filesync
--must-match \
109 $(call gb_Extension_get_target
,$*) \
110 `cat $${ZIPFILES} | tr -d '\r'` && rm $${ZIPFILES})
112 # set file list and location of manifest and description files
113 # register target and clean target
115 # add dependency for outdir target to workdir target (pattern rule for delivery is in Package.mk)
117 # gb_Extension_Extension extension srcdir nodeliver
118 define gb_Extension_Extension
119 $(call gb_Extension_get_target
,$(1)) : DESCRIPTION
:=
120 $(call gb_Extension_get_target
,$(1)) : FILES
:= META-INF description.xml
121 $(call gb_Extension_get_target
,$(1)) : LICENSE
:=
122 $(call gb_Extension_get_target
,$(1)) : LOCATION
:= $(SRCDIR
)/$(2)
123 $(call gb_Extension_get_target
,$(1)) : PLATFORM
:= $(PLATFORMID
)
124 $(call gb_Extension_get_target
,$(1)) : $(SRCDIR
)/$(2)/META-INF
/manifest.xml
125 $(call gb_Extension_get_workdir
,$(1))/description.xml
: \
126 $(SRCDIR
)/$(2)/description.xml
127 $(call gb_Extension_get_workdir
,$(1))/description.xml
:| \
128 $(call gb_Extension__get_preparation_target
,$(1))
129 $(call gb_Extension__get_final_target
,$(1)) : $(call gb_Extension_get_target
,$(1))
131 $(if
$(filter nodeliver
,$(3)),,$(call gb_Extension__Extension_deliver
,$(1),Extension
/$(1)))
133 ifneq ($(strip $(gb_WITH_LANG
)),)
134 $(call gb_Extension_get_target
,$(1)) : \
135 POFILES
:= $(wildcard $(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/$(2).po
))
136 $(call gb_Extension_get_workdir
,$(1))/description.xml
: \
137 $(wildcard $(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/$(2).po
))
138 $(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/$(2).po
) :
141 $(foreach lang
,$(gb_Extension_ALL_LANGS
), \
142 $(call gb_Extension__compile_help_onelang
,$(1),$(lang
)))
144 $$(eval
$$(call gb_Module_register_target
,$(call gb_Extension__get_final_target
,$(1)),$(call gb_Extension_get_clean_target
,$(1))))
145 $(call gb_Helper_make_userfriendly_targets
,$(1),Extension
,$(call gb_Extension__get_final_target
,$(1)))
149 # Ensure delivery of the extension to instdir.
151 # gb_Extension__Extension_deliver extension package-name
152 define gb_Extension__Extension_deliver
153 $(call gb_GeneratedPackage_GeneratedPackage
,$(2),$(dir $(call gb_Extension_get_rootdir
,$(1))))
154 $(call gb_GeneratedPackage_add_dir
,$(2),$(INSTROOT
)/$(LIBO_SHARE_FOLDER
)/extensions
/$(1),$(notdir $(call gb_Extension_get_rootdir
,$(1))))
156 $(call gb_GeneratedPackage_get_target
,$(2)) : $(call gb_Extension_get_target
,$(1))
157 $(call gb_Extension__get_final_target
,$(1)) : $(call gb_GeneratedPackage_get_target
,$(2))
161 # adding a file creates a dependency to it
162 # file is copied to $(WORKDIR)
163 define gb_Extension_add_file
164 $(call gb_Extension_get_target
,$(1)) : FILES
+= $(2)
165 $(call gb_Extension_get_target
,$(1)) : $(call gb_Extension_get_rootdir
,$(1))/$(2)
166 $(3) :|
$(call gb_Extension__get_preparation_target
,$(1))
167 $(call gb_Extension_get_rootdir
,$(1))/$(2) : $(3)
168 mkdir
-p
$$(dir $$@
) && \
173 # Add several files at once
175 # This function avoids the need to specify each file's name twice. The
176 # files are added directly under specified path in the extension,
177 # without any subpath. If no path is specified, they are added directly
178 # to the root dir of the extension.
179 define gb_Extension_add_files
180 $(foreach file
,$(3),$(call gb_Extension_add_file
,$(1),$(if
$(strip $(2)),$(strip $(2))/)$(notdir $(file
)),$(file
)))
184 # add a library from workdir; DO NOT use gb_Library_get_target
185 define gb_Extension_add_library
186 $(call gb_Extension_add_file
,$(1),$(call gb_Library_get_runtime_filename
,$(2)),\
187 $(call gb_LinkTarget_get_target
,$(call gb_Library_get_linktarget
,$(2))))
191 define gb_Extension_add_libraries
192 $(foreach lib
,$(2),$(call gb_Extension_add_library
,$(1),$(lib
)))
197 define gb_Extension_add_executable
198 $(call gb_Extension_add_file
,$(1),$(notdir $(call gb_Executable_get_target
,$(2))),\
199 $(call gb_Executable_get_target
,$(2)))
203 define gb_Extension_add_executables
204 $(foreach exe
,$(2),$(call gb_Extension_add_executable
,$(1),$(exe
)))
208 # localize .properties file
209 # source file is copied to $(WORKDIR)
210 define gb_Extension_localize_properties
211 $(foreach lang
,$(gb_Extension_ALL_LANGS
),\
212 $(call gb_Extension__localize_properties_onelang
,$(1),$(subst en_US
,$(subst -,_
,$(lang
)),$(2)),$(3),$(lang
)))
217 # add an .xhp help file, to be localized and compiled
218 # $(1): extension identifier
219 # $(2): absolute path prefix of en-US source file without $(3) (resp. $(4))
221 # $(3): relative path of (target) .xhp file (e.g.,
222 # com.sun.wiki-publisher/wiki.xhp)
223 # $(4): optional relative path of source .xhp file, when it differs from $(3)
224 # (i.e., if $(4) is empty the en-US source file is $(2)/$(3), otherwise it
226 define gb_Extension_add_helpfile
227 $(foreach lang
,$(gb_Extension_ALL_LANGS
), \
228 $(call gb_Extension__localize_helpfile_onelang
,$(1),$(2),$(3),$(4),$(lang
)) \
229 $(call gb_Extension__add_compiled_help_dependency_onelang
,$(1),$(lang
)))
233 # add a list of .xhp help files, to be localized and compiled
234 # $(1): extension identifier
235 # $(2): absolute path prefix of en-US source files without $(3) suffixes
236 # $(3): list of relative paths of .xhp files (see gb_Extension_add_helpfile)
237 define gb_Extension_add_helpfiles
238 $(foreach helpfile
,$(3), \
239 $(call gb_Extension_add_helpfile
,$(1),$(2),$(helpfile
),))
243 # add a help.tree file, to be localized and compiled
244 # $(1): extension identifier
245 # $(2): absolute path prefix of en-US source file without $(3) (resp. $(4))
247 # $(3): relative path of (target) help.tree file (e.g.,
248 # com.sun.wiki-publisher/help.tree)
249 # $(4): relative path of source help.tree file
250 # $(5): relative path of localized xhp files (PlatformID included)
251 define gb_Extension_add_helptreefile
252 $(foreach lang
,$(gb_Extension_ALL_LANGS
), \
253 $(call gb_Extension__localize_helptreefile_onelang
,$(1),$(2),$(3),$(4),$(lang
),$(5)) \
254 $(call gb_Extension__add_compiled_help_dependency_onelang
,$(1),$(lang
)))
258 # Use the given file as description-en-US.txt
259 define gb_Extension_use_default_description
260 $(call gb_Extension_add_file
,$(1),description-en-US.txt
,$(SRCDIR
)/$(2))
261 $(call gb_Extension_get_target
,$(1)) : DESCRIPTION
:= $(true
)
262 ifneq ($(strip $(gb_WITH_LANG
)),)
263 $(call gb_Extension_get_target
,$(1)) : FILES
+= $(foreach lang
,$(gb_Extension_TRANS_LANGS
),description-
$(lang
).txt
)
268 # Use the default license file
269 define gb_Extension_use_default_license
270 $(call gb_Extension_get_target
,$(1)) : FILES
+= registration
271 $(call gb_Extension_get_target
,$(1)) : LICENSE
:= $(gb_Extension_LICENSEFILE_DEFAULT
)
272 $(call gb_Extension_get_target
,$(1)) : $(gb_Extension_LICENSEFILE_DEFAULT
)
276 define gb_Extension_use_unpacked
277 $(call gb_Extension__get_preparation_target
,$(1)) \
278 :|
$(call gb_UnpackedTarball_get_final_target
,$(2))
282 # Add a dependency on an ExternalProject.
284 # call gb_Extension_use_external_project,extension,externalproject
285 define gb_Extension_use_external_project
286 $(call gb_Extension__get_preparation_target
,$(1)) \
287 :|
$(call gb_ExternalProject_get_target
,$(2))
291 define gb_Extension__localize_properties_onelang
292 $(call gb_Extension_get_target
,$(1)) : FILES
+= $(2)
293 ifneq ($(filter-out en-US
,$(4)),)
294 ifneq ($(filter-out qtz
,$(4)),)
295 $(call gb_Extension_get_rootdir
,$(1))/$(2) : \
296 POFILE
:= $(gb_POLOCATION
)/$(or
$(5),$(4))/$(patsubst /%/,%,$(subst $(SRCDIR
),,$(dir $(3)))).po
297 $(call gb_Extension_get_rootdir
,$(1))/$(2) : \
298 $(gb_POLOCATION
)/$(or
$(5),$(4))/$(patsubst /%/,%,$(subst $(SRCDIR
),,$(dir $(3)))).po
299 $(gb_POLOCATION
)/$(or
$(5),$(4))/$(patsubst /%/,%,$(subst $(SRCDIR
),,$(dir $(3)))).po
:
302 $(call gb_Extension_get_target
,$(1)) : $(call gb_Extension_get_rootdir
,$(1))/$(2)
303 $(call gb_Extension_get_rootdir
,$(1))/$(2) \
304 :|
$(call gb_Extension__get_preparation_target
,$(1))
305 $(call gb_Extension_get_rootdir
,$(1))/$(2) : $(3) \
306 $(gb_Extension_PROPMERGEDEPS
)
307 $$(call gb_Output_announce
,$(2),$(true
),PRP
,3)
308 $$(call gb_Helper_abbreviate_dirs
, \
309 mkdir
-p
$$(dir $$@
) && \
310 $(if
$(filter qtz
,$(4)), \
311 $(subst $$,$$$$,$(gb_Extension_PROPMERGECOMMAND
)) -i
$$< -o
$$@
-m
-l
$(4) \
313 $(if
$(filter-out en-US
,$(4)), \
314 MERGEINPUT
=`$(gb_MKTEMP)` && \
315 echo
$$(POFILE
) > $$$${MERGEINPUT} && \
316 $(subst $$,$$$$,$(gb_Extension_PROPMERGECOMMAND
)) -i
$$< -o
$$@
-m
$$$${MERGEINPUT} -l
$(4) && \
317 rm -rf
$$$${MERGEINPUT} \
326 # localize one .xhp help file for one language; the result is stored as
327 # help/$(4)/$(3) in the extension's workdir; as a special case, if $(4) is
328 # "en-US", the source file is just copied, not passed through helpex
329 # $(1): extension identifier
330 # $(2): absolute path prefix of en-US source file without $(3) (resp. $(4))
332 # $(3): relative path of (target) .xhp file (see
333 # gb_Extension_add_helpfile)
334 # $(4): optional relative path of source .xhp file (see
335 # gb_Extension_add_helpfile)
337 define gb_Extension__localize_helpfile_onelang
338 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5).done
: HELPFILES
+= $(3)
339 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5).done
: \
340 $(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(3)
341 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)-xhp.done
: \
342 $(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(3)
343 ifneq ($(filter-out en-US
,$(5)),)
344 ifneq ($(filter-out qtz
,$(5)),)
345 $(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(3) : \
346 POFILE
:= $(gb_POLOCATION
)/$(5)$(subst $(SRCDIR
),,$(2))$(patsubst %/,/%.po
,$(patsubst .
/,.po
,$(dir $(or
$(4),$(3)))))
347 $(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(3) : \
348 $(gb_POLOCATION
)/$(5)$(subst $(SRCDIR
),,$(2))$(patsubst %/,/%.po
,$(patsubst .
/,.po
,$(dir $(or
$(4),$(3)))))
349 $(gb_POLOCATION
)/$(5)$(subst $(SRCDIR
),,$(2))$(patsubst %/,/%.po
,$(patsubst .
/,.po
,$(dir $(or
$(4),$(3))))) :
352 $(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(3) : \
353 $(if
$(filter-out en-US
,$(5)),$(gb_Extension_HELPEXDEPS
)) | \
354 $(call gb_Extension_get_workdir
,$(1))/help
/.
dir
355 $(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(3) : \
357 $$(call gb_Output_announce
,$(1) $(3) $(5),$(true
),XHP
,3)
358 $$(call gb_Helper_abbreviate_dirs
, \
359 mkdir
-p
$$(dir $$@
) && \
360 $(if
$(filter qtz
,$(5)), \
361 $(gb_Extension_HELPEXCOMMAND
) -i
$$< -o
$$@
-l
$(5) -m \
363 $(if
$(filter-out en-US
,$(5)), \
364 MERGEINPUT
=`$(gb_MKTEMP)` && \
365 echo
$$(POFILE
) > $$$${MERGEINPUT} && \
366 $$(gb_Extension_HELPEXCOMMAND
) -i
$$< -o
$$@
-l
$(5) \
367 -m
$$$${MERGEINPUT} && \
368 rm -rf
$$$${MERGEINPUT} \
373 touch
$(call gb_Extension_get_rootdir
,$(1))/help
/$(5)-xhp.done \
378 # localize one help.tree for one language; the result is stored as
379 # help/$(4)/$(3) in the extension's workdir;
380 # $(1): extension identifier
381 # $(2): absolute path prefix of en-US source file without $(3) (resp. $(4))
383 # $(3): relative path of (target) help.tree file (see
384 # gb_Extension_add_helptreefile)
385 # $(4): relative path of source help.tree file (see
386 # gb_Extension_add_helptreefile)
388 # $(6): relative path of localized xhp files (PlatformID included)
389 define gb_Extension__localize_helptreefile_onelang
390 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5).done
: \
391 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)/$(3)
392 ifneq ($(filter-out en-US
,$(5)),)
393 ifneq ($(filter-out qtz
,$(5)),)
394 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)/$(3) : \
395 POFILE
:= $(gb_POLOCATION
)/$(5)$(subst $(SRCDIR
),,$(2))$(patsubst %/,/%.po
,$(patsubst .
/,.po
,$(dir $(4))))
396 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)/$(3) : \
397 $(gb_POLOCATION
)/$(5)$(subst $(SRCDIR
),,$(2))$(patsubst %/,/%.po
,$(patsubst .
/,.po
,$(dir $(4))))
398 $(gb_POLOCATION
)/$(5)$(subst $(SRCDIR
),,$(2))$(patsubst %/,/%.po
,$(patsubst .
/,.po
,$(dir $(4)))) :
401 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)/$(3) : \
402 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)-xhp.done
403 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)/$(3) : \
404 $(gb_Extension_TREEXDEPS
) | \
406 $(call gb_Extension_get_rootdir
,$(1))/help
/$(5)/$(3) : \
408 $$(call gb_Output_announce
,$(1) $(3) $(5),$(true
),TRE
,3)
409 $$(call gb_Helper_abbreviate_dirs
, \
410 mkdir
-p
$$(dir $$@
) && \
411 $(if
$(filter qtz
,$(5)), \
412 $(subst $$,$$$$,$(gb_Extension_TREEXCOMMAND
)) -i
$$< -o
$$@
-l
$(5) -m \
413 -r
$$(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(6) \
415 $(if
$(filter-out en-US
,$(5)), \
416 MERGEINPUT
=`$(gb_MKTEMP)` && \
417 echo
$$(POFILE
) > $$$${MERGEINPUT} && \
418 $(subst $$,$$$$,$(gb_Extension_TREEXCOMMAND
)) -i
$$< -o
$$@
-l
$(5) \
419 -m
$$$${MERGEINPUT} \
420 -r
$$(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(6) && \
421 rm -rf
$$$${MERGEINPUT} \
423 $(subst $$,$$$$,$(gb_Extension_TREEXCOMMAND
)) -i
$$< -o
$$@
-l
$(5) \
424 -r
$$(call gb_Extension_get_workdir
,$(1))/help
/$(5)/$(6) \
431 # compile help for one language; the result is stored as help/$(3)/ in the
432 # extension's rootdir and marked for zipping into the .oxt
433 # $(1): extension identifier
435 # Target-specific HELPFILES: list of relative paths of .xhp files (see
436 # gb_Extension_add_helpfile)
437 define gb_Extension__compile_help_onelang
438 $(call gb_Extension_get_rootdir
,$(1))/help
/$(2).done
: \
439 $(gb_Extension_HELPINDEXERDEPS
) \
440 $(gb_Extension_HELPLINKERDEPS
) \
441 $(SRCDIR
)/xmlhelp
/util
/embed.xsl \
442 $(SRCDIR
)/xmlhelp
/util
/idxcaption.xsl \
443 $(SRCDIR
)/xmlhelp
/util
/idxcontent.xsl | \
444 $(call gb_Extension_get_rootdir
,$(1))/help
/.
dir
445 $$(call gb_Output_announce
,$(1) $(2),$(true
),XHC
,3)
446 $$(call gb_Helper_abbreviate_dirs
, \
447 mkdir
-p
$$(basename $$@
) && \
448 $$(gb_Extension_HELPLINKERCOMMAND
) -mod help \
449 -extlangsrc
$(call gb_Extension_get_workdir
,$(1))/help
/$(2) \
450 -sty
$(SRCDIR
)/xmlhelp
/util
/embed.xsl \
451 -extlangdest
$$(basename $$@
) \
452 -idxcaption
$(SRCDIR
)/xmlhelp
/util
/idxcaption.xsl \
453 -idxcontent
$(SRCDIR
)/xmlhelp
/util
/idxcontent.xsl \
455 (cd
$(call gb_Extension_get_workdir
,$(1))/help
/$(2) && \
456 $$(gb_Extension_ZIPCOMMAND
) -r
$$(basename $$@
)/help.jar \
458 $$(gb_Extension_HELPINDEXERCOMMAND
) -lang
$(2) -mod help \
459 -dir $$(basename $$@
) && \
460 rm -fr
$$(basename $$@
)/caption
$$(basename $$@
)/content
&& \
465 # establish the dependency that actually causes inclusion of the compiled help
466 # into the .oxt, for one language; in principle, this would only need to be done
467 # once per language iff the extension uses any help -- currently it is done from
468 # each individual gb_Extension_add_helpfile call (and thus requires $strip
469 # to remove duplicates from FILES)
470 # $(1): extension identifier
472 define gb_Extension__add_compiled_help_dependency_onelang
473 $(call gb_Extension_get_target
,$(1)) : FILES
+= help
/$(2)
474 $(call gb_Extension_get_target
,$(1)) : \
475 $(call gb_Extension_get_rootdir
,$(1))/help
/$(2).done
476 $(call gb_Extension_get_rootdir
,$(1))/help
/$(2).done \
477 :|
$(call gb_Extension__get_preparation_target
,$(1))
481 # vim: set noet sw=4 ts=4: