forked from retf/Boost.Application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboost-build.jam
70 lines (54 loc) · 2.05 KB
/
boost-build.jam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright Rene Rivera 2007.
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# For instructions see Jamfile.v2, or "bjam --help".
local rule if-has-file ( file + : dir * )
{
local result ;
if $(dir)
{
result = [ GLOB $(dir) : $(file) ] ;
}
return $(result[1]:P) ;
}
#~ Attempts to find the Boost source tree...
local boost-src = [ if-has-file LICENSE_1_0.txt :
[ MATCH --boost=(.*) : $(ARGV) ]
$(BOOST)
$(.boost-build-file:D)/../boost
$(.boost-build-file:D)/../Trunk
] ;
# error handling:
if ! $(boost-src)
{
ECHO Unable to find the Boost source tree in the locations searched. ;
ECHO Try setting the environment variable BOOST to point to your ;
ECHO Boost tree, or else invoke bjam with the --boost=path option. ;
ECHO The Boost include path will not be automatically set. ;
ECHO The paths searched were [ MATCH --boost=(.*) : $(ARGV) ] $(BOOST) $(.boost-build-file:D)/../boost $(.boost-build-file:D)/../Trunk ;
ECHO But the file LICENSE_1_0.txt was not found in any of them ;
}
#~ Attempts to find the Boost.Build files...
local boost-build-src = [ if-has-file bootstrap.jam :
[ MATCH --boost-build=(.*) : $(ARGV) ]
$(BOOST_BUILD_PATH)
$(BOOST_BUILD)
$(boost-src)/tools/build/v2
] ;
# error handling:
if ! $(boost-build-src)
{
ECHO Unable to find the Boost.Build source tree in the locations searched. ;
ECHO Try setting the environment variable BOOST_BUILD to point to your ;
ECHO Boost.Build tree, or else invoke bjam with the --boost-build=path option. ;
ECHO The paths searched were [ MATCH --boost-build=(.*) : $(ARGV) ] $(BOOST_BUILD_PATH) $(BOOST_BUILD) $(boost-src)/tools/build/v2 ;
ECHO But bootstrap.jam was not found in any of these ;
ECHO More failures will very likely follow... ;
}
#~ Set some common vars to refer to the Boost sources...
BOOST ?= $(boost-src) ;
BOOST_ROOT ?= $(boost-src) ;
#~ And load up Boost.Build...
boost-build $(boost-build-src) ;