mirror of
https://github.com/boostorg/boost_install.git
synced 2026-01-19 04:02:13 +00:00
Sync from upstream.
This commit is contained in:
3
Jamfile
3
Jamfile
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
require-b2 5.1 ;
|
require-b2 5.1 ;
|
||||||
|
|
||||||
|
import make ;
|
||||||
import option ;
|
import option ;
|
||||||
import path ;
|
import path ;
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ project /boost/boost_install ;
|
|||||||
|
|
||||||
# BoostConfigVersion.cmake
|
# BoostConfigVersion.cmake
|
||||||
|
|
||||||
generate BoostConfigVersion.cmake : : <generating-rule>@boost-install%generate-cmake-config-version <name>Boost <version>$(BOOST_VERSION) ;
|
make BoostConfigVersion.cmake : : @boost-install%make-cmake-config-version : <version>$(BOOST_VERSION) ;
|
||||||
explicit BoostConfigVersion.cmake ;
|
explicit BoostConfigVersion.cmake ;
|
||||||
|
|
||||||
explicit
|
explicit
|
||||||
|
|||||||
@@ -5,60 +5,9 @@
|
|||||||
import modules ;
|
import modules ;
|
||||||
import package ;
|
import package ;
|
||||||
import path ;
|
import path ;
|
||||||
|
import stage ;
|
||||||
|
|
||||||
# includedir
|
stage.add-install-dir cmakedir : cmake : libdir ;
|
||||||
|
|
||||||
rule includedir
|
|
||||||
{
|
|
||||||
if ! $(.includedir)
|
|
||||||
{
|
|
||||||
local paths = [ package.paths Boost ] ;
|
|
||||||
.includedir = [ $(paths).includedir ] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $(.includedir) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# bindir
|
|
||||||
|
|
||||||
rule bindir
|
|
||||||
{
|
|
||||||
if ! $(.bindir)
|
|
||||||
{
|
|
||||||
local paths = [ package.paths Boost ] ;
|
|
||||||
.bindir = [ $(paths).bindir ] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $(.bindir) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# libdir
|
|
||||||
|
|
||||||
rule libdir
|
|
||||||
{
|
|
||||||
if ! $(.libdir)
|
|
||||||
{
|
|
||||||
local paths = [ package.paths Boost ] ;
|
|
||||||
.libdir = [ $(paths).libdir ] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $(.libdir) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# cmakedir
|
|
||||||
|
|
||||||
rule cmakedir
|
|
||||||
{
|
|
||||||
if ! $(.cmakedir)
|
|
||||||
{
|
|
||||||
package.add-path-option cmakedir : cmake : libdir ;
|
|
||||||
|
|
||||||
local paths = [ package.paths Boost ] ;
|
|
||||||
.cmakedir = [ $(paths).get cmakedir ] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $(.cmakedir) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# header-subdir
|
# header-subdir
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
# Distributed under the Boost Software License, Version 1.0.
|
# 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)
|
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
import make ;
|
||||||
import modules ;
|
import modules ;
|
||||||
import property-set ;
|
import property-set ;
|
||||||
import "class" : new ;
|
import "class" : new ;
|
||||||
@@ -9,23 +10,16 @@ import project ;
|
|||||||
import common ;
|
import common ;
|
||||||
import print ;
|
import print ;
|
||||||
import os ;
|
import os ;
|
||||||
|
import property ;
|
||||||
import feature ;
|
import feature ;
|
||||||
import package ;
|
|
||||||
import sequence ;
|
import sequence ;
|
||||||
import set ;
|
import set ;
|
||||||
|
import stage ;
|
||||||
import type ;
|
import type ;
|
||||||
import path ;
|
import path ;
|
||||||
import regex ;
|
import regex ;
|
||||||
import ./boost-install-dirs ;
|
import ./boost-install-dirs ;
|
||||||
|
|
||||||
feature.feature library-type : : free ;
|
|
||||||
feature.feature boost-install.dependency : : free ;
|
|
||||||
feature.feature boost-install.cmakedir : : free ;
|
|
||||||
feature.feature boost-install.includedir : : free ;
|
|
||||||
feature.feature boost-install.libdir : : free ;
|
|
||||||
feature.feature boost-install.lib-target-type : : free ;
|
|
||||||
feature.feature boost-install.dll-target : : free ;
|
|
||||||
|
|
||||||
if "--verbose" in [ modules.peek : ARGV ]
|
if "--verbose" in [ modules.peek : ARGV ]
|
||||||
{
|
{
|
||||||
.info-enabled = 1 ;
|
.info-enabled = 1 ;
|
||||||
@@ -52,6 +46,19 @@ local rule .debug ( messages * )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local rule flags-to-vars ( ps )
|
||||||
|
{
|
||||||
|
for local opt in [ $(ps).get <flags> ]
|
||||||
|
{
|
||||||
|
local match = [ MATCH (.*)=(.*) : $(opt) ] ;
|
||||||
|
if $(match)
|
||||||
|
{
|
||||||
|
# assigns to variables which assumed to exist in outside scope
|
||||||
|
$(match[1]) += $(match[2-]) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# generate-cmake-variant-
|
# generate-cmake-variant-
|
||||||
|
|
||||||
local rule remap-library ( lib )
|
local rule remap-library ( lib )
|
||||||
@@ -115,12 +122,19 @@ rule generate-cmake-variant- ( target : sources * : properties * )
|
|||||||
|
|
||||||
local ps = [ property-set.create $(properties) ] ;
|
local ps = [ property-set.create $(properties) ] ;
|
||||||
|
|
||||||
|
local project ;
|
||||||
|
local name ;
|
||||||
|
local library-type ;
|
||||||
|
local lib-target-type ;
|
||||||
|
local dll-target ;
|
||||||
|
local dependency ;
|
||||||
|
flags-to-vars $(ps) ;
|
||||||
|
|
||||||
print.output $(target) ;
|
print.output $(target) ;
|
||||||
|
|
||||||
local version = [ $(ps).get <version> ] ;
|
local version = [ $(ps).get <version> ] ;
|
||||||
.info " version=" $(version) ;
|
.info " version=" $(version) ;
|
||||||
|
|
||||||
local name = [ $(ps).get <name> ] ;
|
|
||||||
.info " name=" $(name) ;
|
.info " name=" $(name) ;
|
||||||
|
|
||||||
local variant = [ $(ps).get <variant> ] ;
|
local variant = [ $(ps).get <variant> ] ;
|
||||||
@@ -432,7 +446,6 @@ rule generate-cmake-variant- ( target : sources * : properties * )
|
|||||||
|
|
||||||
print.text "# Target file name: $(fname)" "" : true ;
|
print.text "# Target file name: $(fname)" "" : true ;
|
||||||
|
|
||||||
local lib-target-type = [ $(ps).get <boost-install.lib-target-type> ] ;
|
|
||||||
.info " lib-target-type=" $(lib-target-type) ;
|
.info " lib-target-type=" $(lib-target-type) ;
|
||||||
|
|
||||||
local loc-prop = LOCATION ;
|
local loc-prop = LOCATION ;
|
||||||
@@ -444,8 +457,6 @@ rule generate-cmake-variant- ( target : sources * : properties * )
|
|||||||
|
|
||||||
.info " loc-prop=" $(loc-prop) ;
|
.info " loc-prop=" $(loc-prop) ;
|
||||||
|
|
||||||
local dll-target = [ $(ps).get <boost-install.dll-target> ] ;
|
|
||||||
|
|
||||||
local dll-name ;
|
local dll-name ;
|
||||||
|
|
||||||
if $(dll-target)
|
if $(dll-target)
|
||||||
@@ -506,7 +517,7 @@ rule generate-cmake-variant- ( target : sources * : properties * )
|
|||||||
: true ;
|
: true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
local deps = [ MATCH "boost_(.*)" : [ $(ps).get <boost-install.dependency> ] ] headers ;
|
local deps = [ MATCH "boost_(.*)" : $(dependency) ] headers ;
|
||||||
.info " deps=" $(deps) ;
|
.info " deps=" $(deps) ;
|
||||||
|
|
||||||
if $(deps)
|
if $(deps)
|
||||||
@@ -518,7 +529,7 @@ rule generate-cmake-variant- ( target : sources * : properties * )
|
|||||||
: true ;
|
: true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
local deps2 = [ set.difference [ $(ps).get <boost-install.dependency> ] : boost_$(deps) ] ;
|
local deps2 = [ set.difference $(dependency) : boost_$(deps) ] ;
|
||||||
.info " deps2=" $(deps2) ;
|
.info " deps2=" $(deps2) ;
|
||||||
|
|
||||||
local deps3 ;
|
local deps3 ;
|
||||||
@@ -546,10 +557,6 @@ rule generate-cmake-variant- ( target : sources * : properties * )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
actions generate-cmake-variant-
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
# tag
|
# tag
|
||||||
|
|
||||||
local rule tag ( name : type ? : property-set )
|
local rule tag ( name : type ? : property-set )
|
||||||
@@ -656,7 +663,7 @@ rule generate-cmake-variant ( project name : property-set : sources * )
|
|||||||
local dll-target = [ get-dll-target $(sources) ] ;
|
local dll-target = [ get-dll-target $(sources) ] ;
|
||||||
|
|
||||||
local other-names = [ get-dependency-names $(sources) ] ;
|
local other-names = [ get-dependency-names $(sources) ] ;
|
||||||
property-set = [ $(property-set).add-raw <boost-install.dependency>$(other-names) ] ;
|
property-set = [ $(property-set).add-raw <flags>dependency=$(other-names) ] ;
|
||||||
|
|
||||||
local result ;
|
local result ;
|
||||||
|
|
||||||
@@ -673,13 +680,13 @@ rule generate-cmake-variant ( project name : property-set : sources * )
|
|||||||
.debug " dll-target=" [ $(dll-target).name ] ;
|
.debug " dll-target=" [ $(dll-target).name ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
local tag = [ tag $(name) : : $(property-set) ] ;
|
property-set = [ $(property-set).add-raw <flags>lib-target-type=$(lib-target-type) ] ;
|
||||||
|
property-set = [ $(property-set).add-raw <flags>dll-target=$(dll-target) ] ;
|
||||||
property-set = [ $(property-set).add-raw <boost-install.lib-target-type>$(lib-target-type) ] ;
|
|
||||||
property-set = [ $(property-set).add-raw <boost-install.dll-target>$(dll-target) ] ;
|
|
||||||
|
|
||||||
local a = [ new non-scanning-action $(lib-target) : boost-install.generate-cmake-variant- : $(property-set) ] ;
|
local a = [ new non-scanning-action $(lib-target) : boost-install.generate-cmake-variant- : $(property-set) ] ;
|
||||||
|
|
||||||
|
local tag = [ tag $(name) : : $(property-set) ] ;
|
||||||
|
|
||||||
result += [ new file-target $(tag) : : $(project) : $(a) ] ;
|
result += [ new file-target $(tag) : : $(project) : $(a) ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -726,30 +733,41 @@ local rule get-dir ( name : dir )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rule generate-cmake-config- ( target : sources * : properties * )
|
# make-cmake-config
|
||||||
|
|
||||||
|
rule make-cmake-config ( target : sources * : properties * )
|
||||||
{
|
{
|
||||||
.info generate-cmake-config- $(target) ":" $(sources) ;
|
.info make-cmake-config $(target) ":" $(sources) ;
|
||||||
|
|
||||||
local ps = [ property-set.create $(properties) ] ;
|
local ps = [ property-set.create $(properties) ] ;
|
||||||
|
|
||||||
|
local name ;
|
||||||
|
local library-type ;
|
||||||
|
local header-subdir ;
|
||||||
|
flags-to-vars $(ps) ;
|
||||||
|
|
||||||
print.output $(target) ;
|
print.output $(target) ;
|
||||||
|
|
||||||
local version = [ $(ps).get <version> ] ;
|
local version = [ $(ps).get <version> ] ;
|
||||||
.info " version=" $(version) ;
|
.info " version=" $(version) ;
|
||||||
|
|
||||||
local name = [ $(ps).get <name> ] ;
|
|
||||||
.info " name=" $(name) ;
|
.info " name=" $(name) ;
|
||||||
|
|
||||||
local library-type = [ $(ps).get <library-type> ] ;
|
|
||||||
.info " library-type=" $(library-type) ;
|
.info " library-type=" $(library-type) ;
|
||||||
|
|
||||||
local cmakedir = [ $(ps).get <boost-install.cmakedir> ] ;
|
local cmakedir = [ stage.get-dir cmakedir : $(ps) : Boost ] ;
|
||||||
|
.info " prefix=" [ stage.get-dir prefix : $(ps) : Boost ] ;
|
||||||
|
.info " exec-prefix=" [ stage.get-dir exec-prefix : $(ps) : Boost ] ;
|
||||||
|
.info " libdir=" [ stage.get-dir libdir : $(ps) : Boost ] ;
|
||||||
.info " cmakedir=" $(cmakedir) ;
|
.info " cmakedir=" $(cmakedir) ;
|
||||||
|
|
||||||
local includedir = [ $(ps).get <boost-install.includedir> ] ;
|
local includedir = [ stage.get-dir includedir : $(ps) : Boost ] ;
|
||||||
|
includedir = [ path.join $(includedir) $(header-subdir) ] ;
|
||||||
|
includedir = [ path.relative-to $(cmakedir) $(includedir) ] ;
|
||||||
.info " includedir=" $(includedir) ;
|
.info " includedir=" $(includedir) ;
|
||||||
|
|
||||||
local libdir = [ $(ps).get <boost-install.libdir> ] ;
|
local libdir = [ stage.get-dir libdir : $(ps) : Boost ] ;
|
||||||
|
libdir = [ path.relative-to $(cmakedir) $(libdir) ] ;
|
||||||
.info " libdir=" $(libdir) ;
|
.info " libdir=" $(libdir) ;
|
||||||
|
|
||||||
local lname = [ MATCH boost_(.*) : $(name) ] ;
|
local lname = [ MATCH boost_(.*) : $(name) ] ;
|
||||||
@@ -953,51 +971,14 @@ rule generate-cmake-config- ( target : sources * : properties * )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
actions generate-cmake-config-
|
# make-cmake-config-version
|
||||||
|
|
||||||
|
rule make-cmake-config-version ( target : sources * : properties * )
|
||||||
{
|
{
|
||||||
}
|
.info make-cmake-config-version $(target) ":" $(sources) ;
|
||||||
|
|
||||||
# generate-cmake-config
|
local version = [ property.select <version> : $(properties) ] ;
|
||||||
|
local version = $(version:G=) ;
|
||||||
rule generate-cmake-config ( project name : property-set : sources * )
|
|
||||||
{
|
|
||||||
.debug generate-cmake-config $(name) ;
|
|
||||||
|
|
||||||
local pname = [ $(property-set).get <name> ] ;
|
|
||||||
local version = [ $(property-set).get <version> ] ;
|
|
||||||
local location = [ $(property-set).get <location> ] ;
|
|
||||||
local library-type = [ $(property-set).get <library-type> ] ;
|
|
||||||
local cmakedir = [ $(property-set).get <boost-install.cmakedir> ] ;
|
|
||||||
local includedir = [ $(property-set).get <boost-install.includedir> ] ;
|
|
||||||
local libdir = [ $(property-set).get <boost-install.libdir> ] ;
|
|
||||||
|
|
||||||
local ps = [ property-set.create
|
|
||||||
<name>$(pname) <version>$(version) <location>$(location)
|
|
||||||
<library-type>$(library-type)
|
|
||||||
<boost-install.cmakedir>$(cmakedir)
|
|
||||||
<boost-install.includedir>$(includedir)
|
|
||||||
<boost-install.libdir>$(libdir) ] ;
|
|
||||||
|
|
||||||
local result ;
|
|
||||||
|
|
||||||
local a = [ new non-scanning-action : boost-install.generate-cmake-config- : $(ps) ] ;
|
|
||||||
|
|
||||||
result += [ new file-target $(name) : : $(project) : $(a) ] ;
|
|
||||||
|
|
||||||
return $(result) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# generate-cmake-config-version-
|
|
||||||
|
|
||||||
rule generate-cmake-config-version- ( target : sources * : properties * )
|
|
||||||
{
|
|
||||||
.info generate-cmake-config-version- $(target) ":" $(sources) ;
|
|
||||||
|
|
||||||
local ps = [ property-set.create $(properties) ] ;
|
|
||||||
|
|
||||||
print.output $(target) ;
|
|
||||||
|
|
||||||
local version = [ $(ps).get <version> ] ;
|
|
||||||
.info " version=" $(version) ;
|
.info " version=" $(version) ;
|
||||||
|
|
||||||
print.output $(target) ;
|
print.output $(target) ;
|
||||||
@@ -1020,34 +1001,9 @@ rule generate-cmake-config-version- ( target : sources * : properties * )
|
|||||||
: true ;
|
: true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
actions generate-cmake-config-version-
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
# generate-cmake-config-version
|
|
||||||
|
|
||||||
rule generate-cmake-config-version ( project name : property-set : sources * )
|
|
||||||
{
|
|
||||||
.debug generate-cmake-config-version $(name) ;
|
|
||||||
|
|
||||||
local pname = [ $(property-set).get <name> ] ;
|
|
||||||
local version = [ $(property-set).get <version> ] ;
|
|
||||||
local location = [ $(property-set).get <location> ] ;
|
|
||||||
|
|
||||||
local ps = [ property-set.create <name>$(pname) <version>$(version) <location>$(location) ] ;
|
|
||||||
|
|
||||||
local result ;
|
|
||||||
|
|
||||||
local a = [ new non-scanning-action : boost-install.generate-cmake-config-version- : $(ps) ] ;
|
|
||||||
|
|
||||||
result += [ new file-target $(name) : : $(project) : $(a) ] ;
|
|
||||||
|
|
||||||
return $(result) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# install-cmake-config-
|
# install-cmake-config-
|
||||||
|
|
||||||
local rule install-cmake-config- ( install-or-stage : location : includedir : libdir : version : name )
|
local rule install-cmake-config- ( install-or-stage : version : name : requirements * )
|
||||||
{
|
{
|
||||||
#.debug install-cmake-config- $(name) ;
|
#.debug install-cmake-config- $(name) ;
|
||||||
|
|
||||||
@@ -1055,7 +1011,7 @@ local rule install-cmake-config- ( install-or-stage : location : includedir : li
|
|||||||
|
|
||||||
if [ MATCH boost_(.*) : $(name) ]
|
if [ MATCH boost_(.*) : $(name) ]
|
||||||
{
|
{
|
||||||
local loc = $(location)/$(name)-$(version) ;
|
local loc = (cmakedir)/$(name)-$(version) ;
|
||||||
|
|
||||||
local library-type = UNKNOWN ;
|
local library-type = UNKNOWN ;
|
||||||
|
|
||||||
@@ -1064,19 +1020,18 @@ local rule install-cmake-config- ( install-or-stage : location : includedir : li
|
|||||||
library-type = INTERFACE ;
|
library-type = INTERFACE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
local reqs = <name>$(name) <version>$(version) <library-type>$(library-type) <boost-install.cmakedir>$(location) <boost-install.includedir>$(includedir) <boost-install.libdir>$(libdir) ;
|
local reqs = <version>$(version) <flags>library-type=$(library-type) <flags>name=$(name) ;
|
||||||
|
|
||||||
r += [ generate $(install-or-stage)/$(name)-config.cmake : $(name) : <generating-rule>@boost-install%generate-cmake-config $(reqs) ] ;
|
r += [ make $(install-or-stage)/$(name)-config.cmake : $(name) : @boost-install%make-cmake-config : $(reqs) $(requirements) ] ;
|
||||||
r += [ install $(install-or-stage)-$(name)-config.cmake : $(install-or-stage)/$(name)-config.cmake : <location>$(loc) ] ;
|
r += [ install $(install-or-stage)-$(name)-config.cmake : $(install-or-stage)/$(name)-config.cmake : <location>$(loc) $(requirements) ] ;
|
||||||
|
|
||||||
r += [ generate $(install-or-stage)/$(name)-config-version.cmake : $(name) : <generating-rule>@boost-install%generate-cmake-config-version $(reqs) ] ;
|
r += [ make $(install-or-stage)/$(name)-config-version.cmake : $(name) : @boost-install%make-cmake-config-version : $(reqs) $(requirements) ] ;
|
||||||
r += [ install $(install-or-stage)-$(name)-config-version.cmake : $(install-or-stage)/$(name)-config-version.cmake : <location>$(loc) ] ;
|
r += [ install $(install-or-stage)-$(name)-config-version.cmake : $(install-or-stage)/$(name)-config-version.cmake : <location>$(loc) $(requirements) ] ;
|
||||||
|
|
||||||
if $(library-type) != INTERFACE
|
if $(library-type) != INTERFACE
|
||||||
{
|
{
|
||||||
local v = [ generate $(install-or-stage)/$(name)-variant.cmake : $(name) : <generating-rule>@boost-install%generate-cmake-variant $(reqs) ] ;
|
r += [ generate $(install-or-stage)/$(name)-variant.cmake : $(name) : <generating-rule>@boost-install%generate-cmake-variant $(reqs) ] ;
|
||||||
r += $(v) ;
|
r += [ install $(install-or-stage)-$(name)-config-variant.cmake : $(install-or-stage)/$(name)-variant.cmake : <location>$(loc) $(requirements) ] ;
|
||||||
r += [ install $(install-or-stage)-$(name)-config-variant.cmake : $(v) : <location>$(loc) ] ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1089,9 +1044,8 @@ local rule install-cmake-config- ( install-or-stage : location : includedir : li
|
|||||||
|
|
||||||
# install-or-stage-cmake-config
|
# install-or-stage-cmake-config
|
||||||
#
|
#
|
||||||
# includedir, libdir, cmakedir should be in canonical path.make format
|
|
||||||
|
|
||||||
rule install-or-stage-cmake-config ( name * : install-or-stage : includedir : libdir : cmakedir )
|
rule install-or-stage-cmake-config ( name * : install-or-stage )
|
||||||
{
|
{
|
||||||
local p = [ project.current ] ;
|
local p = [ project.current ] ;
|
||||||
|
|
||||||
@@ -1102,8 +1056,18 @@ rule install-or-stage-cmake-config ( name * : install-or-stage : includedir : li
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
includedir = [ path.relative-to $(cmakedir) $(includedir) ] ;
|
local reqs ;
|
||||||
libdir = [ path.relative-to $(cmakedir) $(libdir) ] ;
|
if $(install-or-stage) = stage
|
||||||
|
{
|
||||||
|
local libdir = [ boost-install-dirs.stage-libdir ] ;
|
||||||
|
local includedir = [ path.make [ modules.peek boostcpp : BOOST_ROOT ] ] ;
|
||||||
|
reqs = <install-libdir>$(libdir) <install-includedir>$(includedir) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
local subdir = [ boost-install-dirs.header-subdir ] ;
|
||||||
|
reqs = <flags>header-subdir=$(subdir) ;
|
||||||
|
}
|
||||||
|
|
||||||
local BOOST_VERSION = [ modules.peek boostcpp : BOOST_VERSION ] ;
|
local BOOST_VERSION = [ modules.peek boostcpp : BOOST_VERSION ] ;
|
||||||
|
|
||||||
@@ -1111,7 +1075,7 @@ rule install-or-stage-cmake-config ( name * : install-or-stage : includedir : li
|
|||||||
|
|
||||||
for local nm in $(name)
|
for local nm in $(name)
|
||||||
{
|
{
|
||||||
configs += [ install-cmake-config- $(install-or-stage) : $(cmakedir) : $(includedir) : $(libdir) : $(BOOST_VERSION) : $(nm) ] ;
|
configs += [ install-cmake-config- $(install-or-stage) : $(BOOST_VERSION) : $(nm) : $(reqs) ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Target install/stage-detect-toolset
|
# Target install/stage-detect-toolset
|
||||||
@@ -1119,19 +1083,19 @@ rule install-or-stage-cmake-config ( name * : install-or-stage : includedir : li
|
|||||||
local boost-install-dir = [ modules.binding $(__name__) ] ;
|
local boost-install-dir = [ modules.binding $(__name__) ] ;
|
||||||
boost-install-dir = $(boost-install-dir:D) ;
|
boost-install-dir = $(boost-install-dir:D) ;
|
||||||
|
|
||||||
install $(install-or-stage)-detect-toolset : $(boost-install-dir)/BoostDetectToolset.cmake : <location>$(cmakedir) <name>BoostDetectToolset-$(BOOST_VERSION).cmake ;
|
install $(install-or-stage)-detect-toolset : $(boost-install-dir)/BoostDetectToolset.cmake : <location>(cmakedir) <name>BoostDetectToolset-$(BOOST_VERSION).cmake $(reqs) ;
|
||||||
$(p).mark-target-as-explicit $(install-or-stage)-detect-toolset ;
|
$(p).mark-target-as-explicit $(install-or-stage)-detect-toolset ;
|
||||||
|
|
||||||
# Target install/stage-boost-config
|
# Target install/stage-boost-config
|
||||||
|
|
||||||
install $(install-or-stage)-boost-config : $(boost-install-dir)/BoostConfig.cmake : <location>$(cmakedir)/Boost-$(BOOST_VERSION) ;
|
install $(install-or-stage)-boost-config : $(boost-install-dir)/BoostConfig.cmake : <location>(cmakedir)/Boost-$(BOOST_VERSION) $(reqs) ;
|
||||||
$(p).mark-target-as-explicit $(install-or-stage)-boost-config ;
|
$(p).mark-target-as-explicit $(install-or-stage)-boost-config ;
|
||||||
|
|
||||||
# Target install/stage-boost-config-version
|
# Target install/stage-boost-config-version
|
||||||
|
|
||||||
project.load [ path.make $(boost-install-dir) ] ;
|
project.load [ path.make $(boost-install-dir) ] ;
|
||||||
|
|
||||||
install $(install-or-stage)-boost-config-version : /boost/boost_install//BoostConfigVersion.cmake : <location>$(cmakedir)/Boost-$(BOOST_VERSION) ;
|
install $(install-or-stage)-boost-config-version : /boost/boost_install//BoostConfigVersion.cmake : <location>(cmakedir)/Boost-$(BOOST_VERSION) $(reqs) ;
|
||||||
$(p).mark-target-as-explicit $(install-or-stage)-boost-config-version ;
|
$(p).mark-target-as-explicit $(install-or-stage)-boost-config-version ;
|
||||||
|
|
||||||
# Target install/stage-cmake-config
|
# Target install/stage-cmake-config
|
||||||
@@ -1147,26 +1111,12 @@ rule install-cmake-config ( name * )
|
|||||||
{
|
{
|
||||||
#.debug install-cmake-config $(name) ;
|
#.debug install-cmake-config $(name) ;
|
||||||
|
|
||||||
local includedir = [ boost-install-dirs.includedir ] ;
|
install-or-stage-cmake-config $(name) : install ;
|
||||||
local libdir = [ boost-install-dirs.libdir ] ;
|
|
||||||
local cmakedir = [ boost-install-dirs.cmakedir ] ;
|
|
||||||
local header-subdir = [ boost-install-dirs.header-subdir ] ;
|
|
||||||
|
|
||||||
if $(header-subdir)
|
|
||||||
{
|
|
||||||
includedir = $(includedir)/$(header-subdir) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
install-or-stage-cmake-config $(name) : install : $(includedir) : $(libdir) : $(cmakedir) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rule stage-cmake-config ( name * )
|
rule stage-cmake-config ( name * )
|
||||||
{
|
{
|
||||||
local includedir = [ boost-install-dirs.stage-includedir ] ;
|
install-or-stage-cmake-config $(name) : stage ;
|
||||||
local libdir = [ boost-install-dirs.stage-libdir ] ;
|
|
||||||
local cmakedir = $(libdir)/cmake ;
|
|
||||||
|
|
||||||
install-or-stage-cmake-config $(name) : stage : $(includedir) : $(libdir) : $(cmakedir) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# stage-cmake-config
|
# stage-cmake-config
|
||||||
@@ -1256,7 +1206,7 @@ rule generate-dependencies ( project name ? : property-set : sources * )
|
|||||||
|
|
||||||
# boost-install
|
# boost-install
|
||||||
|
|
||||||
local rule install-stage-subdir ( properties * )
|
rule install-subdir ( properties * )
|
||||||
{
|
{
|
||||||
import boostcpp ;
|
import boostcpp ;
|
||||||
|
|
||||||
@@ -1276,25 +1226,7 @@ local rule install-stage-subdir ( properties * )
|
|||||||
r = $(r:B=$(r:B)-python$(python)) ;
|
r = $(r:B=$(r:B)-python$(python)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $(r) ;
|
return <location>(libdir)/$(r:E=) ;
|
||||||
}
|
|
||||||
|
|
||||||
rule stage-subdir ( properties * )
|
|
||||||
{
|
|
||||||
local r = [ install-stage-subdir $(properties) ] ;
|
|
||||||
|
|
||||||
local libdir = [ boost-install-dirs.stage-libdir ] ;
|
|
||||||
|
|
||||||
return <location>$(libdir)/$(r) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
rule install-subdir ( properties * )
|
|
||||||
{
|
|
||||||
local r = [ install-stage-subdir $(properties) ] ;
|
|
||||||
|
|
||||||
local libdir = [ boost-install-dirs.libdir ] ;
|
|
||||||
|
|
||||||
return <location>$(libdir)/$(r) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rule boost-install ( libraries * )
|
rule boost-install ( libraries * )
|
||||||
@@ -1328,21 +1260,17 @@ rule boost-install ( libraries * )
|
|||||||
local libdir = [ boost-install-dirs.libdir ] ;
|
local libdir = [ boost-install-dirs.libdir ] ;
|
||||||
local bindir = [ boost-install-dirs.bindir ] ;
|
local bindir = [ boost-install-dirs.bindir ] ;
|
||||||
|
|
||||||
install install-libraries-static : $(libraries) : <location>$(libdir) <install-dependencies>on <install-type>STATIC_LIB ;
|
install install-libraries-static : $(libraries) : <location>(libdir) <install-dependencies>on <install-type>STATIC_LIB ;
|
||||||
$(p).mark-target-as-explicit install-libraries-static ;
|
$(p).mark-target-as-explicit install-libraries-static ;
|
||||||
|
|
||||||
alias install-libraries-shared : install-libraries-shared- ;
|
|
||||||
alias install-libraries-shared : install-libraries-shared-cygwin : <target-os>cygwin ;
|
|
||||||
$(p).mark-target-as-explicit install-libraries-shared ;
|
|
||||||
|
|
||||||
install install-libraries-shared- : $(libraries) : <location>$(libdir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on ;
|
install install-libraries-shared- : $(libraries) : <location>$(libdir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on ;
|
||||||
$(p).mark-target-as-explicit install-libraries-shared- ;
|
$(p).mark-target-as-explicit install-libraries-shared- ;
|
||||||
|
|
||||||
install install-libraries-shared-cygwin : $(libraries) : <location>$(bindir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on ;
|
install install-libraries-shared- : $(libraries) : <location>(libdir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on ;
|
||||||
$(p).mark-target-as-explicit install-libraries-shared-cygwin ;
|
$(p).mark-target-as-explicit install-libraries-shared- ;
|
||||||
|
|
||||||
install install-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-install%install-subdir ;
|
install install-libraries-shared-cygwin : $(libraries) : <location>(bindir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on ;
|
||||||
$(p).mark-target-as-explicit install-unprefixed-static ;
|
$(p).mark-target-as-explicit install-libraries-shared-cygwin ;
|
||||||
|
|
||||||
install install-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB <install-no-version-symlinks>on <conditional>@boost-install%install-subdir ;
|
install install-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB <install-no-version-symlinks>on <conditional>@boost-install%install-subdir ;
|
||||||
$(p).mark-target-as-explicit install-unprefixed-shared ;
|
$(p).mark-target-as-explicit install-unprefixed-shared ;
|
||||||
@@ -1361,19 +1289,20 @@ rule boost-install ( libraries * )
|
|||||||
if ! [ $(p).has-alternative-for-target stage ]
|
if ! [ $(p).has-alternative-for-target stage ]
|
||||||
{
|
{
|
||||||
local stage-libdir = [ boost-install-dirs.stage-libdir ] ;
|
local stage-libdir = [ boost-install-dirs.stage-libdir ] ;
|
||||||
|
local reqs = <install-libdir>$(stage-libdir) ;
|
||||||
|
|
||||||
stage-cmake-config $(libraries) ;
|
stage-cmake-config $(libraries) ;
|
||||||
|
|
||||||
install stage-libraries-static : $(libraries) : <location>$(stage-libdir) <install-dependencies>on <install-type>STATIC_LIB ;
|
install stage-libraries-static : $(libraries) : <location>(libdir) $(reqs) <install-dependencies>on <install-type>STATIC_LIB ;
|
||||||
$(p).mark-target-as-explicit stage-libraries-static ;
|
$(p).mark-target-as-explicit stage-libraries-static ;
|
||||||
|
|
||||||
install stage-libraries-shared : $(libraries) : <location>$(stage-libdir) <install-dependencies>on <install-type>SHARED_LIB <install-type>PDB <install-no-version-symlinks>on ;
|
install stage-libraries-shared : $(libraries) : <location>(libdir) $(reqs) <install-dependencies>on <install-type>SHARED_LIB <install-type>PDB <install-no-version-symlinks>on ;
|
||||||
$(p).mark-target-as-explicit stage-libraries-shared ;
|
$(p).mark-target-as-explicit stage-libraries-shared ;
|
||||||
|
|
||||||
install stage-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-install%stage-subdir ;
|
install stage-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB $(reqs) <conditional>@boost-install%install-subdir ;
|
||||||
$(p).mark-target-as-explicit stage-unprefixed-static ;
|
$(p).mark-target-as-explicit stage-unprefixed-static ;
|
||||||
|
|
||||||
install stage-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB <install-type>PDB <install-no-version-symlinks>on <conditional>@boost-install%stage-subdir ;
|
install stage-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB $(reqs) <install-type>PDB <install-no-version-symlinks>on <conditional>@boost-install%install-subdir ;
|
||||||
$(p).mark-target-as-explicit stage-unprefixed-shared ;
|
$(p).mark-target-as-explicit stage-unprefixed-shared ;
|
||||||
|
|
||||||
generate stage-dependencies : $(libraries) : <generating-rule>@boost-install%generate-dependencies <name>stage ;
|
generate stage-dependencies : $(libraries) : <generating-rule>@boost-install%generate-dependencies <name>stage ;
|
||||||
@@ -1383,3 +1312,30 @@ rule boost-install ( libraries * )
|
|||||||
$(p).mark-target-as-explicit stage ;
|
$(p).mark-target-as-explicit stage ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If --{parent} is explicitly specified on the command line, then we need to
|
||||||
|
# clear every dir setting in config files that depends on it
|
||||||
|
if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
|
||||||
|
{
|
||||||
|
option.set exec-prefix : ;
|
||||||
|
option.set bindir : ;
|
||||||
|
option.set libdir : ;
|
||||||
|
option.set includedir : ;
|
||||||
|
option.set datadir : ;
|
||||||
|
option.set datarootdir : ;
|
||||||
|
option.set cmakedir : ;
|
||||||
|
}
|
||||||
|
if [ MATCH --exec-prefix=(.*) : [ modules.peek : ARGV ] ]
|
||||||
|
{
|
||||||
|
option.set bindir : ;
|
||||||
|
option.set libdir : ;
|
||||||
|
option.set cmakedir : ;
|
||||||
|
}
|
||||||
|
if [ MATCH --libdir-prefix=(.*) : [ modules.peek : ARGV ] ]
|
||||||
|
{
|
||||||
|
option.set cmakedir : ;
|
||||||
|
}
|
||||||
|
if [ MATCH --dataroot-prefix=(.*) : [ modules.peek : ARGV ] ]
|
||||||
|
{
|
||||||
|
option.set datadir : ;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user