Skip to content

Commit

Permalink
Makefile: add 'strip' target
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 13, 2006
1 parent 4c34a2c commit 4dc0002
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ CFLAGS = -g -O2 -Wall
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
STRIP ?= strip

prefix = $(HOME)
bindir = $(prefix)/bin
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit 4dc0002

Please sign in to comment.