Solaris: give a bit more built-in defaults.
Taking the make command line Peter Eriksen uses, give defaults to SHELL_PATH, TAR, CURLDIR, NO_STRCASESTR, and INSTALL. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
6d9bbc50a3
commit
229a7ed7ab
43
Makefile
43
Makefile
@ -27,8 +27,6 @@
|
|||||||
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
|
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
|
||||||
# Patrick Mauritz).
|
# Patrick Mauritz).
|
||||||
#
|
#
|
||||||
# Define NO_GETDOMAINNAME if your library lack it (SunOS, Patrick Mauritz).
|
|
||||||
#
|
|
||||||
# Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
|
# Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
|
||||||
#
|
#
|
||||||
# Define COLLISION_CHECK below if you believe that SHA1's
|
# Define COLLISION_CHECK below if you believe that SHA1's
|
||||||
@ -63,6 +61,7 @@ GIT_PYTHON_DIR = $(prefix)/share/git-core/python
|
|||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
AR = ar
|
AR = ar
|
||||||
|
TAR = tar
|
||||||
INSTALL = install
|
INSTALL = install
|
||||||
RPMBUILD = rpmbuild
|
RPMBUILD = rpmbuild
|
||||||
|
|
||||||
@ -133,17 +132,6 @@ ifdef WITH_SEND_EMAIL
|
|||||||
SCRIPT_PERL += git-send-email.perl
|
SCRIPT_PERL += git-send-email.perl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef NO_CURL
|
|
||||||
ifdef CURLDIR
|
|
||||||
# This is still problematic -- gcc does not want -R.
|
|
||||||
CFLAGS += -I$(CURLDIR)/include
|
|
||||||
CURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl
|
|
||||||
else
|
|
||||||
CURL_LIBCURL = -lcurl
|
|
||||||
endif
|
|
||||||
PROGRAMS += git-http-fetch
|
|
||||||
endif
|
|
||||||
|
|
||||||
LIB_FILE=libgit.a
|
LIB_FILE=libgit.a
|
||||||
|
|
||||||
LIB_H = \
|
LIB_H = \
|
||||||
@ -166,6 +154,9 @@ LIB_OBJS = \
|
|||||||
LIBS = $(LIB_FILE)
|
LIBS = $(LIB_FILE)
|
||||||
LIBS += -lz
|
LIBS += -lz
|
||||||
|
|
||||||
|
#
|
||||||
|
# Platform specific tweaks
|
||||||
|
#
|
||||||
ifeq ($(shell uname -s),Darwin)
|
ifeq ($(shell uname -s),Darwin)
|
||||||
NEEDS_SSL_WITH_CRYPTO = YesPlease
|
NEEDS_SSL_WITH_CRYPTO = YesPlease
|
||||||
NEEDS_LIBICONV = YesPlease
|
NEEDS_LIBICONV = YesPlease
|
||||||
@ -173,12 +164,28 @@ endif
|
|||||||
ifeq ($(shell uname -s),SunOS)
|
ifeq ($(shell uname -s),SunOS)
|
||||||
NEEDS_SOCKET = YesPlease
|
NEEDS_SOCKET = YesPlease
|
||||||
NEEDS_NSL = YesPlease
|
NEEDS_NSL = YesPlease
|
||||||
|
SHELL_PATH = /bin/bash
|
||||||
|
NO_STRCASESTR = YesPlease
|
||||||
|
CURLDIR = /opt/sfw
|
||||||
|
INSTALL = ginstall
|
||||||
|
TAR = gtar
|
||||||
PLATFORM_DEFINES += -D__EXTENSIONS__
|
PLATFORM_DEFINES += -D__EXTENSIONS__
|
||||||
endif
|
endif
|
||||||
ifneq (,$(findstring arm,$(shell uname -m)))
|
ifneq (,$(findstring arm,$(shell uname -m)))
|
||||||
ARM_SHA1 = YesPlease
|
ARM_SHA1 = YesPlease
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef NO_CURL
|
||||||
|
ifdef CURLDIR
|
||||||
|
# This is still problematic -- gcc does not want -R.
|
||||||
|
CFLAGS += -I$(CURLDIR)/include
|
||||||
|
CURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl
|
||||||
|
else
|
||||||
|
CURL_LIBCURL = -lcurl
|
||||||
|
endif
|
||||||
|
PROGRAMS += git-http-fetch
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef SHELL_PATH
|
ifndef SHELL_PATH
|
||||||
SHELL_PATH = /bin/sh
|
SHELL_PATH = /bin/sh
|
||||||
endif
|
endif
|
||||||
@ -245,6 +252,7 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
|
|||||||
$(patsubst %.py,%,$(SCRIPT_PYTHON)) \
|
$(patsubst %.py,%,$(SCRIPT_PYTHON)) \
|
||||||
gitk
|
gitk
|
||||||
|
|
||||||
|
export TAR INSTALL DESTDIR
|
||||||
### Build rules
|
### Build rules
|
||||||
|
|
||||||
all: $(PROGRAMS) $(SCRIPTS)
|
all: $(PROGRAMS) $(SCRIPTS)
|
||||||
@ -254,7 +262,8 @@ all:
|
|||||||
|
|
||||||
git: git.sh Makefile
|
git: git.sh Makefile
|
||||||
rm -f $@+ $@
|
rm -f $@+ $@
|
||||||
sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' <$@.sh >$@+
|
sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \
|
||||||
|
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' <$@.sh >$@+
|
||||||
chmod +x $@+
|
chmod +x $@+
|
||||||
mv $@+ $@
|
mv $@+ $@
|
||||||
|
|
||||||
@ -356,7 +365,7 @@ dist: git-core.spec git-tar-tree
|
|||||||
./git-tar-tree HEAD $(GIT_TARNAME) > $(GIT_TARNAME).tar
|
./git-tar-tree HEAD $(GIT_TARNAME) > $(GIT_TARNAME).tar
|
||||||
@mkdir -p $(GIT_TARNAME)
|
@mkdir -p $(GIT_TARNAME)
|
||||||
@cp git-core.spec $(GIT_TARNAME)
|
@cp git-core.spec $(GIT_TARNAME)
|
||||||
tar rf $(GIT_TARNAME).tar $(GIT_TARNAME)/git-core.spec
|
$(TAR) rf $(GIT_TARNAME).tar $(GIT_TARNAME)/git-core.spec
|
||||||
@rm -rf $(GIT_TARNAME)
|
@rm -rf $(GIT_TARNAME)
|
||||||
gzip -f -9 $(GIT_TARNAME).tar
|
gzip -f -9 $(GIT_TARNAME).tar
|
||||||
|
|
||||||
@ -365,7 +374,7 @@ rpm: dist
|
|||||||
|
|
||||||
deb: dist
|
deb: dist
|
||||||
rm -rf $(GIT_TARNAME)
|
rm -rf $(GIT_TARNAME)
|
||||||
tar zxf $(GIT_TARNAME).tar.gz
|
$(TAR) zxf $(GIT_TARNAME).tar.gz
|
||||||
dpkg-source -b $(GIT_TARNAME)
|
dpkg-source -b $(GIT_TARNAME)
|
||||||
cd $(GIT_TARNAME) && fakeroot debian/rules binary
|
cd $(GIT_TARNAME) && fakeroot debian/rules binary
|
||||||
|
|
||||||
@ -380,5 +389,5 @@ clean:
|
|||||||
rm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc
|
rm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc
|
||||||
rm -f git-tk_$(GIT_VERSION)-*.deb
|
rm -f git-tk_$(GIT_VERSION)-*.deb
|
||||||
$(MAKE) -C Documentation/ clean
|
$(MAKE) -C Documentation/ clean
|
||||||
$(MAKE) -C templates/ clean
|
$(MAKE) -C templates clean
|
||||||
$(MAKE) -C t/ clean
|
$(MAKE) -C t/ clean
|
||||||
|
@ -139,7 +139,8 @@ yes,yes)
|
|||||||
then
|
then
|
||||||
HEAD=HEAD
|
HEAD=HEAD
|
||||||
fi
|
fi
|
||||||
tar Ccf "$repo" - refs $HEAD | tar Cxf "$D/.git" - || exit 1
|
(cd "$repo" && tar cf - refs $HEAD) |
|
||||||
|
(cd "$D/.git" && tar xf -) || exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
case "$repo" in
|
case "$repo" in
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
# make and install sample templates
|
# make and install sample templates
|
||||||
|
|
||||||
INSTALL=install
|
INSTALL ?= install
|
||||||
prefix=$(HOME)
|
TAR ?= tar
|
||||||
template_dir=$(prefix)/share/git-core/templates/
|
prefix ?= $(HOME)
|
||||||
|
template_dir ?= $(prefix)/share/git-core/templates/
|
||||||
# DESTDIR=
|
# DESTDIR=
|
||||||
|
|
||||||
all: boilerplates custom
|
all: boilerplates custom
|
||||||
@ -35,4 +36,5 @@ clean:
|
|||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d -m755 $(DESTDIR)$(template_dir)
|
$(INSTALL) -d -m755 $(DESTDIR)$(template_dir)
|
||||||
tar Ccf blt - . | tar Cxf $(DESTDIR)$(template_dir) -
|
(cd blt && $(TAR) cf - .) | \
|
||||||
|
(cd $(DESTDIR)$(template_dir) && $(TAR) xf -)
|
||||||
|
Loading…
Reference in New Issue
Block a user