Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2012 18:39:42 +0000 (UTC)
From:      Niclas Zeising <zeising@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r39657 - head/en_US.ISO8859-1/books/porters-handbook
Message-ID:  <201210041839.q94IdgSL004400@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zeising
Date: Thu Oct  4 18:39:41 2012
New Revision: 39657
URL: http://svn.freebsd.org/changeset/doc/39657

Log:
  Add a small example on how to check if a ports option is unset.
  
  Reviewed by:	bapt
  Approved by:	joel (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	Thu Oct  4 16:06:29 2012	(r39656)
+++ head/en_US.ISO8859-1/books/porters-handbook/book.xml	Thu Oct  4 18:39:41 2012	(r39657)
@@ -4474,6 +4474,13 @@ RUN_DEPENDS+=	bar:${PORTSDIR}/bar/bar
 .include &lt;bsd.port.mk&gt;</programlisting>
 	  </example>
 
+	  <example id ="ports-options-check-unset">
+	    <title>Check for Unset Port <makevar>OPTIONS</makevar></title>
+	    <programlisting>.if empty(PORT_OPTIONS:MEXAMPLES)
+CONFIGURE_ARGS+=--without-examples
+.endif</programlisting>
+	  </example>
+
 	  <example id="ports-options-practical-use">
 	    <title>Practical Use of <makevar>OPTIONS</makevar></title>
 
@@ -4508,6 +4515,10 @@ CONFIGURE_ARGS+=	--without-postgres
 LIB_DEPENDS+=	icuuc:${PORTSDIR}/devel/icu
 .endif
 
+.if empty(PORT_OPTIONS:MEXAMPLES)
+CONFIGURE_ARGS+=	--without-examples
+.endif
+
 # Check other OPTIONS
 
 .include &lt;bsd.port.mk&gt;</programlisting>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210041839.q94IdgSL004400>