Makefile: Don't install git hooks automatically

These specific git hooks are only needed when someone wants to push a
patch to upstream and so it's not needed to run it in every make call.
Beside that, we also don't know the environment in which this is
executed and it might not be wanted.

Thus, add a new make target `gitconfig` and move the install command to
it. It can be used by running `make gitconfig`.

flashrom-stable: Add `gitconfig` to the `.PHONY` targets.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: Ib83568c7ff149a8ec34ad7e92720c36a89def7bd
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/68647
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71494
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/Makefile b/Makefile
index 9ee49c1..ef1d186 100644
--- a/Makefile
+++ b/Makefile
@@ -339,9 +339,6 @@
 # Inform user of the version string
 $(info Replacing all version templates with $(VERSION).)
 
-# If a VCS is found then try to install hooks.
-$(shell ./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh)
-
 ###############################################################################
 # Default settings of CONFIG_* variables.
 
@@ -1307,7 +1304,10 @@
 libpayload: clean
 	make CC="CC=i386-elf-gcc lpgcc" AR=i386-elf-ar RANLIB=i386-elf-ranlib
 
-.PHONY: all install clean distclean compiler hwlibs features _export export tarball featuresavailable libpayload
+gitconfig:
+	./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh
+
+.PHONY: all install clean distclean compiler hwlibs features _export export tarball featuresavailable libpayload gitconfig
 
 # Disable implicit suffixes and built-in rules (for performance and profit)
 .SUFFIXES: