update credits
[LibreOffice.git] / android / sdremote / Makefile
blob78b89eb9bc8e2e139b96e2014d57f7a83a4184f0
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/.
9 ifeq ($(BUILDDIR),)
10 include ../../config_host.mk
11 endif
13 all: properties translations.done
14 mkdir -p ../abs-lib/libs
15 cp $(ANDROID_SDK_HOME)/extras/android/support/v4/android-support-v4.jar ../abs-lib/libs
16 $(ANT) debug
18 properties:
19 echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties
20 echo sdk.dir=$(ANDROID_SDK_HOME) >../abs-lib/local.properties
22 clean: properties translations.clean
23 $(ANT) -quiet -keep-going clean
25 install: all
26 $(ANDROID_SDK_HOME)/platform-tools/adb install -r ./bin/ImpressRemote-debug.apk
28 define android_get_podir
29 res/values-$(1)
30 endef
32 define android_get_po
33 $(call android_get_podir,$(1))/strings.xml
34 endef
36 define android_translation_rules
37 $(call android_get_po,$(1)):
38 mkdir -p res/values-$(1)
39 $(if $(filter-out qtz,$(1)), \
40 echo $(SRCDIR)/translations/source/$(1)/android/sdremote/res/values.po > translations-$(1).db &&\
41 $(OUTDIR_FOR_BUILD)/bin/stringex -i res/values/strings.xml -o res/values-$(1)/strings.xml -m translations-$(1).db -l $(1), \
42 $(OUTDIR_FOR_BUILD)/bin/stringex -i res/values/strings.xml -o res/values-$(1)/strings.xml -m -l $(1))
44 endef
46 define android_translations_rules
47 $(foreach lang,$(1),$(call android_translation_rules,$(lang)))
48 endef
50 define android_get_langlist
51 $(foreach lang,$(filter-out en-US sat sid mai ast mni brx dgo nso kok,$(WITH_LANG_LIST)),$(subst -,-r,$(lang)))
52 endef
54 $(eval $(call android_translations_rules,$(call android_get_langlist)))
56 translations.done: $(foreach lang,$(call android_get_langlist),$(call android_get_po,$(lang)))
57 touch translations.done
59 translations.clean:
60 rm -rf $(foreach lang,$(call android_get_langlist),$(call android_get_podir,$(lang)))
61 rm -rf $(foreach lang,$(call android_get_langlist),translations-$(lang).db)
62 rm -f translations.done
64 # vim: set noet sw=4 ts=4: