Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56008 - trunk/tools/build/v2/build
From: ghost_at_[hidden]
Date: 2009-09-04 02:42:00


Author: vladimir_prus
Date: 2009-09-04 02:41:59 EDT (Fri, 04 Sep 2009)
New Revision: 56008
URL: http://svn.boost.org/trac/boost/changeset/56008

Log:
Assign source-location to standalone projects.

Text files modified:
   trunk/tools/build/v2/build/project.jam | 13 +++++++++++--
   1 files changed, 11 insertions(+), 2 deletions(-)

Modified: trunk/tools/build/v2/build/project.jam
==============================================================================
--- trunk/tools/build/v2/build/project.jam (original)
+++ trunk/tools/build/v2/build/project.jam 2009-09-04 02:41:59 EDT (Fri, 04 Sep 2009)
@@ -412,9 +412,18 @@
     {
         $(attributes).set source-location : [ path.make $(location) ] : exact ;
     }
- else
+ else if ! $(module-name) in test-config site-config user-config project-config
     {
- $(attributes).set source-location : "" : exact ;
+ # This is a standalone project with known location. Set source location
+ # so that it can declare targets. This is intended so that you can put
+ # a .jam file in your sources and use it via 'using'. Standard modules
+ # (in 'tools' subdir) may not assume source dir is set.
+ local s = [ modules.binding $(module-name) ] ;
+ if ! $(s)
+ {
+ errors.error "Could not determine project location $(module-name)" ;
+ }
+ $(attributes).set source-location : $(s:D) : exact ;
     }
 
     $(attributes).set requirements : [ property-set.empty ] : exact ;


Boost-Commit 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