mirror of
https://github.com/kanaka/mal.git
synced 2024-09-21 02:27:10 +03:00
5245b079e1
TODO: factor groovy guile julia matlab miniMAL swift
39 lines
957 B
Makefile
39 lines
957 B
Makefile
#####################
|
|
|
|
SOURCES_BASE = types.nim reader.nim printer.nim
|
|
SOURCES_LISP = env.nim core.nim stepA_mal.nim
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
|
SOURCES_REBUILD = $(SOURCES_BASE) env.nim core.nim
|
|
|
|
#####################
|
|
|
|
SRCS = step0_repl.nim step1_read_print.nim step2_eval.nim step3_env.nim \
|
|
step4_if_fn_do.nim step5_tco.nim step6_file.nim step7_quote.nim \
|
|
step8_macros.nim step9_try.nim stepA_mal.nim
|
|
BINS = $(SRCS:%.nim=%)
|
|
|
|
#####################
|
|
|
|
all: $(BINS)
|
|
|
|
dist: mal
|
|
|
|
mal: $(word $(words $(BINS)),$(BINS))
|
|
cp $< $@
|
|
|
|
$(BINS): %: %.nim $(SOURCES_REBUILD)
|
|
nim -d:release --nimcache:nimcache-$@ c $@
|
|
|
|
clean:
|
|
rm -rf nimcache-*/ $(BINS)
|
|
rm -f mal
|
|
|
|
.PHONY: stats stats-lisp
|
|
|
|
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]"
|