From 1cbcfaea2edd04271847d0424285c08ab19c9931 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Wed, 24 Oct 2012 00:15:29 +0100 Subject: [PATCH] wincred: add install target and avoid overwriting configured variables. Signed-off-by: Pat Thoyts --- contrib/credential/wincred/Makefile | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile index bad45ca47a..3ce6aba120 100644 --- a/contrib/credential/wincred/Makefile +++ b/contrib/credential/wincred/Makefile @@ -1,14 +1,20 @@ -all: git-credential-wincred.exe - -CC = gcc -RM = rm -f -CFLAGS = -O2 -Wall - -include ../../../config.mak.autogen -include ../../../config.mak -git-credential-wincred.exe : git-credential-wincred.c +prefix ?= /usr/local +libexecdir ?= $(prefix)/libexec/git-core + +INSTALL ?= install + +GIT_CREDENTIAL_WINCRED := git-credential-wincred.exe + +all: $(GIT_CREDENTIAL_WINCRED) + +$(GIT_CREDENTIAL_WINCRED): git-credential-wincred.c $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@ +install: $(GIT_CREDENTIAL_WINCRED) + $(INSTALL) -m 755 $(GIT_CREDENTIAL_WINCRED) $(libexecdir) + clean: - $(RM) git-credential-wincred.exe + $(RM) $(GIT_CREDENTIAL_WINCRED) -- 2.11.4.GIT