forked from senchalabs/connect
/
Makefile
51 lines (37 loc) · 1.07 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
NODE = node
TEST = support/expresso/bin/expresso
TESTS ?= test/*.test.js
PREFIX = /usr/local
test:
@CONNECT_ENV=test ./$(TEST) -I lib -I support/sass/lib $(TEST_FLAGS) $(TESTS)
test-cov:
@$(MAKE) test TEST_FLAGS="--cov"
install: install-docs
cp -f bin/connect $(PREFIX)/bin/connect
uninstall:
rm -f $(PREFIX)/share/man/man1/connect.1
rm -f $(PREFIX)/bin/connect
install-docs:
cp -f docs/api.1 $(PREFIX)/share/man/man1/connect.1
benchmark: benchmarks/run
@./benchmarks/run
graphs: benchmarks/graph
@./benchmarks/graph
docs: docs/api.1 docs/api.html
docs/api.1: docs/api.md
ronn -r $< > $@
docs/api.html: docs/api.md
ronn -5 --pipe --fragment $< \
| cat docs/api.head.html - docs/api.foot.html \
| sed 's/NAME/Connect/g' \
> $@
docclean:
rm -f docs/api.html
rm -f docs/api.1
site:
cp docs/api.html /tmp/connect.index.html && \
git checkout gh-pages && \
cp /tmp/connect.index.html index.html && \
git commit -a -m 'Updated index.html' && \
git checkout master
.PHONY: install uninstall docs test test-cov benchmark graphs docclean site install-docs