On 2011-05-16 19:23, Doug Barton wrote: > On 5/16/2011 3:23 AM, Chris Rees wrote: >> On 16 May 2011 05:18, Warren Block<[email protected]> wrote: >>> On Sun, 15 May 2011, Doug Barton wrote: >>> >>>> I'm confused (yeah, I know, nothing new about that). From >>>> ports/Mk/bsd.port.options.mk: >>>> >>>> # usage: >>>> # >>>> # .include "bsd.port.options.mk" >>>> #<deal with user options> >>>> # .include "bsd.port.pre.mk" >>>> #<other work, including adjusting dependencies> >>>> # .include "bsd.port.post.mk" >>>> >>>> >>>> However the ports I've looked at so far all do: >>>> >>>> OPTIONS= blah >>>> >>>> .include<bsd.port.options.mk> >>>> >>>> blah >>>> >>>> .include<bsd.port.mk> >>>> EOF >>>> >>>> I assume that this method works, since it seems like so many ports use it. >>>> Should the notes in options.mk be updated? >>> >>> Yes, it should be updated. See examples "5.8 Simple use of OPTIONS" and >>> "5.9 Old style use of OPTIONS" in the Porter's Handbook: >>> >>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.html >>> >> >> No, because stuff is done in pre.mk which is not done in OPTIONS; >> handling dependencies such as USE_BZIP2 or USE_JAVA for example. >> >> After options processing, pre.mk is only needed if you need to do the >> above, which is why it's missed out on most ports. >> >> The Handbook part refers to 'SIMPLE' use of OPTIONS, so perhaps should >> have a 'complex' use of options as well... > > Can you give an example of a port that needs this? I didn't find any examples > of > ports doing it the "complex" way, but my search wasn't exhaustive. > > > Doug
(scratch my head, thinking ...) Now I remember a case where <bsd.port.options.mk> with <bsd.port.mk> has broken the amavisd-new port (patch was submitted by me ... :< ) with the affect the existing config was overwritten. http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/amavisd-new/Makefile.diff?r1=1.72;r2=1.73 corrected Makefile http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/amavisd-new/Makefile.diff?r1=1.73;r2=1.74 I suspect if <bds.port.options.mk> is removed (like r71) nothing will change. olli _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "[email protected]"
