GIT 0.99.9i aka 1.0rc2
[gitweb.git] / Makefile
index 76d33b44f896bdf78a71ec3ceda7d3f785b4af71..f4a3a332bb656c712138b194f1f0cde1cdafaa8e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,12 +6,16 @@
 # Define NO_OPENSSL environment variable if you do not have OpenSSL. You will
 # miss out git-rev-list --merge-order. This also implies MOZILLA_SHA1.
 #
-# Define NO_CURL if you do not have curl installed.  git-http-pull is not
-# built, and you cannot use http:// and https:// transports.
+# Define NO_CURL if you do not have curl installed.  git-http-pull and
+# git-http-push are not built, and you cannot use http:// and https://
+# transports.
 #
 # Define CURLDIR=/foo/bar if your curl header and library files are in
 # /foo/bar/include and /foo/bar/lib directories.
 #
+# Define NO_EXPAT if you do not have expat installed.  git-http-push is
+# not built, and you cannot push using http:// and https:// transports.
+#
 # Define NO_STRCASESTR if you don't have strcasestr.
 #
 # Define PPC_SHA1 environment variable when running make to make use of
 # Define USE_STDEV below if you want git to care about the underlying device
 # change being considered an inode change from the update-cache perspective.
 
-GIT_VERSION = 0.99.9.GIT
+GIT_VERSION = 0.99.9i
 
-# CFLAGS is for the users to override from the command line.
+# CFLAGS and LDFLAGS are for the users to override from the command line.
 
 CFLAGS = -g -O2 -Wall
+LDFLAGS =
 ALL_CFLAGS = $(CFLAGS)
+ALL_LDFLAGS = $(LDFLAGS)
 
 prefix = $(HOME)
 bindir = $(prefix)/bin
@@ -85,12 +91,13 @@ SCRIPT_SH = \
        git-tag.sh git-verify-tag.sh git-whatchanged.sh git.sh \
        git-applymbox.sh git-applypatch.sh git-am.sh \
        git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
-       git-merge-resolve.sh git-merge-ours.sh git-grep.sh
+       git-merge-resolve.sh git-merge-ours.sh git-grep.sh \
+       git-lost-found.sh
 
 SCRIPT_PERL = \
        git-archimport.perl git-cvsimport.perl git-relink.perl \
-       git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \
-       git-svnimport.perl git-mv.perl
+       git-shortlog.perl git-fmt-merge-msg.perl \
+       git-svnimport.perl git-mv.perl git-cvsexportcommit.perl
 
 SCRIPT_PYTHON = \
        git-merge-recursive.py
@@ -118,7 +125,7 @@ PROGRAMS = \
        git-unpack-objects$X git-update-index$X git-update-server-info$X \
        git-upload-pack$X git-verify-pack$X git-write-tree$X \
        git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \
-       git-name-rev$X $(SIMPLE_PROGRAMS)
+       git-name-rev$X git-pack-redundant$X $(SIMPLE_PROGRAMS)
 
 # Backward compatibility -- to be removed after 1.0
 PROGRAMS += git-ssh-pull$X git-ssh-push$X
@@ -181,6 +188,12 @@ uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
 ifeq ($(uname_S),Darwin)
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
+       ## fink
+       ALL_CFLAGS += -I/sw/include
+       ALL_LDFLAGS += -L/sw/lib
+       ## darwinports
+       ALL_CFLAGS += -I/opt/local/include
+       ALL_LDFLAGS += -L/opt/local/lib
 endif
 ifeq ($(uname_S),SunOS)
        NEEDS_SOCKET = YesPlease
@@ -202,7 +215,13 @@ endif
 ifeq ($(uname_S),OpenBSD)
        NO_STRCASESTR = YesPlease
        NEEDS_LIBICONV = YesPlease
-       ALL_CFLAGS += -I/usr/local/include -L/usr/local/lib
+       ALL_CFLAGS += -I/usr/local/include
+       ALL_LDFLAGS += -L/usr/local/lib
+endif
+ifeq ($(uname_S),NetBSD)
+       NEEDS_LIBICONV = YesPlease
+       ALL_CFLAGS += -I/usr/pkg/include
+       ALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib
 endif
 ifneq (,$(findstring arm,$(uname_M)))
        ARM_SHA1 = YesPlease
@@ -212,13 +231,17 @@ endif
 
 ifndef NO_CURL
        ifdef CURLDIR
-               # This is still problematic -- gcc does not want -R.
+               # This is still problematic -- gcc does not always want -R.
                ALL_CFLAGS += -I$(CURLDIR)/include
                CURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl
        else
                CURL_LIBCURL = -lcurl
        endif
        PROGRAMS += git-http-fetch$X
+       ifndef NO_EXPAT
+               EXPAT_LIBEXPAT = -lexpat
+               PROGRAMS += git-http-push$X
+       endif
 endif
 
 ifndef SHELL_PATH
@@ -356,12 +379,13 @@ git-cherry-pick: git-revert
        $(CC) -o $*.o -c $(ALL_CFLAGS) $<
 
 git-%$X: %.o $(LIB_FILE)
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+       $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
 git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)
 $(SIMPLE_PROGRAMS) : $(LIB_FILE)
 $(SIMPLE_PROGRAMS) : git-%$X : %.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB)
+       $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
+               $(LIB_FILE) $(SIMPLE_LIB)
 
 git-http-fetch$X: fetch.o
 git-local-fetch$X: fetch.o
@@ -371,6 +395,7 @@ git-ssh-pull$X: rsh.o fetch.o
 git-ssh-push$X: rsh.o
 
 git-http-fetch$X: LIBS += $(CURL_LIBCURL)
+git-http-push$X: LIBS += $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 git-rev-list$X: LIBS += $(OPENSSL_LIBSSL)
 
 init-db.o: init-db.c
@@ -394,10 +419,10 @@ test: all
        $(MAKE) -C t/ all
 
 test-date$X: test-date.c date.o ctype.o
-       $(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o ctype.o
+       $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) test-date.c date.o ctype.o
 
 test-delta$X: test-delta.c diff-delta.o patch-delta.o
-       $(CC) $(ALL_CFLAGS) -o $@ $^
+       $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^
 
 check:
        for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done