{"thread":{"id":"3409","subject":"[PATCH] Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables","startedAt":"2006-02-20T23:36:28Z","lastAt":"2006-02-20T23:53:19Z","messageCount":2,"participants":["Paul Jakma"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16481","messageId":"Pine.LNX.4.64.0602202335020.31425@sheen.jakma.org","threadId":"3409","inReplyTo":null,"subject":"[PATCH] Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables","fromName":"Paul Jakma","fromEmail":"paul@clubi.ie","sentAt":"2006-02-20T23:36:28Z","receivedAt":"2006-02-20T23:36:28Z","isPatch":true,"sender":{"key":"paul@clubi.ie","avatar":null},"body":"- Solaris 9 and up do not need -liconv, so NEEDS_LIBICONV should be set\n   only for S8.\n- Move the declaration of the uname variables to early in the Makefile\n   so they can be referenced by prefix and gitexecdir variables.\n- gitexecdir defaults to being same as bindir, it might as well reference\n   that variable.\n\nSigned-off-by: Paul Jakma <paul@quagga.net>\n\n---\n\n  Makefile |   15 ++++++++-------\n  1 files changed, 8 insertions(+), 7 deletions(-)\n\n6ee3566e9b5408b7bfedbb6ffcdbac1be6bafbbb\ndiff --git a/Makefile b/Makefile\nindex 317be3c..a225e9c 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -70,7 +70,12 @@ all:\n\n  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n  \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n--include GIT-VERSION-FILE\n+\n+uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')\n+uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')\n+uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')\n+uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')\n+uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')\n\n  # CFLAGS and LDFLAGS are for the users to override from the command line.\n\n@@ -82,7 +87,7 @@ STRIP ?= strip\n\n  prefix = $(HOME)\n  bindir = $(prefix)/bin\n-gitexecdir = $(prefix)/bin\n+gitexecdir = $(bindir)\n  template_dir = $(prefix)/share/git-core/templates/\n  GIT_PYTHON_DIR = $(prefix)/share/git-core/python\n  # DESTDIR=\n@@ -212,10 +217,6 @@ shellquote = '$(call shq,$(1))'\n  # We choose to avoid \"if .. else if .. else .. endif endif\"\n  # because maintaining the nesting to match is a pain.  If\n  # we had \"elif\" things would have been much nicer...\n-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')\n-uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')\n-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')\n-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')\n\n  ifeq ($(uname_S),Darwin)\n  \tNEEDS_SSL_WITH_CRYPTO = YesPlease\n@@ -230,10 +231,10 @@ endif\n  ifeq ($(uname_S),SunOS)\n  \tNEEDS_SOCKET = YesPlease\n  \tNEEDS_NSL = YesPlease\n-\tNEEDS_LIBICONV = YesPlease\n  \tSHELL_PATH = /bin/bash\n  \tNO_STRCASESTR = YesPlease\n  \tifeq ($(uname_R),5.8)\n+\t\tNEEDS_LIBICONV = YesPlease\n  \t\tNO_UNSETENV = YesPlease\n  \t\tNO_SETENV = YesPlease\n  \tendif\n-- \n1.2.1\n"},{"id":"16483","messageId":"Pine.LNX.4.64.0602202347410.31425@sheen.jakma.org","threadId":"3409","inReplyTo":"7v3bid8umq.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables","fromName":"Paul Jakma","fromEmail":"paul@clubi.ie","sentAt":"2006-02-20T23:53:19Z","receivedAt":"2006-02-20T23:53:19Z","isPatch":true,"sender":{"key":"paul@clubi.ie","avatar":null},"body":"On Mon, 20 Feb 2006, Junio C Hamano wrote:\n\n> The latter two makes sense to me.\n\nYeah, it's handy for installs to shared volumes, e.g. I like to set \nbindir to $(prefix)/arch/$(uname_P)/bin.\n\n> I'd appreciate independent confirmations from people with Solaris 8 \n> and/or Solaris 9 boxes.\n\nSeems wise ;).\n\nNote that it doesn't change things for S8. Also, I've tested this on \nSolaris 10 and fairly recent Solaris dev snapshots (snv_31). I didn't \ntry a test compile on S9, however I did check on an S9u7 box and \nthere is no libiconv to link against.\n\nregards,\n-- \nPaul Jakma\tpaul@clubi.ie\tpaul@jakma.org\tKey ID: 64A2FF6A\nFortune:\n\"Ada is the work of an architect, not a computer scientist.\"\n- Jean Icbiah, inventor of Ada, weenie\n"}]}