Boost logo

Boost-Build :

From: Ilya Sokolov (fal_delivery_at_[hidden])
Date: 2006-05-24 12:19:14


with jamfile

exe zclient
   : # sources
     ...
     //site-config/zlib #my bug, should be /site-config//zlib
     ...
   ;

i get this strange message:

K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:537:
in start-building from module targets
error: Recursion in main target references
error: the following target are being built currently:
error: ./zclient ./zclient
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:724:
in object(main-target)@58.generate from module object(main-target)@58
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:252:
in object(project-target)@52.generate from module object(project-target)@52
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:888:
in targets.generate-from-reference from module targets
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:1122:
in generate-dependencies from module object(typed-target)@54
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:1163:
in object(typed-target)@54.generate from module object(typed-target)@54
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:759:
in generate-really from module object(main-target)@58
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:735:
in object(main-target)@58.generate from module object(main-target)@58
K:/develop/third_party/tool/boost/tools/build/v2/build\targets.jam:252:
in object(project-target)@52.generate from module object(project-target)@52
K:/develop/third_party/tool/boost/tools/build/v2\build-system.jam:296:
in load from module build-system
K:\develop\third_party\tool\boost\tools\build\v2/kernel\modules.jam:261:
in import from module modules
K:\develop\third_party\tool\boost\tools\build\v2/kernel/bootstrap.jam:121:
in boostt-build from module
K:\develop\boost-build.jam:2: in module scope from module

my patch to fix it:

cvs -q diff -u -d -- util\path.jam build\targets.jam (in directory J:\w\boost\boost\tools\build\v2\)
Index: util/path.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/util/path.jam,v
retrieving revision 1.30
diff -u -d -r1.30 path.jam
--- util/path.jam 23 May 2006 14:21:58 -0000 1.30
+++ util/path.jam 24 May 2006 16:11:46 -0000
@@ -37,9 +37,9 @@
 #
 # Converts the native path into normalized form.
 #
-rule make ( native )
+rule make ( native : current-location ? )
 {
- return [ make-$(os) $(native) ] ;
+ return [ make-$(os) $(native) : $(current-location) ] ;
 }
 
 #
@@ -390,9 +390,22 @@
     return $(result) ;
 }
 
-rule make-NT ( native )
+rule make-NT ( native : current-location ? )
 {
     local tokens = [ regex.split $(native) "[/\\]" ] ;
+ # native begins with '/'
+ if $(tokens[1]) = ""
+ {
+ if $(current-location)
+ {
+ error "'$(native)' is not a valid path referred from project at '$(current-location)'" ;
+ }
+ else
+ {
+ error "'$(native)' is not a valid path name" ;
+ }
+ }
+
     local result ;
 
     # Handle paths ending with slashes
@@ -423,7 +436,7 @@
     return $(result) ;
 }
 
-rule make-UNIX ( native )
+rule make-UNIX ( native : current-location ? )
 {
     # VP: I have no idea now 'native' can be empty here! But it can!
     if $(native) = ""
@@ -441,9 +454,9 @@
     return $(path) ;
 }
 
-rule make-CYGWIN ( path )
+rule make-CYGWIN ( path : current-location ? )
 {
- return [ make-NT $(path) ] ;
+ return [ make-NT $(path) : $(current-location) ] ;
 }
 
 rule native-CYGWIN ( path )
@@ -483,7 +496,7 @@
 # Adds a trailing dot (".") to the file part if no extension
 # is present (helps when converting it back into native path).
 #
-rule make-VMS ( native )
+rule make-VMS ( native : current-location ? )
 {
     if [ MATCH ^(\\[[a-zA-Z0-9]) : $(native) ]
     {

Index: build/targets.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/build/targets.jam,v
retrieving revision 1.196
diff -u -d -r1.196 targets.jam
--- build/targets.jam 19 May 2006 13:38:57 -0000 1.196
+++ build/targets.jam 24 May 2006 16:07:25 -0000
@@ -375,7 +375,7 @@
             
             if ! $(result)
             {
- result = [ new file-reference [ path.make $(id) ] : $(project) ] ;
+ result = [ new file-reference [ path.make $(id) : $(current-location) ] : $(project) ] ;
  
                 if ! [ $(result).exists ]
                 {


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