-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.02 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
M := ../../.cache/makes
$(shell [ -d $M ] || git clone -q https://github.com/makeplus/makes $M)
include $M/init.mk
include $M/node.mk
include $M/clean.mk
include $M/shell.mk
ROOT := $(shell cd ../..; pwd)
BASE := $(ROOT)/parser-1.2
PARSER-LANG := javascript
BIN := node
GRAMMAR :=
ALL-JS := \
bin/yaml-parser \
lib/grammar.js \
lib/parser.js \
lib/prelude.js \
lib/receiver.js \
lib/test-receiver.js \
test/testml-bridge.js \
BUILD-DEPS := \
$(ROOT)/node_modules \
build-coffee \
$(ALL-JS) \
$(ROOT)/test/testml/src/node/lib \
include $(ROOT)/.common.mk
yaml-parser: $(ROOT)/node_modules
./bin/yaml-parser
build-coffee:
$(MAKE) -C $(BASE)/coffeescript build
bin/%: $(BASE)/coffeescript/bin/%
echo '#!/usr/bin/env node' > $@
coffee -cp $< >> $@
chmod +x $@
lib/%.js: $(BASE)/coffeescript/lib/%.coffee
coffee -cp $< > $@
test/%.js: $(BASE)/coffeescript/test/%.coffee
coffee -cp $< > $@
perl -pi -e 's{/coffee/}{/node/}' $@
$(ROOT)/test/testml/src/node/lib: $(ROOT)/test/testml
$(MAKE) -C $(@:%/lib=%) js-files