Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-05 15:40:48


Hello,
  I've been trying to build Boost from a directory that isn't the source
directory and isn't the target directory. Assume I have this:

/projects/boost contains the Boost source, Jamfiles, etc, etc.
/projects/boost-binaries should be the target for everything Boost builds
/projects/i_am_here is the directory I want to run Jam from

It seems that a command like this should work:

jam -sALL_LOCATE_TARGET=/projects/boost-binaries -sTOP=/projects/boost
-sJAMFILE=/projects/boost/Jamfile

However, this is not the case because $(TOP) doesn't seem to influence the
search for source files at all. I boiled it down to the following problem:
gTOP is never actually set, so when we look for search paths in subincludes,
there is no value for $(gTOP)_TOKENS, which is needed to build the search
directory. Below is a short patch to allyourbase.jam (the version from CVS,
updated today) that fixes the problem, although I'm sure there are better
ways to go about it (Jam experts, please?)

        Doug

Index: allyourbase.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/allyourbase.jam,v
retrieving revision 1.18
diff -c -3 -p -r1.18 allyourbase.jam
*** allyourbase.jam 2001/12/13 18:45:42 1.18
--- allyourbase.jam 2002/01/05 19:59:14
*************** rule SubDir
*** 1175,1180 ****
--- 1175,1185 ----
      # directory elements in order to set search&locate stuff.
      #

+ if ! $(gTOP)
+ {
+ gTOP = TOP ;
+ }
+
      if ! $($(<[1]))
      {
          if ! $(<[1])
*************** rule SubDir
*** 1188,1193 ****
--- 1193,1203 ----
                           # other than TOP, but just in case...
      }

+ if ! $($(gTOP)_TOKENS)
+ {
+ $(gTOP)_TOKENS = [ split-path $($(gTOP)) ] ;
+ }
+
      #
      # If $(TOP)/Jamrules hasn't been included, do so.
      #


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk