2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 # Configuration files: a bit of an overview of the targets:
22 # => XcsTarget: schemas
25 # => XcuDataTarget: data
27 # => XcsTarget (schema)
29 # => XcuModuleTaret: modules
32 # => XcuLangpackTarget: langpack (per lang)
35 # => XcuResTarget: resources (per lang)
37 # => XcuMergeTarget: merge
38 # => buildtools (cfgex)
41 # => XcsTarget (schema)
43 # TODO: This is obsolete--we do not have multiple repos anymore. Drop
44 # the first arugment of gb_Configuration__get_source and clean up its
45 # uses. Or just replace it by $(SRCDIR)/... .
46 # Per-repo pattern rules for each repository do not work for all targets
47 # because the prerequisites of some targets need to have the stem mangled
48 # and this does not seem to be possible in GNU make because when the stem is
49 # matched variables have already been expanded (this was possible in dmake).
51 # So to keep things consistent the Configuration takes a parameter for the
52 # repository and all targets use that to find the source file.
54 # Targets where % rule per repo works: XcsTarget XcuDataTarget XcuMergeTarget
55 # fails: XcuModuleTarget XcuLangpackTarget XcuResTarget
57 gb_Configuration__get_source
= $(SRCDIR
)/$(2)
59 # The main LibreOffice registry (cf. officecfg/Configuration_officecfg.mk):
60 gb_Configuration_PRIMARY_REGISTRY_NAME
:= registry
61 gb_Configuration_PRIMARY_REGISTRY_SCHEMA_ROOT
= \
62 $(SRCDIR
)/officecfg
/registry
/schema
64 gb_Configuration__stringparam_schemaRoot
= --stringparam schemaRoot \
65 $(if
$(PRIMARY_REGISTRY
), \
66 $(gb_Configuration_PRIMARY_REGISTRY_SCHEMA_ROOT
), \
67 $(call gb_XcsTarget_get_outdir_target
,))
69 gb_Configuration_XSLTCOMMAND
= $(call gb_ExternalExecutable_get_command
,xsltproc
)
70 gb_Configuration_XSLTCOMMAND_DEPS
= $(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
74 # need to locate a schema file corresponding to some XCU file in the outdir
75 define gb_XcsTarget_for_XcuTarget
76 $(call gb_XcsTarget_get_outdir_target
,$(basename $(1)).xcs
)
79 gb_Configuration_LANGS
:= en-US
$(filter-out en-US
,$(gb_WITH_LANG
))
81 gb_XcsTarget_XSLT_SchemaVal
:= $(OUTDIR
)/xml
/processing
/schema_val.xsl
82 gb_XcsTarget_XSLT_Sanity
:= $(OUTDIR
)/xml
/processing
/sanity.xsl
83 gb_XcsTarget_XSLT_SchemaTrim
:= $(OUTDIR
)/xml
/processing
/schema_trim.xsl
84 gb_XcsTarget_DTD_Schema
:= $(OUTDIR
)/xml
/registry
/component-schema.dtd
86 define gb_XcsTarget__command
87 $(call gb_Output_announce
,$(2),$(true
),XCS
,1)
88 $(call gb_Helper_abbreviate_dirs
,\
89 mkdir
-p
$(dir $(1)) && \
90 $(gb_Configuration_XSLTCOMMAND
) --nonet \
92 --stringparam componentName
$(subst /,.
,$(basename $(XCSFILE
))) \
93 --stringparam root
$(subst $(XCSFILE
),,$(3)) \
94 $(gb_Configuration__stringparam_schemaRoot
) \
95 $(gb_XcsTarget_XSLT_SchemaVal
) \
97 $(gb_Configuration_XSLTCOMMAND
) --nonet \
99 $(gb_XcsTarget_XSLT_Sanity
) \
101 $(gb_Configuration_XSLTCOMMAND
) --nonet \
103 $(gb_XcsTarget_XSLT_SchemaTrim
) \
107 $(call gb_XcsTarget_get_target
,%) : \
108 $(gb_XcsTarget_XSLT_SchemaVal
) $(gb_XcsTarget_XSLT_Sanity
) \
109 $(gb_XcsTarget_XSLT_SchemaTrim
) $(gb_XcsTarget_DTD_Schema
) \
110 |
$(gb_Configuration_XSLTCOMMAND_DEPS
)
111 $(call gb_XcsTarget__command
,$@
,$*,$(filter %.xcs
,$^
))
113 $(call gb_XcsTarget_get_clean_target
,%) :
114 $(call gb_Output_announce
,$*,$(false
),XCS
,1)
115 $(call gb_Helper_abbreviate_dirs
,\
116 rm -f
$(call gb_XcsTarget_get_target
,$*) \
117 $(call gb_XcsTarget_get_outdir_target
,$(XCSFILE
)))
120 # XcuDataTarget class
122 gb_XcuTarget_XSLT_AllLang
:= $(OUTDIR
)/xml
/processing
/alllang.xsl
123 gb_XcuDataTarget_XSLT_DataVal
:= $(OUTDIR
)/xml
/processing
/data_val.xsl
124 gb_XcuDataTarget_DTD_ComponentUpdate
:= $(OUTDIR
)/xml
/registry
/component-update.dtd
126 define gb_XcuDataTarget__command
127 $(call gb_Output_announce
,$(2),$(true
),XCU
,2)
128 $(call gb_Helper_abbreviate_dirs
,\
129 mkdir
-p
$(dir $(1)) && \
130 $(gb_Configuration_XSLTCOMMAND
) --nonet \
132 --stringparam xcs
$(call gb_XcsTarget_for_XcuTarget
,$(XCUFILE
)) \
133 $(gb_Configuration__stringparam_schemaRoot
) \
134 --path
$(gb_Configuration_registry
) \
135 $(gb_XcuDataTarget_XSLT_DataVal
) \
137 $(gb_Configuration_XSLTCOMMAND
) --nonet \
139 --stringparam xcs
$(call gb_XcsTarget_for_XcuTarget
,$(XCUFILE
)) \
140 $(gb_Configuration__stringparam_schemaRoot
) \
141 --path
$(gb_Configuration_registry
) \
142 $(gb_XcuTarget_XSLT_AllLang
) \
146 $(call gb_XcuDataTarget_get_target
,%) : $(gb_XcuDataTarget_XSLT_DataVal
) \
147 $(gb_XcuTarget_XSLT_AllLang
) $(gb_XcuDataTarget_DTD_ComponentUpdate
) \
148 |
$(gb_Configuration_XSLTCOMMAND_DEPS
)
149 $(call gb_XcuDataTarget__command
,$@
,$*,$(filter %.xcu
,$^
))
151 $(call gb_XcuDataTarget_get_clean_target
,%) :
152 $(call gb_Output_announce
,$*,$(false
),XCU
,2)
153 $(call gb_Helper_abbreviate_dirs
,\
154 rm -f
$(call gb_XcuDataTarget_get_target
,$*) \
155 $(call gb_XcuDataTarget_get_outdir_target
,$(XCUFILE
)))
158 # XcuModuleTarget class
160 define gb_XcuDataSource_for_XcuModuleTarget
161 $(call gb_Configuration__get_source
,$(1),$(basename $(subst -,.
,$(basename $(2)))).xcu
)
164 define gb_XcsTarget_for_XcuModuleTarget
165 $(call gb_XcsTarget_get_outdir_target
,$(basename $(subst -,.
,$(basename $(1)))).xcs
)
168 define gb_XcuModuleTarget__command
169 $(call gb_Output_announce
,$(2),$(true
),XCM
,3)
170 $(call gb_Helper_abbreviate_dirs
,\
171 mkdir
-p
$(dir $(1)) && \
172 $(gb_Configuration_XSLTCOMMAND
) --nonet \
174 --stringparam xcs
$(4) \
175 $(gb_Configuration__stringparam_schemaRoot
) \
176 --stringparam module
$(notdir $(subst -,/,$(basename $(notdir $(2))))) \
177 $(gb_XcuTarget_XSLT_AllLang
) \
181 $(call gb_XcuModuleTarget_get_target
,%) : $(gb_XcuTarget_XSLT_AllLang
) \
182 |
$(gb_Configuration_XSLTCOMMAND_DEPS
)
183 $(call gb_XcuModuleTarget__command
,$@
,$*,$(filter %.xcu
,$^
),$(filter %.xcs
,$^
))
185 $(call gb_XcuModuleTarget_get_clean_target
,%) :
186 $(call gb_Output_announce
,$*,$(false
),XCM
,3)
187 $(call gb_Helper_abbreviate_dirs
,\
188 rm -f
$(call gb_XcuModuleTarget_get_target
,$*) \
189 $(call gb_XcuModuleTarget_get_outdir_target
,$(XCUFILE
)))
192 # XcuLangpackTarget class
194 gb_XcuLangpackTarget__get_name_with_lang
= $(basename $(1))-$(2)$(suffix $(1))
196 gb_XcuLangpackTarget__get_outdir_target_with_lang
= \
197 $(call gb_XcuLangpackTarget_get_outdir_target
,$(call gb_XcuLangpackTarget__get_name_with_lang
,$(1),$(2)))
198 gb_XcuLangpackTarget__get_target_with_lang
= \
199 $(call gb_XcuLangpackTarget_get_target
,$(call gb_XcuLangpackTarget__get_name_with_lang
,$(1),$(2)))
201 gb_XcuLangpackTarget_SED_delcomment
:= $(OUTDIR
)/xml
/processing
/delcomment.sed
203 define gb_XcuLangpackTarget__command
204 $(call gb_Output_announce
,$(2),$(true
),XCL
,1)
205 $(call gb_Helper_abbreviate_dirs
,\
206 mkdir
-p
$(dir $(1)) && \
207 sed
-e
"s/__LANGUAGE__/$(LANG)/" -f
$(gb_XcuLangpackTarget_SED_delcomment
)\
211 $(call gb_XcuLangpackTarget_get_target
,%) : \
212 $(gb_XcuLangpackTarget_SED_delcomment
)
213 $(call gb_XcuLangpackTarget__command
,$@
,$*,$(filter %.tmpl
,$^
))
215 $(call gb_XcuLangpackTarget_get_clean_target
,%) :
216 $(call gb_Output_announce
,$*,$(false
),XCL
,1)
217 $(call gb_Helper_abbreviate_dirs
,\
218 rm -f
$(foreach lang
,$(gb_Configuration_LANGS
),\
219 $(call gb_XcuLangpackTarget__get_target_with_lang
,$*,$(lang
)) \
220 $(call gb_XcuLangpackTarget__get_outdir_target_with_lang
,$(XCUFILE
),$(lang
))))
223 # XcuMergeTarget class
225 gb_XcuMergeTarget_CFGEXDEPS
:= $(call gb_Executable_get_runtime_dependencies
,cfgex
)
226 gb_XcuMergeTarget_CFGEXCOMMAND
:= $(call gb_Executable_get_command
,cfgex
)
228 define gb_XcuMergeTarget__command
229 $(call gb_Output_announce
,$(2),$(true
),XCX
,1)
230 MERGEINPUT
=`$(gb_MKTEMP)` && \
231 echo
$(POFILES
) > $${MERGEINPUT} && \
232 $(call gb_Helper_abbreviate_dirs
,\
233 mkdir
-p
$(dir $(1)) && \
234 $(gb_XcuMergeTarget_CFGEXCOMMAND
) \
239 rm -rf
$${MERGEINPUT}
243 $(call gb_XcuMergeTarget_get_target
,%) : $(gb_XcuMergeTarget_CFGEXDEPS
)
244 $(if
$(filter $(words $(POFILES
)),$(words $(wildcard $(POFILES
)))),\
245 $(call gb_XcuMergeTarget__command
,$@
,$*,$(filter %.xcu
,$^
)),\
246 mkdir
-p
$(dir $@
) && cp
$(filter %.xcu
,$^
) $@
)
248 $(call gb_XcuMergeTarget_get_clean_target
,%) :
249 $(call gb_Output_announce
,$*,$(false
),XCX
,1)
250 $(call gb_Helper_abbreviate_dirs
,\
251 rm -f
$(call gb_XcuMergeTarget_get_target
,$*))
253 # $(call gb_XcuMergeTarget_XcuMergeTarget,target,configuration,prefix,xcufile)
254 define gb_XcuMergeTarget_XcuMergeTarget
255 $(call gb_XcuMergeTarget_get_target
,$(1)) : \
256 $(call gb_Configuration__get_source
,$(2),$(3)/$(4)) \
257 $(wildcard $(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/$(patsubst %/,%,$(dir $(1))).po
))
258 $(call gb_XcuMergeTarget_get_target
,$(1)) : \
259 POFILES
:= $(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/$(patsubst %/,%,$(dir $(1))).po
)
260 $(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/$(patsubst %/,%,$(dir $(1))).po
) :
266 # locale is extracted from the stem (parameter $(2))
267 define gb_XcuResTarget__command
268 $(call gb_Output_announce
,$(2),$(true
),XCR
,2)
269 $(call gb_Helper_abbreviate_dirs
,\
270 mkdir
-p
$(dir $(1)) && \
271 $(gb_Configuration_XSLTCOMMAND
) --nonet \
273 --stringparam xcs
$(call gb_XcsTarget_for_XcuTarget
,$(XCUFILE
)) \
274 $(gb_Configuration__stringparam_schemaRoot
) \
275 --stringparam locale
$(word 2,$(subst /, ,$(2))) \
276 --path
$(gb_Configuration_registry
) \
277 $(gb_XcuTarget_XSLT_AllLang
) \
281 $(call gb_XcuResTarget_get_target
,%) : $(gb_XcuTarget_XSLT_AllLang
) \
282 |
$(gb_Configuration_XSLTCOMMAND_DEPS
)
283 $(call gb_XcuResTarget__command
,$@
,$*,$(filter %.xcu
,$^
))
285 $(call gb_XcuResTarget_get_clean_target
,%) :
286 $(call gb_Output_announce
,$*,$(false
),XCR
,2)
287 $(call gb_Helper_abbreviate_dirs
,\
288 rm -f
$(call gb_XcuResTarget_get_target
,$*))
290 # $(call gb_XcuResTarget_XcuResTarget,target,configuration,prefix,xcufile,lang)
291 # this depends either on the source or on the merge target (if WITH_LANG)
292 define gb_XcuResTarget_XcuResTarget
293 ifeq ($(strip $(gb_WITH_LANG
)),)
294 $(call gb_XcuResTarget_get_target
,$(1)) : \
295 $(call gb_Configuration__get_source
,$(2),$(3)/$(4))
297 $(call gb_XcuResTarget_get_target
,$(1)) : \
298 $(call gb_XcuMergeTarget_get_target
,$(3)/$(4))
300 $(call gb_XcuResTarget_get_target
,$(1)) : \
301 $(call gb_XcsTarget_for_XcuTarget
,$(4))
302 $(call gb_XcuResTarget_get_target
,$(1)) : PRIMARY_REGISTRY
:= $(filter $(2),$(gb_Configuration_PRIMARY_REGISTRY_NAME
))
303 $(call gb_XcuResTarget_get_target
,$(1)) : XCUFILE
:= $(4)
307 # Configuration class
309 $(call gb_Configuration_get_clean_target
,%) :
310 $(call gb_Output_announce
,$*,$(false
),CFG
,4)
311 $(call gb_Helper_abbreviate_dirs
,\
312 rm -f
$(call gb_Configuration_get_target
,$*) $(call gb_Configuration_get_preparation_target
,$*))
314 $(call gb_Configuration_get_target
,%) :
315 $(call gb_Output_announce
,$*,$(true
),CFG
,4)
316 $(call gb_Helper_abbreviate_dirs
,\
317 mkdir
-p
$(dir $@
) && touch
$@
)
319 $(call gb_Configuration_get_preparation_target
,%) :
320 $(call gb_Helper_abbreviate_dirs
,\
321 mkdir
-p
$(dir $@
) && touch
$@
)
323 # $(call gb_Configuration_Configuration,configuration,repo,nodeliver)
324 # cannot use target local variable for REPO because it's needed in prereq
325 # last parameter may be used to turn off delivering of files
326 define gb_Configuration_Configuration
327 $(eval gb_Configuration_NODELIVER_
$(1) := $(2))
329 $$(eval
$$(call gb_Module_register_target
,$(call gb_Configuration_get_target
,$(1)),$(call gb_Configuration_get_clean_target
,$(1))))
330 $(call gb_Helper_make_userfriendly_targets
,$(1),Configuration
)
334 # $(call gb_Configuration_add_schema,configuration,prefix,xcsfile)
335 # FIXME this is always delivered because commands depend on it...
336 # hopefully extensions do not need to add schemas with same name as officecfg
337 define gb_Configuration_add_schema
338 $(call gb_Configuration_get_clean_target
,$(1)) : \
339 $(call gb_XcsTarget_get_clean_target
,$(2)/$(3))
340 $(call gb_XcsTarget_get_target
,$(2)/$(3)) : \
341 $(call gb_Configuration__get_source
,$(1),$(2)/$(3)) \
342 $(call gb_Configuration_get_preparation_target
,$(1))
343 $(call gb_XcsTarget_get_target
,$(2)/$(3)) : PRIMARY_REGISTRY
:= $(filter $(1),$(gb_Configuration_PRIMARY_REGISTRY_NAME
))
344 $(call gb_XcsTarget_get_target
,$(2)/$(3)) : XCSFILE
:= $(3)
345 $(call gb_XcsTarget_get_clean_target
,$(2)/$(3)) : XCSFILE
:= $(3)
346 $(call gb_Configuration_get_target
,$(1)) : \
347 $(call gb_XcsTarget_get_outdir_target
,$(3))
348 $(call gb_XcsTarget_get_outdir_target
,$(3)) : \
349 $(call gb_XcsTarget_get_target
,$(2)/$(3)) \
350 |
$(dir $(call gb_XcsTarget_get_outdir_target
,$(3))).
dir
351 $(call gb_Deliver_add_deliverable
,$(call gb_XcsTarget_get_outdir_target
,$(3)),\
352 $(call gb_XcsTarget_get_target
,$(2)/$(3)),$(2)/$(3))
356 #$(call gb_Configuration_add_schemas,configuration,prefix,xcsfiles)
357 define gb_Configuration_add_schemas
358 $(foreach xcs
,$(3),$(call gb_Configuration_add_schema
,$(1),$(2),$(xcs
)))
362 # $(call gb_Configuration_add_data,configuration,prefix,xcufile)
363 define gb_Configuration_add_data
364 $(call gb_Configuration_get_clean_target
,$(1)) : \
365 $(call gb_XcuDataTarget_get_clean_target
,$(2)/$(3))
366 $(call gb_XcuDataTarget_get_target
,$(2)/$(3)) : \
367 $(call gb_Configuration__get_source
,$(1),$(2)/$(3)) \
368 $(call gb_Configuration_get_preparation_target
,$(1)) \
369 $(call gb_XcsTarget_for_XcuTarget
,$(3))
370 $(call gb_XcuDataTarget_get_target
,$(2)/$(3)) : PRIMARY_REGISTRY
:= $(filter $(1),$(gb_Configuration_PRIMARY_REGISTRY_NAME
))
371 $(call gb_XcuDataTarget_get_target
,$(2)/$(3)) : XCUFILE
:= $(3)
372 $(call gb_XcuDataTarget_get_clean_target
,$(2)/$(3)) : XCUFILE
:= $(3)
373 ifeq ($(strip $(gb_Configuration_NODELIVER_
$(1))),)
374 $(call gb_Configuration_get_target
,$(1)) : \
375 $(call gb_XcuDataTarget_get_outdir_target
,$(3))
376 $(call gb_XcuDataTarget_get_outdir_target
,$(3)) : \
377 $(call gb_XcuDataTarget_get_target
,$(2)/$(3)) \
378 |
$(dir $(call gb_XcuDataTarget_get_outdir_target
,$(3))).
dir
379 $(call gb_Deliver_add_deliverable
,\
380 $(call gb_XcuDataTarget_get_outdir_target
,$(3)),\
381 $(call gb_XcuDataTarget_get_target
,$(2)/$(3)),\
384 $(call gb_Configuration_get_target
,$(1)) : \
385 $(call gb_XcuDataTarget_get_target
,$(2)/$(3))
390 #$(call gb_Configuration_add_datas,configuration,prefix,xcufiles)
391 define gb_Configuration_add_datas
392 $(foreach xcu
,$(3),$(call gb_Configuration_add_data
,$(1),$(2),$(xcu
)))
396 # $(call gb_Configuration_add_spool_module,configuration,prefix,xcufile)
397 define gb_Configuration_add_spool_module
398 $(call gb_Configuration_get_clean_target
,$(1)) : \
399 $(call gb_XcuModuleTarget_get_clean_target
,$(2)/$(3))
400 $(call gb_XcuModuleTarget_get_target
,$(2)/$(3)) : \
401 $(call gb_XcuDataSource_for_XcuModuleTarget
,$(1),$(2)/$(3)) \
402 $(call gb_Configuration_get_preparation_target
,$(1)) \
403 $(call gb_XcsTarget_for_XcuModuleTarget
,$(3))
404 $(call gb_XcuModuleTarget_get_target
,$(2)/$(3)) : PRIMARY_REGISTRY
:= $(filter $(1),$(gb_Configuration_PRIMARY_REGISTRY_NAME
))
405 $(call gb_XcuModuleTarget_get_clean_target
,$(2)/$(3)) : XCUFILE
:= $(3)
406 ifeq ($(strip $(gb_Configuration_NODELIVER_
$(1))),)
407 $(call gb_Configuration_get_target
,$(1)) : \
408 $(call gb_XcuModuleTarget_get_outdir_target
,$(3))
409 $(call gb_XcuModuleTarget_get_outdir_target
,$(3)) : \
410 $(call gb_XcuModuleTarget_get_target
,$(2)/$(3)) \
411 |
$(dir $(call gb_XcuModuleTarget_get_outdir_target
,$(3))).
dir
412 $(call gb_Deliver_add_deliverable
,\
413 $(call gb_XcuModuleTarget_get_outdir_target
,$(3)),\
414 $(call gb_XcuModuleTarget_get_target
,$(2)/$(3)),\
417 $(call gb_Configuration_get_target
,$(1)) : \
418 $(call gb_XcuModuleTarget_get_target
,$(2)/$(3))
423 # $(call gb_Configuration_add_spool_modules,configuration,prefix,xcufiles)
424 define gb_Configuration_add_spool_modules
425 $(foreach xcu
,$(3),$(call gb_Configuration_add_spool_module
,$(1),$(2),$(xcu
)))
429 define gb_Configuration__add_langpack
430 $(if
$(gb_Configuration_NODELIVER_
$(1)),\
431 $(error TODO not needed yet
: cannot add langpack if nodeliver
))
432 $(call gb_Configuration_get_clean_target
,$(1)) : \
433 $(call gb_XcuLangpackTarget_get_clean_target
,$(2)/$(3))
434 $(call gb_Configuration_get_target
,$(1)) : \
435 $(call gb_XcuLangpackTarget__get_outdir_target_with_lang
,$(3),$(4))
436 $(call gb_XcuLangpackTarget__get_target_with_lang
,$(2)/$(3),$(4)) : \
437 $(SRCDIR
)/$(2)/$(3).tmpl
438 $(call gb_XcuLangpackTarget_get_clean_target
,$(2)/$(3)) : XCUFILE
:= $(3)
439 $(call gb_XcuLangpackTarget__get_target_with_lang
,$(2)/$(3),$(4)) : LANG
:= $(4)
440 $(call gb_XcuLangpackTarget__get_outdir_target_with_lang
,$(3),$(4)) : \
441 $(call gb_XcuLangpackTarget__get_target_with_lang
,$(2)/$(3),$(4)) \
442 |
$(dir $(call gb_XcuLangpackTarget__get_outdir_target_with_lang
,$(3),$(4))).
dir
443 $(call gb_Deliver_add_deliverable
,\
444 $(call gb_XcuLangpackTarget__get_outdir_target_with_lang
,$(3),$(4)),\
445 $(call gb_XcuLangpackTarget__get_target_with_lang
,$(2)/$(3),$(4)),\
446 $(call gb_XcuLangpackTarget__get_name_with_lang
,$(2)/$(3),$(4)))
450 # $(call gb_Configuration_add_spool_langpack,configuration,prefix,xcufile)
451 define gb_Configuration_add_spool_langpack
452 $(foreach lang
,$(gb_Configuration_LANGS
),$(eval \
453 $(call gb_Configuration__add_langpack
,$(1),$(2),$(strip $(3)),$(lang
))))
457 # $(call gb_Configuration_add_localized_data,configuration,prefix,xcufile)
458 define gb_Configuration_add_localized_data
459 $(eval
$(call gb_Configuration_add_data
,$(1),$(2),$(3)))
460 ifneq ($(strip $(gb_WITH_LANG
)),)
461 $(eval
$(call gb_XcuMergeTarget_XcuMergeTarget
,$(2)/$(3),$(1),$(2),$(3)))
462 $(eval
$(call gb_Configuration_get_clean_target
,$(1)) : \
463 $(call gb_XcuMergeTarget_get_clean_target
,$(2)/$(3)))
465 $(foreach lang
,$(gb_Configuration_LANGS
),$(eval \
466 $(call gb_XcuResTarget_XcuResTarget
,$(1)/$(lang
)/$(3),$(1),$(2),$(3),$(lang
))))
467 $(foreach lang
,$(gb_Configuration_LANGS
),$(eval \
468 $(call gb_Configuration_get_target
,$(1)) : \
469 $(call gb_XcuResTarget_get_target
,$(1)/$(lang
)/$(3))))
470 $(foreach lang
,$(gb_Configuration_LANGS
),$(eval \
471 $(call gb_Configuration_get_clean_target
,$(1)) : \
472 $(call gb_XcuResTarget_get_clean_target
,$(1)/$(lang
)/$(3))))
476 # $(call gb_Configuration_add_localized_datas,configuration,prefix,xcufile)
477 define gb_Configuration_add_localized_datas
478 $(foreach xcu
,$(3),$(call gb_Configuration_add_localized_data
,$(1),$(2),$(xcu
)))
482 # Set extra registry this configuration can use schemas from.
485 # # foo needs schemas from the main configuration
486 # $(eval $(call gb_Configuration_use_configuration,foo,registry))
487 define gb_Configuration_use_configuration
488 $(call gb_Configuration_get_preparation_target
,$(1)) : $(call gb_Configuration_get_target
,$(2))
492 # apparently extensions package the XcuMergeTarget directly...
493 # trivial convenience function to get the right file:
494 ifeq ($(gb_WITH_LANG
),)
495 gb_XcuFile_for_extension
= $(call gb_Configuration__get_source
,,$(1))
497 gb_XcuFile_for_extension
= $(call gb_XcuMergeTarget_get_target
,$(1))
500 # vim: set noet sw=4 ts=4: