Boost logo

Boost-Build :

From: Peter Foley (pjfoley_at_[hidden])
Date: 2005-07-01 06:33:18


Hi,

I am just trying to work out what is happening within the msvc tool jam
file.

Specifically within the default-paths rule.

Comments inline below. I have perpended my comments with "****" To make it
easier to see my comments.

Thanks for any help.

Peter

rule default-paths ( version ? )
{
local possible-paths ;

local ProgramFiles = [ modules.peek : ProgramFiles ] ;
if $(ProgramFiles)
{
ProgramFiles = "$(ProgramFiles:J= )" ;
**** ^^^^^^^^
**** What does the ":J=" mean? I assume it processes the environment
variable somehow?

}
else
{
ProgramFiles = "c:\\Program Files" ;
}

local version-6-path = $(ProgramFiles)"\\Microsoft Visual Studio\\VC98"
;
local version-7-path = $(ProgramFiles)"\\Microsoft Visual Studio
.NET\\VC7" ;
local version-7.0-path = $(version-7-path) ;
local version-7.1-path = $(ProgramFiles)"\\Microsoft Visual Studio .NET
2003\\VC7" ;
local version-8.0-path = $(ProgramFiles)"\\Microsoft Visual Studio 8" ;

local VS71COMNTOOLS = [ modules.peek : VS71COMNTOOLS ] ;
if $(VS71COMNTOOLS)
{
# VS71COMNTOOLS is set by VS .NET 2003 to <VSDIR>\Common7\Tools
version-7.1-path = [ path.make "$(VS71COMNTOOLS:J= )" ] ;
version-7.1-path = [ path.parent $(version-7.1-path) ] ;
version-7.1-path = [ path.parent $(version-7.1-path) ] ;
version-7.1-path = [ path.join $(version-7.1-path) "VC7" ] ;
version-7.1-path = [ path.native $(version-7.1-path) ] ;

**** I see that up the top of the msvc.jam file "import path ;" occurs. I
have searched for the path.jam file
**** in the v2\build, v2\kernal, v2\tools directories but I cannot find this
file. Where is this file defined.
**** Essentially I am curious what the "path." commands do.

}

local VCToolkitInstallDir = [ modules.peek : VCToolkitInstallDir ] ;
if $(VCToolkitInstallDir)
{
version-7.1-path = [ path.make "$(VCToolkitInstallDir:J= )" ] ;
}

if $(version)
{
local v = [ MATCH ^(6|[^6].*) : $(version) ] ;
possible-paths += $(version-$(v)-path) ;
}
else
{
possible-paths += $(version-8.0-path) $(version-7.1-path)
$(version-7.0-path) $(version-6-path) ;
}

# The vccars32.bat is actually in "bin" directory.
# (except for free VC7.1 tools)
possible-paths = $(possible-paths)\\bin $(possible-paths) ;

**** Why does the "$(possible-paths)\\bin" command append "\\bin" to each
path registered within the variable?
**** I would have thought that it would have just appended it to the very
last entry.

return $(possible-paths) ;
}

 


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