forked from jashkenas/coffeescript
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile will replace Cakefile and Rakefile.
But not yet. make test actually calls cake test right now.
- Loading branch information
1 parent
e2d05d5
commit d64fbe4
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.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) | ||
|
||
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) | ||
@# make -C test $@ | ||
|
||
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 $@ |