Only rebuild doc when source changes

This commit is contained in:
Tom Payne
2012-09-29 12:09:31 +02:00
parent 2341e8cd8f
commit 83a3306bb7
2 changed files with 9 additions and 3 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
/bin/plovr*.jar
/build/gh-pages
/build/jsdoc-*-timestamp
/build/lint-spec-timestamp
/build/lint-src-timestamp
/build/ol.css

View File

@@ -1,3 +1,4 @@
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
JSDOC = jsdoc
PHANTOMJS = phantomjs
PLOVR_JAR = bin/plovr-b254c26318c5.jar
@@ -81,17 +82,21 @@ $(PLOVR_JAR):
.PHONY: gh-pages
gh-pages:
bin/git-update-ghpages openlayers/ol3 -i build/gh-pages/$(shell git rev-parse --abbrev-ref HEAD) -p $(shell git rev-parse --abbrev-ref HEAD)
bin/git-update-ghpages openlayers/ol3 -i build/gh-pages/$(BRANCH) -p $(BRANCH)
.PHONY: doc
doc:
$(JSDOC) -t doc/template -r src -d build/gh-pages/$(shell git rev-parse --abbrev-ref HEAD)/apidoc
doc: build/jsdoc-$(BRANCH)-timestamp
build/jsdoc-$(BRANCH)-timestamp: $(SRC) $(shell find doc/template -type f)
$(JSDOC) -t doc/template -r src -d build/gh-pages/$(BRANCH)/apidoc
touch $@
.PHONY: test
test: $(INTERNAL_SRC)
$(PHANTOMJS) test/phantom-jasmine/run_jasmine_test.coffee test/ol.html
clean:
rm -f jsdoc/jsdoc-*-timestamp
rm -f build/lint-spec-timestamp
rm -f build/lint-src-timestamp
rm -f build/ol.css