| Summary: | [patch] tell porters handbook about OPTIONS | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | edwin | ||||||
| Component: | Books & Articles | Assignee: | jcamou | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | ||||||||
| Priority: | Normal | ||||||||
| Version: | Latest | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
edwin
2005-01-19 21:10:24 UTC
As noted by pav: option names should be uppercase: --- makefile-options.diff.old Thu Jan 20 08:29:45 2005 +++ makefile-options.diff Thu Jan 20 08:28:43 2005 @@ -24,7 +24,7 @@ + <title>Syntax</title> + <para>The syntax for the <makevar>OPTIONS</makevar> variable is: + -+<programlisting>OPTIONS= option "descriptive text" default ... ++<programlisting>OPTIONS= OPTION "descriptive text" default ... +</programlisting> + + The value for default is either <literal>ON</literal> or @@ -48,15 +48,15 @@ + <title>Example</title> + <example id="ports-options-simple-use"> + <title>Simple use of <makevar>OPTIONS</makevar></title> -+ <para><programlisting>OPTIONS= foo "Enable option foo" On \ -+ bar "Support feature bar" Off ++ <para><programlisting>OPTIONS= FOO "Enable option foo" On \ ++ BAR "Support feature bar" Off + +.include <bsd.port.pre.mk> + -+.if defined(WITH_FOO) -+CONFIGURE_ARGS+= --with-foo -+.else ++.if defined(WITHOUT_FOO) +CONFIGURE_ARGS+= --without-foo ++.else ++CONFIGURE_ARGS+= --with-foo +.endif + +.if defined(WITH_BAR) -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/ More patches, in coperation with josef@ --- makefile-options.diff.old Thu Jan 20 08:29:45 2005 +++ makefile-options.diff Thu Jan 20 09:35:59 2005 @@ -24,18 +24,18 @@ + <title>Syntax</title> + <para>The syntax for the <makevar>OPTIONS</makevar> variable is: + -+<programlisting>OPTIONS= option "descriptive text" default ... ++<programlisting>OPTIONS= OPTION "descriptive text" default ... +</programlisting> + + The value for default is either <literal>ON</literal> or + <literal>OFF</literal>. Multiple repetitions of these three fields -+ is allowed.</para> ++ are allowed.</para> + + <para>When the user runs the <command>make config</command> (or runs + <command>make build</command> for the first time), the framework will + check for + <filename>/var/db/ports/<replaceable>portname</replaceable>/options</filename>. -+ If it doesn't exist, it will use the values of ++ If that file doesn't exist, it will use the values of + <makevar>OPTIONS</makevar> to create a dialogbox where the options + can be enabled or disabled. Then the options file is saved and the + selected variables are set.</para> @@ -48,15 +48,15 @@ + <title>Example</title> + <example id="ports-options-simple-use"> + <title>Simple use of <makevar>OPTIONS</makevar></title> -+ <para><programlisting>OPTIONS= foo "Enable option foo" On \ -+ bar "Support feature bar" Off ++ <para><programlisting>OPTIONS= FOO "Enable option foo" On \ ++ BAR "Support feature bar" Off + +.include <bsd.port.pre.mk> + -+.if defined(WITH_FOO) -+CONFIGURE_ARGS+= --with-foo -+.else ++.if defined(WITHOUT_FOO) +CONFIGURE_ARGS+= --without-foo ++.else ++CONFIGURE_ARGS+= --with-foo +.endif + +.if defined(WITH_BAR) @@ -67,7 +67,7 @@ + </example> + + <sect3> -+ <title>Brokeness</title> ++ <title>Brokenness</title> + <itemizedlist> + <listitem> + <para><command>make index</command> doesn't follow -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/ Responsible Changed From-To: freebsd-doc->josef Josef said: <josef_> but if you can wait until weekend you can assign the pr to me On Thu, Jan 20, 2005 at 08:01:53AM +1100, Edwin Groothuis wrote: [snip] > + > + <sect2> > + <title><makevar>OPTIONS</makevar></title> Just a couple of minor comments; the text is great. > + > + <sect3> > + <title>Background</title> > + <para>The <makevar>OPTIONS</makevar> variable gives the user who > + installs the port a dialog with the available options and saves > + them to <filename>/var/db/ports/portname/options</filename>. Next > + time when the port has to be rebuild, the options are reused. Never > + again you have to remember all the twenty "Never again *will* you have...", perhaps? > + The value for default is either <literal>ON</literal> or > + <literal>OFF</literal>. Multiple repetitions of these three fields > + is allowed.</para> "Multiple repetitions... *are* allowed" sounds a bit better to me... > + <para>When the user runs the <command>make config</command> (or runs I don't think you need 'the' here, since 'command' is never displayed in the resulting text/HTML/whatever. I'd suggest 'When the user runs <command>...' > + <command>make build</command> for the first time), the framework will > + check for > + <filename>/var/db/ports/<replaceable>portname</replaceable>/options</filename>. > + If it doesn't exist, it will use the values of Maybe "If this file doesn't exist", to avoid confusion as to what the different 'it's mean :) > + <makevar>OPTIONS</makevar> to create a dialogbox where the options > + can be enabled or disabled. Then the options file is saved and the > + selected variables are set.</para> The selected variables are only set when the port is actually being fetched/built/installed, and not in the user environment or anything, right? Maybe something like 'and the selected variables will be used when building the port'. [snip] > + <title>Brokeness</title> ITYM Brokenness :) Other than that, great work! G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 because I didn't think of a good beginning of it. On Thu, Jan 20, 2005 at 10:08:11AM +0200, Peter Pentchev wrote: > > On Thu, Jan 20, 2005 at 08:01:53AM +1100, Edwin Groothuis wrote: > [snip] > > + > > + <sect2> > > + <title><makevar>OPTIONS</makevar></title> > > Just a couple of minor comments; the text is great. > > > + > > + <sect3> > > + <title>Background</title> > > + <para>The <makevar>OPTIONS</makevar> variable gives the user who > > + installs the port a dialog with the available options and saves > > + them to <filename>/var/db/ports/portname/options</filename>. Next > > + time when the port has to be rebuild, the options are reused. Never > > + again you have to remember all the twenty My take on the 2nd to last sentence: "When the port has to be rebuilt, the options are reused." ^ > > "Never again *will* you have...", perhaps? Agreed along with your other comments. [snip] -- Frank print "f r a n k @ e s p e r a n c e - l i n u x . c o . u k" | sed 's/ //g' --->PGP keyID: 0x10BD6F4B<--- Responsible Changed From-To: josef->docs Take away from Joseph since he's busy playing records :-) Responsible Changed From-To: docs->freebsd-doc Canonicalize assignment. Responsible Changed From-To: freebsd-doc->jcamou Take it, I'll work on it. How about the following patch? -- Jesus R. Camou - jcamou@FreeBSD.org On Wed, Apr 20, 2005 at 01:04:34PM -0700, Jesus R. Camou wrote: > How about the following patch? excellenet. Get it in! Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/ State Changed From-To: open->closed Patch committed with some changes, thanks edwin and all of you that reviewed the patch. |