forked from TooTallNate/NodObjC
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
38 lines (29 loc) · 815 Bytes
/
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
NODE ?= node
DOX ?= $(NODE) ./node_modules/.bin/dox
TESTS := $(wildcard test/*.js)
JS_FILES := $(wildcard lib/*.js)
DOC_DEPS := $(JS_FILES:.js=.html)
DOC_DEPS := $(DOC_DEPS:lib/%=docs/%)
# The name of the individual pages
export PAGES=$(notdir $(basename $(JS_FILES)))
test: $(TESTS)
$(TESTS):
@./test/run.sh "$@"
docs/%.html: lib/%.js
$(DOX) --raw \
< $< \
| $(NODE) docs/compile.js $(notdir $(basename $^)) \
> $@
%.doc: lib/%.js
$(NODE) $(DOX) --raw --debug < $<
docs: $(DOC_DEPS)
docclean:
rm -fv docs/*.html
gh-pages: docclean docs
rm -rf /tmp/NodObjC_docs \
&& cp -Lrf docs /tmp/NodObjC_docs \
&& rm /tmp/NodObjC_docs/compile.js /tmp/NodObjC_docs/template.jade \
&& git checkout gh-pages \
&& cp -Lrf /tmp/NodObjC_docs/* . \
&& echo "done"
.PHONY: docs gh-pages test $(TESTS)