boostorg / boostorg/build

Cannot figure out how to call qualified rule

Offen
#65 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
251
Forks
63
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.