[coreboot-gerrit] New patch to review for coreboot: f81c2c1 gitconfig: Use the right make executable in git hooks
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Tue Apr 28 21:47:12 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10018
-gerrit
commit f81c2c1dec8c18587f5eaaf1798112f601758627
Author: Patrick Georgi <patrick at georgi-clan.de>
Date: Tue Apr 28 21:36:11 2015 +0200
gitconfig: Use the right make executable in git hooks
When installing git hooks through $(MAKE) gitconfig,
make knows itself (and is a GNU make). So let it splice
itself into hooks where necessary by replacing %MAKE%.
Change-Id: Iaf778bfa3f17a8fe31312f871571ed89a9de5385
Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
Makefile.inc | 2 +-
util/gitconfig/pre-commit | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index d0a292c..c1e7def 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -418,7 +418,7 @@ gitconfig:
for hook in commit-msg pre-commit ; do \
if [ util/gitconfig/$$hook -nt .git/hooks/$$hook -o \
! -x .git/hooks/$$hook ]; then \
- cp util/gitconfig/$$hook .git/hooks/$$hook; \
+ sed -e "s,%MAKE%,$(MAKE),g" util/gitconfig/$$hook > .git/hooks/$$hook; \
chmod +x .git/hooks/$$hook; \
fi; \
done
diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit
index 8ab3e56..ccf78d3 100755
--- a/util/gitconfig/pre-commit
+++ b/util/gitconfig/pre-commit
@@ -1,2 +1,2 @@
#!/bin/sh
-exec make lint-stable
+exec %MAKE% lint-stable
More information about the coreboot-gerrit
mailing list