Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-07-03 05:26:15


In the msvc toolset for BBv2 there is a detection for vcvars32.bat that gets
executed before the cl/link commands so that the tools work correctly
without environment settings being modified.

This kind of thing is also needed for the Metrowerks CodeWarrior toolset, so
I ask this:

Can the prefix detection code be moved over to a Jamfile like prefix.jam
that will work for msvc and mwcw and any other tools that require prefix
detection. This would mean that it would be easier to support additional
tools (rc, midl, etc) on these platforms. It would be something like:

rule get-prefix ( toolset : version ? : path ? )
{
if $(path) return ... ;
if $(toolset) = "msvc" return ... ;
if $(toolset) = "mwcw" return ... ;
return "" ; # empty string to support other toolsets
}

You can then do something like:

import prefix.jam

rule __init__ ( version ? : path ? compiler ? linker ? )
{
compiler ?= cl ;
linker ?= link ;

local prefix = get-prefix msvc : version : path ;
.CC = $(prefix)$(compiler) ;
.LINK = $(prefix)$(linker) ;
}

It might be beneficial to allow a toolset to extend the prefix rules,
allowing, for example something like:

import prefix.jam;

prefix.add-rule platformsdk : * : <base-path>ProgramFiles : "PlatformSDK"
;
prefix.add-rule dotnet : 1.1 : <base-path>windows :
"Microsoft.NET\Framework\v1.1.4322" ;
prefix.add-rule dotnet : 1.1 : <base-path>windows :
"Microsoft.NET\Framework\v1.1" ;
prefix.add-rule dotnet : 1.1 : <lookup-type>envvar : "FrameworkSDK" ;

This mechanism could also be used for the msvc and mwcw path detection:

prefix.add-rule msvc : 7.0 : <base-path>ProgramFiles : "Microsoft Visual
Studio .NET\vc7\bin" ;
prefix.add-rule msvc : 7.1 : <base-path>ProgramFiles : "Microsoft Visual
Studio .NET 2003\vc7\bin" ;
prefix.add-rule msvc : 7.1 : <base-path>ProgramFiles : "Microsoft Visual
Studio .NET 2003 Toolkit\vc7\bin" ;

Thoughts?

Regards,
Reece

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/

 


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