tumble/Makefile

26 lines
521 B
Makefile
Raw Normal View History

.PHONY: lib test
2013-03-05 23:25:53 +00:00
lib_sources:= $(wildcard src/*.coffee)
lib_objects:= $(subst src/, lib/, $(lib_sources:%.coffee=%.js))
2013-03-05 23:25:53 +00:00
default: build
2013-04-17 17:10:06 +00:00
build: $(lib_objects) lib/tokenizer.js
2013-04-17 17:10:06 +00:00
lib:
mkdir -p lib
2013-03-05 23:25:53 +00:00
2013-04-17 17:10:06 +00:00
lib/tumble.js: lib src/tumble.peg
./node_modules/.bin/pegjs src/tumble.peg lib/tumble.js
2013-04-27 20:53:31 +00:00
$(lib_objects): $(lib_sources)
@mkdir -p $(@D)
2013-03-05 23:25:53 +00:00
coffee -o $(@D) -c $<
2013-04-27 20:53:31 +00:00
test: test/[0-9]*_mocha.coffee lib/tumble.js lib/parser.js
./node_modules/.bin/mocha -R tap -C --compilers coffee:coffee-script -u tdd $<
2013-03-06 17:57:12 +00:00
2013-03-05 23:25:53 +00:00
clean:
rm -fr lib