1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
$NetBSD: patch-aa,v 1.9 2007/09/11 09:23:55 bjs Exp $
NetBSD 3.0 needs -liconv, too.
AR, CC, CFLAGS, LDFLAGS and LIBS should be taken from the environment.
--- Makefile.orig 2007-09-02 01:57:44.000000000 -0400
+++ Makefile
@@ -135,8 +135,6 @@ uname_P := $(shell sh -c 'uname -p 2>/de
# CFLAGS and LDFLAGS are for the users to override from the command line.
-CFLAGS = -g -O2 -Wall
-LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
STRIP ?= strip
@@ -173,12 +171,8 @@ GITWEB_SITE_FOOTER =
export prefix bindir gitexecdir sharedir template_dir sysconfdir
-CC = gcc
-AR = ar
RM = rm -f
-TAR = tar
FIND = find
-INSTALL = install
RPMBUILD = rpmbuild
TCL_PATH = tclsh
TCLTK_PATH = wish
@@ -398,6 +392,7 @@ ifeq ($(uname_S),Darwin)
NO_STRLCPY = YesPlease
endif
ifeq ($(uname_S),SunOS)
+ NEEDS_LIBICONV = YesPlease
NEEDS_SOCKET = YesPlease
NEEDS_NSL = YesPlease
SHELL_PATH = /bin/bash
@@ -416,8 +411,6 @@ ifeq ($(uname_S),SunOS)
NO_C99_FORMAT = YesPlease
NO_STRTOUMAX = YesPlease
endif
- INSTALL = ginstall
- TAR = gtar
BASIC_CFLAGS += -D__EXTENSIONS__
endif
ifeq ($(uname_O),Cygwin)
@@ -447,9 +440,7 @@ ifeq ($(uname_S),OpenBSD)
BASIC_LDFLAGS += -L/usr/local/lib
endif
ifeq ($(uname_S),NetBSD)
- ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
- NEEDS_LIBICONV = YesPlease
- endif
+ NEEDS_LIBICONV = YesPlease
BASIC_CFLAGS += -I/usr/pkg/include
BASIC_LDFLAGS += -L/usr/pkg/lib
ALL_LDFLAGS += -Wl,-rpath,/usr/pkg/lib
@@ -710,7 +701,7 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_P
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
-LIBS = $(GITLIBS) $(EXTLIBS)
+LIBS += $(GITLIBS) $(EXTLIBS)
BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \
-DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $(COMPAT_CFLAGS)
@@ -986,14 +977,14 @@ remove-dashes:
### Installation rules
install: all
- $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'
- $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
- $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
- $(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
+ $(BSD_INSTALL_PROGRAM_DIR) '$(DESTDIR_SQ)$(bindir_SQ)'
+ $(BSD_INSTALL_PROGRAM_DIR) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+ $(BSD_INSTALL_SCRIPT) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+ $(BSD_INSTALL_SCRIPT) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
$(MAKE) -C perl prefix='$(prefix_SQ)' install
ifndef NO_TCLTK
- $(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+ $(BSD_INSTALL_SCRIPT) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
$(MAKE) -C git-gui install
endif
if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
|