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: Tue, 28 Jun 2011 16:31:41
Message-Id: 201106281227.13400.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] demanual update (was: Don't use / when applying sed with CFLAGS) by Peter Volkov
1 On Tuesday, June 28, 2011 08:25:50 Peter Volkov wrote:
2 > +Sometimes a package will not use the user's <c>${CFLAGS}</c> or
3 > +<c>${LDFLAGS}</c>.
4
5 there are more flag vars than this. you should use language like:
6 Sometimes a package will not use the user's build settings (such as CFLAGS or
7 LDFLAGS).
8
9 > - sed -i -e "s:cc -O2:$(tc-getCC) ${CFLAGS} ${LDFLAGS}:" build.sh \
10 > + sed -i -e "s|cc -O2|$(tc-getCC) ${CFLAGS} ${LDFLAGS}|" build.sh \
11
12 probably better to suggest delaying of the expansion in the first place.
13 sed -i -e "s|cc -O2|$(tc-getCC) \${CFLAGS} \${LDFLAGS}|" build.sh \
14
15 also, your example ignores CPPFLAGS
16 -mike

Attachments

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