Splits up Makefile. Adds all rule and phony tasks
Now setup calls the deps rule that takes care of bundling RubyGem dependencies loudly.
This commit is contained in:
12
Makefile
12
Makefile
@@ -1,14 +1,19 @@
|
|||||||
|
all: setup index
|
||||||
|
|
||||||
index:
|
index:
|
||||||
@TLDRHOME=`pwd` ./scripts/build_index.rb
|
@TLDRHOME=`pwd` ./scripts/build_index.rb
|
||||||
@echo "Index rebuilt."
|
@echo "Index rebuilt."
|
||||||
|
|
||||||
setup:
|
setup: hooks deps
|
||||||
|
|
||||||
|
hooks:
|
||||||
@cp ./scripts/pre-commit .git/hooks
|
@cp ./scripts/pre-commit .git/hooks
|
||||||
@chmod +x .git/hooks/pre-commit
|
@chmod +x .git/hooks/pre-commit
|
||||||
@echo "Git pre-commit hook installed."
|
@echo "Git pre-commit hook installed."
|
||||||
|
|
||||||
@gem install mdl --install-dir .gem --no-rdoc --no-ri
|
deps:
|
||||||
@echo "Installed required Ruby gems under .gem"
|
@bundle
|
||||||
|
@echo "OK"
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
@GEM_PATH=.gem find pages -exec .gem/bin/mdl {} --style ./scripts/markdown-style.rb 1>&2 \;
|
@GEM_PATH=.gem find pages -exec .gem/bin/mdl {} --style ./scripts/markdown-style.rb 1>&2 \;
|
||||||
@@ -16,3 +21,4 @@ lint:
|
|||||||
lint-changed:
|
lint-changed:
|
||||||
@./scripts/lint-changed.sh
|
@./scripts/lint-changed.sh
|
||||||
|
|
||||||
|
.PHONY: index setup hooks deps lint lint-changed
|
||||||
|
Reference in New Issue
Block a user