boostorg / boostorg/build

Cannot figure out how to call qualified rule

Open
#65 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
251
Forks
63
PR merge metrics
No merged PRs in 30d

Description

As Boost Build manual suggests I ask this question inside an issue.
I recently started to study Boost Build and I like how it does things a lot. But when I reached [the section about modules](http://www.boost.org/build/doc/html/jam/language.html#jam.language.modules) and copy-pasted the first example inside a project definition, b2 exited with an error.

Here is the full Jamroot contents:

```
project someproject ;

module my_module
{
rule salute ( x ) { ECHO $(x), world ; }
rule greet ( ) { salute hello ; }
greet ;
}
my_module.salute goodbye ;
```

The output is:

```
hello, world
Jamroot:12: in modules.load
ERROR: rule "my_module.salute" unknown in module "Jamfile".
/usr/share/boost-build/build/project.jam:311: in load-jamfile
/usr/share/boost-build/build/project.jam:64: in load
/usr/share/boost-build/build/project.jam:145: in project.find
/usr/share/boost-build/build-system.jam:535: in load
/usr/share/boost-build/kernel/modules.jam:289: in import
/usr/share/boost-build/kernel/bootstrap.jam:139: in boost-build
/usr/share/boost-build/boost-build.jam:8: in module scope
```

`b2 -v` produces `Boost.Jam Version 2014.03. OS=LINUX.`

So, how a rule in a module should be invoked?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.