| |
| |
| |
| |
| |
|
|
| |
|
|
| if $(JAM_VERSION:J="") < 030112 |
| { |
| ECHO "error: Boost.Jam version 3.1.12 or later required" ; |
| EXIT ; |
| } |
|
|
| local required-rules = GLOB-RECURSIVELY HAS_NATIVE_RULE ; |
|
|
| for local r in $(required-rules) |
| { |
| if ! $(r) in [ RULENAMES ] |
| { |
| ECHO "error: builtin rule '$(r)' is not present" ; |
| ECHO "error: your version of bjam is likely out of date" ; |
| ECHO "error: please get a fresh version from SVN." ; |
| EXIT ; |
| } |
| } |
|
|
| local native = |
| regex transform 2 |
| ; |
| while $(native) |
| { |
| if ! [ HAS_NATIVE_RULE $(native[1]) : |
| $(native[2]) : |
| $(native[3]) ] |
| { |
| ECHO "error: missing native rule '$(native[1]).$(native[2])'" ; |
| ECHO "error: or interface version of that rule is too low" ; |
| ECHO "error: your version of bjam is likely out of date" ; |
| ECHO "error: please get a fresh version from SVN." ; |
| EXIT ; |
| } |
| native = $(native[4-]) ; |
| } |
|
|
| |
| |
| |
| |
| module .ENVIRON |
| { |
| local p = $(PATH) $(Path) $(path) ; |
| if ! $(p) |
| { |
| ECHO "error: no builtin module .ENVIRON is found" ; |
| ECHO "error: your version of bjam is likely out of date" ; |
| ECHO "error: please get a fresh version from SVN." ; |
| EXIT ; |
| } |
| } |
|
|
| |
| |
| |
| |
| { |
| if ! $(TMPNAME) |
| { |
| ECHO "error: no @() functionality found" ; |
| ECHO "error: your version of bjam is likely out of date" ; |
| ECHO "error: please get a fresh version from SVN." ; |
| EXIT ; |
| } |
| } |
|
|
| |
| if "\n" = "n" |
| { |
| if $(OS) = CYGWIN |
| { |
| ECHO "warning: escape sequences are not supported" ; |
| ECHO "warning: this will cause major misbehaviour on cygwin" ; |
| ECHO "warning: your version of bjam is likely out of date" ; |
| ECHO "warning: please get a fresh version from SVN." ; |
| } |
| } |
|
|
| |
| |
| SEARCH on <module@>modules.jam = $(.bootstrap-file:D) ; |
| module modules { include <module@>modules.jam ; } |
| IMPORT modules : import : : import ; |
|
|
| { |
| |
| |
| |
| |
| |
| |
|
|
| local subdirs = |
| kernel |
| util |
| build |
| tools |
| contrib |
| . |
| ; |
| local whereami = [ NORMALIZE_PATH $(.bootstrap-file:DT) ] ; |
| BOOST_BUILD_PATH += $(whereami:D)/$(subdirs) ; |
|
|
| modules.poke .ENVIRON : BOOST_BUILD_PATH : $(BOOST_BUILD_PATH) ; |
| |
| modules.poke : EXTRA_PYTHONPATH : $(whereami) ; |
| } |
|
|
| |
| |
| |
| import modules ; |
|
|
| |
| |
| |
| import option ; |
| local dont-build = [ option.process ] ; |
|
|
| |
| |
| |
| if ! $(dont-build) |
| { |
| if ! --python in $(ARGV) |
| { |
| |
| |
| local build-system = [ MATCH --build-system=(.*) : $(ARGV) ] ; |
| build-system ?= build-system ; |
|
|
| |
| import $(build-system[-1]) ; |
| } |
| else |
| { |
| ECHO "Boost.Build V2 Python port (experimental)" ; |
| |
| |
| |
| |
| module python_interface |
| { |
| rule load ( module-name : location ) |
| { |
| USER_MODULE $(module-name) ; |
| |
| |
| |
| |
| module $(module-name) |
| { |
| __name__ = $(1) ; |
| include $(2) ; |
| local rules = [ RULENAMES $(1) ] ; |
| IMPORT $(1) : $(rules) : $(1) : $(1).$(rules) ; |
| } |
| } |
| |
| rule peek ( module-name ? : variables + ) |
| { |
| module $(<) |
| { |
| return $($(>)) ; |
| } |
| } |
| |
| rule set-variable ( module-name : name : value * ) |
| { |
| module $(<) |
| { |
| $(>) = $(3) ; |
| } |
| } |
| |
| rule set-top-level-targets ( targets * ) |
| { |
| DEPENDS all : $(targets) ; |
| } |
| |
| rule call-in-module ( m : rulename : * ) |
| { |
| module $(m) |
| { |
| return [ $(2) $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ; |
| } |
| } |
|
|
| |
| rule set-update-action ( action : targets * : sources * : properties * ) |
| { |
| $(action) $(targets) : $(sources) : $(properties) ; |
| } |
| |
| rule set-update-action-in-module ( m : action : targets * : sources * : properties * ) |
| { |
| module $(m) |
| { |
| $(2) $(3) : $(4) : $(5) ; |
| } |
| } |
| |
| rule set-target-variable ( targets + : variable : value * : append ? ) |
| { |
| if $(append) |
| { |
| $(variable) on $(targets) += $(value) ; |
| } |
| else |
| { |
| $(variable) on $(targets) = $(value) ; |
| } |
| } |
|
|
| rule get-target-variable ( targets + : variable ) |
| { |
| return [ on $(targets) return $($(variable)) ] ; |
| } |
|
|
| rule import-rules-from-parent ( parent-module : this-module : user-rules * ) |
| { |
| IMPORT $(parent-module) : $(user-rules) : $(this-module) : $(user-rules) ; |
| EXPORT $(this-module) : $(user-rules) ; |
| } |
|
|
| rule mark-included ( targets * : includes * ) { |
| NOCARE $(includes) ; |
| INCLUDES $(targets) : $(includes) ; |
| ISFILE $(includes) ; |
| } |
| } |
|
|
| PYTHON_IMPORT_RULE bootstrap : bootstrap : PyBB : bootstrap ; |
| modules.poke PyBB : root : [ NORMALIZE_PATH $(.bootstrap-file:DT)/.. ] ; |
| |
| module PyBB |
| { |
| local ok = [ bootstrap $(root) ] ; |
| if ! $(ok) |
| { |
| EXIT ; |
| } |
| } |
| |
| |
| |
|
|
| |
| |
| |
| |
|
|
| } |
| } |
|
|