@matheusbsbs / matheus-bagliano / commits / e15f545155
Fork 0

Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables

- Solaris 9 and up do not need -liconv, so NEEDS_LIBICONV should be set only for S8. - Move the declaration of the uname variables to early in the Makefile so they can be referenced by prefix and gitexecdir variables. - gitexecdir defaults to being same as bindir, it might as well reference that variable. [jc: corrupt patch, sneakily tried to remove inclusion of GIT-VERSION-FILE I do not know why I am applying this...] Signed-off-by: Paul Jakma <paul@quagga.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Paul Jakma committed Feb 20, 2006 at 23:36 UTC e15f545155bb4b2cad4475a25cad8fb576d37dee
1 file changed +8 -6
Makefile
+8 -6
@@ -77,6 +77,12 @@ GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
77 @$(SHELL_PATH) ./GIT-VERSION-GEN
78 -include GIT-VERSION-FILE
79
80 +uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
81 +uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
82 +uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
83 +uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
84 +uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
85 +
86 # CFLAGS and LDFLAGS are for the users to override from the command line.
87
88 CFLAGS = -g -O2 -Wall
@@ -87,7 +93,7 @@ STRIP ?= strip
93
94 prefix = $(HOME)
95 bindir = $(prefix)/bin
90 -gitexecdir = $(prefix)/bin
96 +gitexecdir = $(bindir)
97 template_dir = $(prefix)/share/git-core/templates/
98 GIT_PYTHON_DIR = $(prefix)/share/git-core/python
99 # DESTDIR=
@@ -217,10 +223,6 @@ shellquote = '$(call shq,$(1))'
223 # We choose to avoid "if .. else if .. else .. endif endif"
224 # because maintaining the nesting to match is a pain. If
225 # we had "elif" things would have been much nicer...
220 -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
221 -uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
222 -uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
223 -uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
226
227 ifeq ($(uname_S),Darwin)
228 NEEDS_SSL_WITH_CRYPTO = YesPlease
@@ -235,10 +237,10 @@ endif
237 ifeq ($(uname_S),SunOS)
238 NEEDS_SOCKET = YesPlease
239 NEEDS_NSL = YesPlease
238 - NEEDS_LIBICONV = YesPlease
240 SHELL_PATH = /bin/bash
241 NO_STRCASESTR = YesPlease
242 ifeq ($(uname_R),5.8)
243 + NEEDS_LIBICONV = YesPlease
244 NO_UNSETENV = YesPlease
245 NO_SETENV = YesPlease
246 endif