summaryrefslogtreecommitdiff
path: root/unrpyc/Makefile
blob: 6e28df49ccd2660bd6b44bab9e3e2ab08b3a9838 (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
all: script.json.gz

script.json.gz: script.json
	gzip -9c script.json > script.json.gz
	touch script.json script.json.gz

script.json: $(patsubst %.rpyc,%.json,$(wildcard *.rpyc))
	cat script-*.json > script.json
	sed -i -e 's/^/{/;s/,$$/}/' script.json

script-%.json.o: script-%.rpyc *.py
	python unrpyc.py --clobber $< $@

script-%.json: script-%.json.o
	node fix.js $< $@
	sed -i -e 's/^{//;s/}$$/,/' $@

clean:
	rm -f *.json.o *.json script.json.gz

test: all
	jshint --show-non-errors *.json

install: all
	install -t ../www/scripts script.json script.json.gz

.PHONY: all clean test install