aboutsummaryrefslogtreecommitdiff
path: root/extension/Makefile
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2016-02-22 19:08:16 +0100
committertg(x) <*@tg-x.net>2016-02-22 19:08:16 +0100
commit4c005a15960174ba96903f5e3882f56ab7485d81 (patch)
treefc8ccb3878a692452a99357279cbee9d900be397 /extension/Makefile
parent5a0b3935d81422ae19a5b7aefbd11e20bef4a3d7 (diff)
downloadwallet-core-4c005a15960174ba96903f5e3882f56ab7485d81.tar.xz
Makefile + po2json
Diffstat (limited to 'extension/Makefile')
-rw-r--r--extension/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/extension/Makefile b/extension/Makefile
new file mode 100644
index 000000000..4055cb00e
--- /dev/null
+++ b/extension/Makefile
@@ -0,0 +1,32 @@
+src = lib background content_scripts pages
+
+gulp = node_modules/gulp/bin/gulp.js
+tsc = node_modules/typescript/bin/tsc
+po2json = node_modules/po2json/bin/po2json
+
+.PHONY: taler.po lib/i18n.json
+
+package-stable: tsc i18n
+ $(gulp) package-stable
+
+package-unstable: tsc i18n
+ $(gulp) package-unstable
+
+tsc: tsconfig.json node_modules
+ $(tsc)
+
+tsconfig.json: gulpfile.js node_modules
+ $(gulp) tsconfig
+
+i18n: lib/i18n.json
+
+taler.po: node_modules
+ for f in `find $(src) -name '*.ts' -or -name '*.tsx'`; do echo $$f; pogen/pogen.js $$f > `dirname $$f`/`basename $$f .ts`.po; done
+ touch $@
+ msgcat `find $(src) -name '*.po'` | msgmerge -o $@ $@ -
+
+lib/i18n.json: taler.po node_modules
+ $(po2json) $< $@
+
+node_modules:
+ npm install .