1 # Copyright 2017 Peter Dimov
3 # Distributed under the Boost Software License, Version 1.0.
4 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
10 import virtual-target ;
14 project : requirements -<link>static ; # from tools/Jamfile
16 if "--debug-check-build" in [ modules.peek : ARGV ]
21 local rule .info ( messages * )
25 ECHO "info:" $(messages) ;
29 local all-libraries = [ MATCH .*libs/(.*)/build/.* :
30 [ glob ../../../libs/*/build/Jamfile.v2 ]
31 [ glob ../../../libs/*/build/Jamfile ] ] ;
33 all-libraries = [ sequence.unique $(all-libraries) ] ;
35 # The function_types library has a Jamfile, but it's used for maintenance
36 # purposes, there's no library to build and install.
38 all-libraries = [ set.difference $(all-libraries) : function_types ] ;
40 #ECHO all-libraries: $(all-libraries) ;
42 rule alias-sources-impl ( project name : property-set : sources * )
46 for local s in $(sources)
48 target-graph += [ virtual-target.traverse $(s) : include-sources : include-roots ] ;
51 # Remove targets created by the main target
55 for local t in $(target-graph)
57 if [ $(t).root ] && ! ( $(t) in $(sources) ) && ( [ $(t).type ] = STATIC_LIB || [ $(t).type ] = SHARED_LIB )
65 for local t in $(result)
67 .info " " [ $(t).name ] ;
73 path-constant ROOT : ../../.. ;
75 for local lib in $(all-libraries)
77 local path = [ NORMALIZE_PATH /$(ROOT)/libs/$(lib)/build ] ;
78 generate library-$(lib) : $(path)//stage : <generating-rule>@alias-sources-impl ;
81 for local lib in $(all-libraries)
85 if $(lib) in python mpi graph_parallel
87 python-dep = /python//python ;
90 run main.cpp : : : [ ac.check-library library-$(lib) : <library>library-$(lib) <library>$(python-dep) : <build>no ] : $(lib) ;