svn commit: r315759 - head/graphics/sane-backends

Baptiste Daroussin bapt at FreeBSD.org
Mon Apr 8 13:24:10 UTC 2013


On Mon, Apr 08, 2013 at 01:18:24PM +0000, Alexey Dokuchaev wrote:
> On Mon, Apr 08, 2013 at 12:26:47PM +0000, William Grzybowski wrote:
> > New Revision: 315759
> > URL: http://svnweb.freebsd.org/changeset/ports/315759
> > 
> > Log:
> >   - Fix inverted logic for USB option
> >   
> > @@ -53,7 +53,7 @@ LDFLAGS+=	-L${LOCALBASE}/lib
> >  .include "Makefile.man"
> >  .include <bsd.port.pre.mk>
> >  
> > -.if ${PORT_OPTIONS:MUSB}
> > +.if empty(PORT_OPTIONS:MUSB)
> >  CONFIGURE_ARGS+=	--disable-libusb
> >  .endif
> 
> While technically empty()-form is equivalent to !-form, the latter should
> had been probably used instead, for the following reasons:
> 
>   - !-form is given as an example in PH (Example 5-12);
>   - In the same PH page, in the last note, empty() is only suggested as
>     alternative syntax when traditional check cannot be used for some reason;
>   - empty()-form is more error prone: it's relatively easy to make mistakes
>     like empty(${FOO}) vs. correct emtpy(FOO) which go unnoticed as make(1)
>     does not issue any warning;
>   - Let's not increase diversity in syntax; most ports use !-form.
> 
> ./danfe

While I tend to agree here in that particular case the empty(..) form has been
chosen to remain consistent with the rest of that port.

I do agree that after the freeze a conversion from empty(..) to now more used !
${...} would be great.

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20130408/7ac03c4b/attachment.sig>


More information about the svn-ports-all mailing list