diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-25 12:48:16 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-25 12:48:16 -0400 |
commit | 4db774c1ec0c0b20611fea938d2603e6a3dfe4ca (patch) | |
tree | b41afaaee6cd85846b4bb68f692ee503e918e01c /unrpyc/Makefile | |
parent | 23518a31d24e62caeecbfafe7708f4c7ffcd24f5 (diff) | |
download | html5ks-4db774c1ec0c0b20611fea938d2603e6a3dfe4ca.tar.xz html5ks-4db774c1ec0c0b20611fea938d2603e6a3dfe4ca.zip |
pre-gzip script.json as part of build process
Diffstat (limited to 'unrpyc/Makefile')
-rw-r--r-- | unrpyc/Makefile | 17 |
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 |