--- ./Makefile.orig	2010-02-12 18:44:43.000000000 -0600
+++ ./Makefile	2010-02-13 16:06:13.000000000 -0600
@@ -234,7 +234,7 @@ endif
 
 # CFLAGS and LDFLAGS are for the users to override from the command line.
 
-CFLAGS = -g -O2 -Wall
+CFLAGS := -g -O2 -Wall
 LDFLAGS =
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
@@ -1453,7 +1453,7 @@ builtin-help.s builtin-help.o: ALL_CFLAG
 
 $(BUILT_INS): git$X
 	$(QUIET_BUILT_IN)$(RM) $@ && \
-	ln git$X $@ 2>/dev/null || \
+	ln -sf git$X $@ 2>/dev/null || \
 	ln -s git$X $@ 2>/dev/null || \
 	cp git$X $@
 
@@ -1804,7 +1804,9 @@ install_bindir_programs := $(patsubst %,
 install: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
-	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+	for F in $(ALL_PROGRAMS) ; do \
+		$(INSTALL) $$F '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' ; \
+	done
 	$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_PERL
