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

Bug#430649: New proposed wording for DEB_BUILD_OPTIONS



On Mon, Dec 31, 2007 at 11:30:25AM -0800, Russ Allbery wrote:
> Lo?c Minier <lool@dooz.org> writes:
> > On Sun, Dec 30, 2007, Russ Allbery wrote:
> >> Comments?  Seconds?
> >
> >  Thanks for your wording!
> >
> >> +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
> >> +    CFLAGS += -O0
> >> +else
> >> +    CFLAGS += -O2
> >> +endif
> >
> >  I personally use:
> >
> >     CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
> >
> >  in my packages; perhaps slightly harder to read the first time, but
> >  soon becomes a well known line which eats less space.
> 
> That's certainly a reasonable thing to do, but I'm inclined to not mess
> with this part of the example since it's been in Policy for ages and does
> work.  (Although I did change findstring to filter to be consistent with
> the change in requiring space separation and to avoid triggering on parts
> of other options, so I suppose I did open the door to changing other
> things about it too.)  There is a warning that it's just an example and
> maintainers are free to do other things.
> 
> I'm happy to change, though, if there's a consensus that the example
> should be different.

IMHO, another reason to keep the multi-line version is that this does
not apply only to compiled C programs, but also to other code in other
languages - even the documentation of the "noopt" tag says so :)
Keeping the multi-line version allows people to easily adapt it to their
packages.

Thus, it is good to have an example showing how to do it the
if/then/else way, while possibly mentioning the inline version.

G'luck,
Peter

-- 
Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
"yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation.

Attachment: pgpNjqt_2Y_7H.pgp
Description: PGP signature


Reply to: