~gnome-shell-extensions/gnome-shell-extensions/appindicator-support-head

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
33
34
35
36
37
38
39
40
41
# simple helper makefile, handles schema compilation, translations and zip file creation

.PHONY= zip-file pot mo schema all

# files that go into the zip
ZIP= $(wildcard *.js) metadata.json $(wildcard schemas/*) $(wildcard locale/*/LC_MESSAGES/*)

all: pot mo schema config.js

# shortcuts
pot: po/messages.pot
schema: schemas/gschemas.compiled

mo: $(wildcard po/*.po)
	mkdir -p locale
	for x in $^; do\
		name=$$(basename $$x | cut -d'.' -f1); \
		mkdir -p locale/$$name/LC_MESSAGES; \
		msgfmt $$x -o locale/$$name/LC_MESSAGES/gnome-shell-appindicator-support.mo; \
	done;

config.js: config.js.sh
	sh config.js.sh > config.js

po/messages.pot: prefs.js
	xgettext -k_ -o po/messages.pot prefs.js

schemas/gschemas.compiled: $(wildcard schemas/*.gschema.xml)
	glib-compile-schemas schemas

zip-file: $(ZIP) mo schema
	mkdir -p build
	rm -f build/appindicator-support.zip
	zip build/appindicator-support.zip $(ZIP)

clean:
	rm -rf build
	rm -f config.js
	rm -f schemas/gschemas.compiled
	rm -f po/messages.pot
	rm -rf locale