Subject: Re: [Boost-build] Explanation of word "grist" in documentation
Date: 2016-05-23 20:39:19
> I follow your example but I don't follow the notion of "grist" in
> general. I don't see what it is about 'static' that relates to
> "filename-related components".
Actually, "static" doesn't relate to "filename-related components" at all.
--- What that part of the documentation is saying is that you can perform operations on the values of the variable assuming the value contains a grist or a path-like. The operation performed is dependent upon the modifier used. For example, if I wanted to see which features were in the variable "x" I could use the :G modifier to do the following # create my list of properties local x = <toolset>gcc <link>static ; echo $(x:G) ; # will ouput: <toolset> <link> Likewise, if I wanted to see only the values of the properties, I could use the ":G=" modifier (which allows me to set the "grist" to whatever value comes after the "=", in this case, I'm setting it to the empty string): local x = <toolset>gcc <link>static ; echo $(x:G=) ; # will output: gcc static Note: I would only use the above modifiers if I knew that all of the value(s) in my variable were properties. It's also possible to use the other modifiers when you know that the value(s) in the variable are paths or path-like. For example, local x = path/to/some/file.cpp ; # if I wanted to get the parent directory, I could use the :P modifier echo $(x:P) ; # outputs: path/to/some # if I wanted to get the base name (no path and no extension), I could # use the :B modifier echo $(x:B) ; # outputs: file Whenever I need to play around with the Jam language, I will throw some statements at the top of my Jamroot (like the examples above) followed by "exit" rule. For example: local x = a b c ; local y = 1 2 3 ; echo $(x)$(y) ; exit ; # exit here so that nothing builds Hopefully that helps, Aaron
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk