summaryrefslogtreecommitdiff
path: root/unrpyc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'unrpyc/Makefile')
-rw-r--r--unrpyc/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/unrpyc/Makefile b/unrpyc/Makefile
index 6a94ca6..0463da9 100644
--- a/unrpyc/Makefile
+++ b/unrpyc/Makefile
@@ -1,10 +1,19 @@
-all: $(patsubst %.rpyc,%.json,$(wildcard *.rpyc))
+all: script.json.gz
-%.json.o: %.rpyc *.py
+script.json.gz: script.json
+ gzip -c 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 $< $@
-%.json: %.json.o
+script-%.json: script-%.json.o
node fix.js $< $@
+ sed -i -e 's/^{//;s/}$$/,/' $@
clean:
rm -f *.json.o *.json
@@ -13,6 +22,6 @@ test: all
jshint --show-non-errors *.json
install: all
- install -t ../www/scripts *.json
+ install -t ../www/scripts script.json script.json.gz
.PHONY: all clean test install