summaryrefslogtreecommitdiff
path: root/unrpyc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'unrpyc/Makefile')
-rw-r--r--unrpyc/Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/unrpyc/Makefile b/unrpyc/Makefile
index a92a91d..4fb222d 100644
--- a/unrpyc/Makefile
+++ b/unrpyc/Makefile
@@ -1,6 +1,8 @@
GZIP := $(shell ./find-gzip.sh)
-all: script.json script.json.gz imachine.json imachine.json.gz imachine_replay.json imachine_replay.json.gz ui-strings.json ui-strings.json.gz
+TARGETS := script.json script.json.gz imachine.json imachine.json.gz imachine_replay.json imachine_replay.json.gz ui-strings.json ui-strings.json.gz ui-strings_FR.json ui-strings_FR.json.gz
+
+all: $(TARGETS)
%.json.gz: %.json
$(GZIP) -c $< > $@
@@ -13,9 +15,9 @@ script.json: $(patsubst %.rpyc,%.json,$(wildcard script-*.rpyc))
%.json: %.json.o
node fix.js $< $@
-ui-strings.json.o: ui-strings.rpyc *.py
+ui-strings.json.o ui-strings_FR.json.o: ui-strings%.json.o: ui-strings%.rpyc *.py
python unrpyc.py --clobber $< $@
- sed -i -e 's/ \["init_language", "en", \],//;s/^\]}$$/}/' $@
+ sed -i -e 's/ \["init_language", "[a-z]*", \],//;s/^\]}$$/}/' $@
%.json.o: %.rpyc *.py
python unrpyc.py --clobber $< $@
@@ -25,16 +27,16 @@ script-%.json: script-%.json.o
sed -i -e 's/^{//;s/}$$/,/' $@
clean:
- rm -f *.json*
+ $(RM) *.json*
test: all
jshint --show-non-errors *.json
install: all
[ -d ../www/json ] || mkdir ../www/json
- install -t ../www/json script.json script.json.gz imachine.json imachine.json.gz imachine_replay.json imachine_replay.json.gz ui-strings.json ui-strings.json.gz
+ install $(TARGETS) ../www/json
uninstall:
- rm -f ../www/json/*
+ $(RM) ../www/json/*
.PHONY: all clean test install