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

Alexey Dokuchaev danfe at FreeBSD.org
Mon Apr 8 13:18:24 UTC 2013


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


More information about the svn-ports-head mailing list