aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-12 21:42:25 -0800
committerJunio C Hamano <junkio@cox.net>2006-01-12 21:51:23 -0800
commit4dc00021f784697e6d196ec285c8689d0777c533 (patch)
tree61badc87d55dfbf3eac2af50560c9aa4120afb1c
parent4c34a2c555f8064d45e655e45fd40d7e2b203d6e (diff)
downloadgit-4dc00021f784697e6d196ec285c8689d0777c533.tar.gz
git-4dc00021f784697e6d196ec285c8689d0777c533.tar.xz
Makefile: add 'strip' target
This is not invoked by any other target (most notably, "make install" does not), but is provided as a convenience for people who are building from the source. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fa0cd8315..373881195 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,7 @@ CFLAGS = -g -O2 -Wall
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
+STRIP ?= strip
prefix = $(HOME)
bindir = $(prefix)/bin
@@ -371,6 +372,9 @@ all: $(ALL_PROGRAMS)
all:
$(MAKE) -C templates
+strip: $(PROGRAMS) git$X
+ $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
+
git$X: git.c $(LIB_FILE)
$(CC) -DGIT_EXEC_PATH='"$(bindir)"' -DGIT_VERSION='"$(GIT_VERSION)"' \
$(CFLAGS) $(COMPAT_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE)
@@ -512,6 +516,6 @@ clean:
$(MAKE) -C t/ clean
rm -f GIT-VERSION-FILE
-.PHONY: all install clean
+.PHONY: all install clean strip
.PHONY: .FORCE-GIT-VERSION-FILE