From e417662dce5cae2e95ef98ee38baa8f53a02b9d5 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 16 Apr 2014 15:17:31 -0400 Subject: mbleh --- Makefile | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c606599..58f9960 100644 --- a/Makefile +++ b/Makefile @@ -50,14 +50,16 @@ www/js/lib/when.js: when IRPYC := ast2json/imachine.rpyc ast2json/imachine_replay.rpyc IJSON := $(IRPYC:ast2json/%.rpyc=www/json/%.json) -URPYC := ast2json/ui-strings.rpyc ast2json/ui-strings_FR.rpyc -UJSON := $(URPYC:ast2json/%.rpyc=www/json/%.json) +TRPYC := ast2json/ui-strings.rpyc ast2json/ui-strings_FR.rpyc +TJSON := $(TRPYC:ast2json/%.rpyc=www/json/%.json) + +ERPYC := ast2json/ui_settings.rpyc +EJSON := $(ERPYC:ast2json/%.rpyc=www/json/%.json) SRPYC := $(wildcard ast2json/script-a*.rpyc) -JSONI := $(SRPYC:%.rpyc=%.json.i) SJSON := $(SRPYC:ast2json/%.rpyc=www/json/%.json) -JSON := $(IJSON) $(UJSON) $(SJSON) +JSON := $(IJSON) $(TJSON) $(EJSON) $(SJSON) JSONGZ := $(JSON:=.gz) AJSON := $(JSON) $(JSONGZ) @@ -69,21 +71,24 @@ json: $(AJSON) $(SJSON): www/json/%.json: ast2json/script2json.py ast2json/%.json.i $^ $@ -$(UJSON): www/json/%.json: ast2json/strings2json.py ast2json/%.json.i +$(TJSON): www/json/%.json: ast2json/strings2json.py ast2json/%.json.i $^ $@ $(IJSON): www/json/%.json: ast2json/imachine2json.py ast2json/%.json.i $^ $@ +$(EJSON): www/json/%.json: ast2json/settings2json.py ast2json/%.json.i + $^ $@ + %.json.gz: %.json -ifdef GZIP -ifdef DEFLUFF - $(GZIP) -c $< | $(DEFLUFF) > $@ -else - $(GZIP) -c $< > $@ -endif - touch $< $@ -endif + $(if $(GZIP), + $(if $(DEFLUFF), + $(GZIP) -c $< | $(DEFLUFF) > $@ + , + $(GZIP) -c $< > $@ + ) + touch $< $@ + ) # === VIDEO === @@ -189,7 +194,7 @@ www/dump/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP) # === MISC === -test: $(MYJS) +test: $(MYJS) $(AJSON) jshint --show-non-errors $^ space: @@ -209,5 +214,5 @@ MAKEFLAGS=-LRr .SUFFIXES: .PRECIOUS: $(WAV) -.INTERMEDIATE: $(WAV) $(JSONO) $(Y4M) $(CTC_ANIM_TMP_ALL) $(CTC_ANIM_TMP_WEBP) -.PHONY: video audio images js jshint space watch +.INTERMEDIATE: $(WAV) $(Y4M) $(CTC_ANIM_TMP_ALL) $(CTC_ANIM_TMP_WEBP) +.PHONY: video audio images js test space watch -- cgit v1.2.3-70-g09d2