mirror of
https://github.com/boostorg/boost.git
synced 2025-04-14 17:03:38 +00:00
Integrate into top-level install and stage
This commit is contained in:
parent
b81160cfaa
commit
235076dee6
2 changed files with 74 additions and 16 deletions
74
boostcpp.jam
74
boostcpp.jam
|
@ -237,6 +237,7 @@ rule filtered-target ( name : message + : sources + : requirements * )
|
|||
rule declare_install_and_stage_proper_targets ( libraries * : headers * )
|
||||
{
|
||||
local p = [ project.current ] ;
|
||||
|
||||
for local l in $(libraries)
|
||||
{
|
||||
if $(l) = locale
|
||||
|
@ -263,29 +264,41 @@ rule declare_install_and_stage_proper_targets ( libraries * : headers * )
|
|||
$(p).mark-target-as-explicit $(l)-for-install ;
|
||||
}
|
||||
}
|
||||
|
||||
local library-targets = $(libraries)-for-install ;
|
||||
|
||||
install-requirements = <install-source-root>$(BOOST_ROOT)/boost ;
|
||||
local install-requirements ;
|
||||
|
||||
local install-source-root = $(BOOST_ROOT)/boost ;
|
||||
|
||||
install-requirements += <install-source-root>$(install-source-root) ;
|
||||
|
||||
local install-header-subdir ;
|
||||
|
||||
if $(layout-versioned)
|
||||
{
|
||||
install-requirements +=
|
||||
<install-header-subdir>boost-$(BOOST_VERSION_TAG)/boost ;
|
||||
install-header-subdir = boost-$(BOOST_VERSION_TAG)/boost ;
|
||||
}
|
||||
else
|
||||
{
|
||||
install-requirements += <install-header-subdir>boost ;
|
||||
install-header-subdir = boost ;
|
||||
}
|
||||
|
||||
install-requirements += <install-header-subdir>$(install-header-subdir) ;
|
||||
|
||||
local install-default-prefix ;
|
||||
|
||||
if [ os.name ] = NT
|
||||
{
|
||||
install-requirements += <install-default-prefix>C:/Boost ;
|
||||
install-default-prefix = C:/Boost ;
|
||||
}
|
||||
else
|
||||
{
|
||||
install-requirements += <install-default-prefix>/usr/local ;
|
||||
install-default-prefix = /usr/local ;
|
||||
}
|
||||
|
||||
install-requirements += <install-default-prefix>$(install-default-prefix) ;
|
||||
|
||||
p = [ project.current ] ;
|
||||
|
||||
# Complete install.
|
||||
|
@ -306,6 +319,51 @@ rule declare_install_and_stage_proper_targets ( libraries * : headers * )
|
|||
;
|
||||
$(p).mark-target-as-explicit stage-proper ;
|
||||
|
||||
# CMake targets
|
||||
|
||||
if [ path.exists $(BOOST_ROOT)/libs/cmake_config/Jamfile ]
|
||||
{
|
||||
alias boost_cmake_config : libs/cmake_config//boost_cmake_config ;
|
||||
$(p).mark-target-as-explicit boost_cmake_config ;
|
||||
|
||||
local cmake-config-output-dir = bin.v2 ;
|
||||
|
||||
# prefix, libdir
|
||||
|
||||
local prefix ;
|
||||
local libdir ;
|
||||
|
||||
# Duplicate package.install logic
|
||||
|
||||
if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
|
||||
{
|
||||
# --prefix on the command line overrides --libdir
|
||||
prefix = [ option.get prefix ] ;
|
||||
libdir = $(prefix)/lib ;
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = $(install-default-prefix) ;
|
||||
libdir = [ option.get libdir : $(prefix)/lib ] ;
|
||||
}
|
||||
|
||||
install install-cmake
|
||||
: boost_cmake_config
|
||||
: <location>$(libdir) <install-source-root>$(cmake-config-output-dir) ;
|
||||
|
||||
install stage-cmake
|
||||
: boost_cmake_config
|
||||
: <location>$(stage-locate)/lib <install-source-root>$(cmake-config-output-dir) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
alias install-cmake ;
|
||||
alias stage-cmake ;
|
||||
}
|
||||
|
||||
$(p).mark-target-as-explicit install-cmake ;
|
||||
$(p).mark-target-as-explicit stage-cmake ;
|
||||
|
||||
# Commented out as it does not seem to work. Whoever wrote this originally,
|
||||
# left some typos in the code, but when that got corrected and the code got
|
||||
# enabled - it started reporting ambiguous/duplicate target Boost Build
|
||||
|
@ -459,11 +517,11 @@ rule declare_top_level_targets ( libraries * : headers * )
|
|||
|
||||
targets.create-metatarget top-level-target : [ project.current ]
|
||||
: install
|
||||
: install-proper install-unversioned
|
||||
: install-proper install-unversioned install-cmake
|
||||
;
|
||||
targets.create-metatarget top-level-target : [ project.current ]
|
||||
: stage
|
||||
: stage-proper stage-unversioned
|
||||
: stage-proper stage-unversioned stage-cmake
|
||||
;
|
||||
|
||||
p = [ project.current ] ;
|
||||
|
|
|
@ -397,18 +397,18 @@ actions boostdep-cmake
|
|||
|
||||
# output-dir
|
||||
|
||||
local project = [ project.current ] ;
|
||||
#local project = [ project.current ] ;
|
||||
|
||||
local build-dir = [ path.root [ $(project).get build-dir ] [ path.pwd ] ] ;
|
||||
.info build-dir is $(build-dir) ;
|
||||
#local build-dir = [ path.root [ $(project).get build-dir ] [ path.pwd ] ] ;
|
||||
#.info build-dir is $(build-dir) ;
|
||||
|
||||
path-constant HERE : . ;
|
||||
.info HERE is $(HERE) ;
|
||||
#path-constant HERE : . ;
|
||||
#.info HERE is $(HERE) ;
|
||||
|
||||
local current-dir = [ path.make $(HERE) ] ;
|
||||
.info current-dir is $(current-dir) ;
|
||||
#local current-dir = [ path.make $(HERE) ] ;
|
||||
#.info current-dir is $(current-dir) ;
|
||||
|
||||
local output-dir = [ path.relative-to $(current-dir) $(build-dir) ] ;
|
||||
output-dir = ../../bin.v2 ; # [ path.relative-to $(current-dir) $(build-dir) ] ;
|
||||
.info output-dir is $(output-dir) ;
|
||||
|
||||
# create library config targets
|
||||
|
|
Loading…
Add table
Reference in a new issue