mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Look in the user's real home directory first on NT.
[SVN r29312]
This commit is contained in:
@@ -30,7 +30,7 @@ import version ;
|
||||
|
||||
# Check if we can load 'test-config.jam'. If we can, load it and
|
||||
# ignore user configs.
|
||||
local test-config = [ GLOB [ modules.peek : BOOST_BUILD_PATH ] : test-config.jam ] ;
|
||||
local test-config = [ GLOB [ os.environ BOOST_BUILD_PATH ] : test-config.jam ] ;
|
||||
if $(test-config)
|
||||
{
|
||||
module test-config
|
||||
@@ -46,10 +46,7 @@ if $(test-config) || --ignore-config in [ modules.peek : ARGV ]
|
||||
ignore-config = true ;
|
||||
}
|
||||
|
||||
local HOME = [ modules.peek : HOME ] ;
|
||||
# Bjam breaks vars at spaces -- fix this back.
|
||||
HOME = $(HOME:J=" ") ;
|
||||
local user-path = $(HOME) [ modules.peek : BOOST_BUILD_PATH ] ;
|
||||
local user-path = [ os.home-directories ] [ os.environ BOOST_BUILD_PATH ] ;
|
||||
|
||||
# Load site-config.
|
||||
module site-config
|
||||
|
||||
@@ -85,11 +85,13 @@ boost-build build-system ;
|
||||
|
||||
<entry>
|
||||
<simpara><code>%SystemRoot%</code></simpara>
|
||||
<simpara><code>%HOMEDRIVE%%HOMEPATH%</code></simpara>
|
||||
<simpara><code>%HOME%</code></simpara>
|
||||
<simpara><code>%BOOST_BUILD_PATH%</code></simpara>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<simpara><code>%HOMEDRIVE%%HOMEPATH%</code></simpara>
|
||||
<simpara><code>%HOME%</code></simpara>
|
||||
<simpara><code>%BOOST_BUILD_PATH%</code></simpara>
|
||||
</entry>
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
# warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
import modules ;
|
||||
|
||||
# Return the value(s) of the given environment variable(s) at the time
|
||||
# bjam was invoked.
|
||||
rule environ ( variable-names + )
|
||||
{
|
||||
return [ modules.peek .ENVIRON : $(variable-names) ] ;
|
||||
}
|
||||
|
||||
.name = [ modules.peek : OS ] ;
|
||||
.platform = [ modules.peek : OSPLAT ] ;
|
||||
.version = [ modules.peek : OSVER ] ;
|
||||
@@ -50,6 +58,22 @@ EXPORT $(__name__) : $(.constants) ;
|
||||
.expand-variable-prefix = $ ;
|
||||
.expand-variable-suffix = "" ;
|
||||
|
||||
if $(.name) = NT
|
||||
{
|
||||
local home = [ environ HOMEDRIVE HOMEPATH HOME ] ;
|
||||
.home-directories = $(home[1])$(home[2]) $(home[3]) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
.home-directories = [ environ HOME ] ;
|
||||
}
|
||||
|
||||
# Can't use 'constant' mechanism because it only returns 1-element
|
||||
# values.
|
||||
rule home-directories ( )
|
||||
{
|
||||
return $(.home-directories) ;
|
||||
}
|
||||
# Return the string needed to represent the expansion of the named
|
||||
# shell variable.
|
||||
rule expand-variable ( variable )
|
||||
|
||||
Reference in New Issue
Block a user