| Summary: | [patch] Automatic Detection of Dependencies Addendum for Porter's Handbook | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | A.J. Kehoe IV <zxMbzY3e> | ||||
| Component: | Books & Articles | Assignee: | Warren Block <wblock> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
A.J. Kehoe IV
2012-04-11 19:40:11 UTC
Responsible Changed From-To: freebsd-doc->wblock Take. On Wed, 11 Apr 2012 18:33:18 GMT, A.J. Kehoe IV (Nanoman) wrote:
> + <example>
> + <title>Correct Declaration of an Optional Dependency</title>
> +
> + <programlisting>OPTIONS= BAR "Enable bar support" on
> +
> +.include <bsd.port.pre.mk>
> +
> +.if defined(WITH_BAR) && !defined(WITHOUT_BAR)
> +LIB_DEPENDS= bar:${PORTSDIR}/foo/bar
> +.endif</programlisting>
> + </example>
It's not enough. You also need to add something like --disable-bar to configure arguments and of course configure script should respect the switch.
> On Wed, 11 Apr 2012 18:33:18 GMT, A.J. Kehoe IV (Nanoman) wrote: >> + <example> >> + <title>Correct Declaration of an Optional Dependency</title> >> + >> + <programlisting>OPTIONS= BAR "Enable bar >> support" on >> + >> +.include <bsd.port.pre.mk> >> + >> +.if defined(WITH_BAR) && !defined(WITHOUT_BAR) >> +LIB_DEPENDS= bar:${PORTSDIR}/foo/bar >> +.endif</programlisting> >> + </example> > > It's not enough. You also need to add something like --disable-bar to > configure arguments and of course configure script should respect the > switch. This is needed only if it's required by the configure script. If support for a dependency doesn't need to be compiled in, then simply including it in the dependency list would suffice. My examples included only the elements that were needed to illustrate my point. Anyone wanting to use optional dependencies should read the "makefile-options" section that I linked to, along with any other sections that are relevant to their port. wblock 2012-04-16 02:31:31 UTC
FreeBSD doc repository
Modified files:
en_US.ISO8859-1/books/porters-handbook book.sgml
Log:
Add a section describing automatic dependencies, the problems they
cause, and the correct approach. Patch is a modified version of the
original in the PR.
PR: docs/166855
Submitted by: A.J. Kehoe IV
Revision Changes Path
1.1178 +50 -0 doc/en_US.ISO8859-1/books/porters-handbook/book.sgml
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Revised version of original patch committed. Thanks! |