aboutsummaryrefslogtreecommitdiff
path: root/extension/Makefile
blob: 4055cb00e96aa7eaac47108952636eda6cd66be4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 .