Add build/Jamfile

This commit is contained in:
Peter Dimov 2018-10-05 16:58:58 +03:00
parent 37259cbabc
commit 615e37cb58

78
build/Jamfile Normal file
View file

@ -0,0 +1,78 @@
# Copyright 2018 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
import package ;
import path ;
import os ;
import option ;
import boostcpp ;
import ../../tools/cmake-config ;
# install-requirements
local install-requirements ;
local layout = [ modules.peek boostcpp : layout ] ;
local BOOST_VERSION_TAG = [ modules.peek boostcpp : BOOST_VERSION_TAG ] ;
if $(layout) = versioned
{
install-requirements += <install-header-subdir>boost-$(BOOST_VERSION_TAG) ;
}
local install-default-prefix ;
if [ os.name ] = NT
{
install-default-prefix = C:/Boost ;
}
else
{
install-default-prefix = /usr/local ;
}
install-requirements += <install-default-prefix>$(install-default-prefix) ;
# install-headers
local all-headers = $(BOOST_MODULARLAYOUT) ;
for local lib in $(all-headers)
{
local header-root = $(BOOST_ROOT)/libs/$(lib)/include ;
local headers = [ path.glob-tree $(header-root) : *.hpp *.ipp *.h *.inc *.SUNWCCh ] ;
package.install install-$(lib)-headers boost
: $(install-requirements)
<install-source-root>$(header-root)
: # No binaries
: # No libraries
: $(headers)
;
explicit install-$(lib)-headers ;
}
alias install-headers : install-$(all-headers)-headers ;
explicit install-headers ;
# install-cmake-config
local prefix = [ option.get prefix : $(install-default-prefix) ] ;
local lib-locate = [ option.get libdir : $(prefix)/lib ] ;
alias boost_headers ;
cmake-config.libs install-cmake-config : $(lib-locate) : $(BOOST_VERSION) : boost_headers ;
explicit install-cmake-config ;
# install
alias install : install-headers install-cmake-config ;
explicit install ;
# stage
alias stage ;
explicit stage ;