From 8ec4e2a5057b18711bc88fd1e18c9c92e3f40d99 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 14 Apr 2013 14:21:26 -0700 Subject: [PATCH] Fixed makefile to automatically install the git hooks (to acquire the git commit id) on the first make after newly cloning a repository --- makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/makefile b/makefile index 2c39026d..28fe83af 100644 --- a/makefile +++ b/makefile @@ -97,6 +97,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) endif endif endif + ifeq (git-repo,$(shell if $(TEST) -d ./.git; then echo git-repo; fi)) + ifneq (need-hooks,$(shell if $(TEST) ! -e ./.git/hooks/post-checkout; then echo need-hooks; fi)) + $(info *** Installing git hooks ***) + GIT_HOOKS = $(shell cp ./Visual\ Studio\ Projects/git-hooks/* ./.git/hooks/;./git/hooks/post-checkout) + endif + endif LTO_EXCLUDE_VERSIONS = PCAPLIB = pcap ifeq (agcc,$(findstring agcc,$(GCC))) # Android target build?