-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
50 lines (40 loc) · 982 Bytes
/
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
.PHONY: build test npm clean purge help
ALL_LIB := $(shell find src -type d)
ALL_LIB := $(ALL_LIB:src/%=lib/%)
ALL_CDENT := $(shell find src -name *.cd.uni)
ALL_JS := $(ALL_CDENT:src/%.cd.uni=lib/%.js)
default: help
help:
@echo ''
@echo 'Makefile targets:'
@echo ''
@echo ' make build - Compile stuff'
@echo ' make test - Run the tests'
@echo ''
@echo ' make npm - Make a Node.js package'
@echo ''
@echo ' make clean - Clean up'
@echo ' make help - Get Help'
@echo ''
build: $(ALL_LIB) $(ALL_JS)
@make -C test $@
lib/%.js: src/%.cd.uni
coffee --compile -p $< > $@
test xtest: build
coffee -e '(require "./test/lib/Test/Harness").run()' $@
npm: clean build
mkdir -p $@/test
cp -r \
LICENSE* \
README* \
doc \
lib \
test \
$@/
cp -r test/lib $@/test/
./bin/cdent-package-yaml-converter package.yaml > $@/package.json
clean purge:
rm -fr node_modules lib npm
@make -C test $@
$(ALL_LIB):
mkdir -p $@