Boost logo

Boost-Build :

Subject: [Boost-build] How do I call a rule in another Jamfile?
From: John Maddock (jz.maddock_at_[hidden])
Date: 2014-06-04 13:57:04

Title says it all really, I have a rule defined in one Jamfile that I
want to be able to call from elsewhere.

I've tried renaming the Jamfile to "rulename.jam" and then doing a :

import some/path/rulename ;

But loading the Jamfile then fails with:

M:/data/boost/boost/libs/config/test\../checks/config.jam:19: in load
ERROR: rule "explicit" unknown in module "../checks/config".
M:/data/boost/boost/tools/build/src/kernel\modules.jam:289: in
M:/data/boost/boost/tools/build/src/build\project.jam:1024: in import
Jamfile.v2:18: in modules.load
M:/data/boost/boost/tools/build/src/build\project.jam:311: in load-jamfile
M:/data/boost/boost/tools/build/src/build\project.jam:64: in load
M:/data/boost/boost/tools/build/src/build\project.jam:145: in project.find
M:/data/boost/boost/tools/build/src\build-system.jam:535: in load
M:\data\boost\boost\tools\build\src/kernel\modules.jam:289: in import
M:\data\boost\boost\tools\build\src/kernel/bootstrap.jam:139: in boost-build
M:\data\boost\boost\boost-build.jam:17: in module scope

Even though I can run the config.jam on it's own (albeit renamed as

What gives?

Thanks, John.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at