summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-07-23 02:09:20 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-23 03:34:16 (GMT)
commit8cc393068aedc7378166ccc013d3954cd87f0deb (patch)
treee01fed085f595dfda06fda1d9c3b263000ffcb8c /tools
parentf6e1a4d6dc4d1b3d82d5e87fdd817b3994dda5e0 (diff)
downloadgit-8cc393068aedc7378166ccc013d3954cd87f0deb.zip
git-8cc393068aedc7378166ccc013d3954cd87f0deb.tar.gz
git-8cc393068aedc7378166ccc013d3954cd87f0deb.tar.bz2
[PATCH] Install tools with "make install-tools".
Match the main Makefile by separating COPTS from CFLAGS, defining INSTALL, prefix, and bin. Add a new target 'install-tools' to the main Makefile to install them. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 8e7252e..5c07cec 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,6 +1,14 @@
+#
+# Make Linus git-tools
+#
CC=gcc
-CFLAGS=-Wall -O2
+COPTS=-O2
+CFLAGS=-g $(COPTS) -Wall
+INSTALL=install
HOME=$(shell echo $$HOME)
+prefix=$(HOME)
+bin=$(prefix)/bin
+# dest=
PROGRAMS=mailsplit mailinfo
SCRIPTS=applymbox applypatch
@@ -8,7 +16,8 @@ SCRIPTS=applymbox applypatch
all: $(PROGRAMS)
install: $(PROGRAMS) $(SCRIPTS)
- cp -f $(PROGRAMS) $(SCRIPTS) $(HOME)/bin/
+ $(INSTALL) -m755 -d $(dest)$(bin)
+ $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(dest)$(bin)
clean:
rm -f $(PROGRAMS) *.o