Makefile to install locally, with clean and variable targets.
This commit is contained in:
parent
8f353fce29
commit
75a22f87ea
9
Makefile
9
Makefile
|
@ -2,6 +2,13 @@
|
||||||
|
|
||||||
# docs: $(patsubst %.md,%.html,$(wildcard *.md))
|
# docs: $(patsubst %.md,%.html,$(wildcard *.md))
|
||||||
|
|
||||||
|
targets = lists.js reduce.js
|
||||||
|
|
||||||
|
all: $(targets)
|
||||||
|
|
||||||
|
%.js: src/%.coffee
|
||||||
|
coffee -c -o . $<
|
||||||
|
|
||||||
%.html: %.md header.html footer.html
|
%.html: %.md header.html footer.html
|
||||||
cat header.html > $@
|
cat header.html > $@
|
||||||
pandoc $< >> $@
|
pandoc $< >> $@
|
||||||
|
@ -14,3 +21,5 @@ node_modules: package.json
|
||||||
test: node_modules
|
test: node_modules
|
||||||
@node_modules/.bin/mocha --compilers coffee:coffee-script/register
|
@node_modules/.bin/mocha --compilers coffee:coffee-script/register
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(targets)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"main": "lists.js",
|
"main": "lists.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "test"
|
"test": "test"
|
||||||
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
},
|
},
|
||||||
|
@ -13,7 +14,8 @@
|
||||||
"mocha": "^2.1.0"
|
"mocha": "^2.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha"
|
"test": "mocha",
|
||||||
|
"install": "make all"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in New Issue