Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / librelogo / CustomTarget_librelogo.mk
blob03d6e6c6fb4c404cfe33a059b222e4c6136b70c6
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,librelogo/locproperties))
12 librelogo_DIR := $(call gb_CustomTarget_get_workdir,librelogo/locproperties)
14 define librelogo_Properties_Properties
15 $(call librelogo_Properties__Properties_impl,$(librelogo_DIR)/LibreLogo_$(1).properties,$(SRCDIR)/librelogo/source/pythonpath/LibreLogo_en_US.properties,$(gb_POLOCATION)/$(2)/librelogo/source/pythonpath.po,$(2))
17 endef
19 define librelogo_Properties__Properties_impl
20 $(1) : LANG := $(4)
21 $(1) : POFILE := $(3)
22 $(1) : SOURCE := $(2)
24 $(call gb_CustomTarget_get_target,librelogo/locproperties) : $(1)
25 $(1) : $(2) \
26 $(wildcard $(3))
28 endef
30 ifneq ($(strip $(gb_WITH_LANG)),)
31 librelogo_LANGS := $(filter-out qtz,$(filter-out en-US,$(gb_WITH_LANG)))
32 $(eval $(foreach lang,$(librelogo_LANGS),$(call librelogo_Properties_Properties,$(subst -,_,$(lang)),$(lang))))
33 endif
35 librelogo_PROPMERGETARGET := $(call gb_Executable_get_target_for_build,propex)
36 librelogo_PROPMERGECOMMAND := $(gb_Helper_set_ld_path) $(librelogo_PROPMERGETARGET)
38 $(librelogo_DIR)/LibreLogo_%.properties : \
39 $(librelogo_PROPMERGETARGET) \
40 | $(librelogo_DIR)/.dir
41 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1)
42 $(call gb_Helper_abbreviate_dirs, \
43 MERGEINPUT=`$(gb_MKTEMP)` && \
44 echo $(POFILE) > $${MERGEINPUT} && \
45 $(librelogo_PROPMERGECOMMAND) \
46 -p librelogo \
47 -i $(SOURCE) \
48 -o $@ \
49 -m $${MERGEINPUT} \
50 -l $(LANG) && \
51 rm -rf $${MERGEINPUT} \
54 # vim:set shiftwidth=4 tabstop=4 noexpandtab: