git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] add liconv link for makefile

From
CCColin Curtis <colinpcurtis@gmail.com>
Date
Sep 8, 2021, 05:13 UTC
Message-ID
<20210908051340.13332-3-colinpcurtis826@ucla.edu>
In-Reply-To
<20210908051340.13332-1-colinpcurtis826@ucla.edu>
From: Colin Curtis <colinpcurtis@gmail.com>
---
 Makefile      | 8 ++++++--
 builtin/gud.c | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 379cd91a97..e1679cca47 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # The default target of this Makefile is...
 all::
-
+OS := $(shell uname)
 # Define V=1 to have a more verbose compile.
 #
 # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.
@@ -1514,7 +1514,11 @@ ifndef NO_ICONV
 		ifdef NEEDS_LIBINTL_BEFORE_LIBICONV
 			ICONV_LINK += -lintl
 		endif
-		EXTLIBS += $(ICONV_LINK) /usr/local/Cellar/libiconv/1.16/lib/libiconv.dylib # -liconv
+		ifeq ($(OS),Darwin)
+			EXTLIBS += $(ICONV_LINK) /usr/local/Cellar/libiconv/1.16/lib/libiconv.dylib
+		else
+			EXTLIBS += $(ICONV_LINK) -liconv
+		endif
 	endif
 endif
 ifdef ICONV_OMITS_BOM
diff --git a/builtin/gud.c b/builtin/gud.c
index 04808a08f5..9a5a1e71ac 100644
--- a/builtin/gud.c
+++ b/builtin/gud.c
@@ -24,4 +24,4 @@ int cmd_gud(int argc, const char **argv, const char *prefix)
     }
     
     return 0;
-}
\ No newline at end of file
+}
-- 
2.30.1 (Apple Git-130)
Previous: Colin CurtisNext: Carlo Arenas
Message 3 of 6 in “Add cmd_gud and detect libiconv path for Mac OS”
  1. 0/2 Add cmd_gud and detect libiconv path for Mac OSColin Curtis, Sep 8, 2021
  2. 1/2 add cmd_gud to open git-scm.com webpageColin Curtis, Sep 8, 2021
  3. 2/2 add liconv link for makefileColin Curtis, Sep 8, 2021
  4. Carlo ArenasSep 8, 2021
  5. Bagas SanjayaSep 8, 2021
  6. Ævar Arnfjörð BjarmasonSep 8, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.