# 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.
- -# DEFINES += -DUSE_STDEV
- -
- GIT_VERSION = 0.99.9d
- GIT_VERSION = 0.99.9.GIT
-GIT_VERSION = 0.99.7d
+++GIT_VERSION = 0.99.9e
-
+ +# CFLAGS is for the users to override from the command line.
CFLAGS = -g -O2 -Wall
- -ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES)
+ +ALL_CFLAGS = $(CFLAGS)
prefix = $(HOME)
bindir = $(prefix)/bin
LIBS = $(LIB_FILE)
LIBS += -lz
-ifeq ($(shell uname -s),Darwin)
+# Shell quote;
+# Result of this needs to be placed inside ''
+shq = $(subst ','\'',$(1))
+# This has surrounding ''
+shellquote = '$(call shq,$(1))'
+
+#
+# Platform specific tweaks
+#
+
+# We choose to avoid "if .. else if .. else .. endif endif"
+# because maintaining the nesting to match is a pain. If
+# we had "elif" things would have been much nicer...
+uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
+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 -L/sw/lib
+ + ## darwinports
+ + ALL_CFLAGS += -I/opt/local/include -L/opt/local/lib
endif
-ifeq ($(shell uname -s),SunOS)
+ifeq ($(uname_S),SunOS)
NEEDS_SOCKET = YesPlease
NEEDS_NSL = YesPlease
- PLATFORM_DEFINES += -D__EXTENSIONS__
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /bin/bash
+ NO_STRCASESTR = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
- PLATFORM_DEFINES += -D__EXTENSIONS__
+ + ALL_CFLAGS += -D__EXTENSIONS__
+endif
+ifeq ($(uname_O),Cygwin)
+ NO_STRCASESTR = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ NO_IPV6 = YesPlease
+ X = .exe
- PLATFORM_DEFINES += -DUSE_SYMLINK_HEAD=0
+ + ALL_CFLAGS += -DUSE_SYMLINK_HEAD=0
+endif
+ifeq ($(uname_S),OpenBSD)
+ NO_STRCASESTR = YesPlease
+ NEEDS_LIBICONV = YesPlease
- PLATFORM_DEFINES += -I/usr/local/include -L/usr/local/lib
+ + ALL_CFLAGS += -I/usr/local/include -L/usr/local/lib
+endif
+ifneq (,$(findstring arm,$(uname_M)))
+ ARM_SHA1 = YesPlease
+endif
+
+-include config.mak
+
+ifndef NO_CURL
+ ifdef CURLDIR
+ # This is still problematic -- gcc does not want -R.
- CFLAGS += -I$(CURLDIR)/include
+ + 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
ifndef NO_OPENSSL
LIB_OBJS += epoch.o
OPENSSL_LIBSSL = -lssl
- CFLAGS += -I$(OPENSSLDIR)/include
+ ifdef OPENSSLDIR
+ # Again this may be problematic -- gcc does not always want -R.
+ + ALL_CFLAGS += -I$(OPENSSLDIR)/include
+ OPENSSL_LINK = -L$(OPENSSLDIR)/lib -R$(OPENSSLDIR)/lib
+ else
+ OPENSSL_LINK =
+ endif
else
- DEFINES += -DNO_OPENSSL
- DEFINES += '-DNO_OPENSSL'
+ + ALL_CFLAGS += -DNO_OPENSSL
MOZILLA_SHA1 = 1
OPENSSL_LIBSSL =
endif
ifdef NEEDS_SSL_WITH_CRYPTO
- LIB_4_CRYPTO = -lcrypto -lssl
+ LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto -lssl
else
- LIB_4_CRYPTO = -lcrypto
+ LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto
endif
ifdef NEEDS_LIBICONV
- LIB_4_ICONV = -liconv
-else
- LIB_4_ICONV =
-endif
-ifdef MOZILLA_SHA1
- SHA1_HEADER = "mozilla-sha1/sha1.h"
- LIB_OBJS += mozilla-sha1/sha1.o
-else
- ifdef PPC_SHA1
- SHA1_HEADER = "ppc/sha1.h"
- LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
+ ifdef ICONVDIR
+ # Again this may be problematic -- gcc does not always want -R.
- CFLAGS += -I$(ICONVDIR)/include
+ + ALL_CFLAGS += -I$(ICONVDIR)/include
+ ICONV_LINK = -L$(ICONVDIR)/lib -R$(ICONVDIR)/lib
else
- SHA1_HEADER = <openssl/sha.h>
- LIBS += $(LIB_4_CRYPTO)
+ ICONV_LINK =
endif
+ LIB_4_ICONV = $(ICONV_LINK) -liconv
+else
+ LIB_4_ICONV =
endif
ifdef NEEDS_SOCKET
LIBS += -lsocket
SIMPLE_LIB += -lnsl
endif
ifdef NO_STRCASESTR
- DEFINES += -Dstrcasestr=gitstrcasestr -DNO_STRCASESTR=1
- DEFINES += -Dstrcasestr=gitstrcasestr
+ + ALL_CFLAGS += -Dstrcasestr=gitstrcasestr -DNO_STRCASESTR=1
LIB_OBJS += compat/strcasestr.o
endif
- DEFINES += -Dmmap=gitfakemmap -Dmunmap=gitfakemunmap -DNO_MMAP
+ifdef NO_MMAP
- DEFINES += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
+ + ALL_CFLAGS += -Dmmap=gitfakemmap -Dmunmap=gitfakemunmap -DNO_MMAP
+ LIB_OBJS += compat/mmap.o
+endif
+ifdef NO_IPV6
+ + ALL_CFLAGS += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
+endif
-DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
+ifdef PPC_SHA1
+ SHA1_HEADER = "ppc/sha1.h"
+ LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
+else
+ifdef ARM_SHA1
+ SHA1_HEADER = "arm/sha1.h"
+ LIB_OBJS += arm/sha1.o arm/sha1_arm.o
+else
+ifdef MOZILLA_SHA1
+ SHA1_HEADER = "mozilla-sha1/sha1.h"
+ LIB_OBJS += mozilla-sha1/sha1.o
+else
+ SHA1_HEADER = <openssl/sha.h>
+ LIBS += $(LIB_4_CRYPTO)
+endif
+endif
+endif
+
- DEFINES += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER))
+ +ALL_CFLAGS += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER))
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
%.o: %.S
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-git-%: %.o $(LIB_FILE)
+git-%$X: %.o $(LIB_FILE)
$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
-git-mailinfo : SIMPLE_LIB += $(LIB_4_ICONV)
+git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)
$(SIMPLE_PROGRAMS) : $(LIB_FILE)
-$(SIMPLE_PROGRAMS) : git-% : %.o
+$(SIMPLE_PROGRAMS) : git-%$X : %.o
$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB)
-git-http-fetch: fetch.o
-git-local-fetch: fetch.o
-git-ssh-fetch: rsh.o fetch.o
-git-ssh-upload: rsh.o
-git-ssh-pull: rsh.o fetch.o
-git-ssh-push: rsh.o
+git-http-fetch$X: fetch.o
+git-local-fetch$X: fetch.o
+git-ssh-fetch$X: rsh.o fetch.o
+git-ssh-upload$X: rsh.o
+git-ssh-pull$X: rsh.o fetch.o
+git-ssh-push$X: rsh.o
-git-http-fetch: LIBS += -lcurl
-git-rev-list: LIBS += $(OPENSSL_LIBSSL)
+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
$(CC) -c $(ALL_CFLAGS) \
### Cleaning rules
clean:
- rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROGRAMS) $(LIB_FILE)
+ rm -f *.o mozilla-sha1/*.o ppc/*.o compat/*.o $(PROGRAMS) $(LIB_FILE)
rm -f $(filter-out gitk,$(SCRIPTS))
- rm -f git-core.spec
+ rm -f git-core.spec *.pyc *.pyo
rm -rf $(GIT_TARNAME)
rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
- - rm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc
- - rm -f git-tk_$(GIT_VERSION)-*.deb
+ + rm -f git-core_$(GIT_VERSION)-*.dsc
+ + rm -f git-*_$(GIT_VERSION)-*.deb
$(MAKE) -C Documentation/ clean
- $(MAKE) -C templates/ clean
+ $(MAKE) -C templates clean
$(MAKE) -C t/ clean
-git-core (0.99.7d-0) unstable; urgency=low
+++git-core (0.99.9e-0) unstable; urgency=low
++
- * GIT 0.99.7d
+++ * GIT 0.99.9e
++
- -- Junio C Hamano <junkio@cox.net> Sun, 25 Sep 2005 00:40:46 -0700
+++ -- Junio C Hamano <junkio@cox.net> Sun, 6 Nov 2005 18:37:18 -0800
++
-git-core (0.99.7c-0) unstable; urgency=low
++git-core (0.99.9d-0) unstable; urgency=low
+
- * GIT 0.99.7c
++ * GIT 0.99.9d
+
- -- Junio C Hamano <junkio@cox.net> Sat, 24 Sep 2005 11:33:36 -0700
++ -- Junio C Hamano <junkio@cox.net> Sat, 5 Nov 2005 11:46:37 -0800
+
-git-core (0.99.7b-0) unstable; urgency=low
++git-core (0.99.9c-0) unstable; urgency=low
+
- * GIT 0.99.7b
++ * GIT 0.99.9c
+
- -- Junio C Hamano <junkio@cox.net> Thu, 22 Sep 2005 21:46:44 -0700
++ -- Junio C Hamano <junkio@cox.net> Thu, 3 Nov 2005 15:44:54 -0800
+
-git-core (0.99.7a-0) unstable; urgency=low
++git-core (0.99.9b-0) unstable; urgency=low
+
- * GIT 0.99.7a
++ * GIT 0.99.9b
+
- -- Junio C Hamano <junkio@cox.net> Mon, 19 Sep 2005 19:29:07 -0700
++ -- Junio C Hamano <junkio@cox.net> Tue, 1 Nov 2005 21:39:39 -0800
++
++git-core (0.99.9a-0) unstable; urgency=low
++
++ * GIT 0.99.9a
++
++ -- Junio C Hamano <junkio@cox.net> Sun, 30 Oct 2005 15:03:32 -0800
++
+ +git-core (0.99.9.GIT-0) unstable; urgency=low
+ +
+ + * Test Build.
+ +
+ + -- Junio C Hamano <junkio@cox.net> Sat, 5 Nov 2005 11:18:13 -0800
+ +
+ +git-core (0.99.9-1) unstable; urgency=low
+ +
+ + * Split the git-core binary package into core, doc, and foreign SCM
+ + interoperability modules.
+ +
+ + -- Junio C Hamano <junkio@cox.net> Sat, 5 Nov 2005 11:18:13 -0800
+ +
+git-core (0.99.9-0) unstable; urgency=low
+
+ * GIT 0.99.9
+
+ -- Junio C Hamano <junkio@cox.net> Sat, 29 Oct 2005 14:34:30 -0700
+
+git-core (0.99.8-0) unstable; urgency=low
+
+ * GIT 0.99.8
+
+ -- Junio C Hamano <junkio@cox.net> Sun, 2 Oct 2005 12:54:26 -0700
git-core (0.99.7-0) unstable; urgency=low