From: Shawn Pearce <spearce@spearce.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Stefan Pfetzing <stefan.pfetzing@gmail.com>,
git@vger.kernel.org, merlyn@stonehenge.com
Subject: Re: Makefile checks for DarwinPorts / Fink
Date: Sat, 22 Jul 2006 12:19:14 -0400 [thread overview]
Message-ID: <20060722161914.GA10754@spearce.org> (raw)
In-Reply-To: <7vhd19itu2.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
> "Stefan Pfetzing" <stefan.pfetzing@gmail.com> writes:
>
> > while I was updating the DarwinPorts Portfile for git, I saw some
> > really suspicious lines in the Makefile of Git for DarwinPorts/Fink.
> >
> > --- snip ---
> > ## fink
> > ifeq ($(shell test -d /sw/lib && echo y),y)
> > ALL_CFLAGS += -I/sw/include
> > ALL_LDFLAGS += -L/sw/lib
> > endif
> > ## darwinports
> > ifeq ($(shell test -d /opt/local/lib && echo y),y)
> > ALL_CFLAGS += -I/opt/local/include
> > ALL_LDFLAGS += -L/opt/local/lib
> > endif
> > --- snap ---
> >
> > IMHO, Git should definetely not include /sw/include and /sw/lib, just
> > if it *exists*.
[snip]
> But I suspect that the "official" portfile (or whatever it is
> called in the Darwin world) should be able to override whatever
> is done in there --- otherwise we would need to remove them or
> comment them out, but I am hoping it does not have to come to
> that; I think they serve as good hint to help people who are
> building from the source.
The quoted section of the Makefile was mostly my fault. GIT used
to build only against Fink but when I switched to DarwinPorts it
was first not even looking for them and second when I removed Fink
the Mac OS X linker was warning about /sw/lib not existing.
I completely agree that its incorrect to be doing this all of the
time as a higher-level build driver (e.g. Portfile) should be able
to have more direct control CFLAGS and LDFLAGS. Perhaps something
like this?
diff --git a/Makefile b/Makefile
index a1666e2..0a48c32 100644
--- a/Makefile
+++ b/Makefile
@@ -268,14 +268,18 @@ ifeq ($(uname_S),Darwin)
NEEDS_LIBICONV = YesPlease
NO_STRLCPY = YesPlease
## fink
- ifeq ($(shell test -d /sw/lib && echo y),y)
- BASIC_CFLAGS += -I/sw/include
- BASIC_LDFLAGS += -L/sw/lib
+ 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
## darwinports
- ifeq ($(shell test -d /opt/local/lib && echo y),y)
- BASIC_CFLAGS += -I/opt/local/include
- BASIC_LDFLAGS += -L/opt/local/lib
+ 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)
--
Shawn.
next prev parent reply other threads:[~2006-07-22 16:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-21 14:58 Makefile checks for DarwinPorts / Fink Stefan Pfetzing
2006-07-22 14:43 ` Junio C Hamano
2006-07-22 16:19 ` Shawn Pearce [this message]
2006-07-23 5:45 ` Shawn Pearce
2006-07-23 13:00 ` Jakub Narebski
2006-07-24 4:28 ` Shawn Pearce
2006-07-24 6:43 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060722161914.GA10754@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=merlyn@stonehenge.com \
--cc=stefan.pfetzing@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).