Date: Tue, 6 Nov 2012 13:11:15 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r39952 - head/en_US.ISO8859-1/books/porters-handbook Message-ID: <201211061311.qA6DBFvX066045@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Tue Nov 6 13:11:15 2012 New Revision: 39952 URL: http://svnweb.freebsd.org/changeset/doc/39952 Log: Prefer a more obvious syntax but add a note explaining why one may prefer the empty() syntax. PR: docs/172662 Submitted by: crees Approved by: bcr (mentor) Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/book.xml Tue Nov 6 13:11:13 2012 (r39951) +++ head/en_US.ISO8859-1/books/porters-handbook/book.xml Tue Nov 6 13:11:15 2012 (r39952) @@ -4476,7 +4476,7 @@ RUN_DEPENDS+= bar:${PORTSDIR}/bar/bar <example id ="ports-options-check-unset"> <title>Check for Unset Port <makevar>OPTIONS</makevar></title> - <programlisting>.if empty(PORT_OPTIONS:MEXAMPLES) + <programlisting>.if ! ${PORT_OPTIONS:MEXAMPLES} CONFIGURE_ARGS+=--without-examples .endif</programlisting> </example> @@ -4515,7 +4515,7 @@ CONFIGURE_ARGS+= --without-postgres LIB_DEPENDS+= icuuc:${PORTSDIR}/devel/icu .endif -.if empty(PORT_OPTIONS:MEXAMPLES) +.if ! ${PORT_OPTIONS:MEXAMPLES} CONFIGURE_ARGS+= --without-examples .endif @@ -4620,6 +4620,17 @@ CONFIGURE_ARGS+= --disable-foo disabled. The configure script does not enable related features in the application, despite library's presence in the system.</para> + + <note> + <para>Under some circumstances, the shorthand conditional + syntax can cause problems with complex constructs. + If you receive errors such as <literal>Malformed + conditional</literal>, an alternative syntax can be + used.</para> + <programlisting>.if !empty(VARIABLE:MVALUE) +# as an alternative to +.if ${VARIABLE:MVALUE}</programlisting> + </note> </sect2> </sect1>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211061311.qA6DBFvX066045>