# 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 project-root.jam, 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 bootstrap.sh : [ MATCH --boost=(.*) : $(ARGV) ] $(BOOST_ROOT) $(BOOST) $(.boost-build-file:D)/../boost ] ; #~ 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 ] ; #~ 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) ;