Bug 233250

Summary: Porter's handbook: Undocumented OPT_USE variable
Product: Documentation Reporter: Lorenzo Salvadore <salvadore>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed Not A Bug    
Severity: Affects Only Me    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-16 09:13:36 UTC
It seems the OPT_USE variable (where OPT stands for any option name) seems to be undocumented. In particular, it is not listed in "5.13.3.11. Generic Variables Replacement, OPT_VARIABLE and OPT_VARIABLE_OFF" (see https://www.freebsd.org/doc/en/books/porters-handbook/makefile-options.html ), although OPT_USES is different.

For an example of use, here is the bug report where I discovered it's existence: bug #233240.
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-16 09:22:39 UTC
Sorry I have written badly about the difference USE/USES, I will explain better.

OPT_USES is in the list, but OPT_USE is not. The two variables are different and have different behaviors. My guess is (but someone should confirm it) that OPT_USE= A=B adds USE_A= B conditionally depending on the state of OPT.

If someone confirms I can try to write a first draft.
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2018-11-16 11:00:18 UTC
(In reply to Lorenzo Salvadore from comment #1)
It is already documented here:

https://www.freebsd.org/doc/en/books/porters-handbook/makefile-options.html#options-use
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-16 11:19:50 UTC
Thanks, I had not seen it.