I am creating a module with name such as mymodule.jam. I cannot figure out how to use some builtin rules such as: constant or path-constant.
I get errors such as:
ERROR: rule "path-constant" unknown in module "mymodule".
ERROR: rule "constant" unknown in module "mymodule".
What is strange is that it seems I can use these rules without any problem in my jamroot or in my jamfiles, without seeming to need to import anything specific.
These rules are defined in a module named
project-rulesfrom fileboost-build-1_77_0/tools/build/src/build/project.jam.I tried many things, such as:
and I got the following error:
error: Project target requested but not yet assigned for module 'project-rules'.so after spending a long time trying many things, my conclusion is that these rules are available only in what the doc refers to as "Jamfile" (and not
Jamfile):because the doc for
constantsays (emphasis mine):So not available in
mymodule.jam(?).If you find a solution, please add another answer!