Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] demanual update (was: Don't use / when applying sed with CFLAGS)
Date: Wed, 29 Jun 2011 02:47:09
Message-Id: 201106282246.34794.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] demanual update (was: Don't use / when applying sed with CFLAGS) by "Michał Górny"
1 On Tuesday, June 28, 2011 15:58:46 Michał Górny wrote:
2 > On Tue, 28 Jun 2011 15:04:00 -0400 Nathan Phillip Brink wrote:
3 > > On Tue, Jun 28, 2011 at 10:24:26PM +0400, Peter Volkov wrote:
4 > > > ?? ??????, 28/06/2011 ?? 12:23 -0400, Mike Frysinger ??????????:
5 > > > > On Tuesday, June 28, 2011 02:54:03 Micha?? G??rny wrote:
6 > > > > > emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"...
7 > > > >
8 > > > > this is easily dangerous when it comes to packages (and many do)
9 > > > > that append in the Makefile. specifying on the command line
10 > > > > blocks those while passing via env works fine. i'm not sure it's
11 > > > > appropriate to provide as an example.
12 > > >
13 > > > Hm, I'm not sure I understand what you are talking about here.
14 > > > Could you provide example?
15 > >
16 > > I think he's referring to somethine like:
17 > >
18 > > Makefile:
19 > > CFLAGS += `pkg-config --cflags libxml-2.0`
20 > >
21 > > which would work fine for:
22 > > emake
23 > >
24 > > but which would override the pkg-config flags if you do:
25 > > emake CFLAGS="${CFLAGS}"
26 >
27 > But is overriding really useful in this particular case? It seems
28 > rather irrelevant here.
29
30 if the Makefile starts off with
31 CFLAGS = <hardcode>
32
33 and then in subdirs it appends, then yes
34
35 or people split up the initial hardcode and latter pkg-config appends as
36 Nathan showed, then yes
37 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature