svn commit: r39952 - head/en_US.ISO8859-1/books/porters-handbook
Eitan Adler
eadler at FreeBSD.org
Tue Nov 6 13:11:15 UTC 2012
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>
More information about the svn-doc-head
mailing list