1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 10:37:58 +03:00
mal/skew/Makefile
Dov Murik 034e82adc5 Add Skew implementation
See http://skew-lang.org/ for details on the Skew language. Currently
Mal only compiles to Javascript, as there are some issues with the C#
backend for Skew (https://github.com/evanw/skew/issues/19).

Tested with Skew 0.7.42.
2016-11-20 10:10:41 +00:00

37 lines
1.1 KiB
Makefile

STEPS = step0_repl step1_read_print step2_eval step3_env step4_if_fn_do \
step5_tco step6_file step7_quote step8_macros step9_try stepA_mal
SOURCES_BASE = util.sk types.sk reader.sk printer.sk
SOURCES_LISP = env.sk core.sk stepA_mal.sk
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
STEP3_DEPS = $(SOURCES_BASE) env.sk
STEP4_DEPS = $(STEP3_DEPS) core.sk
all: $(foreach s,$(STEPS),$(s).js) dist
dist: mal
step0_repl.js step1_read_print.js step2_eval.js step3_env.js: $(STEP3_DEPS)
step4_if_fn_do.js step5_tco.js step6_file.js step7_quote.js step8_macros.js step9_try.js stepA_mal.js: $(STEP4_DEPS)
%.js: %.sk
skewc --target=js --release --output-file=$@ $^
mal: stepA_mal.js
echo "#!/usr/bin/env node" > $@
cat $< >> $@
chmod +x $@
clean:
rm -rf step*.js mal
stats: $(SOURCES)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
stats-lisp: $(SOURCES_LISP)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
.PHONY: all dist clean stats stats-lisp