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

Re: RFS: mpg321 (updated package, 2nd try)



On Sat, Feb 12, 2011 at 02:13:33PM +0100, Niels Thykier wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On 2011-02-12 11:24, Paul Gevers wrote:
> >>  - The CFLAGS in d/rules overrides flags set by dpkg-buildflags, which
> >>    makes it more difficult to rebuild the package with different default
> >>    flags (see man dpkg-buildflags).
> > 
> > I see that the example in the Debian policy on build options [1] also
> > overrides the flags set by dpkg-buildflags. So is this an example how it
> > should NOT be done and should this be changed as well?
> > 
> > I try to add some option to the CFLAGS, but seem not to be able to do it
> > properly without specifying my own CFLAGS. My idea would be that you
> > just use """CFLAGS+=some_option_here""" in your d/rules, but trying this
> > out just gives me a CFLAGS with only my "some_option_here". So this can
> > not be correct. It seems that d/rules does not have any CFLAGS available
> > before I set them to any value. I must be overseeing something, so can
> > you give an example, in mail or web page link, on how to properly
> > implement adding options to CFLAGS in d/rules.
> > 
> > Kind regards
> > Paul
> > 
> > [1]
> > http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
> > 
Hi,

> 
> Hey
> 
> I believe you can use:
> 
> CFLAGS:= $(CFLAGS) some_option_here
> if (...)
>     CFLAGS += some_other_option
> endif
> 
> Alternatively you can use:
> 
> CFLAGS = $(shell dpkg-buildflags --get CFLAGS) some_option_here
> 

Fixed and uploaded to mentors.d.n.

Cheers,
Chris.	

> But that requires a versioned Build-Depends on dpkg-dev.
> 
> That being said, this is one of the places where building via
> dpkg-buildpackage and debian/rules binary differs.
> 
> As for the policy; it appears that the example might benefit from a
> minor update.
> 
> ~Niels
> 


Reply to: