forked from ecmwf/ecflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boost-build.jam
45 lines (40 loc) · 1.74 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
# Copyright (C) 2002-2003 David Abraham. remote
# Copyright (C) 2002-2003 Vladimir Prus.
# Copyright (C) 2003,2007 Rene Rivera.
# Use, modification and distribution are subject to 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)
# This is the initial file loaded by Boost Jam when run from any Boost library
# folder. It allows us to choose which Boost Build installation to use for
# building Boost libraries. Unless explicitly selected using a command-line
# option, the version included with the Boost library distribution is used (as
# opposed to any other Boost Build version installed on the user's sytem).
# ----------------------------------------------------------------------------
# The two rules were added because, boost build < 1.56 have always been in
# $(BOOST_ROOT)/tools/build/v2
# However for version >= 1.56, boost build is found in:
# $(BOOST_ROOT)/tools/build/src
# This allows both to be searched
# ---------------------------------------------------------------------------
local rule if-has-file ( file + : dir * )
{
local result ;
if $(dir)
{
result = [ GLOB $(dir) : $(file) ] ;
}
return $(result[1]:P) ;
}
local boost-build-src = [ if-has-file bootstrap.jam :
[ MATCH --boost-build=(.*) : $(ARGV) ]
$(BOOST_BUILD_PATH)
$(BOOST_ROOT)/tools/build/v2
$(BOOST_ROOT)/tools/build/src
] ;
boost-build $(boost-build-src) ;
# ------------------------------------------------------------------------------
# Old
#BOOST_BUILD = [ MATCH --boost-build=(.*) : $(ARGV) ] ;
#BOOST_BUILD ?= $(BOOST_ROOT)/tools/build/v2 ;
#BOOST_BUILD ?= $(BOOST_ROOT)/tools/build/src ;
#boost-build $(BOOST_BUILD) ;