forked from jashkenas/coffeescript
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
55 lines (43 loc) · 1.13 KB
/
Makefile
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
51
52
53
54
55
.PHONY: build test node clean purge help node
ALL_LIB := $(shell find src -type d)
ALL_LIB := $(ALL_LIB:src%=lib/coffee-script%)
ALL_CDENT := $(shell find src -name *.uni)
ALL_JS := $(ALL_CDENT:src/%.uni=lib/coffee-script/%.js)
PARSER_JS := lib/coffee-script/parser.js
default: help
help:
@echo ''
@echo 'Makefile targets:'
@echo ''
@echo ' make build - Compile stuff'
@echo ' make test - Run the tests'
@echo ' make install - Install into NPM'
@echo ''
@echo ' make node - Make a Node.js package'
@echo ''
@echo ' make clean - Clean up'
@echo ' make help - Get Help'
@echo ''
build: $(ALL_LIB) $(ALL_JS) $(PARSER_JS)
$(PARSER_JS):
./bin/jison-generate-parser > $@
lib/coffee-script/%.js: src/%.uni
coffee --compile -p $< > $@
test xtest: build
cake test
# coffee -e '(require "./test/lib/Test/Harness").run()' $@
install: node
(cd $<; npm install)
node: clean build
mkdir -p $@
cp -r \
LICENSE* \
README* \
lib \
$@/
./bin/cdent-package-yaml-converter package.yaml > $@/package.json
clean purge:
rm -fr node_modules lib node
@# make -C test $@
$(ALL_LIB):
mkdir -p $@