2015-02-16 09:01:10 +03:00
|
|
|
|
|
|
|
SOURCES_BASE = node_readline.js miniMAL-core.json \
|
|
|
|
types.json reader.json printer.json
|
2015-02-28 20:09:54 +03:00
|
|
|
SOURCES_LISP = env.json core.json stepA_mal.json
|
2015-02-16 09:01:10 +03:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
2017-02-11 22:07:58 +03:00
|
|
|
FFI_STEPS = step4_if_fn_do step5_tco step6_file \
|
|
|
|
step7_quote step8_macros step9_try stepA_mal
|
2015-02-16 09:01:10 +03:00
|
|
|
|
2015-10-10 07:11:47 +03:00
|
|
|
all: node_modules
|
|
|
|
|
|
|
|
node_modules:
|
|
|
|
npm install
|
|
|
|
|
2017-02-11 22:07:58 +03:00
|
|
|
$(foreach S,$(FFI_STEPS),$(S).json): node_modules
|
|
|
|
|
2016-02-24 09:45:40 +03:00
|
|
|
dist: mal.json mal
|
|
|
|
|
|
|
|
mal.json: $(filter-out %.js,$(SOURCES))
|
|
|
|
echo '["do",' >> $@
|
|
|
|
$(foreach f,$+,\
|
|
|
|
cat $(f) | egrep -v '^ *[[]"load-file"' >> $@; \
|
|
|
|
echo "," >> $@;)
|
|
|
|
echo 'null]' >> $@
|
|
|
|
|
|
|
|
mal: mal.json
|
|
|
|
echo '#!/usr/bin/env miniMAL' > $@
|
|
|
|
cat $< >> $@
|
|
|
|
chmod +x $@
|
|
|
|
|
|
|
|
clean:
|