|
Boost-Build : |
From: Samuel Krempp (krempp_at_[hidden])
Date: 2004-01-22 12:46:33
After reading the docu for half an hour or so, from tutorial to some of the
detailed reference and trying the basic tests like building helloworld in
the exemples directory, my first move was to go in a simple directory of
mine and try to roll my own.
No problem creating a project-root.jam and a simple Jamfile following the
tutorial. I managed to make a first exe and run it in no time, so the first
Boost.Build experience is rather enjoyable.
1. I tried building a lib + app project. the building went well, then I
didnt know how to run the exe so that it would find the lib.
I quickly found about the stage dist rule and solved that easily, but is it
possible to run the program without copying the lib first or setting
LD_LIBRARY_PATH ? I there something like "bjam run [target name]" to launch
the built exe ? I felt a need for that planning to add execution of tests
in the Jamfile, then I read Boost.Buildv2 now supports unit test (btw it's
not yet mentionned in the docu).
Still, I'm guessing Boost.build has a basic mechanism to run targets that's
not mentionned in the docs.
2. then my first stumble was : how do I use an environment variable ?
(maybe not the greatest Boost.Build thing to do, but in the context of a new
user in the process of adapting to Boost.Build, it's a very likely first
worry)
I didnt find a clear answer in the docu, and I think there should be.
Looking at some Jamfiles around, I tried $(myvarname), it worked in some
case :
stage dist : somestuff : <location>$(somedestination)
but inside a '<include>' project requirement it was completely ignored.
Is it normal ?
Then I tried adding at the head of my Jamfile :
import modules ;
local MYVARNAME = [ modules.peek : myvarname ] ;
and I got
Jamfile:7: in modules.load
rule import modules ; unknown in module Jamfile</home/sam/progs/simg>.
And then I don't know what to do, and before undertaking further
investigation I start writing this report to the list..
-- Samuel
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