From 739dd80cf69f7e279fe4cdd6681cf8ea7fd53a51 Mon Sep 17 00:00:00 2001 From: Leandro Ostera Date: Wed, 6 May 2015 11:31:58 -0300 Subject: [PATCH] Splits up Makefile. Adds all rule and phony tasks Now setup calls the deps rule that takes care of bundling RubyGem dependencies loudly. --- Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 4363c4e49..c50606c32 100644 --- a/Makefile +++ b/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