threads / patch / 5491

patchInclude local config before platform tweaks

Subject: [PATCH] Include local config before platform tweaks

## tl;dr

5 messages between Sep 5, 2006 and Sep 6, 2006. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Brian Gernhardt· Sep 5, 2006, 22:00 UTC · lore

Having config.mak included after the platform tweaks ignores NO_FINK or NO_DARWIN_PORTS in that file. Simply including the config earlier fixes that.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---
Makefile |    6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Show changes to Makefile +3 −3
diff --git a/Makefile b/Makefile
index 7b3114f..81902d4 100644
--- a/Makefile
+++ b/Makefile
@@ -300,6 +300,9 @@ BUILTIN_OBJS = \
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
+-include config.mak.autogen
+-include config.mak
+
#
# Platform specific tweaks
#
@@ -403,9 +406,6 @@ ifneq (,$(findstring arm,$(uname_M)))
	ARM_SHA1 = YesPlease
endif
--include config.mak.autogen
--include config.mak
-
ifdef WITH_OWN_SUBPROCESS_PY
	PYMODULES += compat/subprocess.py
else
Junio C Hamano· Sep 5, 2006, 22:13 UTC · re: Brian Gernhardt · lore

Re: [PATCH] Include local config before platform tweaks

Brian Gernhardt <benji@silverinsanity.com> writes:
> Having config.mak included after the platform tweaks ignores NO_FINK
> or NO_DARWIN_PORTS in that file.  Simply including the config earlier
> fixes that.

I vaguely recall that this was brought up before, and the conclusion was that the include location is correct but the way darwin bits were done was wrong. I do not recall the details but does anybody on the list know?

Shawn Pearce· Sep 6, 2006, 03:31 UTC · re: Junio C Hamano · lore

Re: [PATCH] Include local config before platform tweaks

Junio C Hamano <junkio@cox.net> wrote:
Show 10 quoted lines
> Brian Gernhardt <benji@silverinsanity.com> writes:
> 
> > Having config.mak included after the platform tweaks ignores NO_FINK
> > or NO_DARWIN_PORTS in that file.  Simply including the config earlier
> > fixes that.
> 
> I vaguely recall that this was brought up before, and the
> conclusion was that the include location is correct but the way
> darwin bits were done was wrong.  I do not recall the details
> but does anybody on the list know?

I think we just need to move the NO_FINK stuff below the include; like this:

Show changes to Makefile +15 −12
diff --git a/Makefile b/Makefile
index 164dbcf..748907b 100644
--- a/Makefile
+++ b/Makefile
@@ -328,18 +333,6 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
 	NEEDS_LIBICONV = YesPlease
 	NO_STRLCPY = YesPlease
-	ifndef NO_FINK
-		ifeq ($(shell test -d /sw/lib && echo y),y)
-			BASIC_CFLAGS += -I/sw/include
-			BASIC_LDFLAGS += -L/sw/lib
-		endif
-	endif
-	ifndef NO_DARWIN_PORTS
-		ifeq ($(shell test -d /opt/local/lib && echo y),y)
-			BASIC_CFLAGS += -I/opt/local/include
-			BASIC_LDFLAGS += -L/opt/local/lib
-		endif
-	endif
 endif
 ifeq ($(uname_S),SunOS)
 	NEEDS_SOCKET = YesPlease
@@ -433,6 +426,21 @@ else
 	endif
 endif
 
+ifeq ($(uname_S),Darwin)
+	ifndef NO_FINK
+		ifeq ($(shell test -d /sw/lib && echo y),y)
+			BASIC_CFLAGS += -I/sw/include
+			BASIC_LDFLAGS += -L/sw/lib
+		endif
+	endif
+	ifndef NO_DARWIN_PORTS
+		ifeq ($(shell test -d /opt/local/lib && echo y),y)
+			BASIC_CFLAGS += -I/opt/local/include
+			BASIC_LDFLAGS += -L/opt/local/lib
+		endif
+	endif
+endif
+
 ifndef NO_CURL
 	ifdef CURLDIR
 		# This is still problematic -- gcc does not always want -R.
Junio C Hamano· Sep 6, 2006, 07:18 UTC · re: Shawn Pearce · lore

Re: [PATCH] Include local config before platform tweaks

Shawn Pearce <spearce@spearce.org> writes:
Show 14 quoted lines
> Junio C Hamano <junkio@cox.net> wrote:
>> Brian Gernhardt <benji@silverinsanity.com> writes:
>> 
>> > Having config.mak included after the platform tweaks ignores NO_FINK
>> > or NO_DARWIN_PORTS in that file.  Simply including the config earlier
>> > fixes that.
>> 
>> I vaguely recall that this was brought up before, and the
>> conclusion was that the include location is correct but the way
>> darwin bits were done was wrong.  I do not recall the details
>> but does anybody on the list know?
>
> I think we just need to move the NO_FINK stuff below the include;
> like this:
Thanks Shawn.  Brian does Shawn's patch work for you?
Brian Gernhardt· Sep 6, 2006, 19:13 UTC · re: Junio C Hamano · lore

Re: [PATCH] Include local config before platform tweaks

On Sep 6, 2006, at 3:18 AM, Junio C Hamano wrote:
> Thanks Shawn.  Brian does Shawn's patch work for you?
Short answer: Yes

Long answer: The patch from his e-mail failed (git apply: fatal: corrupt patch at line 27), but manually making the changes worked. I didn't pull before applying that, so that's probably the problem there.

~~Brian

← back to recent threads