Boost logo

Boost-Build :

Subject: [Boost-build] What does bjam -a mean by "everything"?
From: Anthony Foglia (AFoglia_at_[hidden])
Date: 2009-06-05 20:51:42


        bjam -a supposedly means "Rebuild everything", according to the help
option, but I have no idea what everything means. Here's my example.
My layout is

trunk
   Jamroot
   lib/lib_a
     Jamfile
   lib/tools
     Jamfile
   lib/utilities
     Jamfile
   lib/raw
     Jamfile

Although tools depends directly on lib_a and raw, calling bjam -a
lib/tools only recompiles lib/tools and _lib/utilities_.

In the Jamroot, we use the use-project rule to alias the libraries:

use-project /proj-libs/lib_a : lib/lib_a ;
use-project /proj-libs/tools : lib/tools ;
use-project /proj-libs/utilities : lib/utilities ;
use-project /proj-libs/raw : lib/raw ;

The lib/tools/Jamfile is :
lib tools
    : [ glob src/*.cpp ]
      /proj-libs/lib_a
      /proj-libs/raw
      # Aliases for boost and other third-party libs
    : <include>./include/tools
      <include>./src
      <link>static
    :
    : <include>./include
    ;

The lib/lib_a/Jamfile is :
lib lib_a
    : [ glob *.cpp ]
      /proj-libs/utilities//utilities
      # third-party libs
    : <include>.
       <link>static
    :
    : <include>.
    ;

The lib/raw/Jamfile is :
lib raw
    : [ glob src/*.cpp ]
      /proj-libs/utilities//utilities
      /proj-libs/lib_a//lib_a
      # third-party libs
    : <include>./include
      <link>static
    :
    : <include>./include
       <source>/proj-libs/utilities//utilities
    ;

Finally the lib/utilities/Jamfile is the simplest of all
lib utilities
    : [ glob src/*.cpp ]
      # third party libraries
    : <include>./include
      <link>static
    :
    : <include>./include
    ;

        The only thing I can think of is the
<source>/proj-libs/utilities//utilities line in lib/raw/Jamfile. But
that should just effectively put it in the list of sources for
lib/tools, where /proj-libs/raw and /proj-libs/lib_a already are. Is it
that and the second slash? Does everything mean "only explicit targets,
not sources only referred to by project?"

-- 
Anthony Foglia
Princeton Consultants
(609) 987-8787 x233

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