-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
33 lines (26 loc) · 1.15 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
NODE=node
TYPESCRIPT=node_modules/typescript
TSC=$(NODE) $(TYPESCRIPT)/bin/tsc
TEST_SCRIPTS=tests/*.script
TEST_SOURCES=tests/*.ts
VERSION=$(shell git describe --tags)
build: bin/tss.js tests/script.diff tests/script.results
bin/tss.js: tss.ts harness.ts $(TYPESCRIPT)/lib/typescript.d.ts
$(TSC) tss.ts -target ES5 -m commonjs --noEmitOnError -outDir bin 2>&1 | tee build.log
test ! -s build.log
tests/script.out2: $(TEST_SCRIPTS) $(TEST_SOURCES) tests/tsconfig.json tests/script.js tests/script.out bin/tss.js
cd tests;\
$(NODE) script.js >script.out2;
tests/script.diff: tests/script.out tests/script.out2
cd tests;\
diff --strip-trailing-cr script.out* 2>&1 | tee script.diff
tests/script.results: tests/script.diff
grep '^[0-9]' tests/script.diff >script.results;\
grep -n '//.*script' tests/script.out >>script.results;\
sort -n script.results
package.json: .git/refs/heads/master
$(NODE) -e "var pj=require('./package.json'); \
pj.version='$(VERSION)';\
require('fs').writeFileSync('package.json',JSON.stringify(pj,null,' '));"
eols:
find . -wholename './.git' -prune -o -wholename './node_modules' -prune -o -exec file \{\} \; | grep CRLF