tumble/Makefile

44 lines
851 B
Makefile
Raw Permalink Normal View History

.PHONY: lib test library docs
2013-03-05 23:25:53 +00:00
COFFEE= ./node_modules/.bin/coffee
PEGJS= ./node_modules/.bin/pegjs
DOCCO= ./node_modules/.bin/docco
MOCHA= ./node_modules/.bin/mocha
cof_sources:= $(wildcard src/*.coffee)
cof_objects:= $(subst src/, lib/, $(cof_sources:%.coffee=%.js))
peg_sources:= $(wildcard src/*.peg)
peg_objects:= $(subst src/, lib/, $(peg_sources:%.peg=%.js))
library: $(cof_objects) $(peg_objects)
2013-03-05 23:25:53 +00:00
default: build
build: $(lib_objects)
2013-04-17 17:10:06 +00:00
lib:
mkdir -p lib
2013-03-05 23:25:53 +00:00
$(cof_objects): $(cof_sources)
@mkdir -p $(@D)
$(COFFEE) -o $(@D) -c $<
2013-04-17 17:10:06 +00:00
$(peg_objects): $(peg_sources)
@mkdir -p $(@D)
$(PEGJS) $< $@
docs:
$(DOCCO) $(cof_sources)
echo:
echo $(cof_sources)
echo $(cof_objects)
2013-03-05 23:25:53 +00:00
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