update credits
[LibreOffice.git] / wizards / CustomTarget_wizards.mk
blob6b18ae11db69f9cd7f0353f4bcf10232e9f0d402
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_CustomTarget_CustomTarget,wizards/locproperties))
12 wizards_DIR := $(gb_CustomTarget_workdir)/wizards/locproperties
14 define wizards_Properties_Properties
15 $(call wizards_Properties__Properties_impl,$(wizards_DIR)/resources_$(1).properties,$(SRCDIR)/wizards/source/resources/resources_en_US.properties,$(gb_POLOCATION)/$(2)/wizards/source/resources.po,$(2))
17 endef
19 define wizards_Properties__Properties_impl
20 $(1) : LANGUAGE := $(4)
21 $(1) : POFILE := $(3)
22 $(1) : SOURCE := $(2)
24 $(call gb_CustomTarget_get_target,wizards/locproperties) : $(1)
25 $(1) : $(2) \
26 $(wildcard $(3))
28 endef
30 ifneq ($(strip $(gb_WITH_LANG)),)
31 wizards_LANGS := $(filter-out en-US,$(gb_WITH_LANG))
32 $(eval $(foreach lang,$(wizards_LANGS),$(call wizards_Properties_Properties,$(subst -,_,$(lang)),$(lang))))
33 endif
35 $(wizards_DIR)/resources_%.properties : \
36 $(call gb_Executable_get_runtime_dependencies,propex) \
37 | $(wizards_DIR)/.dir
38 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1)
39 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRP)
40 $(call gb_Helper_abbreviate_dirs, \
41 $(if $(filter-out qtz,$(LANGUAGE)), \
42 MERGEINPUT=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(POFILE)) && \
43 $(call gb_Executable_get_command,propex) \
44 -i $(SOURCE) \
45 -o $@ \
46 -m $${MERGEINPUT} \
47 -l $(LANGUAGE) && \
48 rm -rf $${MERGEINPUT} \
49 , \
50 $(call gb_Executable_get_command,propex) \
51 -i $(SOURCE) \
52 -o $@ \
53 -m \
54 -l $(LANGUAGE) \
55 ) \
57 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRP)
60 # vim:set shiftwidth=4 tabstop=4 noexpandtab: