Browse Source

Splits up Makefile. Adds all rule and phony tasks

Now setup calls the deps rule that takes care of bundling
RubyGem dependencies loudly.
Leandro Ostera 9 years ago
parent
commit
739dd80cf6
1 changed files with 12 additions and 6 deletions
  1. 12 6
      Makefile

+ 12 - 6
Makefile

@@ -1,18 +1,24 @@
+all: setup index
+
 index:
 	@TLDRHOME=`pwd` ./scripts/build_index.rb
 	@echo "Index rebuilt."
 
-setup:
+setup: hooks deps
+
+hooks:
 	@cp ./scripts/pre-commit .git/hooks
 	@chmod +x .git/hooks/pre-commit
 	@echo "Git pre-commit hook installed."
+
+deps:
+	@bundle
+	@echo "OK"
 	
-	@gem install mdl --install-dir .gem --no-rdoc --no-ri
-	@echo "Installed required Ruby gems under .gem"
-	
-lint: 
+lint:
 	@GEM_PATH=.gem find pages -exec .gem/bin/mdl {} --style ./scripts/markdown-style.rb 1>&2 \;
 	
 lint-changed:
 	@./scripts/lint-changed.sh
-	
+
+.PHONY: index setup hooks deps lint lint-changed