From 80ce8b2b4e84f50cd3e95a203e48039377dabe9d Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 14 Apr 2013 15:25:46 -0700 Subject: [PATCH] Fixed makefile logic to install git hooks for git commit id --- makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 28fe83af..5effe365 100644 --- a/makefile +++ b/makefile @@ -66,8 +66,10 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) OSNAME = $(OSTYPE) ifeq (SunOS,$(OSTYPE)) TEST = /bin/test + CP = /bin/cp else TEST = test + CP = cp endif ifeq (CYGWIN,$(findstring CYGWIN,$(OSTYPE))) # uname returns CYGWIN_NT-n.n-ver OSTYPE = cygwin @@ -98,9 +100,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) 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) + ifeq (need-hooks,$(shell if $(TEST) ! -e ./.git/hooks/post-checkout; then echo need-hooks; fi)) + $(info *** Installing git hooks in local repository ***) + GIT_HOOKS = $(shell $(CP) './Visual Studio Projects/git-hooks/post-commit' ./.git/hooks/) + GIT_HOOKS = $(shell $(CP) './Visual Studio Projects/git-hooks/post-checkout' ./.git/hooks/) + GIT_HOOKS = $(shell $(CP) './Visual Studio Projects/git-hooks/post-merge' ./.git/hooks/) + GIT_HOOKS = $(shell ./.git/hooks/post-checkout) endif endif LTO_EXCLUDE_VERSIONS =