|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-04-08 06:38:00
"themadman74" <vmvaf0v02_at_[hidden]> writes:
> Hi,
> I am using jam that was compiled from the boost-jam-3.1.9 source code
> on Cygwin (as well as Linux). In trying out the example for modules
> in boost.jam document, http://www.boost.org/tools/build/jam_src/, if I
> type into a Jamfile:
>
> module my_module
> {
> rule salute ( x ) { ECHO $(x), world ; }
> rule greet ( ) { salute hello ; }
> greet ;
> }
> my_module.salute goodbye ;
>
> I find that it gives an error of:
> ------
> hello, world
> Jamfile:7: in module scope
> rule my_module.salute unknown in module
> ------
>
> If someone could point out to me the correct way of getting modules to
> work, then I would appreciate it. I have tried going over thru the
> mailing list archives but didn't seem to find anything in regards to
> this boost-related enhancement to the original Jam.
You're working with the low-level "module" language feature but not
with the high-level Boost.Build module feature. When Boost.Build
imports a module, it looks up the file, includes it with module
$(name) wrapped around it, and then uses the IMPORT rule to copy
the non-local names from the module into prefixed names in the global
module.
See http://www.boost.org/tools/build/v2/kernel/modules.jam
HTH,
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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