Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: [PATCH] Install tools with "make install-tools".
Date: Fri, 22 Jul 2005 19:09:20 -0700	[thread overview]
Message-ID: <7vll3y6zov.fsf@assigned-by-dhcp.cox.net> (raw)

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>
---

 Makefile       |    4 ++++
 tools/Makefile |   13 +++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

b0189708a35914c504e7bfa8914d1f5ff029a3a4
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -195,12 +195,16 @@ test: all
 doc:
 	$(MAKE) -C Documentation all
 
+install-tools:
+	$(MAKE) -C tools install
+
 install-doc:
 	$(MAKE) -C Documentation install
 
 clean:
 	rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)
 	rm -f git-core-*.tar.gz git-core.spec
+	$(MAKE) -C tools/ clean
 	$(MAKE) -C Documentation/ clean
 
 backup: clean
diff --git a/tools/Makefile b/tools/Makefile
--- 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

                 reply	other threads:[~2005-07-23  2:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vll3y6zov.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox