summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2011-06-05 15:15:49 +0200
committerPeter Stuge <peter@stuge.se>2011-06-07 21:46:08 +0200
commitbb60528e73ed611553befba2ea1bdf8c690a26e5 (patch)
tree2e63a55853c874dbf1dd7828f9b24b169e9d86a8
parentb924eb45f1dee85b1366b202f7e8435069893d0f (diff)
Add "gitconfig" make target to simplify gerrit configuration
"make gitconfig" installs the gerrit commit-msg hook and validates that user.name and user.email are configured. No data will be overwritten. Change-Id: I49ec98538574866e7ad6238ff3d02b9c1beef1bb Reviewed-on: http://review.coreboot.org/2 Tested-by: build bot (Jenkins) Reviewed-by: Peter Stuge <peter@stuge.se>
-rw-r--r--Makefile.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index f8c4deb2ac..72a3b55017 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -231,6 +231,10 @@ lint:
test $$FAILED -eq 0 || { echo "ERROR: $$FAILED test(s) failed." && exit 1; }; \
rm -f $$LINTLOG
+gitconfig:
+ if ! [ -x .git/hooks/commit-msg ]; then wget -O .git/hooks/commit-msg http://review.coreboot.org/tools/hooks/commit-msg; chmod +x .git/hooks/commit-msg; fi
+ (git config --global user.name >/dev/null && git config --global user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email your.email@example.com\n'; exit 1)
+
crossgcc: clean-for-update
$(MAKE) -C util/crossgcc build