default / options keywords
Ryan Schmidt
ryandesign at macports.org
Sun Jul 12 19:44:38 PDT 2009
Are the workings of the "default" and "options" keywords documented
somewhere, or where in the code do I look to understand exactly how
that's working?
It seems to be about late variable substitution, e.g. when the xcode
portgroup says
default destroot.destdir {DSTROOT="${destroot}"}
the curly brackets around the whole thing prevent variable
substitution at the time the portgroup is loaded, and MacPorts plugs
in the value of destroot into that string later, yes? It gives the
port a chance to change destroot before it gets plugged into the string.
It also seems to be about being able to access portgroup variables
without everyone having to "global" them first, e.g. you can just say
"xcode.target something" in a portfile without having to first say
"global xcode.target".
Is this all it is or is there more?
More information about the macports-dev
mailing list