threads / patch / 145

patchParametrize installation directory

Subject: [PATCH] Parametrize installation directory

## tl;dr

One message between Apr 19, 2005 and Apr 19, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Pavel Roskin· Apr 19, 2005, 19:43 UTC · lore
Hello!

It shouldn't be necessary to patch Makefile to specify where scripts should be installed. This patch introduces a variable bindir for that purpose. The name of the variable was chosen for compatibility with projects using Automake.

For example, to install scripts to /usr/local/bin use: make install bindir=usr/local/bin

Signed-off-by: Pavel Roskin <proski@gnu.org>
Show changes to Makefile +2 −1
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ CFLAGS=-g -O3 -Wall
 CC=gcc
 AR=ar
 
+bindir = $(HOME)/bin/
 
 PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \
 	cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \
@@ -54,7 +55,7 @@ gitversion.sh: $(VERSION)
 	@chmod +x $@
 
 install: $(PROG) $(GEN_SCRIPT)
-	install $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(HOME)/bin/
+	install $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(bindir)
 
 clean:
 	rm -f *.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE)
-- 
Regards,
Pavel Roskin

← back to recent threads