[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CFLAGS/CPPFLAGS/LDFLAGS



On Tue, May 14, 2013 at 11:12:52AM +0600, Andrey Rahmatullin wrote:
> On Mon, May 13, 2013 at 08:55:15PM +0000, Nathan Owens wrote:
> >  when I do blhc --build and I was wondering how to get the CPPFLAG.
> > I tried overriding auto build  and do make CFLAGS+=$(shell
> > dpkg-buildflags --get CFLAGS) and same with CPPFLAGS but it still
>                         ^^^^^^
>                         CPPFLAGS

...well, he did write "and same with CPPFLAGS" :)  Or maybe you meant
something else (see below).

Nathan, I believe that what Andrey may have meant is that there are some
upstream packages that simply pay no attention to the CPPFLAGS
environment variable - just as there are some that do not pay any
attention to CFLAGS and LDFLAGS, either.  In this case, if it turns out
that your package is one of those, you basically have two options:
- patch the package's build system so that it honors CPPFLAGS
- do what Andrey said: in the debian/rules file, add the contents of
  CPPFLAGS to the CFLAGS variable that the package supposedly already
  honors

In both cases, write to the upstream authors and ask them to honor
CPPFLAGS, too.

But, as somebody else wrote, we'll need to see a build log and a copy of
your debian/rules file before that.  Actually, it might be good to see
upstream's build files (Makefile, CMakeLists.txt, etc), too, just to
make sure that they do (or don't) pay attention to CPPFLAGS at all.

G'luck,
Peter

-- 
Peter Pentchev	roam@ringlet.net roam@FreeBSD.org p.penchev@storpool.com
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
This sentence is false.

Attachment: signature.asc
Description: Digital signature


Reply to: