git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables
@ 2006-02-20 23:36 Paul Jakma
       [not found] ` <7v3bid8umq.fsf@assigned-by-dhcp.cox.net>
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Jakma @ 2006-02-20 23:36 UTC (permalink / raw)
  To: git list; +Cc: Junio C Hamano

- 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.

Signed-off-by: Paul Jakma <paul@quagga.net>

---

  Makefile |   15 ++++++++-------
  1 files changed, 8 insertions(+), 7 deletions(-)

6ee3566e9b5408b7bfedbb6ffcdbac1be6bafbbb
diff --git a/Makefile b/Makefile
index 317be3c..a225e9c 100644
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,12 @@ all:

  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
  	@$(SHELL_PATH) ./GIT-VERSION-GEN
--include GIT-VERSION-FILE
+
+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')
+uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
+uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')

  # CFLAGS and LDFLAGS are for the users to override from the command line.

@@ -82,7 +87,7 @@ STRIP ?= strip

  prefix = $(HOME)
  bindir = $(prefix)/bin
-gitexecdir = $(prefix)/bin
+gitexecdir = $(bindir)
  template_dir = $(prefix)/share/git-core/templates/
  GIT_PYTHON_DIR = $(prefix)/share/git-core/python
  # DESTDIR=
@@ -212,10 +217,6 @@ shellquote = '$(call shq,$(1))'
  # 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')
-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')

  ifeq ($(uname_S),Darwin)
  	NEEDS_SSL_WITH_CRYPTO = YesPlease
@@ -230,10 +231,10 @@ endif
  ifeq ($(uname_S),SunOS)
  	NEEDS_SOCKET = YesPlease
  	NEEDS_NSL = YesPlease
-	NEEDS_LIBICONV = YesPlease
  	SHELL_PATH = /bin/bash
  	NO_STRCASESTR = YesPlease
  	ifeq ($(uname_R),5.8)
+		NEEDS_LIBICONV = YesPlease
  		NO_UNSETENV = YesPlease
  		NO_SETENV = YesPlease
  	endif
-- 
1.2.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables
       [not found] ` <7v3bid8umq.fsf@assigned-by-dhcp.cox.net>
@ 2006-02-20 23:53   ` Paul Jakma
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Jakma @ 2006-02-20 23:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Mon, 20 Feb 2006, Junio C Hamano wrote:

> The latter two makes sense to me.

Yeah, it's handy for installs to shared volumes, e.g. I like to set 
bindir to $(prefix)/arch/$(uname_P)/bin.

> I'd appreciate independent confirmations from people with Solaris 8 
> and/or Solaris 9 boxes.

Seems wise ;).

Note that it doesn't change things for S8. Also, I've tested this on 
Solaris 10 and fairly recent Solaris dev snapshots (snv_31). I didn't 
try a test compile on S9, however I did check on an S9u7 box and 
there is no libiconv to link against.

regards,
-- 
Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
Fortune:
"Ada is the work of an architect, not a computer scientist."
- Jean Icbiah, inventor of Ada, weenie

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-20 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20 23:36 [PATCH] Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables Paul Jakma
     [not found] ` <7v3bid8umq.fsf@assigned-by-dhcp.cox.net>
2006-02-20 23:53   ` Paul Jakma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).