[PATCH] make INSTALL binary in Makefile configurable via make variable
[git.git] / Makefile
index a8d4175..3e3463b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,10 +7,16 @@
 # BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly
 # break unless your underlying filesystem supports those sub-second times
 # (my ext3 doesn't).
-CFLAGS=-g -O2 -Wall
+COPTS=-O2
+CFLAGS=-g $(COPTS) -Wall
+
+prefix=$(HOME)
+bin=$(prefix)/bin
+# dest=
 
 CC=gcc
 AR=ar
+INSTALL=install
 
 SCRIPTS=git-apply-patch-script git-merge-one-file-script git-prune-script \
        git-pull-script git-tag-script git-resolve-script
@@ -26,7 +32,7 @@ PROG=   git-update-cache git-diff-files git-init-db git-write-tree \
 all: $(PROG)
 
 install: $(PROG) $(SCRIPTS)
-       install $(PROG) $(SCRIPTS) $(HOME)/bin/
+       $(INSTALL) $(PROG) $(SCRIPTS) $(dest)$(bin)
 
 LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
         tag.o date.o