From 39289a3fa0a491d0605670600793711b53bb94e4 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Sat, 28 Dec 2019 00:16:10 +0100 Subject: [PATCH 01/53] add saxonhe_dir action (#522) --- src/tools/saxonhe.jam | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tools/saxonhe.jam b/src/tools/saxonhe.jam index f48cf7fc82..584b80bee7 100644 --- a/src/tools/saxonhe.jam +++ b/src/tools/saxonhe.jam @@ -1,5 +1,6 @@ # # Copyright (c) 2018 Damian Jarek (damian dot jarek93 at gmail dot com) +# Copyright (c) 2019 Richard Hodges (hodges dot r at gmail dot com) # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -21,7 +22,20 @@ rule init ( saxonhe_jar ? : java_exe ? ) } } +# +# execute the saxonhe jar file passing files as inputs and outputs. +# actions saxonhe { "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])" } + +# +# execute the saxonhe jar file passing directories as inputs and outputs. +# saxonhe requires that the output directory already exists +# +actions saxonhe_dir +{ + mkdir -p "$(<)" + "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])" +} From ab5ce1e4686715bc83eeb28b809b9268d6cb2f63 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 1 Jan 2020 05:46:00 -0800 Subject: [PATCH 02/53] Fix MinGW version tag to match GCC (#524) --- src/tools/common.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/common.jam b/src/tools/common.jam index 26a8270e99..005ac9c5d8 100644 --- a/src/tools/common.jam +++ b/src/tools/common.jam @@ -974,7 +974,7 @@ local rule toolset-tag ( name : type ? : property-set ) } # From GCC 5, versioning changes and minor becomes patch - if $(tag) = gcc && $(version[1]) && [ numbers.less 4 $(version[1]) ] + if ( $(tag) = gcc || $(tag) = mgw ) && $(version[1]) && [ numbers.less 4 $(version[1]) ] { version = $(version[1]) ; } From 8c3900ae5efe3e84460ac61fdcf1975e791991c9 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Mon, 20 Jan 2020 12:04:02 -0800 Subject: [PATCH 03/53] saxonhe_dir works on Windows (#523) --- src/tools/saxonhe.jam | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/tools/saxonhe.jam b/src/tools/saxonhe.jam index 584b80bee7..01213193b8 100644 --- a/src/tools/saxonhe.jam +++ b/src/tools/saxonhe.jam @@ -7,6 +7,7 @@ # import common ; +import os ; rule init ( saxonhe_jar ? : java_exe ? ) { @@ -34,8 +35,19 @@ actions saxonhe # execute the saxonhe jar file passing directories as inputs and outputs. # saxonhe requires that the output directory already exists # -actions saxonhe_dir +if [ os.on-windows ] { - mkdir -p "$(<)" - "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])" + actions saxonhe_dir + { + if not exist "$(<)\\" mkdir "$(<)" + "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])" + } +} +else +{ + actions saxonhe_dir + { + mkdir -p "$(<)" + "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])" + } } From 696371814544e63ec09a5a196da7467258e003d2 Mon Sep 17 00:00:00 2001 From: vahtis Date: Wed, 29 Jan 2020 17:11:25 +0200 Subject: [PATCH 04/53] Fixes build on Sun toolset by adding C++11 compile option. Add c++11 flags because sysinfo uses c++11 features fixes #530 --- src/engine/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/build.sh b/src/engine/build.sh index 570b779fd7..7d93b615e5 100755 --- a/src/engine/build.sh +++ b/src/engine/build.sh @@ -313,7 +313,7 @@ case $B2_TOOLSET in PATH=${B2_TOOLSET_ROOT}bin:${PATH} export PATH fi - B2_CXX="${CXX}" + B2_CXX="${CXX} -std=c++11" B2_CXXFLAGS_RELEASE="-xO4 -s" B2_CXXFLAGS_DEBUG="-g" ;; From 770be841fb529aef4f011e396934098ad47e7ec9 Mon Sep 17 00:00:00 2001 From: jehelset <47066444+jehelset@users.noreply.github.com> Date: Sun, 9 Feb 2020 15:38:50 +0100 Subject: [PATCH 05/53] import errors.error in targets.resolve-reference. (#536) * import errors.error in targets.resolve-reference. * fix import statement. --- src/build/targets.jam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build/targets.jam b/src/build/targets.jam index ddfdd33843..cb841f8fe9 100644 --- a/src/build/targets.jam +++ b/src/build/targets.jam @@ -887,7 +887,8 @@ rule resolve-reference ( target-reference : project ) local id = $(split[1]) ; if ! $(split) || ! $(id) { - error "Malformed target reference $(target-reference)" ; + import errors ; + errors.error "Malformed target reference $(target-reference)" ; } local sproperties = ; if $(split[3]) From c6a5df5a4e1eb13f80ddbcf426531380b8e4fcaf Mon Sep 17 00:00:00 2001 From: jehelset <47066444+jehelset@users.noreply.github.com> Date: Sun, 9 Feb 2020 15:45:45 +0100 Subject: [PATCH 06/53] move abstract-file-target.root to virtual-target. (#537) seems to only be called from basic-target.create-subvariant, which seems (looking at the comments and 5.6.4 of docs) to assume that it exists on virtual-target. without this fix a user wanting to produce something derived from virtual-target in the construct-function of something derived from basic-target will get an error. --- src/build/virtual-target.jam | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/build/virtual-target.jam b/src/build/virtual-target.jam index 5df6bbe7e1..d7b84321c3 100644 --- a/src/build/virtual-target.jam +++ b/src/build/virtual-target.jam @@ -174,6 +174,19 @@ class virtual-target # private: (overridables) + # Sets/gets the 'root' flag. Target is root if it directly corresponds to + # some variant of a main target. + # + rule root ( set ? ) + { + if $(set) + { + self.root = true ; + } + return $(self.root) ; + } + + # Sets up build actions for 'target'. Should call appropriate rules and set # target variables. # @@ -296,18 +309,6 @@ class abstract-file-target : virtual-target return $(self.action) ; } - # Sets/gets the 'root' flag. Target is root if it directly corresponds to - # some variant of a main target. - # - rule root ( set ? ) - { - if $(set) - { - self.root = true ; - } - return $(self.root) ; - } - # Gets or sets the subvariant which created this target. Subvariant is set # when target is brought into existence and is never changed after that. In # particular, if a target is shared by multiple subvariants, only the first From 8182f7a91a6d1ca5c97036989af7b574b50a8c51 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 9 Feb 2020 11:31:20 -0600 Subject: [PATCH 07/53] Bump version for next release. Also add current CI test compilers and OSes. --- azure-pipelines.yml | 68 ++++++++++++++++++++++++++++------------- doc/src/history.adoc | 2 ++ src/build/version.jam | 3 +- src/engine/patchlevel.h | 2 +- 4 files changed, 51 insertions(+), 24 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0f9c8bfc3a..8521957378 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -205,24 +205,36 @@ stages: - job: 'macOS' strategy: matrix: + Xcode 11.3.1: + TOOLSET: clang + TEST_TOOLSET: clang + CXX: clang++ + XCODE_APP: /Applications/Xcode_11.3.1.app + VM_IMAGE: 'macOS-10.15' + Xcode 11.3: + TOOLSET: clang + TEST_TOOLSET: clang + CXX: clang++ + XCODE_APP: /Applications/Xcode_11.3.app + VM_IMAGE: 'macOS-10.15' Xcode 11.2: TOOLSET: clang TEST_TOOLSET: clang CXX: clang++ XCODE_APP: /Applications/Xcode_11.2.app - VM_IMAGE: 'macOS-10.14' + VM_IMAGE: 'macOS-10.15' Xcode 11.1: TOOLSET: clang TEST_TOOLSET: clang CXX: clang++ XCODE_APP: /Applications/Xcode_11.1.app - VM_IMAGE: 'macOS-10.14' + VM_IMAGE: 'macOS-10.15' Xcode 11.0: TOOLSET: clang TEST_TOOLSET: clang CXX: clang++ XCODE_APP: /Applications/Xcode_11.app - VM_IMAGE: 'macOS-10.14' + VM_IMAGE: 'macOS-10.15' Xcode 10.2.1: TOOLSET: clang TEST_TOOLSET: clang @@ -252,7 +264,7 @@ stages: TEST_TOOLSET: clang CXX: clang++ XCODE_APP: /Applications/Xcode_9.4.1.app - VM_IMAGE: 'macOS-10.13' + VM_IMAGE: 'macOS-10.14' Xcode 9.4: TOOLSET: clang TEST_TOOLSET: clang @@ -342,6 +354,12 @@ stages: vmImage: 'ubuntu-16.04' strategy: matrix: + 1.72.0 .. GCC 9: + BOOST_VERSION: 1.72.0 + BOOST_VERSION_U: 1_72_0 + TOOLSET: gcc + CXX: g++-9 + PACKAGES: g++-9 1.71.0 .. GCC 9: BOOST_VERSION: 1.71.0 BOOST_VERSION_U: 1_71_0 @@ -469,45 +487,51 @@ stages: - job: 'Release_macOS' displayName: 'Release macOS' pool: - vmImage: 'macOS-10.14' + vmImage: 'macOS-10.15' strategy: matrix: - 1.71.0 .. Xcode 11.1: + 1.72.0 .. Xcode 11.3.1: + BOOST_VERSION: 1.72.0 + BOOST_VERSION_U: 1_72_0 + TOOLSET: clang + CXX: clang++ + XCODE_APP: /Applications/Xcode_11.3.1.app + 1.71.0 .. Xcode 11.3.1: BOOST_VERSION: 1.71.0 BOOST_VERSION_U: 1_71_0 TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.1.app - 1.70.0 .. Xcode 11.1: + XCODE_APP: /Applications/Xcode_11.3.1.app + 1.70.0 .. Xcode 11.3.1: BOOST_VERSION: 1.70.0 BOOST_VERSION_U: 1_70_0 TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.1.app - 1.69.0 .. Xcode 11.1: + XCODE_APP: /Applications/Xcode_11.3.1.app + 1.69.0 .. Xcode 11.3.1: BOOST_VERSION: 1.69.0 BOOST_VERSION_U: 1_69_0 TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.1.app - 1.68.0 .. Xcode 11.1: + XCODE_APP: /Applications/Xcode_11.3.1.app + 1.68.0 .. Xcode 11.3.1: BOOST_VERSION: 1.68.0 BOOST_VERSION_U: 1_68_0 TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.1.app - 1.67.0 .. Xcode 11.1: + XCODE_APP: /Applications/Xcode_11.2.app + 1.67.0 .. Xcode 11.3.1: BOOST_VERSION: 1.67.0 BOOST_VERSION_U: 1_67_0 TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.1.app - 1.66.0 .. Xcode 11.1: + XCODE_APP: /Applications/Xcode_11.3.1.app + 1.66.0 .. Xcode 11.3.1: BOOST_VERSION: 1.66.0 BOOST_VERSION_U: 1_66_0 TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.1.app + XCODE_APP: /Applications/Xcode_11.3.1.app steps: - bash: | set -e @@ -536,19 +560,19 @@ stages: - job: 'Dev_macOS' displayName: 'Dev macOS' pool: - vmImage: 'macOS-10.14' + vmImage: 'macOS-10.15' strategy: matrix: - Master .. Xcode 11.1: + Master .. Xcode 11.3.1: BOOST_BRANCH: master TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.1.app - Develop .. GCC 9: + XCODE_APP: /Applications/Xcode_11.3.1.app + Develop .. Xcode 11.3.1: BOOST_BRANCH: develop TOOLSET: clang CXX: clang++ - XCODE_APP: /Applications/Xcode_11.app + XCODE_APP: /Applications/Xcode_11.3.1.app steps: - bash: | set -e diff --git a/doc/src/history.adoc b/doc/src/history.adoc index bcdc6015a5..c2b0ecd3de 100644 --- a/doc/src/history.adoc +++ b/doc/src/history.adoc @@ -1,6 +1,8 @@ [[b2.history]] = History +== Version 4.2.0 + == Version 4.1.0 Many small bug fixes in this release. But there are some new features also. diff --git a/src/build/version.jam b/src/build/version.jam index 3b47287a6a..fa34d32d2a 100644 --- a/src/build/version.jam +++ b/src/build/version.jam @@ -6,8 +6,9 @@ import numbers ; +# Mirror engine JAM_VERSION .major = "4" ; -.minor = "1" ; +.minor = "2" ; rule boost-build ( ) diff --git a/src/engine/patchlevel.h b/src/engine/patchlevel.h index fe4e34f172..494883da65 100644 --- a/src/engine/patchlevel.h +++ b/src/engine/patchlevel.h @@ -12,5 +12,5 @@ Distributed under the Boost Software License, Version 1.0. #define VERSION_MAJOR 4 -#define VERSION_MINOR 1 +#define VERSION_MINOR 2 #define VERSION_PATCH 0 From 04ba33913eb6f473d4b59be0bab867ffa13fea73 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 9 Feb 2020 12:34:40 -0600 Subject: [PATCH 08/53] The 10.14 image has a busted xcode 9.4.1. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8521957378..b61a971634 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -264,7 +264,7 @@ stages: TEST_TOOLSET: clang CXX: clang++ XCODE_APP: /Applications/Xcode_9.4.1.app - VM_IMAGE: 'macOS-10.14' + VM_IMAGE: 'macOS-10.13' Xcode 9.4: TOOLSET: clang TEST_TOOLSET: clang From ad9cd1d4af5e39d8803bbb67ba5edf4682dd6ee1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 9 Feb 2020 17:01:11 -0600 Subject: [PATCH 09/53] Add Boost msvc tests. --- azure-pipelines.yml | 59 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b61a971634..d2d1e6c178 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -351,7 +351,7 @@ stages: - job: 'Release_Linux' displayName: 'Release Linux' pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-latest' strategy: matrix: 1.72.0 .. GCC 9: @@ -429,7 +429,7 @@ stages: - job: 'Dev_Linux' displayName: 'Dev Linux' pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-latest' strategy: matrix: Master .. GCC 9: @@ -487,7 +487,7 @@ stages: - job: 'Release_macOS' displayName: 'Release macOS' pool: - vmImage: 'macOS-10.15' + vmImage: 'macOS-latest' strategy: matrix: 1.72.0 .. Xcode 11.3.1: @@ -560,7 +560,7 @@ stages: - job: 'Dev_macOS' displayName: 'Dev macOS' pool: - vmImage: 'macOS-10.15' + vmImage: 'macOS-latest' strategy: matrix: Master .. Xcode 11.3.1: @@ -598,6 +598,57 @@ stages: popd displayName: Test + - job: 'Release_Windows' + displayName: 'Release Windows' + pool: + vmImage: 'windows-latest' + strategy: + matrix: + 1.72.0 .. VS 2019: + BOOST_VERSION: 1.72.0 + BOOST_VERSION_U: 1_72_0 + TOOLSET: vc142 + 1.71.0 .. VS 2019: + BOOST_VERSION: 1.71.0 + BOOST_VERSION_U: 1_71_0 + TOOLSET: vc142 + 1.70.0 .. VS 2019: + BOOST_VERSION: 1.70.0 + BOOST_VERSION_U: 1_70_0 + TOOLSET: vc142 + 1.69.0 .. VS 2019: + BOOST_VERSION: 1.69.0 + BOOST_VERSION_U: 1_69_0 + TOOLSET: vc142 + 1.68.0 .. VS 2019: + BOOST_VERSION: 1.68.0 + BOOST_VERSION_U: 1_68_0 + TOOLSET: vc142 + 1.67.0 .. VS 2019: + BOOST_VERSION: 1.67.0 + BOOST_VERSION_U: 1_67_0 + TOOLSET: vc142 + 1.66.0 .. VS 2019: + BOOST_VERSION: 1.66.0 + BOOST_VERSION_U: 1_66_0 + TOOLSET: vc142 + steps: + - powershell: | + cd src/engine + $env:path += ';' + $env:CXX_PATH + cmd /c build.bat $env:TOOLSET + ./b2.exe -v + cd ../.. + displayName: Build + - powershell: | + cd $env:HOME + wget -nv https://dl.bintray.com/boostorg/release/$env:BOOST_VERSION/source/boost_$env:BOOST_VERSION_U.zip + 7z x boost_$env:BOOST_VERSION_U.zip + cd boost_$env:BOOST_VERSION_U + echo "using" "msvc" ;" > $env:HOME/user-config.jam + "$env:BUILD_SOURCESDIRECTORY/src/engine/b2.exe" "--boost-build=$env:BUILD_SOURCESDIRECTORY/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + displayName: Test + - stage: WebsiteUpdate displayName: 'Website Update' condition: in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/develop') From 23995e22b04377fab2594579dbfc9dddcaf9c3b5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 9 Feb 2020 19:29:36 -0600 Subject: [PATCH 10/53] Fix env var expansion in powershell. --- azure-pipelines.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d2d1e6c178..bbeba35677 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -635,18 +635,18 @@ stages: steps: - powershell: | cd src/engine - $env:path += ';' + $env:CXX_PATH - cmd /c build.bat $env:TOOLSET + $env:path += ';' + $env:{CXX_PATH} + cmd /c build.bat $env:{TOOLSET} ./b2.exe -v cd ../.. displayName: Build - powershell: | cd $env:HOME - wget -nv https://dl.bintray.com/boostorg/release/$env:BOOST_VERSION/source/boost_$env:BOOST_VERSION_U.zip - 7z x boost_$env:BOOST_VERSION_U.zip - cd boost_$env:BOOST_VERSION_U - echo "using" "msvc" ;" > $env:HOME/user-config.jam - "$env:BUILD_SOURCESDIRECTORY/src/engine/b2.exe" "--boost-build=$env:BUILD_SOURCESDIRECTORY/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + wget -nv https://dl.bintray.com/boostorg/release/$env:{BOOST_VERSION}/source/boost_$env:{BOOST_VERSION_U}.zip + 7z x boost_$env:{BOOST_VERSION_U}.zip + cd boost_$env:{BOOST_VERSION_U} + echo "using" "msvc" ;" > $env:{HOME}/user-config.jam + "$env:{BUILD_SOURCESDIRECTORY}/src/engine/b2.exe" "--boost-build=$env:{BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From 4830160fc2d0b60c83e93d6284d465a8a41fca22 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 9 Feb 2020 20:29:51 -0600 Subject: [PATCH 11/53] Truly fix powershell env vars. --- azure-pipelines.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bbeba35677..637041652d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -635,18 +635,18 @@ stages: steps: - powershell: | cd src/engine - $env:path += ';' + $env:{CXX_PATH} - cmd /c build.bat $env:{TOOLSET} + $env:path += ';' + ${env:CXX_PATH} + cmd /c build.bat ${env:TOOLSET} ./b2.exe -v cd ../.. displayName: Build - powershell: | cd $env:HOME - wget -nv https://dl.bintray.com/boostorg/release/$env:{BOOST_VERSION}/source/boost_$env:{BOOST_VERSION_U}.zip - 7z x boost_$env:{BOOST_VERSION_U}.zip - cd boost_$env:{BOOST_VERSION_U} - echo "using" "msvc" ;" > $env:{HOME}/user-config.jam - "$env:{BUILD_SOURCESDIRECTORY}/src/engine/b2.exe" "--boost-build=$env:{BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + wget -nv https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip + 7z x boost_${env:BOOST_VERSION_U}.zip + cd boost_${env:BOOST_VERSION_U} + echo "using" "msvc" ;" > ${env:HOME}/user-config.jam + "${env:BUILD_SOURCESDIRECTORY}/src/engine/b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From f665f0501b59be0c46566e6caec913f1faaa2b9c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 10 Feb 2020 17:45:50 -0600 Subject: [PATCH 12/53] Simplyfied bootstrap scripts to match each other. The goal here is to avoid extra complexity of just building. If someone needs more control they can use the src/engine/build scripts. --- .gitignore | 1 + README.adoc | 2 +- bootstrap.bat | 14 +++---- bootstrap.sh | 107 ++++++-------------------------------------------- 4 files changed, 21 insertions(+), 103 deletions(-) diff --git a/.gitignore b/.gitignore index 34f3c337f4..a839c4d66b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /src/engine/b2 /src/engine/b2.exe infer-out +build.log diff --git a/README.adoc b/README.adoc index 1d3e462062..2ca949fcb3 100644 --- a/README.adoc +++ b/README.adoc @@ -16,7 +16,7 @@ Continuously tested on: * Linux Clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8 * Linux GCC 4.7, 4.8, 4.9, 5, 6, 7, 8, 9 -* macOS Xcode 8.3.3, 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1 +* macOS Xcode 8.3.3, 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 11.0, 11.1, 11.2, 11.3, 11.3.1 * Windows MinGW 8.1.0 * Windows VS 2013, 2015, 2017, 2019 diff --git a/bootstrap.bat b/bootstrap.bat index 1c4ccc9144..a4d4322b2e 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -1,16 +1,16 @@ @ECHO OFF REM Copyright (C) 2009 Vladimir Prus -REM Copyright 2019 Rene Rivera +REM Copyright 2019-2020 Rene Rivera REM REM Distributed under the Boost Software License, Version 1.0. REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -:b2_bootstrap -ECHO Bootstrapping the build engine +:b2_build +ECHO Building the B2 engine.. pushd src\engine -call .\build.bat %* > ..\..\bootstrap.log +call .\build.bat %* > ..\..\build.log @ECHO OFF popd if exist ".\src\engine\b2.exe" ( @@ -21,7 +21,7 @@ goto :b2_failure :b2_built ECHO. -ECHO Bootstrapping is done. To build, run: +ECHO Building is done. To install, run: ECHO. ECHO .\b2 --prefix=DIR install ECHO. @@ -30,8 +30,8 @@ goto :end :b2_failure ECHO. -ECHO Failed to bootstrap the build engine -ECHO Please consult bootstrap.log for further diagnostics. +ECHO Failed to build the B2 engine. +ECHO Please consult build.log for further diagnostics. ECHO. goto :end diff --git a/bootstrap.sh b/bootstrap.sh index a362eab669..3951dc051a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -2,110 +2,27 @@ # Copyright (C) 2005, 2006 Douglas Gregor. # Copyright (C) 2006 The Trustees of Indiana University # Copyright (C) 2010 Bryce Lelbach -# Copyright 2018-2019 Rene Rivera +# Copyright 2018-2020 Rene Rivera # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -# boostinspect:notab - Tabs are required for the Makefile. - -B2="" -TOOLSET="" -B2_CONFIG="" - -for option -do - case $option in - - -help | --help | -h) - want_help=yes ;; - - -with-toolset=* | --with-toolset=* ) - TOOLSET=`expr "x$option" : "x-*with-toolset=\(.*\)"` - ;; - - -*) - { echo "error: unrecognized option: $option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - esac -done - -if test "x$want_help" = xyes; then - cat < bootstrap.log 2>&1 - if [ $? -ne 0 ]; then - echo - echo "Failed to bootstrap the build engine" - echo "Consult 'bootstrap.log' for more details" - exit 1 - fi - cd "$pwd" - B2="$my_dir/src/engine/b2" - cp "$B2" . +echo "Building the B2 engine.." +pwd=`pwd` +(cd "./src/engine" && ./build.sh) > build.log 2>&1 +if [ $? -ne 0 ]; then + echo + echo "Failed to build the B2 engine." + echo "Please consult build.log for further diagnostics." + exit 1 fi +cd "$pwd" +cp "./src/engine/b2" . cat << EOF -Bootstrapping is done. To build and install, run: +Building is done. To install, run: ./b2 install --prefix= From 62b45f1ea3dbe4cfd6d08c7fdc18b07a6069cbcf Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 08:19:08 -0600 Subject: [PATCH 13/53] Fix missing quote on AZP CI. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 637041652d..add35dff9d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -645,7 +645,7 @@ stages: wget -nv https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} - echo "using" "msvc" ;" > ${env:HOME}/user-config.jam + echo "using" "msvc" ";" > ${env:HOME}/user-config.jam "${env:BUILD_SOURCESDIRECTORY}/src/engine/b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test From 07df3bbe2a77f69e9445e0229b6dec942641032b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 09:53:39 -0600 Subject: [PATCH 14/53] Does powershell not like quotes on commands? --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index add35dff9d..78f1e99267 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -646,7 +646,7 @@ stages: 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} echo "using" "msvc" ";" > ${env:HOME}/user-config.jam - "${env:BUILD_SOURCESDIRECTORY}/src/engine/b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + ${env:BUILD_SOURCESDIRECTORY}/src/engine/b2.exe "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From cac09cdadfbc1b08791c5d324a7a56e3ffc76153 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 10:34:32 -0600 Subject: [PATCH 15/53] Powershell doesn't like "/" for paths? --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 78f1e99267..5cde6ba67c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -646,7 +646,7 @@ stages: 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} echo "using" "msvc" ";" > ${env:HOME}/user-config.jam - ${env:BUILD_SOURCESDIRECTORY}/src/engine/b2.exe "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From cdf17ab7628a905285e23b85dcbcef6013808675 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 11:20:56 -0600 Subject: [PATCH 16/53] Another PS "\" issue? --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5cde6ba67c..6d5dbe0c42 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -646,7 +646,7 @@ stages: 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} echo "using" "msvc" ";" > ${env:HOME}/user-config.jam - "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}\src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From aa7580eb0b7ba6de048004b4168f2016482c8812 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 12:51:16 -0600 Subject: [PATCH 17/53] Maybe no quotes? --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d5dbe0c42..d8a2ecc9a4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -646,7 +646,7 @@ stages: 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} echo "using" "msvc" ";" > ${env:HOME}/user-config.jam - "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}\src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + ${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe --boost-build=${env:BUILD_SOURCESDIRECTORY}\src --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From 7329a94e4478753d67d6183d201f853a58d9bb93 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 14:07:40 -0600 Subject: [PATCH 18/53] Another try at quotes. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d8a2ecc9a4..63f7bf6e11 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -646,7 +646,7 @@ stages: 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} echo "using" "msvc" ";" > ${env:HOME}/user-config.jam - ${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe --boost-build=${env:BUILD_SOURCESDIRECTORY}\src --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" --boost-build=${env:BUILD_SOURCESDIRECTORY}\src --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From cfbcef2056348844a59d7162a19adc24362c25a1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 14:56:07 -0600 Subject: [PATCH 19/53] Use `&` for exec of b2.. because PS is insane. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 63f7bf6e11..d5a782d806 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -646,7 +646,7 @@ stages: 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} echo "using" "msvc" ";" > ${env:HOME}/user-config.jam - "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" --boost-build=${env:BUILD_SOURCESDIRECTORY}\src --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test - stage: WebsiteUpdate From 1fccee82b4c66d376668b2ab9eb0702a839cc65c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 16:26:16 -0600 Subject: [PATCH 20/53] Random guess for another PS error. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d5a782d806..dca4197527 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -641,7 +641,7 @@ stages: cd ../.. displayName: Build - powershell: | - cd $env:HOME + cd ${env:HOME} wget -nv https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} From 0f88c7f39c8be26d4b78b09878ca466009f797a1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 20:45:21 -0600 Subject: [PATCH 21/53] Set calculated HOME on Windows PS. --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dca4197527..dae09da4cf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -190,12 +190,14 @@ stages: cd ../.. displayName: Build - powershell: | + $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH cd test echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam python test_all.py $env:TEST_TOOLSET cd .. displayName: Test - powershell: | + $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam ./bootstrap.bat @@ -641,6 +643,7 @@ stages: cd ../.. displayName: Build - powershell: | + $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH cd ${env:HOME} wget -nv https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip 7z x boost_${env:BOOST_VERSION_U}.zip From e1828e0d04f9bf1a59f66d7fd3dab1b8866b99ce Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 11 Feb 2020 21:49:51 -0600 Subject: [PATCH 22/53] Work around fake wget in powershell. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dae09da4cf..6f6ecca33f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -645,7 +645,7 @@ stages: - powershell: | $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH cd ${env:HOME} - wget -nv https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip + wget https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip 7z x boost_${env:BOOST_VERSION_U}.zip cd boost_${env:BOOST_VERSION_U} echo "using" "msvc" ";" > ${env:HOME}/user-config.jam From 20674e58d100a0ea57aa00daa571a9ce43462d32 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 12 Feb 2020 08:19:08 -0600 Subject: [PATCH 23/53] Hopefully final fixes for PS AZP. --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6f6ecca33f..40749435f5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -643,12 +643,12 @@ stages: cd ../.. displayName: Build - powershell: | - $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH - cd ${env:HOME} - wget https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip - 7z x boost_${env:BOOST_VERSION_U}.zip - cd boost_${env:BOOST_VERSION_U} - echo "using" "msvc" ";" > ${env:HOME}/user-config.jam + $env:HOME = "$env:HOMEDRIVE" + "$env:HOMEPATH" + cd "${env:HOME}" + Invoke-WebRequest "https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip" -OutFile "boost_${env:BOOST_VERSION_U}.zip" + 7z x "boost_${env:BOOST_VERSION_U}.zip" + cd "boost_${env:BOOST_VERSION_U}" + echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test From 1dee2dc495a99fd9bb508cfa8fca4b05a59ba32a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 12 Feb 2020 09:35:52 -0600 Subject: [PATCH 24/53] Back to bootstrap.log, as some users depend on that name. --- bootstrap.bat | 4 ++-- bootstrap.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap.bat b/bootstrap.bat index a4d4322b2e..e0389e7798 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -10,7 +10,7 @@ REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.t :b2_build ECHO Building the B2 engine.. pushd src\engine -call .\build.bat %* > ..\..\build.log +call .\build.bat %* > ..\..\bootstrap.log @ECHO OFF popd if exist ".\src\engine\b2.exe" ( @@ -31,7 +31,7 @@ goto :end :b2_failure ECHO. ECHO Failed to build the B2 engine. -ECHO Please consult build.log for further diagnostics. +ECHO Please consult bootstrap.log for further diagnostics. ECHO. goto :end diff --git a/bootstrap.sh b/bootstrap.sh index 3951dc051a..e48662448b 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -10,11 +10,11 @@ # Build b2 echo "Building the B2 engine.." pwd=`pwd` -(cd "./src/engine" && ./build.sh) > build.log 2>&1 +(cd "./src/engine" && ./build.sh) > bootstrap.log 2>&1 if [ $? -ne 0 ]; then echo echo "Failed to build the B2 engine." - echo "Please consult build.log for further diagnostics." + echo "Please consult bootstrap.log for further diagnostics." exit 1 fi cd "$pwd" From fd91f8ca0494fdd11ec17ad1d55c73771ed18493 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 12 Feb 2020 13:38:25 -0600 Subject: [PATCH 25/53] Add develop/master Boost testing. --- azure-pipelines.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 40749435f5..6982ddf46e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -652,6 +652,36 @@ stages: & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test + - job: 'Dev_Windows' + displayName: 'Dev Windows' + pool: + vmImage: 'windows-latest' + strategy: + matrix: + Master .. VS 2019: + BOOST_BRANCH: master + TOOLSET: vc142 + Develop .. VS 2019: + BOOST_BRANCH: develop + TOOLSET: vc142 + steps: + - powershell: | + cd src/engine + $env:path += ';' + ${env:CXX_PATH} + cmd /c build.bat ${env:TOOLSET} + ./b2.exe -v + cd ../.. + displayName: Build + - powershell: | + $env:HOME = "$env:HOMEDRIVE" + "$env:HOMEPATH" + cd "${env:HOME}" + git clone --recursive https://github.com/boostorg/boost.git + cd boost + git checkout "${env:BOOST_BRANCH}" + echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" + & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + displayName: Test + - stage: WebsiteUpdate displayName: 'Website Update' condition: in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/develop') From a4ebeeada12c961d9216d94ec77a6bca46917979 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 12 Feb 2020 15:36:56 -0600 Subject: [PATCH 26/53] Git checkout can cerr. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6982ddf46e..86668f4d16 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -677,7 +677,7 @@ stages: cd "${env:HOME}" git clone --recursive https://github.com/boostorg/boost.git cd boost - git checkout "${env:BOOST_BRANCH}" + git checkout "${env:BOOST_BRANCH}" 2>&1 echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test From b57670575aee68337a1fd25b41addc63948fae27 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 12 Feb 2020 22:01:00 -0600 Subject: [PATCH 27/53] Avoid git error exit. --- azure-pipelines.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 86668f4d16..604164fd52 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -677,7 +677,10 @@ stages: cd "${env:HOME}" git clone --recursive https://github.com/boostorg/boost.git cd boost - git checkout "${env:BOOST_BRANCH}" 2>&1 + $OriginalErrorActionPreference = $ErrorActionPreference + $ErrorActionPreference= 'silentlycontinue' + git checkout "${env:BOOST_BRANCH}" + $ErrorActionPreference = $OriginalErrorActionPreference echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install displayName: Test From 89a7ac58dbcb4ffcceb17029154b234fac452eae Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 13 Feb 2020 07:30:17 -0600 Subject: [PATCH 28/53] Add checks for C++11 with informative error. This adds a check_cxx11.cpp source that is checked for compile with the chosen toolset before actually building. This include an appropriate user error. To see such errors, we also nolonger output to bootstrap.log. Instead the bootstrap outputs to cerr and sets the error code. --- bootstrap.bat | 7 +-- bootstrap.sh | 5 +- src/engine/build.sh | 119 ++++++++++++++++++++++++++----------- src/engine/check_cxx11.cpp | 21 +++++++ 4 files changed, 110 insertions(+), 42 deletions(-) create mode 100644 src/engine/check_cxx11.cpp diff --git a/bootstrap.bat b/bootstrap.bat index e0389e7798..25acc0a1c9 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -10,12 +10,12 @@ REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.t :b2_build ECHO Building the B2 engine.. pushd src\engine -call .\build.bat %* > ..\..\bootstrap.log +call .\build.bat %* @ECHO OFF popd if exist ".\src\engine\b2.exe" ( - copy .\src\engine\b2.exe . > nul - goto :b2_built) + copy .\src\engine\b2.exe . > nul + goto :b2_built) goto :b2_failure @@ -31,7 +31,6 @@ goto :end :b2_failure ECHO. ECHO Failed to build the B2 engine. -ECHO Please consult bootstrap.log for further diagnostics. ECHO. goto :end diff --git a/bootstrap.sh b/bootstrap.sh index e48662448b..a8e4d504ce 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -10,11 +10,10 @@ # Build b2 echo "Building the B2 engine.." pwd=`pwd` -(cd "./src/engine" && ./build.sh) > bootstrap.log 2>&1 +( cd "./src/engine" && ./build.sh ) if [ $? -ne 0 ]; then echo - echo "Failed to build the B2 engine." - echo "Please consult bootstrap.log for further diagnostics." + echo "Failed to build the B2 engine." 1>&2 exit 1 fi cd "$pwd" diff --git a/src/engine/build.sh b/src/engine/build.sh index 7d93b615e5..1fa7fc4d76 100755 --- a/src/engine/build.sh +++ b/src/engine/build.sh @@ -13,7 +13,7 @@ B2_OS= # if there was an error. echo_run () { - echo "$@" + echo "> $@" $@ r=$? if test $r -ne 0 ; then @@ -46,7 +46,7 @@ Similarly, the cross-cxx toolset is available for cross-compiling by using the BUILD_CXX, BUILD_CXXFLAGS, and BUILD_LDFLAGS environment variables to compile binaries that will be executed on the build system. This allows CXX etc. to be set for cross-compilers to be propagated to subprocesses. -" +" 1>&2 exit 1 } @@ -68,15 +68,51 @@ test_uname () fi } +# Check that the given command runs. +test_exec () +{ + "$*" 1>/dev/null 2>/dev/null +} + +# Check that the compiler can do C++11. +test_cxx11 () +{ + if ! test $NO_CXX11_CHECK ; then + case $1 in + gcc) ( ${CXX:=g++} -x c++ -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + intel-darwin) ( ${CXX:=icc} -xc++ check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + intel-linux) ( ${CXX:=icc} -xc++ check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + vacpp) ( ${CXX:=xlC_r} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + xlcpp) ( ${CXX:=xlC_r} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + como) ( ${CXX:=como} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + kcc) ( ${CXX:=KCC} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + kylix) ( ${CXX:=bc++} -tC -q check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + mipspro) ( ${CXX:=CC} -FE:template_in_elf_section -ptused check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + pathscale) ( ${CXX:=pathCC} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + pgi) ( ${CXX:=pgc++} -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + sun*) ( ${CXX:=CC} -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + clang*) ( ${CXX:=clang++} -x c++ -std=c++11 check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + tru64cxx) ( ${CXX:=cc} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + acc) ( ${CXX:=aCC} -AA check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + qcc) ( ${CXX:=QCC} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + cxx) ( ${CXX:=cxx} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + cross-cxx) ( ${CXX:=cxx} check_cxx11.cpp && rm -f a.out ) 1>/dev/null 2>/dev/null ;; + *) test "0" = "1" ;; + esac + else + test $NO_CXX11_CHECK + fi +} + # Try and guess the toolset to bootstrap the build with... guess_toolset () { - if test_uname Darwin ; then B2_TOOLSET=clang - elif test_uname IRIX ; then B2_TOOLSET=mipspro - elif test_uname IRIX64 ; then B2_TOOLSET=mipspro - elif test_uname OSF1 ; then B2_TOOLSET=tru64cxx - elif test_uname QNX && test_path QCC ; then B2_TOOLSET=qcc - elif test_uname Linux && test_path xlC_r; then + if test_uname Darwin && test_cxx11 clang ; then B2_TOOLSET=clang + elif test_uname IRIX && test_cxx11 mipspro ; then B2_TOOLSET=mipspro + elif test_uname IRIX64 && test_cxx11 mipspro ; then B2_TOOLSET=mipspro + elif test_uname OSF1 && test_cxx11 tru64cxx ; then B2_TOOLSET=tru64cxx + elif test_uname QNX && test_path QCC && test_cxx11 qcc ; then B2_TOOLSET=qcc + elif test_uname Linux && test_path xlC_r ; then if /usr/bin/lscpu | grep Byte | grep Little > /dev/null 2>&1 ; then # Little endian linux B2_TOOLSET=xlcpp @@ -84,34 +120,34 @@ guess_toolset () #Big endian linux B2_TOOLSET=vacpp fi - elif test_uname AIX && test_path xlC_r; then B2_TOOLSET=vacpp - elif test_uname FreeBSD && test_path freebsd-version && test_path clang++; then B2_TOOLSET=clang - elif test_path g++ ; then B2_TOOLSET=gcc - elif test_path clang++ ; then B2_TOOLSET=clang - elif test_path icc ; then B2_TOOLSET=intel-linux - elif test -r /opt/intel/cc/9.0/bin/iccvars.sh ; then + elif test_uname AIX && test_path xlC_r && test_cxx11 vacpp ; then B2_TOOLSET=vacpp + elif test_uname FreeBSD && test_path freebsd-version && test_path clang++ && test_cxx11 clang ; then B2_TOOLSET=clang + elif test_path g++ && test_cxx11 gcc ; then B2_TOOLSET=gcc + elif test_path clang++ && test_cxx11 clang ; then B2_TOOLSET=clang + elif test_path icc && test_cxx11 intel-linux ; then B2_TOOLSET=intel-linux + elif test -r /opt/intel/cc/9.0/bin/iccvars.sh && test_cxx11 intel-linux ; then B2_TOOLSET=intel-linux B2_TOOLSET_ROOT=/opt/intel/cc/9.0 - elif test -r /opt/intel_cc_80/bin/iccvars.sh ; then + elif test -r /opt/intel_cc_80/bin/iccvars.sh && test_cxx11 intel-linux ; then B2_TOOLSET=intel-linux B2_TOOLSET_ROOT=/opt/intel_cc_80 - elif test -r /opt/intel/compiler70/ia32/bin/iccvars.sh ; then + elif test -r /opt/intel/compiler70/ia32/bin/iccvars.sh && test_cxx11 intel-linux ; then B2_TOOLSET=intel-linux B2_TOOLSET_ROOT=/opt/intel/compiler70/ia32/ - elif test -r /opt/intel/compiler60/ia32/bin/iccvars.sh ; then + elif test -r /opt/intel/compiler60/ia32/bin/iccvars.sh && test_cxx11 intel-linux ; then B2_TOOLSET=intel-linux B2_TOOLSET_ROOT=/opt/intel/compiler60/ia32/ - elif test -r /opt/intel/compiler50/ia32/bin/iccvars.sh ; then + elif test -r /opt/intel/compiler50/ia32/bin/iccvars.sh && test_cxx11 intel-linux ; then B2_TOOLSET=intel-linux B2_TOOLSET_ROOT=/opt/intel/compiler50/ia32/ - elif test_path pgc++ ; then B2_TOOLSET=pgi - elif test_path pathCC ; then B2_TOOLSET=pathscale - elif test_path como ; then B2_TOOLSET=como - elif test_path KCC ; then B2_TOOLSET=kcc - elif test_path bc++ ; then B2_TOOLSET=kylix - elif test_path aCC ; then B2_TOOLSET=acc + elif test_path pgc++ && test_cxx11 pgi ; then B2_TOOLSET=pgi + elif test_path pathCC && test_cxx11 pathscale ; then B2_TOOLSET=pathscale + elif test_path como && test_cxx11 como ; then B2_TOOLSET=como + elif test_path KCC && test_cxx11 kcc ; then B2_TOOLSET=kcc + elif test_path bc++ && test_cxx11 kylix ; then B2_TOOLSET=kylix + elif test_path aCC && test_cxx11 acc ; then B2_TOOLSET=acc elif test_uname HP-UX ; then B2_TOOLSET=acc - elif test -r /opt/SUNWspro/bin/cc ; then + elif test -r /opt/SUNWspro/bin/cc && test_cxx11 sunpro ; then B2_TOOLSET=sunpro B2_TOOLSET_ROOT=/opt/SUNWspro/ # Test for some common compile command as the default fallback. @@ -147,11 +183,20 @@ check_debug_build () # is the name of the toolset to force building # with. case "$1" in - --guess-toolset) guess_toolset ; echo "$B2_TOOLSET" ; exit 1 ;; + --guess-toolset) NO_CXX11_CHECK=1 ; guess_toolset ; echo "$B2_TOOLSET" ; exit 1 ;; -*) guess_toolset ;; ?*) B2_TOOLSET=$1 ; shift ;; *) guess_toolset ;; esac + +# We need a C++11 compiler. Check here and given some feedback about it. +if ! test_cxx11 $B2_TOOLSET ; then + error_exit " +A C++11 capable compiler is required for building the B2 engine. +Toolset '$B2_TOOLSET' does not appear to support C++11. +" +fi + case $B2_TOOLSET in gcc) @@ -159,7 +204,7 @@ case $B2_TOOLSET in CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version} # Check whether it's MinGW GCC, which has Windows headers and none of POSIX ones. machine=$(${CXX} -dumpmachine 2>/dev/null) - if [ $? -ne 0 ]; then + if test $? -ne 0 ; then echo "B2_TOOLSET is gcc, but the 'gcc' command cannot be executed." echo "Make sure 'gcc' is in PATH, or use a different toolset." exit 1 @@ -321,7 +366,7 @@ case $B2_TOOLSET in clang*) CXX=${CXX:=clang++} CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version} - B2_CXX="${CXX} -x c++ -O3 -std=c++11" + B2_CXX="${CXX} -x c++ -std=c++11" B2_TOOLSET=clang B2_CXXFLAGS_RELEASE="-O3 -s" B2_CXXFLAGS_DEBUG="-O0 -fno-inline -g" @@ -368,14 +413,18 @@ case $B2_TOOLSET in ;; esac -echo "###" -echo "###" -echo "### Using '$B2_TOOLSET' toolset." -echo "###" -echo "###" +echo " +### +### +### Using '$B2_TOOLSET' toolset. +### +### +" echo_run ${CXX} ${CXX_VERSION_OPT} -echo "###" -echo "###" +echo " +### +### +" B2_SOURCES="\ builtins.cpp \ class.cpp \ diff --git a/src/engine/check_cxx11.cpp b/src/engine/check_cxx11.cpp new file mode 100644 index 0000000000..f01fcff71d --- /dev/null +++ b/src/engine/check_cxx11.cpp @@ -0,0 +1,21 @@ +/* Copyright 2020 Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + */ + +/* +This program is a compile test for support of C++11. If it compiles +successfully some key parts of C++11 the B2 engine requires are +available. This is used by the build script to guess and check the +compiler to build the engine with. +*/ + +// Some headers we depend on.. +#include + + +int main() +{ + // Check for basic thread calls. + { auto _ = std::thread::hardware_concurrency(); } +} From 415bede6bc8e69c45c516c745539a4295fef89fc Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 13 Feb 2020 20:36:30 -0600 Subject: [PATCH 29/53] Nicer cxx11 error message pass from bootstrap to build. Expanded error message for cxx11 requirment. And now passing bootstrap arguments to build script to allow choosing toolset from bootstrap also. --- bootstrap.sh | 2 +- src/engine/build.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index a8e4d504ce..37bc9502f6 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -10,7 +10,7 @@ # Build b2 echo "Building the B2 engine.." pwd=`pwd` -( cd "./src/engine" && ./build.sh ) +( cd "./src/engine" && ./build.sh "$*" ) if [ $? -ne 0 ]; then echo echo "Failed to build the B2 engine." 1>&2 diff --git a/src/engine/build.sh b/src/engine/build.sh index 1fa7fc4d76..41af3715eb 100755 --- a/src/engine/build.sh +++ b/src/engine/build.sh @@ -194,6 +194,10 @@ if ! test_cxx11 $B2_TOOLSET ; then error_exit " A C++11 capable compiler is required for building the B2 engine. Toolset '$B2_TOOLSET' does not appear to support C++11. + +** Note, the C++11 capable compiler is _only_ required for building the B2 +** engine. The B2 build system allows for using any C++ level and any other +** supported language and resource in your projects. " fi From 2f9d6575f913adef0afbaa44e65d0d97898ffe31 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 18 Feb 2020 19:48:36 -0600 Subject: [PATCH 30/53] Don't compile cxx11 check with regular b2 build. --- Jamroot.jam | 1 + 1 file changed, 1 insertion(+) diff --git a/Jamroot.jam b/Jamroot.jam index 5cf340734f..fe5aefaa3f 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -153,6 +153,7 @@ local b2_src = [ glob src/engine/*.cpp src/engine/modules/*.cpp : src/engine/*nt.cpp src/engine/*unix.cpp src/engine/*vms.cpp src/engine/yyacc.cpp src/engine/mkjambase.cpp + src/engine/check_cxx11.cpp ] ; local b2_src_nt = [ glob src/engine/*nt.cpp ] ; local b2_src_unix = [ glob src/engine/*unix.cpp ] ; From 4dea1934c6ff528c5df5d4c7feda80c4ae4e0321 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 18 Feb 2020 20:49:39 -0600 Subject: [PATCH 31/53] Rebuild grammar parser with latest Bison. --- src/engine/jamgram.cpp | 1023 ++++++++++++++++++++++------------------ src/engine/jamgram.hpp | 4 +- 2 files changed, 560 insertions(+), 467 deletions(-) diff --git a/src/engine/jamgram.cpp b/src/engine/jamgram.cpp index cfbbf6c628..66210b34d0 100644 --- a/src/engine/jamgram.cpp +++ b/src/engine/jamgram.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -48,7 +48,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.3.2" +#define YYBISON_VERSION "3.5.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -66,7 +66,7 @@ /* First part of user prologue. */ -#line 98 "src/engine/jamgram.y" /* yacc.c:337 */ +#line 98 "src/engine/jamgram.y" #include "jam.h" @@ -111,7 +111,17 @@ # define psnode( s,l ) parse_make( F0,l,P0,P0,s,S0,0 ) -#line 115 "src/engine/jamgram.cpp" /* yacc.c:337 */ +#line 115 "src/engine/jamgram.cpp" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -132,8 +142,8 @@ # define YYERROR_VERBOSE 0 #endif -/* In a future release of Bison, this section will be replaced - by #include "jamgram.hpp". */ +/* Use api.header.include to #include this header + instead of duplicating it here. */ #ifndef YY_YY_SRC_ENGINE_JAMGRAM_HPP_INCLUDED # define YY_YY_SRC_ENGINE_JAMGRAM_HPP_INCLUDED /* Debug traces. */ @@ -269,28 +279,75 @@ int yyparse (void); # undef short #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + and (if available) are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short yytype_uint16; +typedef short yytype_int16; #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; #else -typedef short yytype_int16; +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T @@ -298,7 +355,7 @@ typedef short yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -306,7 +363,19 @@ typedef short yytype_int16; # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + +/* Stored state numbers (used for stacks). */ +typedef yytype_uint8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -320,22 +389,20 @@ typedef short yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# define YY_ATTRIBUTE(Spec) /* empty */ +# define YY_ATTRIBUTE_PURE # endif #endif -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ @@ -347,11 +414,11 @@ typedef short yytype_int16; #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -364,6 +431,20 @@ typedef short yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) #if ! defined yyoverflow || YYERROR_VERBOSE @@ -440,17 +521,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -463,11 +544,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -479,12 +560,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -510,14 +591,15 @@ union yyalloc #define YYUNDEFTOK 2 #define YYMAXUTOK 305 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ - ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_uint8 yytranslate[] = +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -554,7 +636,7 @@ static const yytype_uint8 yytranslate[] = #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_int16 yyrline[] = { 0, 145, 145, 147, 158, 160, 164, 166, 168, 168, 168, 173, 176, 176, 178, 182, 185, 188, 191, 194, @@ -601,7 +683,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const yytype_int16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -612,14 +694,14 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -119 +#define YYPACT_NINF (-119) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-119))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -25 +#define YYTABLE_NINF (-25) -#define yytable_value_is_error(Yytable_value) \ +#define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -652,7 +734,7 @@ static const yytype_int16 yypact[] = /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const yytype_int8 yydefact[] = { 2, 103, 111, 0, 47, 0, 18, 41, 22, 8, 44, 0, 31, 38, 50, 11, 102, 0, 3, 0, @@ -764,7 +846,7 @@ static const yytype_int16 yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const yytype_int8 yystos[] = { 0, 18, 20, 22, 24, 25, 29, 30, 33, 34, 35, 36, 39, 41, 44, 45, 49, 52, 54, 61, @@ -790,7 +872,7 @@ static const yytype_uint8 yystos[] = }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const yytype_int8 yyr1[] = { 0, 51, 52, 52, 53, 53, 54, 54, 55, 56, 54, 57, 59, 58, 58, 60, 60, 61, 61, 62, @@ -808,7 +890,7 @@ static const yytype_uint8 yyr1[] = }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const yytype_int8 yyr2[] = { 0, 2, 0, 1, 1, 1, 1, 2, 0, 0, 7, 0, 0, 3, 1, 3, 0, 1, 0, 2, @@ -908,7 +990,9 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) if (yytype < YYNTOKENS) YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -932,7 +1016,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -955,19 +1039,19 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) { - unsigned long yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], + yystos[+yyssp[yyi + 1 - yynrhs]], &yyvsp[(yyi + 1) - (yynrhs)] ); YYFPRINTF (stderr, "\n"); @@ -1012,13 +1096,13 @@ int yydebug; # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) # else /* Return the length of YYSTR. */ -static YYSIZE_T +static YYPTRDIFF_T yystrlen (const char *yystr) { - YYSIZE_T yylen; + YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; @@ -1054,12 +1138,12 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYSIZE_T +static YYPTRDIFF_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { - YYSIZE_T yyn = 0; + YYPTRDIFF_T yyn = 0; char const *yyp = yystr; for (;;) @@ -1090,10 +1174,10 @@ yytnamerr (char *yyres, const char *yystr) do_not_strip_quotes: ; } - if (! yyres) + if (yyres) + return yystpcpy (yyres, yystr) - yyres; + else return yystrlen (yystr); - - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); } # endif @@ -1106,19 +1190,19 @@ yytnamerr (char *yyres, const char *yystr) *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + yy_state_t *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ + /* Actual size of YYARG. */ int yycount = 0; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then @@ -1145,7 +1229,9 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, */ if (yytoken != YYEMPTY) { - int yyn = yypact[*yyssp]; + int yyn = yypact[+*yyssp]; + YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + yysize = yysize0; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { @@ -1170,7 +1256,8 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) yysize = yysize1; else @@ -1197,7 +1284,9 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + /* Don't count the "%s"s in the final size, but reserve room for + the terminator. */ + YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) yysize = yysize1; else @@ -1227,8 +1316,8 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } else { - yyp++; - yyformat++; + ++yyp; + ++yyformat; } } return 0; @@ -1271,7 +1360,7 @@ int yynerrs; int yyparse (void) { - int yystate; + yy_state_fast_t yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -1283,16 +1372,16 @@ yyparse (void) to reallocate them elsewhere. */ /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss; + yy_state_t *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; - YYSIZE_T yystacksize; + YYPTRDIFF_T yystacksize; int yyn; int yyresult; @@ -1306,7 +1395,7 @@ yyparse (void) /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1338,10 +1427,14 @@ yyparse (void) /*--------------------------------------------------------------------. -| yynewstate -- set current state (the top of the stack) to yystate. | +| yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - *yyssp = (yytype_int16) yystate; + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1349,23 +1442,23 @@ yyparse (void) #else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; @@ -1379,9 +1472,10 @@ yyparse (void) yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); @@ -1395,16 +1489,16 @@ yyparse (void) yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) YYACCEPT; @@ -1464,15 +1558,13 @@ yyparse (void) /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -1507,722 +1599,723 @@ yyparse (void) YY_REDUCE_PRINT (yyn); switch (yyn) { - case 3: -#line 148 "src/engine/jamgram.y" /* yacc.c:1667 */ - { parse_save( yyvsp[0].parse ); } -#line 1514 "src/engine/jamgram.cpp" /* yacc.c:1667 */ + case 3: +#line 148 "src/engine/jamgram.y" + { parse_save( yyvsp[0].parse ); } +#line 1606 "src/engine/jamgram.cpp" break; case 4: -#line 159 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; } -#line 1520 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 159 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1612 "src/engine/jamgram.cpp" break; case 5: -#line 161 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; } -#line 1526 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 161 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1618 "src/engine/jamgram.cpp" break; case 6: -#line 165 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; } -#line 1532 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 165 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1624 "src/engine/jamgram.cpp" break; case 7: -#line 167 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = prules( yyvsp[-1].parse, yyvsp[0].parse ); } -#line 1538 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 167 "src/engine/jamgram.y" + { yyval.parse = prules( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 1630 "src/engine/jamgram.cpp" break; case 8: -#line 168 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_ASSIGN ); } -#line 1544 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 168 "src/engine/jamgram.y" + { yymode( SCAN_ASSIGN ); } +#line 1636 "src/engine/jamgram.cpp" break; case 9: -#line 168 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1550 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 168 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1642 "src/engine/jamgram.cpp" break; case 10: -#line 169 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = plocal( yyvsp[-4].parse, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1556 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 169 "src/engine/jamgram.y" + { yyval.parse = plocal( yyvsp[-4].parse, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1648 "src/engine/jamgram.cpp" break; case 11: -#line 173 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pnull(); } -#line 1562 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 173 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 1654 "src/engine/jamgram.cpp" break; case 12: -#line 176 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1568 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 176 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1660 "src/engine/jamgram.cpp" break; case 13: -#line 177 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_SET; } -#line 1574 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 177 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_SET; } +#line 1666 "src/engine/jamgram.cpp" break; case 14: -#line 179 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_APPEND; } -#line 1580 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 179 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_APPEND; } +#line 1672 "src/engine/jamgram.cpp" break; case 15: -#line 183 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[-1].parse; } -#line 1586 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 183 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; } +#line 1678 "src/engine/jamgram.cpp" break; case 16: -#line 185 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = P0; } -#line 1592 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 185 "src/engine/jamgram.y" + { yyval.parse = P0; } +#line 1684 "src/engine/jamgram.cpp" break; case 17: -#line 189 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = 1; } -#line 1598 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 189 "src/engine/jamgram.y" + { yyval.number = 1; } +#line 1690 "src/engine/jamgram.cpp" break; case 18: -#line 191 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = 0; } -#line 1604 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 191 "src/engine/jamgram.y" + { yyval.number = 0; } +#line 1696 "src/engine/jamgram.cpp" break; case 19: -#line 195 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; } -#line 1610 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 195 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1702 "src/engine/jamgram.cpp" break; case 20: -#line 197 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pnull(); } -#line 1616 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 197 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 1708 "src/engine/jamgram.cpp" break; case 21: -#line 200 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[-1].parse; } -#line 1622 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 200 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; } +#line 1714 "src/engine/jamgram.cpp" break; case 22: -#line 201 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1628 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 201 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1720 "src/engine/jamgram.cpp" break; case 23: -#line 202 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pincl( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } -#line 1634 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 202 "src/engine/jamgram.y" + { yyval.parse = pincl( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } +#line 1726 "src/engine/jamgram.cpp" break; case 24: -#line 203 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1640 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 203 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1732 "src/engine/jamgram.cpp" break; case 25: -#line 204 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = prule( yyvsp[-3].string, yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } -#line 1646 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 204 "src/engine/jamgram.y" + { yyval.parse = prule( yyvsp[-3].string, yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } +#line 1738 "src/engine/jamgram.cpp" break; case 26: -#line 205 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1652 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 205 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1744 "src/engine/jamgram.cpp" break; case 27: -#line 206 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pset( yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-3].number ); yymode( SCAN_NORMAL ); } -#line 1658 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 206 "src/engine/jamgram.y" + { yyval.parse = pset( yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-3].number ); yymode( SCAN_NORMAL ); } +#line 1750 "src/engine/jamgram.cpp" break; case 28: -#line 207 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_ASSIGN ); } -#line 1664 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 207 "src/engine/jamgram.y" + { yymode( SCAN_ASSIGN ); } +#line 1756 "src/engine/jamgram.cpp" break; case 29: -#line 207 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1670 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 207 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1762 "src/engine/jamgram.cpp" break; case 30: -#line 208 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pset1( yyvsp[-7].parse, yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-3].number ); yymode( SCAN_NORMAL ); } -#line 1676 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 208 "src/engine/jamgram.y" + { yyval.parse = pset1( yyvsp[-7].parse, yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-3].number ); yymode( SCAN_NORMAL ); } +#line 1768 "src/engine/jamgram.cpp" break; case 31: -#line 209 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1682 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 209 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1774 "src/engine/jamgram.cpp" break; case 32: -#line 210 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = preturn( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } -#line 1688 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 210 "src/engine/jamgram.y" + { yyval.parse = preturn( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } +#line 1780 "src/engine/jamgram.cpp" break; case 33: -#line 212 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pbreak(); } -#line 1694 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 212 "src/engine/jamgram.y" + { yyval.parse = pbreak(); } +#line 1786 "src/engine/jamgram.cpp" break; case 34: -#line 214 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pcontinue(); } -#line 1700 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 214 "src/engine/jamgram.y" + { yyval.parse = pcontinue(); } +#line 1792 "src/engine/jamgram.cpp" break; case 35: -#line 215 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1706 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 215 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1798 "src/engine/jamgram.cpp" break; case 36: -#line 215 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1712 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 215 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1804 "src/engine/jamgram.cpp" break; case 37: -#line 216 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pfor( yyvsp[-7].string, yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-8].number ); } -#line 1718 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 216 "src/engine/jamgram.y" + { yyval.parse = pfor( yyvsp[-7].string, yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-8].number ); } +#line 1810 "src/engine/jamgram.cpp" break; case 38: -#line 217 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1724 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 217 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1816 "src/engine/jamgram.cpp" break; case 39: -#line 217 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1730 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 217 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1822 "src/engine/jamgram.cpp" break; case 40: -#line 218 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pswitch( yyvsp[-4].parse, yyvsp[-1].parse ); } -#line 1736 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 218 "src/engine/jamgram.y" + { yyval.parse = pswitch( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1828 "src/engine/jamgram.cpp" break; case 41: -#line 219 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1742 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 219 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1834 "src/engine/jamgram.cpp" break; case 42: -#line 219 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1748 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 219 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1840 "src/engine/jamgram.cpp" break; case 43: -#line 220 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pif( yyvsp[-5].parse, yyvsp[-2].parse, yyvsp[0].parse ); } -#line 1754 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 220 "src/engine/jamgram.y" + { yyval.parse = pif( yyvsp[-5].parse, yyvsp[-2].parse, yyvsp[0].parse ); } +#line 1846 "src/engine/jamgram.cpp" break; case 44: -#line 221 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1760 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 221 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1852 "src/engine/jamgram.cpp" break; case 45: -#line 221 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1766 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 221 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1858 "src/engine/jamgram.cpp" break; case 46: -#line 222 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pmodule( yyvsp[-4].parse, yyvsp[-1].parse ); } -#line 1772 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 222 "src/engine/jamgram.y" + { yyval.parse = pmodule( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1864 "src/engine/jamgram.cpp" break; case 47: -#line 223 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1778 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 223 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1870 "src/engine/jamgram.cpp" break; case 48: -#line 223 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1784 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 223 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1876 "src/engine/jamgram.cpp" break; case 49: -#line 224 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pclass( yyvsp[-4].parse, yyvsp[-1].parse ); } -#line 1790 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 224 "src/engine/jamgram.y" + { yyval.parse = pclass( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1882 "src/engine/jamgram.cpp" break; case 50: -#line 225 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1796 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 225 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1888 "src/engine/jamgram.cpp" break; case 51: -#line 225 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1802 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 225 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1894 "src/engine/jamgram.cpp" break; case 52: -#line 226 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pwhile( yyvsp[-4].parse, yyvsp[-1].parse ); } -#line 1808 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 226 "src/engine/jamgram.y" + { yyval.parse = pwhile( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1900 "src/engine/jamgram.cpp" break; case 53: -#line 227 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 1814 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 227 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1906 "src/engine/jamgram.cpp" break; case 54: -#line 227 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PARAMS ); } -#line 1820 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 227 "src/engine/jamgram.y" + { yymode( SCAN_PARAMS ); } +#line 1912 "src/engine/jamgram.cpp" break; case 55: -#line 227 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1826 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 227 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1918 "src/engine/jamgram.cpp" break; case 56: -#line 228 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = psetc( yyvsp[-4].string, yyvsp[0].parse, yyvsp[-2].parse, yyvsp[-7].number ); } -#line 1832 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 228 "src/engine/jamgram.y" + { yyval.parse = psetc( yyvsp[-4].string, yyvsp[0].parse, yyvsp[-2].parse, yyvsp[-7].number ); } +#line 1924 "src/engine/jamgram.cpp" break; case 57: -#line 230 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pon( yyvsp[-1].parse, yyvsp[0].parse ); } -#line 1838 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 230 "src/engine/jamgram.y" + { yyval.parse = pon( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 1930 "src/engine/jamgram.cpp" break; case 58: -#line 232 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_STRING ); } -#line 1844 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 232 "src/engine/jamgram.y" + { yymode( SCAN_STRING ); } +#line 1936 "src/engine/jamgram.cpp" break; case 59: -#line 234 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 1850 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 234 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1942 "src/engine/jamgram.cpp" break; case 60: -#line 236 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = psete( yyvsp[-6].string,yyvsp[-5].parse,yyvsp[-2].string,yyvsp[-7].number ); } -#line 1856 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 236 "src/engine/jamgram.y" + { yyval.parse = psete( yyvsp[-6].string,yyvsp[-5].parse,yyvsp[-2].string,yyvsp[-7].number ); } +#line 1948 "src/engine/jamgram.cpp" break; case 61: -#line 244 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = ASSIGN_SET; } -#line 1862 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 244 "src/engine/jamgram.y" + { yyval.number = ASSIGN_SET; } +#line 1954 "src/engine/jamgram.cpp" break; case 62: -#line 246 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = ASSIGN_APPEND; } -#line 1868 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 246 "src/engine/jamgram.y" + { yyval.number = ASSIGN_APPEND; } +#line 1960 "src/engine/jamgram.cpp" break; case 63: -#line 248 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = ASSIGN_DEFAULT; } -#line 1874 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 248 "src/engine/jamgram.y" + { yyval.number = ASSIGN_DEFAULT; } +#line 1966 "src/engine/jamgram.cpp" break; case 64: -#line 250 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = ASSIGN_DEFAULT; } -#line 1880 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 250 "src/engine/jamgram.y" + { yyval.number = ASSIGN_DEFAULT; } +#line 1972 "src/engine/jamgram.cpp" break; case 65: -#line 257 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_EXISTS, yyvsp[0].parse, pnull() ); yymode( SCAN_COND ); } -#line 1886 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 257 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_EXISTS, yyvsp[0].parse, pnull() ); yymode( SCAN_COND ); } +#line 1978 "src/engine/jamgram.cpp" break; case 66: -#line 258 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1892 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 258 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1984 "src/engine/jamgram.cpp" break; case 67: -#line 259 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_EQUALS, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1898 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 259 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_EQUALS, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1990 "src/engine/jamgram.cpp" break; case 68: -#line 260 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1904 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 260 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1996 "src/engine/jamgram.cpp" break; case 69: -#line 261 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_NOTEQ, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1910 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 261 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_NOTEQ, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2002 "src/engine/jamgram.cpp" break; case 70: -#line 262 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1916 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 262 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2008 "src/engine/jamgram.cpp" break; case 71: -#line 263 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_LESS, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1922 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 263 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_LESS, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2014 "src/engine/jamgram.cpp" break; case 72: -#line 264 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1928 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 264 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2020 "src/engine/jamgram.cpp" break; case 73: -#line 265 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_LESSEQ, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1934 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 265 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_LESSEQ, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2026 "src/engine/jamgram.cpp" break; case 74: -#line 266 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1940 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 266 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2032 "src/engine/jamgram.cpp" break; case 75: -#line 267 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_MORE, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1946 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 267 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_MORE, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2038 "src/engine/jamgram.cpp" break; case 76: -#line 268 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1952 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 268 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2044 "src/engine/jamgram.cpp" break; case 77: -#line 269 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_MOREEQ, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1958 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 269 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_MOREEQ, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2050 "src/engine/jamgram.cpp" break; case 78: -#line 270 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1964 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 270 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2056 "src/engine/jamgram.cpp" break; case 79: -#line 271 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1970 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 271 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2062 "src/engine/jamgram.cpp" break; case 80: -#line 272 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1976 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 272 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2068 "src/engine/jamgram.cpp" break; case 81: -#line 273 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1982 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 273 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2074 "src/engine/jamgram.cpp" break; case 82: -#line 274 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 1988 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 274 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2080 "src/engine/jamgram.cpp" break; case 83: -#line 275 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 1994 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 275 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2086 "src/engine/jamgram.cpp" break; case 84: -#line 276 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 2000 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 276 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2092 "src/engine/jamgram.cpp" break; case 85: -#line 277 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); } -#line 2006 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 277 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2098 "src/engine/jamgram.cpp" break; case 86: -#line 278 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 2012 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 278 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2104 "src/engine/jamgram.cpp" break; case 87: -#line 279 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_IN, yyvsp[-3].parse, yyvsp[0].parse ); yymode( SCAN_COND ); } -#line 2018 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 279 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_IN, yyvsp[-3].parse, yyvsp[0].parse ); yymode( SCAN_COND ); } +#line 2110 "src/engine/jamgram.cpp" break; case 88: -#line 280 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 2024 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 280 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2116 "src/engine/jamgram.cpp" break; case 89: -#line 281 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = peval( EXPR_NOT, yyvsp[0].parse, pnull() ); } -#line 2030 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 281 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_NOT, yyvsp[0].parse, pnull() ); } +#line 2122 "src/engine/jamgram.cpp" break; case 90: -#line 282 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CONDB ); } -#line 2036 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 282 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 2128 "src/engine/jamgram.cpp" break; case 91: -#line 283 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[-1].parse; } -#line 2042 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 283 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; } +#line 2134 "src/engine/jamgram.cpp" break; case 92: -#line 294 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = P0; } -#line 2048 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 294 "src/engine/jamgram.y" + { yyval.parse = P0; } +#line 2140 "src/engine/jamgram.cpp" break; case 93: -#line 296 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pnode( yyvsp[-1].parse, yyvsp[0].parse ); } -#line 2054 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 296 "src/engine/jamgram.y" + { yyval.parse = pnode( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 2146 "src/engine/jamgram.cpp" break; case 94: -#line 299 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_CASE ); } -#line 2060 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 299 "src/engine/jamgram.y" + { yymode( SCAN_CASE ); } +#line 2152 "src/engine/jamgram.cpp" break; case 95: -#line 299 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_NORMAL ); } -#line 2066 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 299 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 2158 "src/engine/jamgram.cpp" break; case 96: -#line 300 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = psnode( yyvsp[-3].string, yyvsp[0].parse ); } -#line 2072 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 300 "src/engine/jamgram.y" + { yyval.parse = psnode( yyvsp[-3].string, yyvsp[0].parse ); } +#line 2164 "src/engine/jamgram.cpp" break; case 97: -#line 309 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pnode( P0, yyvsp[0].parse ); } -#line 2078 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 309 "src/engine/jamgram.y" + { yyval.parse = pnode( P0, yyvsp[0].parse ); } +#line 2170 "src/engine/jamgram.cpp" break; case 98: -#line 311 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pnode( yyvsp[0].parse, yyvsp[-2].parse ); } -#line 2084 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 311 "src/engine/jamgram.y" + { yyval.parse = pnode( yyvsp[0].parse, yyvsp[-2].parse ); } +#line 2176 "src/engine/jamgram.cpp" break; case 99: -#line 321 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; } -#line 2090 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 321 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 2182 "src/engine/jamgram.cpp" break; case 100: -#line 325 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pnull(); } -#line 2096 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 325 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 2188 "src/engine/jamgram.cpp" break; case 101: -#line 327 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pappend( yyvsp[-1].parse, yyvsp[0].parse ); } -#line 2102 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 327 "src/engine/jamgram.y" + { yyval.parse = pappend( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 2194 "src/engine/jamgram.cpp" break; case 102: -#line 331 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = plist( yyvsp[0].string ); } -#line 2108 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 331 "src/engine/jamgram.y" + { yyval.parse = plist( yyvsp[0].string ); } +#line 2200 "src/engine/jamgram.cpp" break; case 103: -#line 332 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = yymode( SCAN_CALL ); } -#line 2114 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 332 "src/engine/jamgram.y" + { yyval.number = yymode( SCAN_CALL ); } +#line 2206 "src/engine/jamgram.cpp" break; case 104: -#line 333 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[-1].parse; yymode( yyvsp[-2].number ); } -#line 2120 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 333 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; yymode( yyvsp[-2].number ); } +#line 2212 "src/engine/jamgram.cpp" break; case 105: -#line 341 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 2126 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 341 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2218 "src/engine/jamgram.cpp" break; case 106: -#line 342 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = prule( yyvsp[-2].string, yyvsp[0].parse ); } -#line 2132 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 342 "src/engine/jamgram.y" + { yyval.parse = prule( yyvsp[-2].string, yyvsp[0].parse ); } +#line 2224 "src/engine/jamgram.cpp" break; case 107: -#line 343 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 2138 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 343 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2230 "src/engine/jamgram.cpp" break; case 108: -#line 344 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pon( yyvsp[-3].parse, prule( yyvsp[-2].string, yyvsp[0].parse ) ); } -#line 2144 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 344 "src/engine/jamgram.y" + { yyval.parse = pon( yyvsp[-3].parse, prule( yyvsp[-2].string, yyvsp[0].parse ) ); } +#line 2236 "src/engine/jamgram.cpp" break; case 109: -#line 345 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 2150 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 345 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2242 "src/engine/jamgram.cpp" break; case 110: -#line 346 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pon( yyvsp[-3].parse, yyvsp[0].parse ); } -#line 2156 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 346 "src/engine/jamgram.y" + { yyval.parse = pon( yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2248 "src/engine/jamgram.cpp" break; case 111: -#line 356 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = 0; } -#line 2162 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 356 "src/engine/jamgram.y" + { yyval.number = 0; } +#line 2254 "src/engine/jamgram.cpp" break; case 112: -#line 358 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = yyvsp[-1].number | yyvsp[0].number; } -#line 2168 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 358 "src/engine/jamgram.y" + { yyval.number = yyvsp[-1].number | yyvsp[0].number; } +#line 2260 "src/engine/jamgram.cpp" break; case 113: -#line 362 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = EXEC_UPDATED; } -#line 2174 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 362 "src/engine/jamgram.y" + { yyval.number = EXEC_UPDATED; } +#line 2266 "src/engine/jamgram.cpp" break; case 114: -#line 364 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = EXEC_TOGETHER; } -#line 2180 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 364 "src/engine/jamgram.y" + { yyval.number = EXEC_TOGETHER; } +#line 2272 "src/engine/jamgram.cpp" break; case 115: -#line 366 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = EXEC_IGNORE; } -#line 2186 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 366 "src/engine/jamgram.y" + { yyval.number = EXEC_IGNORE; } +#line 2278 "src/engine/jamgram.cpp" break; case 116: -#line 368 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = EXEC_QUIETLY; } -#line 2192 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 368 "src/engine/jamgram.y" + { yyval.number = EXEC_QUIETLY; } +#line 2284 "src/engine/jamgram.cpp" break; case 117: -#line 370 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = EXEC_PIECEMEAL; } -#line 2198 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 370 "src/engine/jamgram.y" + { yyval.number = EXEC_PIECEMEAL; } +#line 2290 "src/engine/jamgram.cpp" break; case 118: -#line 372 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.number = EXEC_EXISTING; } -#line 2204 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 372 "src/engine/jamgram.y" + { yyval.number = EXEC_EXISTING; } +#line 2296 "src/engine/jamgram.cpp" break; case 119: -#line 381 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = pnull(); } -#line 2210 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 381 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 2302 "src/engine/jamgram.cpp" break; case 120: -#line 382 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yymode( SCAN_PUNCT ); } -#line 2216 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 382 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2308 "src/engine/jamgram.cpp" break; case 121: -#line 383 "src/engine/jamgram.y" /* yacc.c:1667 */ - { yyval.parse = yyvsp[0].parse; } -#line 2222 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 383 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 2314 "src/engine/jamgram.cpp" break; -#line 2226 "src/engine/jamgram.cpp" /* yacc.c:1667 */ +#line 2318 "src/engine/jamgram.cpp" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2285,7 +2378,7 @@ yyparse (void) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); if (!yymsg) { yymsg = yymsgbuf; @@ -2440,7 +2533,7 @@ yyparse (void) while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[+*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow diff --git a/src/engine/jamgram.hpp b/src/engine/jamgram.hpp index c2bbcb51f2..eb430d9f68 100644 --- a/src/engine/jamgram.hpp +++ b/src/engine/jamgram.hpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify From d618972c7f2a746f33afa0e5749d6b01581d147a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 19 Feb 2020 21:53:25 -0600 Subject: [PATCH 32/53] Add engine contrib info. [skip ci] --- CONTRIBUTING.adoc | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index f8fdb9c956..2d9d12d8f6 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1,4 +1,4 @@ -// Copyright 2019 Rene Rivera +// Copyright 2019-2020 Rene Rivera // Copyright 2003, 2006 Vladimir Prus // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or http://www.boost.org/LICENSE_1_0.txt) @@ -150,3 +150,30 @@ else # } ---- + +== ENGINE + +Developing in the `b2` engine, the C++ part, requires two steps to be +effective: building the "stable" engine, and developing the +"in-progress" engine. + +What is the "stable" engine is up to you. It only refers to a build of the +engine you know is at a good working state. When you are at a point the +source is stable you can run `bootstrap.sh/bat` from the root. That will +create the `b2` executable at the root. You can then use this version to run +regular B2 builds as needed both within the B2 tree and in other projects. + +The "in-progress" engine is whatever build you happen to be testing at the +moment. There are two ways to build this be engine. You can either +(a) run `b2 b2` at the root, or (b) run `build.sh/bat` in `src/engine`. + +Using (a) will place, by default, a fully debuggable `b2` in the `.build` +directories. You can run that one from a debugger with full symbols and +stepping features. This should be the first choice in developing in the +engine. + +After using (a) to implement functionality you can use (b) to fully test +that functionality. The engine built from (b) is fully optimized and +is the one used, by default, by the test system when running in the `test` +directory. Before submitting patches it's required to build this way and +run the tests in at least one toolset version (but preferably at least two). \ No newline at end of file From b02e4c4e506c171b9f3aa7c90a34531704beb111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Sat, 22 Feb 2020 22:24:06 +0100 Subject: [PATCH 33/53] Fix non-zero exit code on Jam parsing errors (#538) Prevent resetting the non-Zero status returned from yyanyerrors on any parsing errors. --- src/engine/jam.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine/jam.cpp b/src/engine/jam.cpp index ef69e22f19..b038df033f 100644 --- a/src/engine/jam.cpp +++ b/src/engine/jam.cpp @@ -275,6 +275,7 @@ int main( int argc, char * * argv, char * * arg_environ ) b2::system_info sys_info; saved_argv0 = argv[ 0 ]; + last_update_now_status = 0; BJAM_MEM_INIT(); @@ -650,6 +651,8 @@ int main( int argc, char * * argv, char * * arg_environ ) } status = yyanyerrors(); + if ( status && !last_update_now_status ) + last_update_now_status = status; /* Manually touch -t targets. */ for ( n = 0; ( s = getoptval( optv, 't', n ) ); ++n ) From e115f077295c2906617f6c31c7ccf748cd3de32f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 24 Feb 2020 22:10:15 -0600 Subject: [PATCH 34/53] Clean up build warnings (gcc & clang). --- src/engine/builtins.cpp | 12 ++- src/engine/class.cpp | 1 - src/engine/debugger.cpp | 124 +++++++--------------------- src/engine/execcmd.cpp | 2 +- src/engine/execcmd.h | 2 +- src/engine/execunix.cpp | 11 --- src/engine/filesys.cpp | 2 - src/engine/fileunix.cpp | 4 +- src/engine/function.cpp | 56 +++---------- src/engine/jam.cpp | 1 - src/engine/jam_strings.cpp | 18 +--- src/engine/lists.cpp | 6 +- src/engine/make1.cpp | 8 +- src/engine/modules/order.cpp | 1 - src/engine/modules/property-set.cpp | 1 - src/engine/modules/sequence.cpp | 1 - src/engine/scan.cpp | 1 - src/engine/timestamp.cpp | 52 ------------ src/engine/yyacc.cpp | 6 +- 19 files changed, 61 insertions(+), 248 deletions(-) diff --git a/src/engine/builtins.cpp b/src/engine/builtins.cpp index 9a008f644d..de31784b78 100644 --- a/src/engine/builtins.cpp +++ b/src/engine/builtins.cpp @@ -1227,13 +1227,15 @@ LIST * builtin_import( FRAME * frame, int flags ) source_iter = list_next( source_iter ), target_iter = list_next( target_iter ) ) { - RULE * r; - RULE * imported; + RULE * r = nullptr; + RULE * imported = nullptr; if ( !source_module->rules || !(r = (RULE *)hash_find( source_module->rules, list_item( source_iter ) ) ) ) + { unknown_rule( frame, "IMPORT", source_module, list_item( source_iter ) ); + } imported = import_rule( r, target_module, list_item( target_iter ) ); if ( !list_empty( localize ) ) @@ -1281,10 +1283,12 @@ LIST * builtin_export( FRAME * frame, int flags ) LISTITER const end = list_end( rules ); for ( ; iter != end; iter = list_next( iter ) ) { - RULE * r; + RULE * r = nullptr; if ( !m->rules || !( r = (RULE *)hash_find( m->rules, list_item( iter ) ) ) ) + { unknown_rule( frame, "EXPORT", m, list_item( iter ) ); + } r->exported = 1; } return L0; @@ -1989,7 +1993,7 @@ LIST *builtin_readlink( FRAME * frame, int flags ) { break; } - else if ( len < bufsize ) + else if ( size_t(len) < bufsize ) { buf[ len ] = '\0'; result = list_new( object_new( buf ) ); diff --git a/src/engine/class.cpp b/src/engine/class.cpp index ec71f93ad6..8d1727f101 100644 --- a/src/engine/class.cpp +++ b/src/engine/class.cpp @@ -129,7 +129,6 @@ OBJECT * make_class_module( LIST * xname, LIST * bases, FRAME * frame ) OBJECT * name = class_module_name( list_front( xname ) ); OBJECT * * pp; module_t * class_module = 0; - module_t * outer_module = frame->module; int found; if ( !classes ) diff --git a/src/engine/debugger.cpp b/src/engine/debugger.cpp index 66aa85cddc..40e9290b06 100644 --- a/src/engine/debugger.cpp +++ b/src/engine/debugger.cpp @@ -341,7 +341,6 @@ static OBJECT * get_filename( OBJECT * path ) PATHNAME path1[ 1 ]; string buf[ 1 ]; OBJECT * result; - const char * root = object_str( cwd() ); path_parse( object_str( path ), path1 ); path1->f_dir.ptr = NULL; path1->f_dir.len = 0; @@ -415,35 +414,6 @@ static void debug_print_source( OBJECT * filename, int line ) } } -static void debug_print_frame( FRAME * frame ) -{ - OBJECT * file = frame->file; - if ( file == NULL ) file = constant_builtin; - printf( "%s ", frame->rulename ); - if ( strcmp( frame->rulename, "module scope" ) != 0 ) - { - printf( "( " ); - if ( frame->args->count ) - { - lol_print( frame->args ); - printf( " " ); - } - printf( ") " ); - } - printf( "at %s:%d", object_str( file ), frame->line ); -} - -static void debug_mi_print_frame( FRAME * frame ) -{ - OBJECT * fullname = make_absolute_path( frame->file ); - printf( "frame={func=\"%s\",args=[],file=\"%s\",fullname=\"%s\",line=\"%d\"}", - frame->rulename, - object_str( frame->file ), - object_str( fullname ), - frame->line ); - object_free( fullname ); -} - static void debug_print_frame_info( FRAME_INFO * frame ) { OBJECT * file = frame->file; @@ -768,7 +738,6 @@ static void debug_child_info( int argc, const char * * argv ) { int frame_number = debug_selected_frame_number; int i; - OBJECT * fullname; FRAME base = *debug_frame; FRAME * frame = &base; base.file = debug_file; @@ -924,7 +893,7 @@ static void debug_parent_child_exited( int pid, int exit_code ) static void debug_parent_child_signalled( int pid, int sigid ) { - + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) { printf( "Child %d exited on signal %d\n", child_pid, sigid ); @@ -1071,7 +1040,7 @@ void debug_init_handles( const char * in, const char * out ) sscanf( in, "%p", &read_handle ); read_fd = _open_osfhandle( (intptr_t)read_handle, _O_RDONLY ); command_input = _fdopen( read_fd, "r" ); - + sscanf( out, "%p", &write_handle ); write_fd = _open_osfhandle( (intptr_t)write_handle, _O_WRONLY ); command_output = _fdopen( write_fd, "w" ); @@ -1221,7 +1190,6 @@ static void debug_start_child( int argc, const char * * argv ) int write_fd; int read_fd; int pid; - int i; assert( debug_state == DEBUG_NO_CHILD ); if (pipe(pipe1) == -1) { @@ -1538,7 +1506,7 @@ static void debug_parent_clear( int argc, const char * * argv ) { printf( "Deleted breakpoint %d\n", id ); } - + sprintf( buf, "%d", id ); new_args[ 0 ] = "delete"; new_args[ 1 ] = buf; @@ -1578,7 +1546,7 @@ static void debug_parent_backtrace( int argc, const char * * argv ) int depth; int i; FRAME_INFO frame; - + if ( debug_state == DEBUG_NO_CHILD ) { debug_error( "The program is not being run." ); @@ -1622,7 +1590,7 @@ static void debug_parent_quit( int argc, const char * * argv ) static const char * const help_text[][2] = { { - "run", + "run", "run \n" "Creates a new b2 child process passing on the command line." " Terminates\nthe current child (if any).\n" @@ -1834,7 +1802,7 @@ static void debug_mi_format_breakpoint( int id ) } /* fullname */ /* times */ - printf( "" ); + // printf( "" ); printf( "}" ); } @@ -1846,58 +1814,32 @@ static int breakpoint_id_parse( const char * name ) return id; } -static void debug_mi_break_after( int argc, const char * * argv ) -{ - int id; - int count; - --argc; - ++argv; - if ( argc > 0 && strcmp( argv[ 0 ], "--" ) == 0 ) - { - ++argv; - --argc; - } - if ( argc < 2 ) - { - debug_mi_error( "not enough arguments for -break-after." ); - return; - } - else if ( argc > 2 ) - { - debug_mi_error( "too many arguments for -break-after." ); - return; - } - id = atoi( argv[ 0 ] ); - count = atoi( argv[ 1 ] ); - /* FIXME: set ignore count */ -} - static void debug_mi_break_insert( int argc, const char * * argv ) { const char * inner_argv[ 2 ]; - int temporary = 0; /* FIXME: not supported yet */ - int hardware = 0; /* unsupported */ - int force = 1; /* We don't have global debug information... */ + // int temporary = 0; /* FIXME: not supported yet */ + // int hardware = 0; /* unsupported */ + // int force = 1; /* We don't have global debug information... */ int disabled = 0; - int tracepoint = 0; /* unsupported */ - int thread_id = 0; - int ignore_count = 0; - const char * condition; /* FIXME: not supported yet */ + // int tracepoint = 0; /* unsupported */ + // int thread_id = 0; + // int ignore_count = 0; + // const char * condition; /* FIXME: not supported yet */ const char * location; int id; for ( --argc, ++argv; argc; --argc, ++argv ) { if ( strcmp( *argv, "-t" ) == 0 ) { - temporary = 1; + // temporary = 1; } else if ( strcmp( *argv, "-h" ) == 0 ) { - hardware = 1; + // hardware = 1; } else if ( strcmp( *argv, "-f" ) == 0 ) { - force = 1; + // force = 1; } else if ( strcmp( *argv, "-d" ) == 0 ) { @@ -1905,7 +1847,7 @@ static void debug_mi_break_insert( int argc, const char * * argv ) } else if ( strcmp( *argv, "-a" ) == 0 ) { - tracepoint = 1; + // tracepoint = 1; } else if ( strcmp( *argv, "-c" ) == 0 ) { @@ -1915,7 +1857,7 @@ static void debug_mi_break_insert( int argc, const char * * argv ) return; } - condition = argv[ 1 ]; + // condition = argv[ 1 ]; --argc; ++argv; } @@ -1927,7 +1869,7 @@ static void debug_mi_break_insert( int argc, const char * * argv ) return; } - ignore_count = atoi( argv[ 1 ] ); + // ignore_count = atoi( argv[ 1 ] ); --argc; ++argv; } @@ -1939,7 +1881,7 @@ static void debug_mi_break_insert( int argc, const char * * argv ) return; } - thread_id = atoi( argv[ 1 ] ); + // thread_id = atoi( argv[ 1 ] ); --argc; ++argv; } @@ -2130,7 +2072,7 @@ static void debug_mi_break_list( int argc, const char * * argv ) debug_mi_error( "Too many arguments for -break-list" ); return; } - + number = 0; for ( i = 0; i < num_breakpoints; ++i ) if ( breakpoints[ i ].status != BREAKPOINT_DELETED ) @@ -2295,7 +2237,6 @@ static void debug_mi_stack_info_frame( int argc, const char * * argv ) static void debug_mi_stack_list_variables( int argc, const char * * argv ) { - int print_values = 0; #define DEBUG_PRINT_VARIABLES_NO_VALUES 1 #define DEBUG_PRINT_VARIABLES_ALL_VALUES 2 #define DEBUG_PRINT_VARIABLES_SIMPLE_VALUES 3 @@ -2317,15 +2258,15 @@ static void debug_mi_stack_list_variables( int argc, const char * * argv ) } else if ( strcmp( *argv, "--no-values" ) == 0 ) { - print_values = DEBUG_PRINT_VARIABLES_NO_VALUES; + // print_values = DEBUG_PRINT_VARIABLES_NO_VALUES; } else if ( strcmp( *argv, "--all-values" ) == 0 ) { - print_values = DEBUG_PRINT_VARIABLES_ALL_VALUES; + // print_values = DEBUG_PRINT_VARIABLES_ALL_VALUES; } else if ( strcmp( *argv, "--simple-values" ) == 0 ) { - print_values = DEBUG_PRINT_VARIABLES_SIMPLE_VALUES; + // print_values = DEBUG_PRINT_VARIABLES_SIMPLE_VALUES; } else if ( strcmp( *argv, "--" ) == 0 ) { @@ -2350,7 +2291,7 @@ static void debug_mi_stack_list_variables( int argc, const char * * argv ) printf( "^error,msg=\"Too many arguments for -stack-list-variables\"\n(gdb) \n" ); return; } - + { LIST * vars; LISTITER iter, end; @@ -2394,7 +2335,6 @@ static void debug_mi_stack_list_variables( int argc, const char * * argv ) static void debug_mi_stack_list_locals( int argc, const char * * argv ) { - int print_values = 0; #define DEBUG_PRINT_VARIABLES_NO_VALUES 1 #define DEBUG_PRINT_VARIABLES_ALL_VALUES 2 #define DEBUG_PRINT_VARIABLES_SIMPLE_VALUES 3 @@ -2422,15 +2362,15 @@ static void debug_mi_stack_list_locals( int argc, const char * * argv ) } else if ( strcmp( *argv, "--no-values" ) == 0 ) { - print_values = DEBUG_PRINT_VARIABLES_NO_VALUES; + // print_values = DEBUG_PRINT_VARIABLES_NO_VALUES; } else if ( strcmp( *argv, "--all-values" ) == 0 ) { - print_values = DEBUG_PRINT_VARIABLES_ALL_VALUES; + // print_values = DEBUG_PRINT_VARIABLES_ALL_VALUES; } else if ( strcmp( *argv, "--simple-values" ) == 0 ) { - print_values = DEBUG_PRINT_VARIABLES_SIMPLE_VALUES; + // print_values = DEBUG_PRINT_VARIABLES_SIMPLE_VALUES; } else if ( strcmp( *argv, "--" ) == 0 ) { @@ -2455,7 +2395,7 @@ static void debug_mi_stack_list_locals( int argc, const char * * argv ) printf( "^error,msg=\"Too many arguments for -stack-list-variables\"\n(gdb) \n" ); return; } - + { LIST * vars; LISTITER iter, end; @@ -2499,10 +2439,9 @@ static void debug_mi_stack_list_locals( int argc, const char * * argv ) static void debug_mi_stack_list_frames( int argc, const char * * argv ) { - const char * new_args[ 3 ]; int depth; int i; - + if ( debug_state == DEBUG_NO_CHILD ) { debug_mi_format_token(); @@ -2510,9 +2449,6 @@ static void debug_mi_stack_list_frames( int argc, const char * * argv ) return; } - new_args[ 0 ] = "info"; - new_args[ 1 ] = "frame"; - fprintf( command_output, "info depth\n" ); fflush( command_output ); depth = debug_int_read( command_child ); diff --git a/src/engine/execcmd.cpp b/src/engine/execcmd.cpp index 37584d50ed..8e6ec4f504 100644 --- a/src/engine/execcmd.cpp +++ b/src/engine/execcmd.cpp @@ -74,7 +74,7 @@ void argv_from_shell( char const * * argv, LIST * shell, char const * command, /* Returns whether the given command string contains lines longer than the given * maximum. */ -int check_cmd_for_too_long_lines( char const * command, int const max, +int check_cmd_for_too_long_lines( char const * command, size_t max, int * const error_length, int * const error_max_length ) { while ( *command ) diff --git a/src/engine/execcmd.h b/src/engine/execcmd.h index bea3df6e3d..b39e8ae2dc 100644 --- a/src/engine/execcmd.h +++ b/src/engine/execcmd.h @@ -109,7 +109,7 @@ int is_raw_command_request( LIST * shell ); /* Utility worker for exec_check() checking whether all the given command lines * are under the specified length limit. */ -int check_cmd_for_too_long_lines( char const * command, int const max, +int check_cmd_for_too_long_lines( char const * command, size_t max, int * const error_length, int * const error_max_length ); #endif diff --git a/src/engine/execunix.cpp b/src/engine/execunix.cpp index 26076dff90..2740743c71 100644 --- a/src/engine/execunix.cpp +++ b/src/engine/execunix.cpp @@ -184,7 +184,6 @@ void exec_cmd int const slot = get_free_cmdtab_slot(); int out[ 2 ]; int err[ 2 ]; - int len; char const * argv[ MAXARGC + 1 ]; /* +1 for NULL */ /* Initialize default shell. */ @@ -460,8 +459,6 @@ void exec_wait() while ( !finished ) { int i; - struct timeval tv; - struct timeval * ptv = NULL; int select_timeout = globs.timeout; /* Check for timeouts: @@ -485,14 +482,6 @@ void exec_wait() else if ( globs.timeout - consumed < select_timeout ) select_timeout = globs.timeout - consumed; } - - /* If nothing else causes our select() call to exit, force it after - * however long it takes for the next one of our child processes to - * crossed its allotted processing time so we can terminate it. - */ - tv.tv_sec = select_timeout; - tv.tv_usec = 0; - ptv = &tv; } /* select() will wait for I/O on a descriptor, a signal, or timeout. */ diff --git a/src/engine/filesys.cpp b/src/engine/filesys.cpp index f64eeb28e5..c4b0756dc4 100644 --- a/src/engine/filesys.cpp +++ b/src/engine/filesys.cpp @@ -634,8 +634,6 @@ int filelist_length( FILELIST * list ) void filelist_free( FILELIST * list ) { - FILELISTITER iter; - if ( filelist_empty( list ) ) return; while ( filelist_length( list ) ) filelist_pop_front( list ); diff --git a/src/engine/fileunix.cpp b/src/engine/fileunix.cpp index 50c2c67d67..4c1b6adf34 100644 --- a/src/engine/fileunix.cpp +++ b/src/engine/fileunix.cpp @@ -228,7 +228,6 @@ void file_archscan( char const * arch, scanback func, void * closure ) for ( ; iter != end ; iter = filelist_next( iter ) ) { file_info_t * member_file = filelist_item( iter ); - LIST * symbols = member_file->files; /* Construct member path: 'archive-path(member-name)' */ @@ -308,7 +307,8 @@ int file_collect_archive_content_( file_archive_info_t * const archive ) char * src; char * dest; - strncpy( lar_name, ar_hdr.ar_name, sizeof( ar_hdr.ar_name ) ); + size_t ar_hdr_name_size = sizeof( ar_hdr.ar_name ); // Workaround for sizeof strncpy warning. + strncpy( lar_name, ar_hdr.ar_name, ar_hdr_name_size ); sscanf( ar_hdr.ar_date, "%ld", &lar_date ); sscanf( ar_hdr.ar_size, "%ld", &lar_size ); diff --git a/src/engine/function.cpp b/src/engine/function.cpp index 8996f27058..805a5f5901 100644 --- a/src/engine/function.cpp +++ b/src/engine/function.cpp @@ -34,7 +34,7 @@ #ifndef FUNCTION_DEBUG_PROFILE #undef PROFILE_ENTER_LOCAL -#define PROFILE_ENTER_LOCAL(x) static int unused_LOCAL_##x = 0 +#define PROFILE_ENTER_LOCAL(x) while (false) #undef PROFILE_EXIT_LOCAL #define PROFILE_EXIT_LOCAL(x) #endif @@ -502,7 +502,6 @@ static LIST * function_call_member_rule( JAM_FUNCTION * function, FRAME * frame, int i; LIST * first = stack_pop( s ); LIST * result = L0; - LIST * trailing; RULE * rule; module_t * module; OBJECT * real_rulename = 0; @@ -773,31 +772,6 @@ static void var_edit_file( char const * in, string * out, VAR_EDITS * edits ) } -/* - * var_edit_translate_path() - translate path to os native format. - */ - -static void var_edit_translate_path( string * out, size_t pos, VAR_EDITS * edits ) -{ - if ( edits->to_windows ) - { - string result[ 1 ]; - int translated; - - /* Translate path to os native format. */ - translated = path_translate_to_os( out->value + pos, result ); - if ( translated ) - { - string_truncate( out, pos ); - string_append( out, result->value ); - edits->to_slashes = 0; - } - - string_free( result ); - } -} - - /* * var_edit_shift() - do upshift/downshift & other mods. */ @@ -2422,17 +2396,6 @@ static void adjust_result( compiler * c, int actual_location, assert( !"invalid result location" ); } -static char const * parse_type( PARSE * parse ) -{ - switch ( parse->type ) - { - case PARSE_APPEND: return "append"; - case PARSE_EVAL: return "eval"; - case PARSE_RULES: return "rules"; - default: return "unknown"; - } -} - static void compile_append_chain( PARSE * parse, compiler * c ) { assert( parse->type == PARSE_APPEND ); @@ -3135,7 +3098,6 @@ void argument_list_check( struct arg_list * formal, int formal_count, for ( j = 0; j < formal[ i ].size; ++j ) { struct argument * formal_arg = &formal[ i ].args[ j ]; - LIST * value; switch ( formal_arg->flags ) { @@ -3149,9 +3111,7 @@ void argument_list_check( struct arg_list * formal, int formal_count, actual_iter = list_next( actual_iter ); break; case ARG_OPTIONAL: - if ( actual_iter == actual_end ) - value = L0; - else + if ( actual_iter != actual_end ) { type_check_range( formal_arg->type_name, actual_iter, list_next( actual_iter ), frame, function, @@ -3851,11 +3811,15 @@ struct align_expansion_item expansion_item e; }; -static char check_align_var_edits[ sizeof(struct align_var_edits) <= sizeof(VAR_EDITS) + sizeof(void *) ? 1 : -1 ]; -static char check_align_expansion_item[ sizeof(struct align_expansion_item) <= sizeof(expansion_item) + sizeof(void *) ? 1 : -1 ]; +static_assert( + sizeof(struct align_var_edits) <= sizeof(VAR_EDITS) + sizeof(void *), + "sizeof(struct align_var_edits) <= sizeof(VAR_EDITS) + sizeof(void *)" ); +static_assert( + sizeof(struct align_expansion_item) <= sizeof(expansion_item) + sizeof(void *), + "sizeof(struct align_expansion_item) <= sizeof(expansion_item) + sizeof(void *)" ); -static char check_ptr_size1[ sizeof(LIST *) <= sizeof(void *) ? 1 : -1 ]; -static char check_ptr_size2[ sizeof(char *) <= sizeof(void *) ? 1 : -1 ]; +static_assert( sizeof(LIST *) <= sizeof(void *), "sizeof(LIST *) <= sizeof(void *)" ); +static_assert( sizeof(char *) <= sizeof(void *), "sizeof(char *) <= sizeof(void *)" ); void function_run_actions( FUNCTION * function, FRAME * frame, STACK * s, string * out ) diff --git a/src/engine/jam.cpp b/src/engine/jam.cpp index b038df033f..255f500b59 100644 --- a/src/engine/jam.cpp +++ b/src/engine/jam.cpp @@ -265,7 +265,6 @@ int main( int argc, char * * argv, char * * arg_environ ) int n; char * s; struct bjam_option optv[ N_OPTS ]; - char const * all = "all"; int status; int arg_c = argc; char * * arg_v = argv; diff --git a/src/engine/jam_strings.cpp b/src/engine/jam_strings.cpp index 01d39469d3..5094c5e2b2 100644 --- a/src/engine/jam_strings.cpp +++ b/src/engine/jam_strings.cpp @@ -74,7 +74,8 @@ static void string_reserve_internal( string * self, size_t capacity ) self->value = (char *)BJAM_MALLOC_ATOMIC( capacity + JAM_STRING_MAGIC_SIZE ); self->value[ 0 ] = 0; - strncat( self->value, self->opt, sizeof(self->opt) ); + size_t opt_size = sizeof(self->opt); // Workaround sizeof in strncat warning. + strncat( self->value, self->opt, opt_size ); assert( strlen( self->value ) <= self->capacity && "Regression test" ); } else @@ -99,19 +100,6 @@ void string_reserve( string * self, size_t capacity ) } -static void extend_full( string * self, char const * start, char const * finish ) -{ - size_t new_size = self->capacity + ( finish - start ); - size_t new_capacity = self->capacity; - size_t old_size = self->capacity; - while ( new_capacity < new_size + 1) - new_capacity <<= 1; - string_reserve_internal( self, new_capacity ); - memcpy( self->value + old_size, start, new_size - old_size ); - self->value[ new_size ] = 0; - self->size = new_size; -} - static void maybe_reserve( string * self, size_t new_size ) { size_t capacity = self->capacity; @@ -203,7 +191,7 @@ void string_unit_test() { { string s[ 1 ]; - int i; + unsigned int i; int const limit = sizeof( s->opt ) * 2 + 2; string_new( s ); assert( s->value == s->opt ); diff --git a/src/engine/lists.cpp b/src/engine/lists.cpp index 065145e009..af602b504b 100644 --- a/src/engine/lists.cpp +++ b/src/engine/lists.cpp @@ -64,7 +64,7 @@ LIST * list_append( LIST * l, LIST * nl ) return nl; if ( !list_empty( nl ) ) { - int const l_size = list_length( l ); + unsigned int const l_size = list_length( l ); int const nl_size = list_length( nl ); int const size = l_size + nl_size; unsigned const bucket = get_bucket( size ); @@ -112,7 +112,6 @@ LIST * list_new( OBJECT * value ) LIST * list_push_back( LIST * head, OBJECT * value ) { unsigned int size = list_length( head ); - unsigned int i; if ( DEBUG_LISTS ) out_printf( "list > %s <\n", object_str( value ) ); @@ -199,7 +198,6 @@ static int str_ptr_compare( void const * va, void const * vb ) LIST * list_sort( LIST * l ) { int len; - int ii; LIST * result; if ( !l ) @@ -367,7 +365,7 @@ LIST * list_unique( LIST * sorted_list ) void list_done() { - int i; + unsigned int i; for ( i = 0; i < sizeof( freelist ) / sizeof( freelist[ 0 ] ); ++i ) { LIST * l = freelist[ i ]; diff --git a/src/engine/make1.cpp b/src/engine/make1.cpp index c5d3f59557..61f0614a1a 100644 --- a/src/engine/make1.cpp +++ b/src/engine/make1.cpp @@ -62,8 +62,6 @@ static CMD * make1cmds ( TARGET * ); static LIST * make1list ( LIST *, TARGETS *, int flags ); static SETTINGS * make1settings ( struct module_t *, LIST * vars ); static void make1bind ( TARGET * ); -static TARGET * make1findcycle ( TARGET * ); -static void make1breakcycle( TARGET *, TARGET * cycle_root ); static void push_cmds( CMDLIST * cmds, int status ); static int cmd_sem_lock( TARGET * t ); static void cmd_sem_unlock( TARGET * t ); @@ -205,7 +203,7 @@ int make1( LIST * targets ) int status = 0; memset( (char *)counts, 0, sizeof( *counts ) ); - + { LISTITER iter, end; stack temp_stack = { NULL }; @@ -598,8 +596,6 @@ static void make1c( state const * const pState ) } else { - ACTIONS * actions; - /* Tally success/failure for those we tried to update. */ if ( t->progress == T_MAKE_RUNNING ) { @@ -884,7 +880,6 @@ static void make1c_closure CMD * const cmd = (CMD *)t->cmds; char const * rule_name = 0; char const * target_name = 0; - int print_buffer = 0; assert( cmd ); @@ -1287,7 +1282,6 @@ static CMD * make1cmds( TARGET * t ) TARGET * sem = targets_iter->target->semaphore; if ( sem ) { - TARGETS * semiter; if ( ! targets_contains( semaphores, sem ) ) semaphores = targetentry( semaphores, sem ); } diff --git a/src/engine/modules/order.cpp b/src/engine/modules/order.cpp index c5ebeba06a..38209b889d 100644 --- a/src/engine/modules/order.cpp +++ b/src/engine/modules/order.cpp @@ -127,7 +127,6 @@ LIST * order( FRAME * frame, int flags ) { int i; LISTITER iter = list_begin( arg ); - LISTITER const end = list_end( arg ); for ( i = 0; i < order[ index ]; ++i, iter = list_next( iter ) ); result = list_push_back( result, object_copy( list_item( iter ) ) ); } diff --git a/src/engine/modules/property-set.cpp b/src/engine/modules/property-set.cpp index 20b37694f4..4008597237 100644 --- a/src/engine/modules/property-set.cpp +++ b/src/engine/modules/property-set.cpp @@ -267,7 +267,6 @@ LIST * property_set_contains_features( FRAME * frame, int flags ) OBJECT * varname = object_new( "self.raw" ); LIST * props = var_get( frame->module, varname ); LIST * features = lol_get( frame->args, 0 ); - LIST * result = L0; LISTITER features_iter = list_begin( features ); LISTITER features_end = list_end( features ) ; object_free( varname ); diff --git a/src/engine/modules/sequence.cpp b/src/engine/modules/sequence.cpp index 08ed305994..cece2cd5b2 100644 --- a/src/engine/modules/sequence.cpp +++ b/src/engine/modules/sequence.cpp @@ -43,7 +43,6 @@ LIST * sequence_select_highest_ranked( FRAME * frame, int flags ) LISTITER iter = list_begin( rank ); LISTITER const end = list_end( rank ); LISTITER elements_iter = list_begin( elements ); - LISTITER const elements_end = list_end( elements ); for ( ; iter != end; iter = list_next( iter ), elements_iter = list_next( elements_iter ) ) if ( atoi( object_str( list_item( iter ) ) ) == highest_rank ) diff --git a/src/engine/scan.cpp b/src/engine/scan.cpp index 9ca3310c69..37fc5a1dc3 100644 --- a/src/engine/scan.cpp +++ b/src/engine/scan.cpp @@ -237,7 +237,6 @@ int yypeek() #define yyprev() ( incp->string-- ) static int use_new_scanner = 0; -static int expect_whitespace; #define yystartkeyword() if(use_new_scanner) break; else token_warning() #define yyendkeyword() if(use_new_scanner) break; else if ( 1 ) { expect_whitespace = 1; continue; } else (void)0 diff --git a/src/engine/timestamp.cpp b/src/engine/timestamp.cpp index c998730bed..af9779fa53 100644 --- a/src/engine/timestamp.cpp +++ b/src/engine/timestamp.cpp @@ -19,8 +19,6 @@ * timestamp_done() - free timestamp tables * * Internal routines: - * time_enter() - internal worker callback for scanning archives & - * directories * free_timestamps() - worker function for freeing timestamp table contents */ @@ -60,18 +58,6 @@ typedef struct _binding static struct hash * bindhash = 0; -static void time_enter( void *, OBJECT *, int const found, - timestamp const * const ); - -static const char * time_progress[] = -{ - "INIT", - "NOENTRY", - "SPOTTED", - "MISSING", - "FOUND" -}; - #ifdef OS_NT /* @@ -162,13 +148,6 @@ void timestamp_from_path( timestamp * const time, OBJECT * const path ) { PROFILE_ENTER( timestamp ); - PATHNAME f1; - PATHNAME f2; - int found; - BINDING * b; - string buf[ 1 ]; - - if ( file_time( path, time ) < 0 ) timestamp_clear( time ); @@ -218,37 +197,6 @@ char const * timestamp_timestr( timestamp const * const time ) } -/* - * time_enter() - internal worker callback for scanning archives & directories - */ - -static void time_enter( void * closure, OBJECT * target, int const found, - timestamp const * const time ) -{ - int item_found; - BINDING * b; - struct hash * const bindhash = (struct hash *)closure; - - target = path_as_key( target ); - - b = (BINDING *)hash_insert( bindhash, target, &item_found ); - if ( !item_found ) - { - b->name = object_copy( target ); - b->flags = 0; - } - - timestamp_copy( &b->time, time ); - b->progress = found ? BIND_FOUND : BIND_SPOTTED; - - if ( DEBUG_BINDSCAN ) - out_printf( "time ( %s ) : %s\n", object_str( target ), time_progress[ - b->progress ] ); - - object_free( target ); -} - - /* * free_timestamps() - worker function for freeing timestamp table contents */ diff --git a/src/engine/yyacc.cpp b/src/engine/yyacc.cpp index b5efc96b55..1ff3223f0e 100644 --- a/src/engine/yyacc.cpp +++ b/src/engine/yyacc.cpp @@ -196,13 +196,13 @@ int main(int argc, char ** argv) return result; } -static char * usage[] = { +static const char * usage[] = { "yyacc ", 0 }; void print_usage() { - char ** u; + const char ** u; for (u = usage; *u != 0; ++u) { fputs(*u,stderr); putc('\n',stderr); @@ -220,7 +220,7 @@ char * copy_string(char * s, int l) char * tokenize_string(char * s) { char * result; - char * literal = s; + const char * literal = s; int l; int c; From b971027dd4379d7790e8cc4cb82a2099e50e629d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 24 Feb 2020 22:39:45 -0600 Subject: [PATCH 35/53] Test we stay warning free in engine. --- azure-pipelines.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 604164fd52..f8afcf40a9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -148,6 +148,12 @@ stages: python test_all.py ${TEST_TOOLSET} cd .. displayName: Test + - bash: | + set -e + CXX_PATH=`which ${CXX}` + echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam + ./src/engine/b2 b2 warnings-as-errors=on toolset=${TEST_TOOLSET} + displayName: "No Warnings" - bash: | set -e CXX_PATH=`which ${CXX}` @@ -196,6 +202,12 @@ stages: python test_all.py $env:TEST_TOOLSET cd .. displayName: Test + - powershell: | + $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH + $env:path += ';' + $env:CXX_PATH + echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam + ./src/engine/b2.exe b2 warnings-as-errors=on toolset=${TEST_TOOLSET} + displayName: "No Warnings" - powershell: | $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH @@ -339,6 +351,12 @@ stages: python test_all.py ${TEST_TOOLSET} cd .. displayName: Test + - bash: | + set -e + CXX_PATH=`which ${CXX}` + echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam + ./src/engine/b2 b2 warnings-as-errors=on toolset=${TEST_TOOLSET} + displayName: "No Warnings" - bash: | set -e CXX_PATH=`which ${CXX}` From 7eab8ce45d8c1567fad002518d50ad3359406e10 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 25 Feb 2020 09:21:15 -0600 Subject: [PATCH 36/53] Check for ability to gen grammar. Avoid errors when building on system without the needed bison generator. By checking that it exists and otherwise using the existing grammar. --- Jamroot.jam | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index fe5aefaa3f..baf469c2ef 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -16,6 +16,7 @@ import indirect ; import "class" : new ; import type ; import virtual-target ; +import errors ; path-constant SELF : . ; @@ -73,11 +74,13 @@ explicit jamgram.y ; Define grammar translation with Bison. |# +local BISON = [ os.environ BISON ] ; +BISON ?= bison ; +local BISON_IN_PATH = [ path.glob [ os.executable-path ] : $(BISON[1]) $(BISON[1]).* ] ; + rule grammar ( target : source : properties * ) { # LOCATE on $(target) = $(source:D) ; - local BISON = [ os.environ BISON ] ; - BISON ?= bison ; BISON on $(target) = $(BISON) ; } @@ -86,11 +89,20 @@ actions grammar "$(BISON)" --yacc --defines -o "$(<[1])" "$(>)" } -make jamgram.cpp - : src/engine/jamgram.y - : @grammar - : jamgram.y - src/engine ; +if $(BISON_IN_PATH) +{ + make jamgram.cpp + : src/engine/jamgram.y + : @grammar + : jamgram.y + src/engine ; +} +else +{ + errors.warning "Bison generator program '$(BISON:J= )' not found. Skipping grammar build." ; + alias jamgram.cpp + : src/engine/jamgram.cpp ; +} explicit jamgram.cpp ; #| From 1d42fed9b26abc78e06659fb3a8e2c0b9de22257 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 25 Feb 2020 09:31:25 -0600 Subject: [PATCH 37/53] Need c++11 specified for older compilers. --- Jamroot.jam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jamroot.jam b/Jamroot.jam index baf469c2ef..ccc84f2d51 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -22,6 +22,7 @@ path-constant SELF : . ; project b2 : build-dir .build + : requirements 11 ; #| @@ -74,7 +75,7 @@ explicit jamgram.y ; Define grammar translation with Bison. |# -local BISON = [ os.environ BISON ] ; +BISON = [ os.environ BISON ] ; BISON ?= bison ; local BISON_IN_PATH = [ path.glob [ os.executable-path ] : $(BISON[1]) $(BISON[1]).* ] ; From 88361336a7763efc128828d4947d909470d1d57c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 25 Feb 2020 09:52:17 -0600 Subject: [PATCH 38/53] Fix missing test_toolset env refs for powershell. --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f8afcf40a9..068989e0c7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -206,14 +206,14 @@ stages: $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam - ./src/engine/b2.exe b2 warnings-as-errors=on toolset=${TEST_TOOLSET} + ./src/engine/b2.exe b2 warnings-as-errors=on toolset=$env:TEST_TOOLSET displayName: "No Warnings" - powershell: | $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam ./bootstrap.bat - ./b2.exe --prefix=./.b2 install ${TEST_TOOLSET} + ./b2.exe --prefix=./.b2 install $env:TEST_TOOLSET displayName: Bootstrap - job: 'macOS' From 391939c93b966c2b083230a1b093ba017f9d79bc Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 25 Feb 2020 10:28:38 -0600 Subject: [PATCH 39/53] Avoid MSVC secure, and one more un/signed warning. --- Jamroot.jam | 4 +++- src/engine/jam_strings.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index ccc84f2d51..b22b8e9d69 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -22,7 +22,9 @@ path-constant SELF : . ; project b2 : build-dir .build - : requirements 11 + : requirements + 11 + msvc:_CRT_SECURE_NO_WARNINGS=1 ; #| diff --git a/src/engine/jam_strings.cpp b/src/engine/jam_strings.cpp index 5094c5e2b2..c9ed8a17f0 100644 --- a/src/engine/jam_strings.cpp +++ b/src/engine/jam_strings.cpp @@ -191,8 +191,8 @@ void string_unit_test() { { string s[ 1 ]; - unsigned int i; - int const limit = sizeof( s->opt ) * 2 + 2; + unsigned long i; + unsigned long const limit = sizeof( s->opt ) * 2 + 2; string_new( s ); assert( s->value == s->opt ); for ( i = 0; i < limit; ++i ) From 66869d10e5c76584cf8db4ec06acd0c3cec078e3 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 25 Feb 2020 11:19:15 -0600 Subject: [PATCH 40/53] Try and get rid of more msvc deprecation warnings. --- Jamroot.jam | 1 + 1 file changed, 1 insertion(+) diff --git a/Jamroot.jam b/Jamroot.jam index b22b8e9d69..278c9bcfa3 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -25,6 +25,7 @@ project b2 : requirements 11 msvc:_CRT_SECURE_NO_WARNINGS=1 + msvc:_CRT_NONSTDC_NO_DEPRECATE=1 ; #| From 520ebfd0bf65bb83412c85c0a0e028049ee684ec Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 26 Feb 2020 14:36:54 -0600 Subject: [PATCH 41/53] Remove some warnings on NT/Windows. --- src/engine/builtins.cpp | 7 +++---- src/engine/debugger.cpp | 16 +++++++++------- src/engine/execnt.cpp | 20 ++++++++++---------- src/engine/filent.cpp | 7 +++---- src/engine/pathnt.cpp | 2 +- src/engine/w32_getreg.cpp | 4 ++-- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/engine/builtins.cpp b/src/engine/builtins.cpp index de31784b78..eb6af8c823 100644 --- a/src/engine/builtins.cpp +++ b/src/engine/builtins.cpp @@ -1952,7 +1952,7 @@ LIST *builtin_readlink( FRAME * frame, int flags ) int length = buf.reparse.SymbolicLinkReparseBuffer.SubstituteNameLength / 2; char cbuf[MAX_PATH + 1]; int numchars = WideCharToMultiByte( CP_ACP, 0, buf.reparse.SymbolicLinkReparseBuffer.PathBuffer + index, length, cbuf, sizeof(cbuf), NULL, NULL ); - if( numchars >= sizeof(cbuf) ) + if( numchars >= int(sizeof(cbuf)) ) { return 0; } @@ -1966,7 +1966,7 @@ LIST *builtin_readlink( FRAME * frame, int flags ) char cbuf[MAX_PATH + 1]; const char * result; int numchars = WideCharToMultiByte( CP_ACP, 0, buf.reparse.MountPointReparseBuffer.PathBuffer + index, length, cbuf, sizeof(cbuf), NULL, NULL ); - if( numchars >= sizeof(cbuf) ) + if( numchars >= int(sizeof(cbuf)) ) { return 0; } @@ -2690,7 +2690,6 @@ LIST * builtin_glob_archive( FRAME * frame, int flags ) { LIST * const l = lol_get( frame->args, 0 ); LIST * const r1 = lol_get( frame->args, 1 ); - LIST * const r2 = lol_get( frame->args, 2 ); LIST * const r3 = lol_get( frame->args, 3 ); LISTITER iter; @@ -2705,7 +2704,7 @@ LIST * builtin_glob_archive( FRAME * frame, int flags ) # if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_VMS ) l; /* Always case-insensitive. */ # else - r2; + lol_get( frame->args, 2 ); // r2 # endif if ( globbing.case_insensitive ) diff --git a/src/engine/debugger.cpp b/src/engine/debugger.cpp index 40e9290b06..f3642ca310 100644 --- a/src/engine/debugger.cpp +++ b/src/engine/debugger.cpp @@ -891,18 +891,20 @@ static void debug_parent_child_exited( int pid, int exit_code ) } } -static void debug_parent_child_signalled( int pid, int sigid ) +#if !NT + +static void debug_parent_child_signalled( int pid, int id ) { if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) { - printf( "Child %d exited on signal %d\n", child_pid, sigid ); + printf( "Child %d exited on signal %d\n", child_pid, id ); } else if ( debug_interface == DEBUG_INTERFACE_MI ) { const char * name = "unknown"; const char * meaning = "unknown"; - switch( sigid ) + switch( id ) { case SIGINT: name = "SIGINT"; meaning = "Interrupt"; break; } @@ -914,6 +916,8 @@ static void debug_parent_child_signalled( int pid, int sigid ) } } +#endif + static void debug_parent_on_breakpoint( void ) { FRAME_INFO base; @@ -1055,8 +1059,6 @@ void debug_init_handles( const char * in, const char * out ) static void init_parent_handles( HANDLE out, HANDLE in ) { - int read_fd, write_fd; - command_child = _fdopen( _open_osfhandle( (intptr_t)in, _O_RDONLY ), "r" ); command_output = _fdopen( _open_osfhandle( (intptr_t)out, _O_WRONLY ), "w" ); } @@ -1107,12 +1109,12 @@ static void debug_start_child( int argc, const char * * argv ) assert( debug_state == DEBUG_NO_CHILD ); if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) ) { - printf("internal error: CreatePipe:1: 0x$08x\n", GetLastError()); + printf("internal error: CreatePipe:1: 0x%08x\n", GetLastError()); return; } if ( ! CreatePipe( &pipe2[ 0 ], &pipe2[ 1 ], &sa, 0 ) ) { - printf("internal error: CreatePipe:2: 0x$08x\n", GetLastError()); + printf("internal error: CreatePipe:2: 0x%08x\n", GetLastError()); CloseHandle( pipe1[ 0 ] ); CloseHandle( pipe1[ 1 ] ); return; diff --git a/src/engine/execnt.cpp b/src/engine/execnt.cpp index f3a2610361..5852fd1b8a 100644 --- a/src/engine/execnt.cpp +++ b/src/engine/execnt.cpp @@ -174,7 +174,7 @@ void execnt_unit_test() * Use a table instead. */ { - typedef struct test { char * command; int result; } test; + typedef struct test { const char * command; int result; } test; test tests[] = { { "", 0 }, { " ", 0 }, @@ -279,7 +279,7 @@ int exec_check /* Check prerequisites for executing raw commands. */ if ( is_raw_command_request( *pShell ) ) { - int const raw_cmd_length = raw_command_length( command->value ); + long const raw_cmd_length = raw_command_length( command->value ); if ( raw_cmd_length < 0 ) { /* Invalid characters detected - fallback to default shell. */ @@ -342,6 +342,7 @@ void exec_cmd shell = default_shell; if ( DEBUG_EXECCMD ) + { if ( is_raw_cmd ) out_printf( "Executing raw command directly\n" ); else @@ -350,6 +351,7 @@ void exec_cmd list_print( shell ); out_printf( "\n" ); } + } /* If we are running a raw command directly - trim its leading whitespaces * as well as any trailing all-whitespace lines but keep any trailing @@ -367,7 +369,7 @@ void exec_cmd end = p; string_new( cmd_local ); string_append_range( cmd_local, start, end ); - assert( cmd_local->size == raw_command_length( cmd_orig->value ) ); + assert( long(cmd_local->size) == raw_command_length( cmd_orig->value ) ); } /* If we are not running a raw command directly, prepare a command file to * be executed using an external shell and the actual command string using @@ -767,7 +769,7 @@ static void read_pipe { DWORD bytesInBuffer = 0; DWORD bytesAvailable = 0; - int i; + DWORD i; for (;;) { @@ -840,7 +842,6 @@ static void CALLBACK try_wait_callback( void * data, BOOLEAN is_timeout ) static int try_wait_impl( DWORD timeout ) { int job_index; - int timed_out; int res = WaitForSingleObject( process_queue.read_okay, timeout ); if ( res != WAIT_OBJECT_0 ) return -1; @@ -853,7 +854,6 @@ static void register_wait( int job_id ) { if ( globs.jobs > MAXIMUM_WAIT_OBJECTS ) { - HANDLE ignore; RegisterWaitForSingleObject( &cmdtab[ job_id ].wait_handle, cmdtab[ job_id ].pi.hProcess, &try_wait_callback, &cmdtab[ job_id ], INFINITE, @@ -1201,7 +1201,7 @@ static FILE * open_command_file( int const slot ) string_new( command_file ); string_reserve( command_file, tmpdir->size + 64 ); command_file->size = sprintf( command_file->value, - "%s\\jam%d-%02d-##.bat", tmpdir->value, procID, slot ); + "%s\\jam%ul-%02d-##.bat", tmpdir->value, procID, slot ); } /* For some reason opening a command file can fail intermittently. But doing @@ -1314,7 +1314,7 @@ static void reportWindowsError( char const * const apiName, int slot ) (LPSTR)&errorMessage, /* __out LPTSTR lpBuffer */ 0, /* __in DWORD nSize */ 0 ); /* __in_opt va_list * Arguments */ - + /* Build a message as if the process had written to stderr. */ if ( globs.pipe_action ) err_buf = cmdtab[ slot ].buffer_err; @@ -1322,7 +1322,7 @@ static void reportWindowsError( char const * const apiName, int slot ) err_buf = cmdtab[ slot ].buffer_out; string_append( err_buf, apiName ); string_append( err_buf, "() Windows API failed: " ); - sprintf( buf, "%d", errorCode ); + sprintf( buf, "%ul", errorCode ); string_append( err_buf, buf ); if ( !apiResult ) @@ -1347,7 +1347,7 @@ static void reportWindowsError( char const * const apiName, int slot ) (*cmdtab[ slot ].func)( cmdtab[ slot ].closure, EXEC_CMD_FAIL, &time, cmdtab[ slot ].buffer_out->value, cmdtab[ slot ].buffer_err->value, EXIT_OK ); - + /* Clean up any handles that were opened. */ closeWinHandle( &cmdtab[ slot ].pi.hProcess ); closeWinHandle( &cmdtab[ slot ].pi.hThread ); diff --git a/src/engine/filent.cpp b/src/engine/filent.cpp index 717508ba0d..70db691528 100644 --- a/src/engine/filent.cpp +++ b/src/engine/filent.cpp @@ -372,7 +372,6 @@ void file_archscan( char const * arch, scanback func, void * closure ) for ( ; iter != end ; iter = filelist_next( iter ) ) { file_info_t * member_file = filelist_item( iter ); - LIST * symbols = member_file->files; /* Construct member path: 'archive-path(member-name)' */ @@ -481,13 +480,13 @@ int file_collect_archive_content_( file_archive_info_t * const archive ) /* strip leading directory names, an NT specialty */ { char * c; - if ( c = strrchr( name, '/' ) ) + if ( (c = strrchr( name, '/' )) != nullptr ) name = c + 1; - if ( c = strrchr( name, '\\' ) ) + if ( (c = strrchr( name, '\\' )) != nullptr ) name = c + 1; } - sprintf( buf, "%.*s", endname - name, name ); + sprintf( buf, "%.*s", int(endname - name), name ); if ( strcmp( buf, "") != 0 ) { diff --git a/src/engine/pathnt.cpp b/src/engine/pathnt.cpp index bde5cd0b8e..5bc9c74a2c 100644 --- a/src/engine/pathnt.cpp +++ b/src/engine/pathnt.cpp @@ -130,7 +130,7 @@ static int canonicWindowsPath( char const * const path, int const path_length, /* Special case '\' && 'D:\' - include trailing '\'. */ if ( p == path || - p == path + 2 && path[ 1 ] == ':' ) + (p == path + 2 && path[ 1 ] == ':') ) ++p; missing_parent = 0; diff --git a/src/engine/w32_getreg.cpp b/src/engine/w32_getreg.cpp index 15c0c947d0..5b09b8a6e0 100644 --- a/src/engine/w32_getreg.cpp +++ b/src/engine/w32_getreg.cpp @@ -81,7 +81,7 @@ LIST * builtin_system_registry( FRAME * frame, int flags ) case REG_EXPAND_SZ: { - long len; + unsigned long len; string expanded[1]; string_new(expanded); @@ -112,7 +112,7 @@ LIST * builtin_system_registry( FRAME * frame, int flags ) case REG_DWORD: { char buf[100]; - sprintf( buf, "%u", *(PDWORD)data ); + sprintf( buf, "%lu", *(PDWORD)data ); result = list_push_back( result, object_new(buf) ); } break; From 4077c4fe41026f8a40b048bda853de1935d13bad Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 26 Feb 2020 16:25:43 -0600 Subject: [PATCH 42/53] More Windows build warning removal. --- src/engine/debugger.cpp | 4 ++-- src/engine/execnt.cpp | 13 +++++-------- src/engine/timestamp.cpp | 5 +++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/engine/debugger.cpp b/src/engine/debugger.cpp index f3642ca310..54343a036d 100644 --- a/src/engine/debugger.cpp +++ b/src/engine/debugger.cpp @@ -1109,12 +1109,12 @@ static void debug_start_child( int argc, const char * * argv ) assert( debug_state == DEBUG_NO_CHILD ); if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) ) { - printf("internal error: CreatePipe:1: 0x%08x\n", GetLastError()); + printf("internal error: CreatePipe:1: 0x%08lx\n", GetLastError()); return; } if ( ! CreatePipe( &pipe2[ 0 ], &pipe2[ 1 ], &sa, 0 ) ) { - printf("internal error: CreatePipe:2: 0x%08x\n", GetLastError()); + printf("internal error: CreatePipe:2: 0x%08lx\n", GetLastError()); CloseHandle( pipe1[ 0 ] ); CloseHandle( pipe1[ 1 ] ); return; diff --git a/src/engine/execnt.cpp b/src/engine/execnt.cpp index 5852fd1b8a..44921740c2 100644 --- a/src/engine/execnt.cpp +++ b/src/engine/execnt.cpp @@ -55,6 +55,7 @@ #include #include #include +#include /* get the maximum shell command line length according to the OS */ @@ -568,12 +569,8 @@ static void invoke_cmd( char const * const command, int const slot ) static int raw_maxline() { - OSVERSIONINFO os_info; - os_info.dwOSVersionInfoSize = sizeof( os_info ); - GetVersionEx( &os_info ); - - if ( os_info.dwMajorVersion >= 5 ) return 8191; /* XP */ - if ( os_info.dwMajorVersion == 4 ) return 2047; /* NT 4.x */ + if ( IsWindowsVersionOrGreater(5,0,0) ) return 8191; /* XP */ + if ( IsWindowsVersionOrGreater(4,0,0) ) return 2047; /* NT 4.x */ return 996; /* NT 3.5.1 */ } @@ -1201,7 +1198,7 @@ static FILE * open_command_file( int const slot ) string_new( command_file ); string_reserve( command_file, tmpdir->size + 64 ); command_file->size = sprintf( command_file->value, - "%s\\jam%ul-%02d-##.bat", tmpdir->value, procID, slot ); + "%s\\jam%lu-%02d-##.bat", tmpdir->value, procID, slot ); } /* For some reason opening a command file can fail intermittently. But doing @@ -1322,7 +1319,7 @@ static void reportWindowsError( char const * const apiName, int slot ) err_buf = cmdtab[ slot ].buffer_out; string_append( err_buf, apiName ); string_append( err_buf, "() Windows API failed: " ); - sprintf( buf, "%ul", errorCode ); + sprintf( buf, "%lu", errorCode ); string_append( err_buf, buf ); if ( !apiResult ) diff --git a/src/engine/timestamp.cpp b/src/engine/timestamp.cpp index af9779fa53..67090ca554 100644 --- a/src/engine/timestamp.cpp +++ b/src/engine/timestamp.cpp @@ -96,9 +96,10 @@ void timestamp_clear( timestamp * const time ) int timestamp_cmp( timestamp const * const lhs, timestamp const * const rhs ) { - return lhs->secs == rhs->secs + return int( + lhs->secs == rhs->secs ? lhs->nsecs - rhs->nsecs - : lhs->secs - rhs->secs; + : lhs->secs - rhs->secs ); } From d52d7c3e33f945dfec80ace783eee45b3d92f9a9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 26 Feb 2020 17:26:32 -0600 Subject: [PATCH 43/53] Fix link errors with msvc. --- Jamroot.jam | 3 +++ azure-pipelines.yml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index 278c9bcfa3..be460547e4 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -184,6 +184,9 @@ exe b2 $(unix_os):$(b2_src_unix) jamgram.cpp jambase.cpp + msvc:kernel32 + msvc:advapi32 + msvc:user32 ; explicit b2 ; diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 068989e0c7..1d42b20994 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -206,14 +206,14 @@ stages: $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam - ./src/engine/b2.exe b2 warnings-as-errors=on toolset=$env:TEST_TOOLSET + ./src/engine/b2.exe --debug-configuration b2 warnings-as-errors=on toolset=$env:TEST_TOOLSET displayName: "No Warnings" - powershell: | $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam ./bootstrap.bat - ./b2.exe --prefix=./.b2 install $env:TEST_TOOLSET + ./b2.exe --debug-configuration --prefix=./.b2 install toolset=$env:TEST_TOOLSET displayName: Bootstrap - job: 'macOS' From aa9b558bb2318aa2d01c2c25f292fdac8dd0c445 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 27 Feb 2020 22:58:14 -0600 Subject: [PATCH 44/53] Restore cygwin/vms only function. fixes #541 --- src/engine/function.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/engine/function.cpp b/src/engine/function.cpp index 805a5f5901..71f9b119ac 100644 --- a/src/engine/function.cpp +++ b/src/engine/function.cpp @@ -772,6 +772,35 @@ static void var_edit_file( char const * in, string * out, VAR_EDITS * edits ) } +#if defined( OS_CYGWIN ) || defined( OS_VMS ) + +/* + * var_edit_translate_path() - translate path to os native format. + */ + +static void var_edit_translate_path( string * out, size_t pos, VAR_EDITS * edits ) +{ + if ( edits->to_windows ) + { + string result[ 1 ]; + int translated; + + /* Translate path to os native format. */ + translated = path_translate_to_os( out->value + pos, result ); + if ( translated ) + { + string_truncate( out, pos ); + string_append( out, result->value ); + edits->to_slashes = 0; + } + + string_free( result ); + } +} + +#endif + + /* * var_edit_shift() - do upshift/downshift & other mods. */ From 71b8d4b823985c9f0a51eaba5cd9fc238994f081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Fri, 28 Feb 2020 14:32:34 +0100 Subject: [PATCH 45/53] Switch to explicit ANSI variants of Win32 API functions (#543) Allow clean compilation with /DUNICODE defined. Fixes #542 --- src/engine/debugger.cpp | 6 +++--- src/engine/execnt.cpp | 12 +++++++++++- src/engine/filent.cpp | 4 ++-- src/engine/jam.cpp | 2 +- src/engine/pathnt.cpp | 2 +- src/engine/w32_getreg.cpp | 14 +++++++------- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/engine/debugger.cpp b/src/engine/debugger.cpp index 54343a036d..051166699b 100644 --- a/src/engine/debugger.cpp +++ b/src/engine/debugger.cpp @@ -772,7 +772,7 @@ static int get_module_filename( string * out ) DWORD result; string_reserve( out, 256 + 1 ); string_truncate( out, 256 ); - while( ( result = GetModuleFileName( NULL, out->value, out->size ) ) == out->size ) + while( ( result = GetModuleFileNameA( NULL, out->value, out->size ) ) == out->size ) { string_reserve( out, out->size * 2 + 1); string_truncate( out, out->size * 2 ); @@ -1104,7 +1104,7 @@ static void debug_start_child( int argc, const char * * argv ) string command_line[ 1 ]; SECURITY_ATTRIBUTES sa = { sizeof( SECURITY_ATTRIBUTES ), NULL, TRUE }; PROCESS_INFORMATION pi = { NULL, NULL, 0, 0 }; - STARTUPINFO si = { sizeof( STARTUPINFO ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + STARTUPINFOA si = { sizeof( STARTUPINFOA ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; assert( debug_state == DEBUG_NO_CHILD ); if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) ) @@ -1149,7 +1149,7 @@ static void debug_start_child( int argc, const char * * argv ) } SetHandleInformation( pipe1[ 1 ], HANDLE_FLAG_INHERIT, 0 ); SetHandleInformation( pipe2[ 0 ], HANDLE_FLAG_INHERIT, 0 ); - if ( ! CreateProcess( + if ( ! CreateProcessA( self->value, command_line->value, NULL, diff --git a/src/engine/execnt.cpp b/src/engine/execnt.cpp index 44921740c2..f8934fd365 100644 --- a/src/engine/execnt.cpp +++ b/src/engine/execnt.cpp @@ -488,7 +488,7 @@ static void invoke_cmd( char const * const command, int const slot ) { SECURITY_ATTRIBUTES sa = { sizeof( SECURITY_ATTRIBUTES ), 0, 0 }; SECURITY_DESCRIPTOR sd; - STARTUPINFO si = { sizeof( STARTUPINFO ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + STARTUPINFOA si = { sizeof( STARTUPINFOA ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* Init the security data. */ @@ -1079,10 +1079,20 @@ static int is_parent_child( DWORD const parent, DWORD const child ) * id == 4. This check must be performed before comparing * process creation times. */ + +#ifdef UNICODE // no PROCESSENTRY32A + if ( !wcsicmp( pinfo.szExeFile, L"csrss.exe" ) && +#else if ( !stricmp( pinfo.szExeFile, "csrss.exe" ) && +#endif is_parent_child( parent, pinfo.th32ParentProcessID ) == 2 ) return 1; + +#ifdef UNICODE // no PROCESSENTRY32A + if ( !wcsicmp( pinfo.szExeFile, L"smss.exe" ) && +#else if ( !stricmp( pinfo.szExeFile, "smss.exe" ) && +#endif ( pinfo.th32ParentProcessID == 4 ) ) return 2; diff --git a/src/engine/filent.cpp b/src/engine/filent.cpp index 70db691528..af89d5ef22 100644 --- a/src/engine/filent.cpp +++ b/src/engine/filent.cpp @@ -98,7 +98,7 @@ int file_collect_dir_content_( file_info_t * const d ) /* FIXME: Avoid duplicate FindXXX Windows API calls here and in the code * determining a normalized path. */ - WIN32_FIND_DATA finfo; + WIN32_FIND_DATAA finfo; HANDLE const findHandle = FindFirstFileA( pathspec->value, &finfo ); if ( findHandle == INVALID_HANDLE_VALUE ) { @@ -142,7 +142,7 @@ int file_collect_dir_content_( file_info_t * const d ) } } } - while ( FindNextFile( findHandle, &finfo ) ); + while ( FindNextFileA( findHandle, &finfo ) ); FindClose( findHandle ); } diff --git a/src/engine/jam.cpp b/src/engine/jam.cpp index 255f500b59..a6a01de3c8 100644 --- a/src/engine/jam.cpp +++ b/src/engine/jam.cpp @@ -727,7 +727,7 @@ int main( int argc, char * * argv, char * * arg_environ ) char * executable_path( char const * argv0 ) { char buf[ 1024 ]; - DWORD const ret = GetModuleFileName( NULL, buf, sizeof( buf ) ); + DWORD const ret = GetModuleFileNameA( NULL, buf, sizeof( buf ) ); return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf ); } #elif defined(__APPLE__) /* Not tested */ diff --git a/src/engine/pathnt.cpp b/src/engine/pathnt.cpp index 5bc9c74a2c..5b0cc4659e 100644 --- a/src/engine/pathnt.cpp +++ b/src/engine/pathnt.cpp @@ -174,7 +174,7 @@ static int canonicWindowsPath( char const * const path, int const path_length, if ( !( n_length == 1 && n[ 0 ] == '.' ) && !( n_length == 2 && n[ 0 ] == '.' && n[ 1 ] == '.' ) ) { - WIN32_FIND_DATA fd; + WIN32_FIND_DATAA fd; HANDLE const hf = FindFirstFileA( out->value, &fd ); if ( hf != INVALID_HANDLE_VALUE ) { diff --git a/src/engine/w32_getreg.cpp b/src/engine/w32_getreg.cpp index 5b09b8a6e0..1ba06274b4 100644 --- a/src/engine/w32_getreg.cpp +++ b/src/engine/w32_getreg.cpp @@ -65,7 +65,7 @@ LIST * builtin_system_registry( FRAME * frame, int flags ) if ( key != 0 - && ERROR_SUCCESS == RegOpenKeyEx(key, path, 0, KEY_QUERY_VALUE, &key) + && ERROR_SUCCESS == RegOpenKeyExA(key, path, 0, KEY_QUERY_VALUE, &key) ) { DWORD type; @@ -74,7 +74,7 @@ LIST * builtin_system_registry( FRAME * frame, int flags ) LIST * const field = lol_get(frame->args, 1); if ( ERROR_SUCCESS == - RegQueryValueEx(key, field ? object_str( list_front( field ) ) : 0, 0, &type, data, &len) ) + RegQueryValueExA(key, field ? object_str( list_front( field ) ) : 0, 0, &type, data, &len) ) { switch (type) { @@ -86,7 +86,7 @@ LIST * builtin_system_registry( FRAME * frame, int flags ) string_new(expanded); while ( - (len = ExpandEnvironmentStrings( + (len = ExpandEnvironmentStringsA( (LPCSTR)data, expanded->value, expanded->capacity)) > expanded->capacity ) @@ -132,7 +132,7 @@ static LIST* get_subkey_names(HKEY key, char const* path) LIST* result = 0; if ( ERROR_SUCCESS == - RegOpenKeyEx(key, path, 0, KEY_ENUMERATE_SUB_KEYS, &key) + RegOpenKeyExA(key, path, 0, KEY_ENUMERATE_SUB_KEYS, &key) ) { char name[MAX_REGISTRY_KEYNAME_LENGTH]; @@ -141,7 +141,7 @@ static LIST* get_subkey_names(HKEY key, char const* path) FILETIME last_write_time; for ( index = 0; - ERROR_SUCCESS == RegEnumKeyEx( + ERROR_SUCCESS == RegEnumKeyExA( key, index, name, &name_size, 0, 0, 0, &last_write_time); ++index, name_size = sizeof(name) @@ -161,14 +161,14 @@ static LIST* get_value_names(HKEY key, char const* path) { LIST* result = 0; - if ( ERROR_SUCCESS == RegOpenKeyEx(key, path, 0, KEY_QUERY_VALUE, &key) ) + if ( ERROR_SUCCESS == RegOpenKeyExA(key, path, 0, KEY_QUERY_VALUE, &key) ) { char name[MAX_REGISTRY_VALUENAME_LENGTH]; DWORD name_size = sizeof(name); DWORD index; for ( index = 0; - ERROR_SUCCESS == RegEnumValue( + ERROR_SUCCESS == RegEnumValueA( key, index, name, &name_size, 0, 0, 0, 0); ++index, name_size = sizeof(name) From bdccf53eec0aa47b6316c691e9ab54308e7853db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Mon, 2 Mar 2020 21:03:38 +0100 Subject: [PATCH 46/53] Make sure b2 exits immediately on syntax errors (#540) Add test verifying Jam syntax error results in non-zero exit status. Refines #538 Fixes #539 --- src/engine/jam.cpp | 42 +++++++++++++++------------ test/core_syntax_error_exit_status.py | 23 +++++++++++++++ test/test_all.py | 1 + 3 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 test/core_syntax_error_exit_status.py diff --git a/src/engine/jam.cpp b/src/engine/jam.cpp index a6a01de3c8..eab9bae2da 100644 --- a/src/engine/jam.cpp +++ b/src/engine/jam.cpp @@ -649,28 +649,32 @@ int main( int argc, char * * argv, char * * arg_environ ) parse_file( constant_plus, frame ); } - status = yyanyerrors(); - if ( status && !last_update_now_status ) - last_update_now_status = status; + /* FIXME: What shall we do if builtin_update_now, + * the sole place setting last_update_now_status, + * failed earlier? + */ - /* Manually touch -t targets. */ - for ( n = 0; ( s = getoptval( optv, 't', n ) ); ++n ) + status = yyanyerrors(); + if ( !status ) { - OBJECT * const target = object_new( s ); - touch_target( target ); - object_free( target ); - } - + /* Manually touch -t targets. */ + for ( n = 0; ( s = getoptval( optv, 't', n ) ); ++n ) + { + OBJECT * const target = object_new( s ); + touch_target( target ); + object_free( target ); + } - /* Now make target. */ - { - PROFILE_ENTER( MAIN_MAKE ); - LIST * const targets = targets_to_update(); - if ( !list_empty( targets ) ) - status |= make( targets, anyhow ); - else - status = last_update_now_status; - PROFILE_EXIT( MAIN_MAKE ); + /* Now make target. */ + { + PROFILE_ENTER( MAIN_MAKE ); + LIST * const targets = targets_to_update(); + if ( !list_empty( targets ) ) + status |= make( targets, anyhow ); + else + status = last_update_now_status; + PROFILE_EXIT( MAIN_MAKE ); + } } PROFILE_EXIT( MAIN ); diff --git a/test/core_syntax_error_exit_status.py b/test/core_syntax_error_exit_status.py new file mode 100644 index 0000000000..452ea43048 --- /dev/null +++ b/test/core_syntax_error_exit_status.py @@ -0,0 +1,23 @@ +#!/usr/bin/python + +# Copyright (C) Mateusz Loskot 2020. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# Test that Jam syntax error results in non-zero exit status + +import BoostBuild + +# Create a temporary working directory. +t = BoostBuild.Tester() + +# Create the needed files. +t.write("jamroot.jam", """ +exe hello : hello.cpp + +""") + +t.run_build_system(status=1) + +t.cleanup() diff --git a/test/test_all.py b/test/test_all.py index 98fcb487f4..ebb6a8cf92 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -195,6 +195,7 @@ def reorder_tests(tests, first_test): "core_actions_quietly", "core_at_file", "core_bindrule", + "core_syntax_error_exit_status", "core_fail_expected", "core_jamshell", "core_multifile_actions", From 6c353a5ca8a8c3d80d0d55dfa4453b8780c4f553 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 2 Mar 2020 18:20:38 -0600 Subject: [PATCH 47/53] Switch to git clone to reduce bintray bandwidth. --- azure-pipelines.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1d42b20994..d39440a1a0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -437,8 +437,7 @@ stages: - bash: | set -e pushd ${HOME} - wget -nv https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_U}.tar.bz2 - tar -jxf boost_${BOOST_VERSION_U}.tar.bz2 + git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules --shallow-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} cd boost_${BOOST_VERSION_U} CXX_PATH=`which ${CXX}` echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam @@ -568,8 +567,7 @@ stages: - bash: | set -e pushd ${HOME} - wget -nv https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_U}.tar.bz2 - tar -jxf boost_${BOOST_VERSION_U}.tar.bz2 + git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules --shallow-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} cd boost_${BOOST_VERSION_U} CXX_PATH=`which ${CXX}` echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam @@ -663,8 +661,7 @@ stages: - powershell: | $env:HOME = "$env:HOMEDRIVE" + "$env:HOMEPATH" cd "${env:HOME}" - Invoke-WebRequest "https://dl.bintray.com/boostorg/release/${env:BOOST_VERSION}/source/boost_${env:BOOST_VERSION_U}.zip" -OutFile "boost_${env:BOOST_VERSION_U}.zip" - 7z x "boost_${env:BOOST_VERSION_U}.zip" + git clone -b boost-${env:BOOST_VERSION} --single-branch --recurse-submodules --shallow-submodules https://github.com/boostorg/boost.git boost_${env:BOOST_VERSION_U} cd "boost_${env:BOOST_VERSION_U}" echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install From 2a9e33e29af76ee8b244033dd786c0745672aa40 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 3 Mar 2020 07:12:32 -0600 Subject: [PATCH 48/53] Clone full submods to avoid GitHub limits. --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d39440a1a0..ebb568de83 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -437,7 +437,7 @@ stages: - bash: | set -e pushd ${HOME} - git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules --shallow-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} + git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} cd boost_${BOOST_VERSION_U} CXX_PATH=`which ${CXX}` echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam @@ -567,7 +567,7 @@ stages: - bash: | set -e pushd ${HOME} - git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules --shallow-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} + git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} cd boost_${BOOST_VERSION_U} CXX_PATH=`which ${CXX}` echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam @@ -661,7 +661,7 @@ stages: - powershell: | $env:HOME = "$env:HOMEDRIVE" + "$env:HOMEPATH" cd "${env:HOME}" - git clone -b boost-${env:BOOST_VERSION} --single-branch --recurse-submodules --shallow-submodules https://github.com/boostorg/boost.git boost_${env:BOOST_VERSION_U} + git clone -b boost-${env:BOOST_VERSION} --single-branch --recurse-submodules https://github.com/boostorg/boost.git boost_${env:BOOST_VERSION_U} cd "boost_${env:BOOST_VERSION_U}" echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install From cf9933462a2a942bd1b95b839c1b2e427201fe8f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 4 Mar 2020 09:44:44 -0600 Subject: [PATCH 49/53] Add history notes for 4.2.0 release. --- doc/src/history.adoc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/src/history.adoc b/doc/src/history.adoc index c2b0ecd3de..53ed193330 100644 --- a/doc/src/history.adoc +++ b/doc/src/history.adoc @@ -3,6 +3,29 @@ == Version 4.2.0 +This release is solely minor fixes and cleanup of the engine. In particular +the bootstrap/build process now clearly communicates C++11 requirement. + +* Add `saxonhe_dir` action. + -- _Richard Hodges_ +* Add CI testing for historical Boost versions on Windows MSVC. + -- _Rene Rivera_ +* Check for C++11 support when building engine. Including aninformative + error message as to that fact. + -- _Rene Rivera_ +* Update Jam grammar parser with latest `bison` version. + -- _Rene Rivera_ +* Allow root `b2 b2` engine build to work even if `bison` grammar generator + is not available. + -- _Rene Rivera_ +* Warning free engine build on at least Windows, macOS, and Linux. + -- _Rene Rivera_ +* Sanitize Windows engine build to consistently use ANSI Win32 API. + -- _Mateusz Loskot_ +* Fix b2 engine not exiting, with error, early when it detects a Jam language + error. + -- _Mateusz Loskot_ + == Version 4.1.0 Many small bug fixes in this release. But there are some new features also. From d8e4d53da1ab851b5b861d9e0b7f25bbd867cde1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 4 Mar 2020 17:18:02 -0600 Subject: [PATCH 50/53] Fix typo in history notes. --- doc/src/history.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/history.adoc b/doc/src/history.adoc index 53ed193330..357f50da28 100644 --- a/doc/src/history.adoc +++ b/doc/src/history.adoc @@ -10,7 +10,7 @@ the bootstrap/build process now clearly communicates C++11 requirement. -- _Richard Hodges_ * Add CI testing for historical Boost versions on Windows MSVC. -- _Rene Rivera_ -* Check for C++11 support when building engine. Including aninformative +* Check for C++11 support when building engine. Including an informative error message as to that fact. -- _Rene Rivera_ * Update Jam grammar parser with latest `bison` version. From 0984ee59bcbf41e36741ae03e5895735618ef0f3 Mon Sep 17 00:00:00 2001 From: tee3 Date: Sat, 7 Mar 2020 08:39:18 -0500 Subject: [PATCH 51/53] help: Print help for local modules as well. (#423) --- src/options/help.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options/help.jam b/src/options/help.jam index abab3770e1..cbd3037763 100644 --- a/src/options/help.jam +++ b/src/options/help.jam @@ -48,7 +48,7 @@ rule process ( { case --help-internal : local path-to-modules = [ modules.peek : BOOST_BUILD_PATH ] ; - path-to-modules ?= . ; + path-to-modules += . ; local possible-modules = [ GLOB $(path-to-modules) : *\\.jam ] ; local not-modules = [ GLOB $(path-to-modules) : *$(.not-modules)\\.jam ] ; local modules-to-list = @@ -177,7 +177,7 @@ local rule split-symbol ( ) { local path-to-modules = [ modules.peek : BOOST_BUILD_PATH ] ; - path-to-modules ?= . ; + path-to-modules += . ; local module-name = $(symbol) ; local symbol-name = ; local result = ; From 16673eb18d97b2731d0d726094ef3124e38449b6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 7 Mar 2020 08:09:36 -0600 Subject: [PATCH 52/53] Add note about local help. --- doc/src/history.adoc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/src/history.adoc b/doc/src/history.adoc index 357f50da28..e819532b3d 100644 --- a/doc/src/history.adoc +++ b/doc/src/history.adoc @@ -3,8 +3,9 @@ == Version 4.2.0 -This release is solely minor fixes and cleanup of the engine. In particular -the bootstrap/build process now clearly communicates C++11 requirement. +This release is predominantly minor fixes and cleanup of the engine. In +particular the bootstrap/build process now clearly communicates C++11 +requirement. * Add `saxonhe_dir` action. -- _Richard Hodges_ @@ -25,6 +26,8 @@ the bootstrap/build process now clearly communicates C++11 requirement. * Fix b2 engine not exiting, with error, early when it detects a Jam language error. -- _Mateusz Loskot_ +* Print help for local modules, i.e. current dir. + -- _Thomas Brown_ == Version 4.1.0 @@ -93,7 +96,7 @@ Other changes in this release: * Support for leak sanitizer. -- _Damian Jarek_ * Fix missing `/manifest` option in clang-win to fix admin elevation for exes with "update" in the name. -- _Peter Dimov_ -* Add `freertos` to `os` feature. -- tee3 +* Add `freertos` to `os` feature. -- _Thomas Brown_ * Default parallel jobs (`-jX`) to the available CPU threads. -- _Rene Rivera_ * Simpler coverage feature. -- _Hans Dembinski_ * Better stacks for sanitizers. -- _James E. King III_ From 3595602a14a3f3bcc53b951270a37e83b35731e7 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 9 Mar 2020 11:08:48 -0500 Subject: [PATCH 53/53] Big rename from Boost.Build to B2. --- doc/src/architecture.adoc | 22 ++-- doc/src/bjam.adoc | 6 +- doc/src/debug.adoc | 4 +- doc/src/extending.adoc | 60 +++++----- doc/src/faq.adoc | 28 ++--- doc/src/howto.adoc | 8 +- doc/src/install.adoc | 8 +- doc/src/overview.adoc | 68 +++++------ doc/src/recipes.adoc | 2 +- doc/src/reference.adoc | 24 ++-- doc/src/standalone.adoc | 2 +- doc/src/tasks.adoc | 50 ++++----- doc/src/tutorial.adoc | 20 ++-- example/customization/readme.txt | 8 +- example/customization/verbatim.jam | 16 +-- example/generate/README.txt | 2 +- example/gettext/readme.txt | 2 +- example/python_modules/python_helpers.jam | 2 +- example/python_modules/python_helpers.py | 2 +- example/python_modules/readme.txt | 2 +- example/qt/README.txt | 10 +- example/try_compile/Jamroot.jam | 6 +- example/user-config.jam | 4 +- notes/build_dir_option.txt | 2 +- notes/release_procedure.txt | 30 ++--- src/bootstrap.jam | 6 +- src/build/config-cache.jam | 2 +- src/build/configure.jam | 18 +-- src/build/generators.jam | 6 +- src/build/project.jam | 6 +- src/build/property-set.jam | 4 +- src/build/version.jam | 8 +- src/engine/Jambase | 16 +-- src/engine/class.cpp | 2 +- src/engine/debian/control | 10 +- src/engine/jambase.cpp | 8 +- src/engine/jamgram.cpp | 4 +- src/engine/jamgram.hpp | 2 +- src/engine/modules/readme.txt | 2 +- src/engine/native.h | 2 +- src/tools/acc.jam | 2 +- src/tools/boostbook.jam | 2 +- src/tools/borland.jam | 44 ++++---- src/tools/cast.jam | 2 +- src/tools/como.jam | 6 +- src/tools/cray.jam | 10 +- src/tools/cw.jam | 28 ++--- src/tools/dmc.jam | 18 +-- src/tools/doxygen.jam | 4 +- src/tools/features/cflags-feature.jam | 2 +- .../features/cxx-template-depth-feature.jam | 2 +- .../features/instruction-set-feature.jam | 2 +- src/tools/features/os-feature.jam | 2 +- src/tools/features/relevant-feature.jam | 4 +- src/tools/features/tag-feature.jam | 2 +- src/tools/gcc.jam | 2 +- src/tools/hp_cxx.jam | 14 +-- src/tools/intel-win.jam | 44 ++++---- src/tools/intel.jam | 8 +- src/tools/mpi.jam | 2 +- src/tools/msvc.jam | 4 +- src/tools/pch.jam | 2 +- src/tools/python.jam | 12 +- src/tools/qt3.jam | 106 +++++++++--------- src/tools/qt4.jam | 2 +- src/tools/qt5.jam | 2 +- src/tools/sun.jam | 2 +- src/tools/vacpp.jam | 10 +- src/tools/vmsdecc.jam | 2 +- src/tools/xlcpp.jam | 10 +- src/util/doc.jam | 14 +-- test/bad_dirname.py | 2 +- test/configuration.py | 4 +- test/library_chain.py | 2 +- test/ordered_properties.py | 2 +- test/pch.py | 2 +- test/project_root_constants.py | 2 +- test/qt5/qtquick.qml | 2 +- test/startup_v2.py | 10 +- test/template.py | 2 +- test/test_system.html | 10 +- test/testing.py | 4 +- 82 files changed, 446 insertions(+), 446 deletions(-) diff --git a/doc/src/architecture.adoc b/doc/src/architecture.adoc index fe95ba8df0..5fb9ddef9d 100644 --- a/doc/src/architecture.adoc +++ b/doc/src/architecture.adoc @@ -1,5 +1,5 @@ [[bbv2.arch]] -Boost.Build v2 architecture +B2 v2 architecture --------------------------- This document is work-in progress. Do not expect much from it yet. @@ -8,7 +8,7 @@ This document is work-in progress. Do not expect much from it yet. Overview -------- -Boost.Build implementation is structured in four different components: +B2 implementation is structured in four different components: "kernel", "util", "build" and "tools". The first two are relatively uninteresting, so we will focus on the remaining pair. The "build" component provides classes necessary to declare targets, determining @@ -52,7 +52,7 @@ to the `generators.construct` function. `run` method is called. The method returns a list of virtual targets. 4. The virtual targets are returned to the top level code, and for each instance, the `actualize` method is called to setup nodes and updating -actions in the dependency graph kept inside Boost.Build engine. This +actions in the dependency graph kept inside B2 engine. This dependency graph is then updated, which runs necessary commands. [[bbv2.arch.build.metatargets]] @@ -125,14 +125,14 @@ When all virtual targets are produced, they are "actualized". This means that the real file names are computed, and the commands that should be run are generated. This is done by the `virtual-target.actualize` and `action.actualize` methods. The first is conceptually simple, while the -second needs additional explanation. Commands in Boost.Build are +second needs additional explanation. Commands in B2 are generated in a two-stage process. First, a rule with an appropriate name (for example "gcc.compile") is called and is given a list of target names. The rule sets some variables, like "OPTIONS". After that, the command string is taken, and variable are substitutes, so use of OPTIONS inside the command string gets transformed into actual compile options. -Boost.Build added a third stage to simplify things. It is now possible +B2 added a third stage to simplify things. It is now possible to automatically convert properties to appropriate variable assignments. For example, on would add "-g" to the OPTIONS variable, without requiring to manually add this logic to gcc.compile. This @@ -165,7 +165,7 @@ Targets ------- NOTE: THIS SECTION IS NOT EXPECTED TO BE READ! There are two -user-visible kinds of targets in Boost.Build. First are "abstract" — +user-visible kinds of targets in B2. First are "abstract" — they correspond to things declared by the user, e.g. projects and executable files. The primary thing about abstract targets is that it is possible to request them to be built with a particular set of @@ -219,7 +219,7 @@ Ability to scan the same file several times As stated above, it is possible to compile a {CPP} file multiple times, using different include paths. Therefore, include dependencies for those -compilations can be different. The problem is that Boost.Build engine +compilations can be different. The problem is that B2 engine does not allow multiple scans of the same target. To solve that, we pass the scanner object when calling `virtual-target.actualize` and it creates different engine targets for different scanners. @@ -251,9 +251,9 @@ This requirement breaks down to the following ones. 1. If when compiling "a.cpp" there is an include of "a.h", the "dir" directory is on the include path, and a target called "a.h" will be -generated in "dir", then Boost.Build should discover the include, and +generated in "dir", then B2 should discover the include, and create "a.h" before compiling "a.cpp". -2. Since Boost.Build almost always generates targets under the "bin" +2. Since B2 almost always generates targets under the "bin" directory, this should be supported as well. I.e. in the scenario above, Jamfile in "dir" might create a main target, which generates "a.h". The file will be generated to "dir/bin" directory, but we still have to @@ -326,7 +326,7 @@ first alternative's problem is avoided, so the second alternative is implemented now. The second sub-requirements is that targets generated under the "bin" -directory are handled as well. Boost.Build implements a semi-automatic +directory are handled as well. B2 implements a semi-automatic approach. When compiling {CPP} files the process is: 1. The main target to which the compiled file belongs to is found. @@ -427,7 +427,7 @@ ________________________________________________________________________________ File targets ------------ -As described above, file targets correspond to files that Boost.Build +As described above, file targets correspond to files that B2 manages. Users may be concerned about file targets in three ways: when declaring file target types, when declaring transformations between types and when determining where a file target is to be placed. File diff --git a/doc/src/bjam.adoc b/doc/src/bjam.adoc index 2f8a5f5491..d012a16a15 100644 --- a/doc/src/bjam.adoc +++ b/doc/src/bjam.adoc @@ -48,8 +48,8 @@ specify the toolset as the first argument, this assumes that the toolset is readily available in the `PATH`. NOTE: The toolset used to build Boost.Jam is independent of the toolsets used -for Boost.Build. Only one version of Boost.Jam is needed to use -Boost.Build. +for B2. Only one version of Boost.Jam is needed to use +B2. The supported toolsets, and whether they are auto-detected, are: @@ -200,7 +200,7 @@ a| The built executables are placed in a subdirectory specific to your platform. For example, in Linux running on an Intel x86 compatible chip, the executables are placed in: `bin.linuxx86`. The `b2[.exe]` -executable can be used to invoke Boost.Build. +executable can be used to invoke B2. The build scripts support additional invocation arguments for use by developers of Boost.Jam and for additional setup of the toolset. The diff --git a/doc/src/debug.adoc b/doc/src/debug.adoc index 159592fdee..e87f8d1173 100644 --- a/doc/src/debug.adoc +++ b/doc/src/debug.adoc @@ -7,8 +7,8 @@ [[bbv2.util.debugger.overview]] === Overview -Boost.Build comes with a debugger for Jamfiles. To run the debugger, -start Boost.Build with `b2 -dconsole`. +B2 comes with a debugger for Jamfiles. To run the debugger, +start B2 with `b2 -dconsole`. .... $ b2 -dconsole diff --git a/doc/src/extending.adoc b/doc/src/extending.adoc index 1840432f8d..3afea995c6 100644 --- a/doc/src/extending.adoc +++ b/doc/src/extending.adoc @@ -4,13 +4,13 @@ [[bbv2.extender.intro]] == Introduction -This section explains how to extend Boost.Build to accommodate your local +This section explains how to extend B2 to accommodate your local requirements -- primarily to add support for non-standard tools you have. Before we start, be sure you have read and understood the concept of metatarget, <>, which is critical to understanding the remaining material. -The current version of Boost.Build has three levels of targets, listed +The current version of B2 has three levels of targets, listed below. metatarget:: @@ -98,7 +98,7 @@ It it permissible to create a custom class derived from link:#bbv2.reference.class.basic-target[basic-target] and create new metatarget rule that creates instance of such target. However, in the majority of cases, a specific subclass of -link:#bbv2.reference.class.basic-target[basic-target] -- +link:#bbv2.reference.class.basic-target[basic-target] -- link:#bbv2.reference.class.typed-target[typed-target] is used. That class is associated with a type and relays to generators to construct concrete targets of that type. This process will be explained below. @@ -137,7 +137,7 @@ In some cases, code that creates concrete targets may be invoked more than once with the same properties. Returning two different instances of `file-target` that correspond to the same file clearly will result in problems. Therefore, whenever returning targets you should pass them via -the `virtual-target.register` function, besides allowing Boost.Build to +the `virtual-target.register` function, besides allowing B2 to track which virtual targets got created for each metatarget, this will also replace targets with previously created identical ones, as necessary.footnote:[This create-then-register pattern is caused by @@ -153,7 +153,7 @@ return [ sequence.transform virtual-target.register : $(targets) ] ; [[bbv2.extender.overview.generators]] === Generators -In theory, every kind of metatarget in Boost.Build (like `exe`, `lib` or +In theory, every kind of metatarget in B2 (like `exe`, `lib` or `obj`) could be implemented by writing a new metatarget class that, independently of the other code, figures what files to produce and what commands to use. However, that would be rather inflexible. For example, @@ -162,7 +162,7 @@ metatargets. In practice, most files have specific types, and most tools consume and produce files of specific type. To take advantage of this fact, -Boost.Build defines concept of target type and generators generators, +B2 defines concept of target type and generators generators, and has special metatarget class link:#bbv2.reference.class.typed-target[typed-target]. Target type is merely an identifier. It is associated with a set of file extensions @@ -197,9 +197,9 @@ takes a verbatim file and creates a cpp file with a single `char*` variable whose name is taken from the first line of the verbatim file and whose value is the file's properly quoted content. -Let's see what Boost.Build can do. +Let's see what B2 can do. -First off, Boost.Build has no idea about "verbatim files". So, you must +First off, B2 has no idea about "verbatim files". So, you must register a new target type. The following code does it: [source,jam] @@ -211,11 +211,11 @@ type.register VERBATIM : verbatim ; The first parameter to link:#bbv2.reference.modules.type.register[type.register] gives the name of the declared type. By convention, it's uppercase. The second -parameter is the suffix for files of this type. So, if Boost.Build sees +parameter is the suffix for files of this type. So, if B2 sees `code.verbatim` in a list of sources, it knows that it's of type `VERBATIM`. -Next, you tell Boost.Build that the verbatim files can be transformed +Next, you tell B2 that the verbatim files can be transformed into {CPP} files in one build step. A generator is a template for a build step that transforms targets of one type (or set of types) into another. Our generator will be called `verbatim.inline-file`; it transforms @@ -227,7 +227,7 @@ import generators ; generators.register-standard verbatim.inline-file : VERBATIM : CPP ; ---- -Lastly, you have to inform Boost.Build about the shell commands used to +Lastly, you have to inform B2 about the shell commands used to make that transformation. That's done with an `actions` declaration. [source,jam] @@ -266,10 +266,10 @@ import type ; type.register VERBATIM : verbatim ; ---- -The type is the most important property of a target. Boost.Build can +The type is the most important property of a target. B2 can automatically generate necessary build actions only because you specify the desired type (using the different main target rules), and because -Boost.Build can guess the type of sources from their extensions. +B2 can guess the type of sources from their extensions. The first two parameters for the `type.register` rule are the name of new type and the list of extensions associated with it. A file with an @@ -304,7 +304,7 @@ meta-information for the plugin. In either way, the `PLUGIN` type can be used whenever `SHARED_LIB` can. For example, you can directly link plugins to an application. -A type can be defined as "main", in which case Boost.Build will +A type can be defined as "main", in which case B2 will automatically declare a main target rule for building targets of that type. More details can be found link:#bbv2.extending.rules.main-type[later]. @@ -313,7 +313,7 @@ link:#bbv2.extending.rules.main-type[later]. == Scanners Sometimes, a file can refer to other files via some include system. To -make Boost.Build track dependencies between included files, you need to +make B2 track dependencies between included files, you need to provide a scanner. The primary limitation is that only one scanner can be assigned to a target type. @@ -362,16 +362,16 @@ That's enough for scanning include dependencies. [[bbv2.extending.tools]] == Tools and generators -This section will describe how Boost.Build can be extended to support +This section will describe how B2 can be extended to support new tools. -For each additional tool, a Boost.Build object called generator must be +For each additional tool, a B2 object called generator must be created. That object has specific types of targets that it accepts and -produces. Using that information, Boost.Build is able to automatically +produces. Using that information, B2 is able to automatically invoke the generator. For example, if you declare a generator that takes a target of the type `D` and produces a target of the type `OBJ`, when placing a file with extension `.d` in a list of sources will cause -Boost.Build to invoke your generator, and then to link the resulting +B2 to invoke your generator, and then to link the resulting object file into an application. (Of course, this requires that you specify that the `.d` extension corresponds to the `D` type.) @@ -395,7 +395,7 @@ We declare a standard generator, specifying its id, the source type and the target type. When invoked, the generator will create a target of type `CPP` with a source target of type `VERBATIM` as the only source. But what command will be used to actually generate the file? In -Boost.Build, actions are specified using named "actions" blocks and the +B2, actions are specified using named "actions" blocks and the name of the action block should be specified when creating targets. By convention, generators use the same name of the action block as their own id. So, in above example, the "inline-file" actions block will be @@ -519,7 +519,7 @@ rule run ( project name ? : property-set : sources * ) python = $(s) ; } } - + local libs ; for local s in $(sources) { @@ -586,7 +586,7 @@ can be used inside the action body. You'd need to consult online help (--help) to find all the features of the `toolset.flags` rule. Although you can define any set of features and interpret their values -in any way, Boost.Build suggests the following coding standard for +in any way, B2 suggests the following coding standard for designing features. Most features should have a fixed set of values that is portable (tool @@ -604,15 +604,15 @@ allows you to pass any command line options to a {CPP} compiler. The the interpretation is tool-specific. (See <> for an example of very smart usage of that feature). Of course one should always strive to use portable features, but these are still be -provided as a backdoor just to make sure Boost.Build does not take away +provided as a backdoor just to make sure B2 does not take away any control from the user. Using portable features is a good idea because: * When a portable feature is given a fixed set of values, you can build -your project with two different settings of the feature and Boost.Build +your project with two different settings of the feature and B2 will automatically use two different directories for generated files. -Boost.Build does not try to separate targets built with different raw +B2 does not try to separate targets built with different raw options. * Unlike with “raw” features, you don't need to use specific @@ -632,7 +632,7 @@ propagate to its dependent targets then make it “propagated”. For example, the `include` feature is a free feature. * if a feature is used to refer to a path relative to the Jamfile, it must be a “path” feature. Such features will also get their values -automatically converted to Boost.Build's internal path representation. +automatically converted to B2's internal path representation. For example, `include` is a path feature. * if feature is used to refer to some target, it must be a “dependency” feature. @@ -680,7 +680,7 @@ actions link bind DEF_FILE } ---- + -Note the `bind DEF_FILE` part. It tells Boost.Build to translate the +Note the `bind DEF_FILE` part. It tells B2 to translate the internal target name in `DEF_FILE` to a corresponding filename in the `link` action. Without it the expansion of `$(DEF_FILE)` would be a strange symbol that is not likely to make sense for the linker. @@ -694,7 +694,7 @@ rule link } ---- + -This is a workaround for a bug in Boost.Build engine, which will +This is a workaround for a bug in B2 engine, which will hopefully be fixed one day. *Variants and composite features.* @@ -746,7 +746,7 @@ to do that. [[bbv2.extending.rules.main-type]]The first way applies when your target rule should just produce a target of specific type. In that case, a rule is already defined for you! When -you define a new type, Boost.Build automatically defines a corresponding +you define a new type, B2 automatically defines a corresponding rule. The name of the rule is obtained from the name of the type, by down-casing all letters and replacing underscores with dashes. For example, if you create a module `obfuscate.jam` containing: @@ -812,7 +812,7 @@ passed to the `using` rule. The set of allowed parameters is determined by you. For example, you can allow the user to specify paths, tool versions, and other options. -Here are some guidelines that help to make Boost.Build more consistent: +Here are some guidelines that help to make B2 more consistent: * The `init` rule should never fail. Even if the user provided an incorrect path, you should emit a warning and go on. Configuration may diff --git a/doc/src/faq.adoc b/doc/src/faq.adoc index b77b9c5b8c..dae2cb9fde 100644 --- a/doc/src/faq.adoc +++ b/doc/src/faq.adoc @@ -6,7 +6,7 @@ This is not possible, since Jamfile does not have "current" value of any feature, be it toolset, build variant or anything else. For a single run -of Boost.Build, any given main target can be built with several property +of B2, any given main target can be built with several property sets. For example, user can request two build variants on the command line. Or one library is built as shared when used from one application, and as static when used from another. Each Jamfile is read only once so @@ -36,7 +36,7 @@ exe b : a.cpp ; The above snippet requires two different compilations of `a.cpp`, which differ only in their `include` property. Since the `include` feature is -declared as `free` Boost.Build does not create a separate build +declared as `free` B2 does not create a separate build directory for each of its values and those two builds would both produce object files generated in the same build directory. Ignoring this and compiling the file only once would be dangerous as different includes @@ -76,7 +76,7 @@ exe b : a-obj ; Note that in both of these cases the `include` property will be applied only for building these object files and not any other sources that might be added for targets `a` and `b`. -2. To compile the file twice, you can tell Boost.Build to compile it to +2. To compile the file twice, you can tell B2 to compile it to two separate object files like so: + [source,jam] @@ -95,14 +95,14 @@ exe a : [ obj a_obj : a.cpp : /usr/local/include ] ; exe b : [ obj a_obj : a.cpp ] ; ---- + -which will cause Boost.Build to actually change the generated object +which will cause B2 to actually change the generated object file names a bit for you and thus avoid any conflicts. + Note that in both of these cases the `include` property will be applied only for building these object files and not any other sources that might be added for targets `a` and `b`. -A good question is why Boost.Build can not use some of the above +A good question is why B2 can not use some of the above approaches automatically. The problem is that such magic would only help in half of the cases, while in the other half it would be silently doing the wrong thing. It is simpler and safer to ask the user to clarify his @@ -143,7 +143,7 @@ exe a : a.cpp : $(SOME_LIBRARY_PATH) ; [[bbv2.faq.proporder]] == How to control properties order? -For internal reasons, Boost.Build sorts all the properties +For internal reasons, B2 sorts all the properties alphabetically. This means that if you write: [source,jam] @@ -177,7 +177,7 @@ the incorrect order will lead to a link error. Further, this behavior is often used to make one library override symbols from another. So, sometimes it is necessary to force specific library linking order. -Boost.Build tries to automatically compute the right order. The primary +B2 tries to automatically compute the right order. The primary rule is that if library `a` "uses" library `b`, then library `a` will appear on the command line before library `b`. Library `a` is considered to use `b` if `b` is present either in the `a` library's sources or its @@ -322,7 +322,7 @@ system. Putting target declaration in a specific project's Jamfile is not really good, since locations of the libraries can vary between different development machines and then such declarations would need to be duplicated in different projects. The solution is to declare the -targets in Boost.Build's `site-config.jam` configuration file: +targets in B2's `site-config.jam` configuration file: [source,jam] ---- @@ -349,7 +349,7 @@ source files to compile. To use such libraries, you need to add proper includes and possibly defines to your project. But with a large number of external libraries it becomes problematic to remember which libraries are header only, and which ones you have to link to. However, with -Boost.Build a header-only library can be declared as Boost.Build target +B2 a header-only library can be declared as B2 target and all dependents can use such library without having to remember whether it is a header-only library or not. @@ -382,16 +382,16 @@ alias mylib ; ---- [[bbv2.faq.names]] -== What is the difference between Boost.Build, `b2`, `bjam` and Perforce Jam? +== What is the difference between B2, `b2`, `bjam` and Perforce Jam? -Boost.Build is the name of the complete build system. The executable +B2 is the name of the complete build system. The executable that runs it is `b2`. That executable is written in C and implements performance-critical algorithms, like traversal of dependency graph and executing commands. It also implements an interpreted language used to -implement the rest of Boost.Build. This executable is formally called -"Boost.Build engine". +implement the rest of B2. This executable is formally called +"B2 engine". -The Boost.Build engine is derived from an earlier build tool called +The B2 engine is derived from an earlier build tool called Perforce Jam. Originally, there were just minor changes, and the filename was `bjam`. Later on, with more and more changes, the similarity of names became a disservice to users, and as of Boost diff --git a/doc/src/howto.adoc b/doc/src/howto.adoc index 27662c353c..38a31f3c7c 100644 --- a/doc/src/howto.adoc +++ b/doc/src/howto.adoc @@ -1,12 +1,12 @@ -Want to learn about Boost.Build features? Start with the +Want to learn about B2 features? Start with the link:#bbv2.tutorial[tutorial] and continue with the link:#bbv2.overview[overview]. -When you're ready to try Boost.Build in practice, go to the +When you're ready to try B2 in practice, go to the link:#bbv2.installation[installation]. -Building a project with Boost.Build? See the link:#bbv2.installation[installation] +Building a project with B2? See the link:#bbv2.installation[installation] and then read the link:#bbv2.overview.invocation[overview]. -Setting up Boost.Build on your project? Take a look at the +Setting up B2 on your project? Take a look at the link:#bbv2.overview[overview] and link:#bbv2.extender[extender manual]. If there's anything you find unclear in this documentation, report the diff --git a/doc/src/install.adoc b/doc/src/install.adoc index 8aa31737f9..186b1622ff 100644 --- a/doc/src/install.adoc +++ b/doc/src/install.adoc @@ -1,7 +1,7 @@ [[bbv2.installation]] = Installation -To install Boost.Build from an official release or a nightly build, as +To install B2 from an official release or a nightly build, as available on the http://boost.org/boost-build2[official web site], follow these steps: @@ -16,14 +16,14 @@ other operating systems). $ ./b2 install --prefix=PREFIX ---- + -where PREFIX is a directory where you want Boost.Build to be installed. +where PREFIX is a directory where you want B2 to be installed. 4. Optionally, add `PREFIX/bin` to your PATH environment variable. -If you are not using a Boost.Build package, but rather the version +If you are not using a B2 package, but rather the version bundled with the Boost {CPP} Libraries, the above commands should be run in the `tools/build` directory. -Now that Boost.Build is installed, you can try some of the examples. +Now that B2 is installed, you can try some of the examples. Copy `PREFIX/share/boost-build/examples/hello` to a different directory, then change to that directory and run: diff --git a/doc/src/overview.adoc b/doc/src/overview.adoc index 3ea5748a54..48e4ceafcc 100644 --- a/doc/src/overview.adoc +++ b/doc/src/overview.adoc @@ -2,16 +2,16 @@ = Overview This section will provide the information necessary to create your own -projects using Boost.Build. The information provided here is relatively +projects using B2. The information provided here is relatively high-level, and the link:#bbv2.reference[Reference] as well as the on-line help system must be used to obtain low-level documentation (see link:#bbv2.overview.invocation.options.help[`--help`]). -Boost.Build has two parts — a build engine with its own interpreted -language, and Boost.Build itself, implemented in that language. The +B2 has two parts — a build engine with its own interpreted +language, and B2 itself, implemented in that language. The chain of events when you type `b2` on the command line is as follows: -1. The Boost.Build executable tries to find Boost.Build modules and +1. The B2 executable tries to find B2 modules and loads the top-level module. The exact process is described in link:#bbv2.reference.init[the section called “Initialization”] 2. The top-level module loads user-defined configuration files, @@ -21,14 +21,14 @@ toolsets. cause reading of further Jamfiles. As a result, a tree of projects is created, with targets inside projects. 4. Finally, using the build request specified on the command line, -Boost.Build decides which targets should be built and how. That +B2 decides which targets should be built and how. That information is passed back to Boost.Jam, which takes care of actually running the scheduled build action commands. -So, to be able to successfully use Boost.Build, you need to know only +So, to be able to successfully use B2, you need to know only four things: -* link:#bbv2.overview.configuration[How to configure Boost.Build] +* link:#bbv2.overview.configuration[How to configure B2] * link:#bbv2.overview.targets[How to declare targets in Jamfiles] * link:#bbv2.overview.build_process[How the build process works] * Some Basics about the Boost.Jam language. See @@ -37,7 +37,7 @@ link:#bbv2.overview.jam_language[the section called “Boost.Jam Language”]. [[bbv2.overview.concepts]] == Concepts -Boost.Build has a few unique concepts that are introduced in this +B2 has a few unique concepts that are introduced in this section. The best way to explain the concepts is by comparison with more classical build tools. @@ -73,7 +73,7 @@ immediately when the build description is parsed, which makes it impossible to perform multi-variant builds. Often, change in any build property requires a complete reconfiguration of the build tree. -In order to support true multi-variant builds, Boost.Build introduces the +In order to support true multi-variant builds, B2 introduces the concept of a metatarget definition main target metatarget _metatarget_ -- an object that is created when the build description is parsed and can be called later with specific build properties to @@ -86,11 +86,11 @@ Consider an example: exe a : a.cpp ; ---- -When this declaration is parsed, Boost.Build creates a metatarget, but +When this declaration is parsed, B2 creates a metatarget, but does not yet decide what files must be created, or what commands must be -used. After all build files are parsed, Boost.Build considers the +used. After all build files are parsed, B2 considers the properties requested on the command line. Supposed you have invoked -Boost.Build with: +B2 with: [source,shell] ---- @@ -105,12 +105,12 @@ different command lines. Another key concept is _build property_. A build property is a variable that affects the build process. It can be specified on the command line, and is passed when calling a metatarget. -While all build tools have a similar mechanism, Boost.Build differs by +While all build tools have a similar mechanism, B2 differs by requiring that all build properties are declared in advance, and providing a large set of properties with portable semantics. The final concept is _property propagation_. -Boost.Build does not require that every metatarget is called with the +B2 does not require that every metatarget is called with the same properties. Instead, the "top-level" metatargets are called with the properties specified on the command line. Each metatarget can elect to augment or override some properties (in particular, using the @@ -123,7 +123,7 @@ have dependencies of their own. For a more in-depth treatment of the requirements and concepts, you may refer to http://syrcose.ispras.ru/2009/files/04_paper.pdf[SYRCoSE 2009 -Boost.Build article]. +B2 article]. [[bbv2.overview.jam_language]] == Boost.Jam Language @@ -307,11 +307,11 @@ link:#jam.language.rules[the section called “Rules”]. [[bbv2.overview.configuration]] == Configuration -On startup, Boost.Build searches and reads three configuration files: +On startup, B2 searches and reads three configuration files: `site-config.jam`, `user-config.jam`, and `project-config.jam`. The first one is usually installed and maintained by a system administrator, and the second is for the user to modify. You can edit the one in the -top-level directory of your Boost.Build installation or create a copy in +top-level directory of your B2 installation or create a copy in your home directory and edit the copy. The third is used for project specific configuration. The following table explains where the files are searched. @@ -383,7 +383,7 @@ using tool-name : ... ; ---- The `using` rule is given the name of tool, and will make that tool -available to Boost.Build. For example, +available to B2. For example, [source] ---- @@ -403,7 +403,7 @@ link:#bbv2.reference.tools[the section called “Builtin tools”], including th specific options they take. Some general notes that apply to most {CPP} compilers are below. -For all the {CPP} compiler toolsets that Boost.Build supports +For all the {CPP} compiler toolsets that B2 supports out-of-the-box, the list of parameters to `using` is the same: `toolset-name`, `version`, `invocation-command`, and `options`. @@ -429,7 +429,7 @@ using gcc : : g++-3.2 ; using msvc : : "Z:/Programs/Microsoft Visual Studio/vc98/bin/cl" ; ---- -Some Boost.Build toolsets will use that path to take additional actions +Some B2 toolsets will use that path to take additional actions required before invoking the compiler, such as calling vendor-supplied scripts to set up its required environment variables. When the compiler executables for C and {CPP} are different, the path to the {CPP} compiler @@ -460,7 +460,7 @@ Note that in the first call to `using`, the compiler found in the `PATH` will be used, and there is no need to explicitly specify the command. Many of toolsets have an `options` parameter to fine-tune the -configuration. All of Boost.Build's standard compiler toolsets accept +configuration. All of B2's standard compiler toolsets accept four options `cflags`, `cxxflags`, `compileflags` and `linkflags` as `options` specifying flags that will be always passed to the corresponding tools. There must not be a space between the tag for the @@ -514,7 +514,7 @@ toolset initialization. [[bbv2.overview.invocation]] == Invocation -To invoke Boost.Build, type `b2` on the command line. Three kinds of +To invoke B2, type `b2` on the command line. Three kinds of command-line tokens are accepted, in any order: options:: @@ -559,7 +559,7 @@ b2 toolset=gcc variant=debug optimization=space [[bbv2.overview.invocation.options]] === Options -Boost.Build recognizes the following command line options. +B2 recognizes the following command line options. [[bbv2.overview.invocation.options.help]]`--help`:: Invokes the online help system. This prints general information on how @@ -594,7 +594,7 @@ Boost.Build recognizes the following command line options. link:#bbv2.reference.buildprocess.targetpath[the section called “Target Paths”]. `--version`:: - Prints information on the Boost.Build and Boost.Jam versions. + Prints information on the B2 and Boost.Jam versions. `-a`:: Causes all files to be rebuilt. `-n`:: @@ -616,7 +616,7 @@ Boost.Build recognizes the following command line options. `--project-config=filename`:: Override the default link:#bbv2.overview.configuration[project-config.jam] `--debug-configuration`:: - Produces debug information about the loading of Boost.Build and + Produces debug information about the loading of B2 and toolset files. `--debug-building`:: Prints what targets are being built and with what properties. @@ -673,7 +673,7 @@ The most common features are summarized below. |link |shared,static -|Determines if Boost.Build creates shared or static libraries +|Determines if B2 creates shared or static libraries |threading |single,multi @@ -783,7 +783,7 @@ also declare custom main target rules as shown in link:#bbv2.extending.rules[the section called “Main target rules”]. anchor:bbv2.main-target-rule-syntax[] -Most main target rules in Boost.Build have the same common signature: +Most main target rules in B2 have the same common signature: [source] ---- @@ -1130,7 +1130,7 @@ Each subproject inherits attributes, constants and rules from its parent project, which is defined by the nearest Jamfile in an ancestor directory above the subproject. The top-level project is declared in a file called `Jamroot`, or `Jamfile`. When loading a project, -Boost.Build looks for either `Jamroot` or `Jamfile`. They are handled +B2 looks for either `Jamroot` or `Jamfile`. They are handled identically, except that if the file is called `Jamroot`, the search for a parent project is not performed. A `Jamfile` without a parent project is also considered the top-level project. @@ -1143,18 +1143,18 @@ project refers to another via the `use-project` or a target reference, no specific order should be assumed. NOTE: Giving the root project the special name “`Jamroot`” ensures that -Boost.Build won't misinterpret a directory above it as the project root +B2 won't misinterpret a directory above it as the project root just because the directory contains a Jamfile. [[bbv2.overview.build_process]] == The Build Process -When you've described your targets, you want Boost.Build to run the +When you've described your targets, you want B2 to run the right tools and create the needed targets. This section will describe two things: how you specify what to build, and how the main targets are actually constructed. -The most important thing to note is that in Boost.Build, unlike other +The most important thing to note is that in B2, unlike other build tools, the targets you declare do not correspond to specific files. What you declare in a Jamfile is more like a “metatarget.” Depending on the properties you specify on the command line, each @@ -1163,7 +1163,7 @@ requested properties. It is quite possible that the same metatarget is built several times with different properties, producing different files. -TIP: This means that for Boost.Build, you cannot directly obtain a build +TIP: This means that for B2, you cannot directly obtain a build variant from a Jamfile. There could be several variants requested by the user, and each target can be built with different properties. @@ -1225,10 +1225,10 @@ requirements. The usage requirements are added to the common properties and the resulting property set will be used for building the current target. 6. Building the target using generators. To convert the sources to the -desired type, Boost.Build uses "generators" -- objects that correspond +desired type, B2 uses "generators" -- objects that correspond to tools like compilers and linkers. Each generator declares what type of targets it can produce and what type of sources it requires. Using -this information, Boost.Build determines which generators must be run to +this information, B2 determines which generators must be run to produce a specific target from specific sources. When generators are run, they return the "real" targets. 7. Computing the usage requirements to be returned. The conditional diff --git a/doc/src/recipes.adoc b/doc/src/recipes.adoc index fea60d9cc6..3d136d6edc 100644 --- a/doc/src/recipes.adoc +++ b/doc/src/recipes.adoc @@ -1,3 +1,3 @@ [[bbv2.recipes]] -Boost.Build System V2 recipes +B2 System V2 recipes ----------------------------- diff --git a/doc/src/reference.adoc b/doc/src/reference.adoc index 12c926824e..05184817cb 100644 --- a/doc/src/reference.adoc +++ b/doc/src/reference.adoc @@ -7,7 +7,7 @@ [[bbv2.reference.init]] === Initialization -Immediately upon starting, the Boost.Build engine (*`b2`*) loads the Jam +Immediately upon starting, the B2 engine (*`b2`*) loads the Jam code that implements the build system. To do this, it searches for a file called `boost-build.jam`, first in the invocation directory, then in its parent and so forth up to the filesystem root, and finally in the @@ -202,7 +202,7 @@ This rule is deprecated and equivalent to `alias`. [[bbv2.overview.builtins.features]] == Builtin features -This section documents the features that are built-in into Boost.Build. +This section documents the features that are built-in into B2. For features with a fixed set of values, that set is provided, with the default value listed first. @@ -277,7 +277,7 @@ include::../../src/tools/features/lto-feature.jam[tag=doc] [[bbv2.reference.tools]] == Builtin tools -Boost.Build comes with support for a large number of {CPP} compilers, and +B2 comes with support for a large number of {CPP} compilers, and other tools. This section documents how to use those tools. Before using any tool, you must declare your intention, and possibly @@ -304,7 +304,7 @@ subsequent sections. [[bbv2.reference.tools.compilers]] === {CPP} Compilers -This section lists all Boost.Build modules that support {CPP} compilers +This section lists all B2 modules that support {CPP} compilers and documents how each one can be initialized. The name of support module for compiler is also the value for the `toolset` feature that can be used to explicitly request that compiler. @@ -325,14 +325,14 @@ include::../../src/tools/vacpp.jam[tag=doc] === Third-party libraries -Boost.Build provides special support for some third-party {CPP} libraries, +B2 provides special support for some third-party {CPP} libraries, documented below. [[bbv2.reference.tools.libraries.stlport]] ==== STLport library The http://stlport.org[STLport] library is an alternative implementation -of {CPP} runtime library. Boost.Build supports using that library on +of {CPP} runtime library. B2 supports using that library on Windows platform. Linux is hampered by different naming of libraries in each STLport version and is not officially supported. @@ -496,7 +496,7 @@ MacOS/Darwin, you can also pass the path of the Python framework. `conditions`:: if specified, should be a set of properties that are matched against the -build configuration when Boost.Build selects a Python configuration to use. +build configuration when B2 selects a Python configuration to use. `extension-suffix`:: A string to append to the name of extension modules before the true filename @@ -556,7 +556,7 @@ using python === Documentation tools -Boost.Build support for the Boost documentation tools is documented +B2 support for the Boost documentation tools is documented below. [[bbv2.reference.tools.doc.xsltproc]] @@ -723,7 +723,7 @@ syntax: using quickbook : command ; ---- -`command` is the quickbook executable. If it is not specified, Boost.Build +`command` is the quickbook executable. If it is not specified, B2 will compile it from source. If it is unable to find the source it will search for a quickbook executable in PATH. @@ -741,14 +741,14 @@ using fop : fop-command : java-home : java ; ---- `fop-command` is the command to run fop. If it is not specified, -Boost.Build will search for it in PATH and FOP_HOME. +B2 will search for it in PATH and FOP_HOME. Either `java-home` or `java` can be used to specify where to find java. [[bbv2.reference.modules]] == Builtin modules -This section describes the modules that are provided by Boost.Build. The +This section describes the modules that are provided by B2. The import rule allows rules from one module to be used in another module or Jamfile. @@ -1014,7 +1014,7 @@ example, given a property set containing: `gcc` `gcc-4.6.1/debug/link-static`. `` is an incidental feature and `` and `` are free features, so they do not affect the path. -Sometimes the paths produced by Boost.Build can become excessively long. +Sometimes the paths produced by B2 can become excessively long. There are a couple of command line options that can help with this. `--abbreviate-paths` reduces each element to no more than five characters. For example, `link-static` becomes `lnk-sttc`. The `--hash` option reduces the diff --git a/doc/src/standalone.adoc b/doc/src/standalone.adoc index 89d78f8449..9b7c0b4b1c 100644 --- a/doc/src/standalone.adoc +++ b/doc/src/standalone.adoc @@ -1,4 +1,4 @@ -= Boost.Build User Manual += B2 User Manual :copyright: Copyright 2018 Rene Rivera; Copyright 2006, 2014 Vladimir Prus :author: Rene Rivera, Vladimir Prus, Steven Watanabe :toc: left diff --git a/doc/src/tasks.adoc b/doc/src/tasks.adoc index 8d5e67a0c5..c5f7ab62e1 100644 --- a/doc/src/tasks.adoc +++ b/doc/src/tasks.adoc @@ -1,7 +1,7 @@ [[bbv2.tasks]] = Common tasks -This section describes main targets types that Boost.Build supports +This section describes main targets types that B2 supports out-of-the-box. Unless otherwise noted, all mentioned main target rules have the common signature, described in link:#bbv2.overview.targets[the section called “Declaring Targets”]. @@ -22,12 +22,12 @@ exe hello This will create an executable file from the sources--in this case, one {CPP} file, one library file present in the same directory, and -another library that is created by Boost.Build. Generally, sources can -include C and {CPP} files, object files and libraries. Boost.Build will +another library that is created by B2. Generally, sources can +include C and {CPP} files, object files and libraries. B2 will automatically try to convert targets of other types. TIP: On Windows, if an application uses shared libraries, and both the -application and the libraries are built using Boost.Build, it is not +application and the libraries are built using B2, it is not possible to immediately run the application, because the `PATH` environment variable should include the path to the libraries. It means you have to either add the paths manually, or have the build place the application and the @@ -328,16 +328,16 @@ that matter are link:#bbv2.builtin.features.dependency[`dependency`] and, on Unix, link:#bbv2.builtin.features.dll-path[`dll-path`]. -NOTE: (Unix specific) On Unix, executables built using Boost.Build typically +NOTE: (Unix specific) On Unix, executables built using B2 typically contain the list of paths to all used shared libraries. For installing, -this is not desired, so Boost.Build relinks the executable with an empty +this is not desired, so B2 relinks the executable with an empty list of paths. You can also specify additional paths for installed executables using the `dll-path` feature. [[bbv2.builtins.testing]] == Testing -Boost.Build has convenient support for running unit tests. The simplest +B2 has convenient support for running unit tests. The simplest way is the `unit-test` rule, which follows the link:#bbv2.main-target-rule-syntax[common syntax]. For example: @@ -410,10 +410,10 @@ command-line option. The output will consist of lines of the form: boost-test(test-type) path : sources ---- -It is possible to process the list of tests, Boost.Build output and the +It is possible to process the list of tests, B2 output and the presence/absence of the `*.test` files created when test passes into human-readable status table of tests. Such processing utilities are not -included in Boost.Build. +included in B2. The following features adjust behavior of the testing metatargets. @@ -466,9 +466,9 @@ A description of the test. This is displayed as part of the [[bbv2.builtins.raw]] == Custom commands -For most main target rules, Boost.Build automatically figures out the +For most main target rules, B2 automatically figures out the commands to run. When you want to use new file types or support new -tools, one approach is to extend Boost.Build to support them smoothly, +tools, one approach is to extend B2 to support them smoothly, as documented in link:#bbv2.extender[Extender Manual]. However, if the new tool is only used in a single place, it might be easier just to specify the commands to run explicitly. @@ -477,7 +477,7 @@ Three main target rules can be used for that. The `make` rule allows you to construct a single file from any number of source file, by running a command you specify. The `notfile` rule allows you to run an arbitrary command, without creating any files. And finally, the `generate` rule allows you to -describe a transformation using Boost.Build's virtual targets. This is +describe a transformation using B2's virtual targets. This is higher-level than the file names that the `make` rule operates with and allows you to create more than one target, create differently named targets depending on properties, or use more than one tool. @@ -487,7 +487,7 @@ of sources using some specific command. The `notfile` is used to unconditionally run a command. Suppose you want to create the file `file.out` from the file `file.in` -by running the command `in2out`. Here is how you would do this in Boost.Build: +by running the command `in2out`. Here is how you would do this in B2: [source] ---- @@ -498,7 +498,7 @@ actions in2out } ---- -If you run `b2` and `file.out` does not exist, Boost.Build will run the +If you run `b2` and `file.out` does not exist, B2 will run the `in2out` command to create that file. For more details on specifying actions, see link:#bbv2.overview.jam_language.actions[the section called “Boost.Jam Language”]. @@ -517,11 +517,11 @@ actions echo ---- The only difference from the `make` rule is that the name of the target -is not considered a name of a file, so Boost.Build will unconditionally +is not considered a name of a file, so B2 will unconditionally run the action. The `generate` rule is used when you want to express transformations -using Boost.Build's virtual targets, as opposed to just filenames. The +using B2's virtual targets, as opposed to just filenames. The `generate` rule has the standard main target rule signature, but you are required to specify the `generating-rule` property. The value of the property should be in the form `@_rule-name_`, the named rule should have the @@ -539,7 +539,7 @@ containing build properties, and the list of instances of the list of `virtual-target` instances. The interface of the `virtual-target` class can be learned by looking at the `build/virtual-target.jam` file. The `generate` example contained in the -Boost.Build distribution illustrates how the `generate` rule can be +B2 distribution illustrates how the `generate` rule can be used. [[bbv2.reference.precompiled_headers]] @@ -548,7 +548,7 @@ used. Precompiled headers is a mechanism to speed up compilation by creating a partially processed version of some header files, and then using that version during compilations rather then repeatedly parsing the original -headers. Boost.Build supports precompiled headers with gcc and msvc +headers. B2 supports precompiled headers with gcc and msvc toolsets. To use precompiled headers, follow the following steps: @@ -560,7 +560,7 @@ libraries. Please wrap the header in `#ifdef BOOST_BUILD_PCH_ENABLED`, so that the potentially expensive inclusion of headers is not done when PCH is not enabled. Include the new header at the top of your source files. -2. Declare a new Boost.Build target for the precompiled header and add +2. Declare a new B2 target for the precompiled header and add that precompiled header to the sources of the target whose compilation you want to speed up: + @@ -573,7 +573,7 @@ exe main : main.cpp pch ; You can use the `c-pch` rule if you want to use the precompiled header in C programs. -The `pch` example in Boost.Build distribution can be used as reference. +The `pch` example in B2 distribution can be used as reference. Please note the following: @@ -598,15 +598,15 @@ details. [[bbv2.reference.generated_headers]] == Generated headers -Usually, Boost.Build handles implicit dependencies completely +Usually, B2 handles implicit dependencies completely automatically. For example, for {CPP} files, all `#include` statements are found and handled. The only aspect where user help might be needed is implicit dependency on generated files. -By default, Boost.Build handles such dependencies within one main +By default, B2 handles such dependencies within one main target. For example, assume that main target "app" has two sources, "app.cpp" and "parser.y". The latter source is converted into "parser.c" -and "parser.h". Then, if "app.cpp" includes "parser.h", Boost.Build will +and "parser.h". Then, if "app.cpp" includes "parser.h", B2 will detect this dependency. Moreover, since "parser.h" will be generated into a build directory, the path to that directory will automatically be added to the include path. @@ -629,7 +629,7 @@ of "app" for implicit-dependencies, it should consider targets from [[bbv2.tasks.crosscompile]] == Cross-compilation -Boost.Build supports cross compilation with the gcc and msvc toolsets. +B2 supports cross compilation with the gcc and msvc toolsets. When using gcc, you first need to specify your cross compiler in `user-config.jam` (see @@ -673,7 +673,7 @@ for details. [[bbv2.tasks.packagemanagers]] == Package Managers -Boost.Build support automatic, or manual, loading of generated build files +B2 support automatic, or manual, loading of generated build files from package managers. For example using the Conan package manager which generates `conanbuildinfo.jam` files B2 will load that files automatically when it loads the project at the same location. The included file can diff --git a/doc/src/tutorial.adoc b/doc/src/tutorial.adoc index cbfb25df0b..761fdb8538 100644 --- a/doc/src/tutorial.adoc +++ b/doc/src/tutorial.adoc @@ -2,13 +2,13 @@ = Tutorial This section will guide you though the most basic features of -Boost.Build. We will start with the “Hello, world” example, learn how to +B2. We will start with the “Hello, world” example, learn how to use libraries, and finish with testing and installing features. [[bbv2.tutorial.hello]] == Hello, world -The simplest project that Boost.Build can construct is stored in +The simplest project that B2 can construct is stored in `example/hello/` directory. The project is described by a file called `Jamfile` that contains: @@ -70,10 +70,10 @@ b2 --clean hello2 == Properties To represent aspects of target configuration such as debug and release -variants, or single- and multi-threaded builds portably, Boost.Build +variants, or single- and multi-threaded builds portably, B2 uses _features_ with associated _values_. For example, the `debug-symbols` feature can have a value of `on` or `off`. A _property_ is just a -(feature, value) pair. When a user initiates a build, Boost.Build +(feature, value) pair. When a user initiates a build, B2 automatically translates the requested properties into appropriate command-line flags for invoking toolset components like compilers and linkers. @@ -104,7 +104,7 @@ b2 variant=release inlining=off debug-symbols=on ---- `variant` is so commonly-used that it has been given special status as -an _implicit_ feature—Boost.Build will deduce its identity just from the +an _implicit_ feature—B2 will deduce its identity just from the name of one of its values. A complete description of features can be found in @@ -265,7 +265,7 @@ reference to another target: a library `bar` declared in the Jamfile at `../util/foo`. TIP: Some other build system have special syntax for listing dependent -libraries, for example `LIBS` variable. In Boost.Build, you just add the +libraries, for example `LIBS` variable. In B2, you just add the library to the list of sources. Suppose we build `app` with: @@ -276,7 +276,7 @@ b2 app optimization=full define=USE_ASM ---- Which properties will be used to build `foo`? The answer is that some -features are _propagated_ — Boost.Build attempts to use dependencies with +features are _propagated_ — B2 attempts to use dependencies with the same value of propagated features. The `` feature is propagated, so both `app` and `foo` will be compiled with full optimization. But `` is not propagated: its value will be added @@ -352,7 +352,7 @@ project Libraries can be either _static_, which means they are included in executable files that use them, or _shared_ (a.k.a. _dynamic_), which are only referred to from executables, and must be available at run -time. Boost.Build can create and use both kinds. +time. B2 can create and use both kinds. The kind of library produced from a `lib` target is determined by the value of the `link` feature. Default value is `shared`, and to build a @@ -434,7 +434,7 @@ NOTE: (Note for non-UNIX system). Typically, shared libraries must be installed to a directory in the dynamic linker's search path. Otherwise, applications that use shared libraries can't be started. On Windows, the dynamic linker's search path is given by the `PATH` environment variable. -This restriction is lifted when you use Boost.Build testing +This restriction is lifted when you use B2 testing facilities—the `PATH` variable will be automatically adjusted before running the executable. @@ -473,7 +473,7 @@ lib demangler : demangler_gcc.cpp : gcc ; # <2> lib demangler : demangler_msvc.cpp : msvc ; # <3> ---- -When building `demangler`, Boost.Build will compare requirements for +When building `demangler`, B2 will compare requirements for each alternative with build properties to find the best match. For example, when building with `gcc` alternative *(2)*, will be selected, and when building with `msvc` alternative *(3)* will be diff --git a/example/customization/readme.txt b/example/customization/readme.txt index 7ee04f1a24..6a799277a2 100644 --- a/example/customization/readme.txt +++ b/example/customization/readme.txt @@ -1,10 +1,10 @@ -Copyright 2003 Vladimir Prus -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +Copyright 2003 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) This example show how to add a new target type and a new tool support to -Boost.Build. Please refer to extender manual for a complete description of this +B2. Please refer to extender manual for a complete description of this example. Note that this example requires Python. If cygwin Python on Windows is to be diff --git a/example/customization/verbatim.jam b/example/customization/verbatim.jam index 700aafb9a8..7b51604c4e 100644 --- a/example/customization/verbatim.jam +++ b/example/customization/verbatim.jam @@ -1,8 +1,8 @@ -# Copyright 2003, 2004 Vladimir Prus -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +# Copyright 2003, 2004 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -# This file shows some of the primary customization mechanisms in Boost.Build V2 +# This file shows some of the primary customization mechanisms in B2 V2 # and should serve as a basic for your own customization. # Each part has a comment describing its purpose, and you can pick the parts # which are relevant to your case, remove everything else, and then change names @@ -10,7 +10,7 @@ import os ; -# Declare a new target type. This allows Boost.Build to do something sensible +# Declare a new target type. This allows B2 to do something sensible # when targets with the .verbatim extension are found in sources. import type ; type.register VERBATIM : verbatim ; @@ -23,7 +23,7 @@ import scanner ; # that class has all the interesting logic, and we only need # to override the 'pattern' method which return regular # expression to use when scanning. -class verbatim-scanner : common-scanner +class verbatim-scanner : common-scanner { rule pattern ( ) { @@ -37,7 +37,7 @@ class verbatim-scanner : common-scanner scanner.register verbatim-scanner : include ; # Assign the scanner class to the target type. # Now, all .verbatim sources will be scanned. -# To test this, build the project, touch the +# To test this, build the project, touch the # t2.verbatim file and build again. type.set-scanner VERBATIM : verbatim-scanner ; @@ -47,7 +47,7 @@ generators.register-standard verbatim.inline-file : VERBATIM : CPP ; # Note: To use Cygwin Python on Windows change the following line # to "python inline_file.py $(<) $(>)" # Also, make sure that "python" in in PATH. -actions inline-file +actions inline-file { "./inline_file.py" $(<) $(>) } diff --git a/example/generate/README.txt b/example/generate/README.txt index fc2b207723..018cbb5645 100644 --- a/example/generate/README.txt +++ b/example/generate/README.txt @@ -6,6 +6,6 @@ This example shows the 'generate' rule, that allows you to construct target using any arbitrary set of transformation and commands. The rule is similar to 'make' and 'notfile', but unlike those, you can operate -in terms of Boost.Build 'virtual targets', which is more flexible. +in terms of B2 'virtual targets', which is more flexible. Please consult the docs for more explanations. diff --git a/example/gettext/readme.txt b/example/gettext/readme.txt index 9c8fee6fd9..097e49b69f 100644 --- a/example/gettext/readme.txt +++ b/example/gettext/readme.txt @@ -4,7 +4,7 @@ Distributed under the Boost Software License, Version 1.0. This example shows how it is possible to use GNU gettext utilities with -Boost.Build. +B2. A simple translation file is compiled and installed as message catalog for russian. The main application explicitly switches to russian locale and outputs diff --git a/example/python_modules/python_helpers.jam b/example/python_modules/python_helpers.jam index 5a79aeebf2..bbeb7007c5 100644 --- a/example/python_modules/python_helpers.jam +++ b/example/python_modules/python_helpers.jam @@ -7,7 +7,7 @@ local here = [ modules.binding $(__name__) ] ; here = $(here:D) ; modules.poke : EXTRA_PYTHONPATH : $(here) ; -# Import the Python rules to Boost.Build +# Import the Python rules to B2 PYTHON_IMPORT_RULE python_helpers : test1 : python_helpers : test1 ; PYTHON_IMPORT_RULE python_helpers : test2 : python_helpers : test2 ; diff --git a/example/python_modules/python_helpers.py b/example/python_modules/python_helpers.py index 8148f57c35..303363e915 100644 --- a/example/python_modules/python_helpers.py +++ b/example/python_modules/python_helpers.py @@ -2,7 +2,7 @@ # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -# Declare a couple of functions called from Boost.Build +# Declare a couple of functions called from B2 # # Each function will receive as many arguments as there ":"-separated # arguments in bjam call. Each argument is a list of strings. diff --git a/example/python_modules/readme.txt b/example/python_modules/readme.txt index 0fe6ee55e6..76b219117a 100644 --- a/example/python_modules/readme.txt +++ b/example/python_modules/readme.txt @@ -3,7 +3,7 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -This example shows how you can use Python modules from Boost.Build. +This example shows how you can use Python modules from B2. In order to do this, you need to build bjam with Python support, by running: diff --git a/example/qt/README.txt b/example/qt/README.txt index d187c31c36..d6977b584e 100644 --- a/example/qt/README.txt +++ b/example/qt/README.txt @@ -1,9 +1,9 @@ -Copyright 2005 Vladimir Prus -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +Copyright 2005 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -This directory contains Boost.Build examples for the Qt library +This directory contains B2 examples for the Qt library (http://www.trolltech.com/products/qt/index.html). The current examples are: @@ -14,7 +14,7 @@ The current examples are: For convenience, there are examples both for 3.* and 4.* version of Qt, they are mostly identical and differ only in source code. -All examples assumes that you just installed Boost.Build and that QTDIR +All examples assumes that you just installed B2 and that QTDIR environment variables is set (typical values can be /usr/share/qt3 and /usr/share/qt4). After adding "using qt ..." to your user-config.jam, you would have to remove "using qt ; " statements from example Jamroot files. diff --git a/example/try_compile/Jamroot.jam b/example/try_compile/Jamroot.jam index 893a03fdc6..3131e722ec 100644 --- a/example/try_compile/Jamroot.jam +++ b/example/try_compile/Jamroot.jam @@ -1,5 +1,5 @@ -# This example shows performing configure checks in Boost.Build, +# This example shows performing configure checks in B2, # e.g. to check for some system function or compiler quirk. # First, declare a metatarget that we'll try to build. @@ -8,8 +8,8 @@ obj foo : foo.cpp ; explicit foo ; # Declare a target that depends on configure check result. -exe main - : main.cpp +exe main + : main.cpp # The check-target-builds invocation in requirements section will # - build the specified metatarget # - if it builds OK, add the properties in the second parameter diff --git a/example/user-config.jam b/example/user-config.jam index df86176cd7..8b4aed1bac 100644 --- a/example/user-config.jam +++ b/example/user-config.jam @@ -4,9 +4,9 @@ # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -# This file is used to configure your Boost.Build installation. You can modify +# This file is used to configure your B2 installation. You can modify # this file in place, or you can place it in a permanent location so that it -# does not get overwritten should you get a new version of Boost.Build. See: +# does not get overwritten should you get a new version of B2. See: # # http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html # diff --git a/notes/build_dir_option.txt b/notes/build_dir_option.txt index 6dbecaed68..0ebd3bef7a 100644 --- a/notes/build_dir_option.txt +++ b/notes/build_dir_option.txt @@ -42,7 +42,7 @@ then with the same value of --build-dir we'd act as if Jamroot contained: project foo : build-dir /tmp/build/foo/bin.v2 ; We can't drop "bin.v2" because it's quite possible that the name of build dir -have specific meaning. For example, it can be used to separate Boost.Build V1 +have specific meaning. For example, it can be used to separate B2 V1 and V2 build results. The --build-dir option has no effect if Jamroot does not define any project id. diff --git a/notes/release_procedure.txt b/notes/release_procedure.txt index f17f38a27b..9ed95f1e64 100644 --- a/notes/release_procedure.txt +++ b/notes/release_procedure.txt @@ -1,9 +1,9 @@ -Copyright 2003, 2005, 2006 Vladimir Prus -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +Copyright 2003, 2005, 2006 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - Boost.Build V2 release procedure. + B2 V2 release procedure. [ Must be done from a Unix shell ] @@ -12,21 +12,21 @@ Distributed under the Boost Software License, Version 1.0. ones. Make sure that "bjam --version" output is correct. Update version string if - needed. Update bjam version and the version check is necessary. + needed. Update bjam version and the version check is necessary. Check the download locations in "index.html". Check that "last modified" string in index.html is correct. 1. Make sure you don't have any local modification, and create SVN directory https://svn.boost.org/svn/boost/branches/build/Milestone_X - + Then, copy: - + https://svn.boost.org/svn/boost/trunk/tools/build https://svn.boost.org/svn/boost/trunk/tools/jam - + to that directory. - + 2. Run svn co https://svn.boost.org/svn/boost/branches/build/Milestone_X boost-build @@ -52,8 +52,8 @@ Distributed under the Boost Software License, Version 1.0. - Go to https://sourceforge.net/project/admin/editpackages.php?group_id=7586 - - - Create new Boost.Build release. Name it 2.0-mXX + + - Create new B2 release. Name it 2.0-mXX - Upload the changelog. Be sure to turn the "Preserve my pre-formatted text" checkbox. @@ -69,15 +69,15 @@ Distributed under the Boost Software License, Version 1.0. - In a separate browser, Download the files and verify checksums. - In SF file release interface, send email notice. - + 9. Announce the release, etc. -10. Login to SF and update the current-release redirects in +10. Login to SF and update the current-release redirects in /home/groups/b/bo/boost/htdocs/boost-build2/.htaccess. -11. If any issues were found during release in this document or in +11. If any issues were found during release in this document or in test-config-example.jam, commit those changes. The release need not be redone, but changes must be committed. 12. Set release date in changes.txt and commit. - + diff --git a/src/bootstrap.jam b/src/bootstrap.jam index af3e8bf506..04cc023e48 100644 --- a/src/bootstrap.jam +++ b/src/bootstrap.jam @@ -4,11 +4,11 @@ # License Version 1.0. (See accompanying file LICENSE_1_0.txt or # http://www.boost.org/LICENSE_1_0.txt) -# This file handles initial phase of Boost.Build loading. -# Boost.Jam has already figured out where Boost.Build is +# This file handles initial phase of B2 loading. +# Boost.Jam has already figured out where B2 is # and loads this file, which is responsible for initialization # of basic facilities such a module system and loading the -# main Boost.Build module, build-system.jam. +# main B2 module, build-system.jam. # # Exact operation of this module is not interesting, it makes # sense to look at build-system.jam right away. diff --git a/src/build/config-cache.jam b/src/build/config-cache.jam index 4afba419f3..65bf91a8c5 100644 --- a/src/build/config-cache.jam +++ b/src/build/config-cache.jam @@ -26,7 +26,7 @@ rule save ( ) { local cache-file-native = [ path.native $(.cache-file) ] ; local target = $(cache-file-native) ; - local contents = "# Automatically generated by Boost.Build.\n# Do not edit.\n\nmodule config-cache {\n" ; + local contents = "# Automatically generated by B2.\n# Do not edit.\n\nmodule config-cache {\n" ; for local var in $(.all-vars) { local transformed ; diff --git a/src/build/configure.jam b/src/build/configure.jam index 0554fd4c0b..646b05a035 100644 --- a/src/build/configure.jam +++ b/src/build/configure.jam @@ -155,7 +155,7 @@ if --reconfigure in [ modules.peek : ARGV ] # Handle the --reconfigure option rule maybe-force-rebuild ( targets * ) -{ +{ if $(.reconfigure) { local all-targets ; @@ -176,7 +176,7 @@ rule try-build ( targets * : ps : what : retry ? ) local cache-name = $(what) [ $(ps).raw ] ; cache-name = $(cache-name:J=-) ; local value = [ config-cache.get $(cache-name) ] ; - + local result ; local jam-targets ; @@ -186,10 +186,10 @@ rule try-build ( targets * : ps : what : retry ? ) { jam-targets += [ $(t).actualize ] ; } - + if $(value) { - local x = [ PAD " - $(what)" : $(.width) ] ; + local x = [ PAD " - $(what)" : $(.width) ] ; if $(value) = true { .$(what)-supported.$(ps) = yes ; @@ -200,7 +200,7 @@ rule try-build ( targets * : ps : what : retry ? ) { log-check-result "$(x) : no (cached)" ; } - } + } else if ! UPDATE_NOW in [ RULENAMES ] { # Cannot determine. Assume existence. @@ -230,7 +230,7 @@ rule try-build ( targets * : ps : what : retry ? ) { config-cache.set $(cache-name) : false ; } - } + } return $(result) ; } @@ -245,7 +245,7 @@ rule try-find-build ( ps : what : * ) local cache-name = $(what) $($(args)[1]) [ $(ps).raw ] ; cache-name = $(cache-name:J=-) ; local value = [ config-cache.get $(cache-name) ] ; - + local result ; local jam-targets ; @@ -329,7 +329,7 @@ rule builds-raw ( metatarget-reference : project : ps : what : retry ? ) { .$(what)-tested.$(ps) = true ; - local targets = [ targets.generate-from-reference + local targets = [ targets.generate-from-reference $(metatarget-reference) : $(project) : $(ps) ] ; result = [ try-build $(targets[2-]) : $(ps) : $(what) : $(retry) ] ; @@ -458,7 +458,7 @@ rule find-builds ( what : properties * : * ) } -# Called by Boost.Build startup code to specify the file to receive the +# Called by B2 startup code to specify the file to receive the # configuration check results. Should never be called by user code. # rule set-log-file ( log-file ) diff --git a/src/build/generators.jam b/src/build/generators.jam index 609ab1bbff..36d8304bf9 100644 --- a/src/build/generators.jam +++ b/src/build/generators.jam @@ -32,7 +32,7 @@ # # Likewise, when generator tries to convert sources to consumable types, it can # get more targets that it was asked for. The question is what to do with extra -# targets. Boost.Build attempts to convert them to requested types, and attempts +# targets. B2 attempts to convert them to requested types, and attempts # that as early as possible. Specifically, this is done after invoking each # generator. TODO: An example is needed to document the rationale for trying # extra target conversion at that point. @@ -40,7 +40,7 @@ # In order for the system to be able to use a specific generator instance 'when # needed', the instance needs to be registered with the system using # generators.register() or one of its related rules. Unregistered generators may -# only be run explicitly and will not be considered by Boost.Build when when +# only be run explicitly and will not be considered by B2 when when # converting between given target types. import "class" : new ; @@ -222,7 +222,7 @@ class generator self.name-prefix += $(m[3]:E="") ; self.name-postfix += $(m[4]:E="") ; } - + for local r in [ requirements ] { if $(r:G=) diff --git a/src/build/project.jam b/src/build/project.jam index bd65b0a0a4..172315e4f9 100644 --- a/src/build/project.jam +++ b/src/build/project.jam @@ -328,7 +328,7 @@ local rule load-jamfile ( dir : jamfile-module : synthesize ? ) errors.error "Multiple Jamfiles found at '$(dir)'" : "Filenames are: " $(jamfile-to-load:D=) ; } - + if ! $(jamfile-to-load) && $(synthesize) { jamfile-to-load = $(dir)/@ ; @@ -964,7 +964,7 @@ rule target ( project-module : allow-missing ? ) } -# Defines a Boost.Build extension project. Such extensions usually contain +# Defines a B2 extension project. Such extensions usually contain # library targets and features that can be used by many people. Even though # extensions are really projects, they can be initialized as a module would be # with the "using" (project.project-rules.using) mechanism. @@ -988,7 +988,7 @@ rule extension ( id space ? : options * : * ) { root-project = [ project.attribute $(root-project) parent-module ] ; } - + # Default to creating extensions in /ext/.. project space. local id = $(1[1]) ; local space = $(1[2]) ; diff --git a/src/build/property-set.jam b/src/build/property-set.jam index d7d737f059..ae6dd2ca40 100644 --- a/src/build/property-set.jam +++ b/src/build/property-set.jam @@ -20,7 +20,7 @@ import option ; # rule should be used to create new instances. Instances are immutable. # # Each property is classified with regard to its effect on build results. -# Incidental properties have no effect on build results, from Boost.Build's +# Incidental properties have no effect on build results, from B2's # point of view. Others are either free, or non-free and we refer to non-free # ones as 'base'. Each property belongs to exactly one of those categories. # @@ -399,7 +399,7 @@ class property-set if $(ignore-relevance) || $(p:G) in $(relevant-features) { local att = [ feature.attributes $(p:G) ] ; - if ! ( incidental in $(att) ) + if ! ( incidental in $(att) ) { self.relevant += $(p) ; if ! ( free in $(att) ) diff --git a/src/build/version.jam b/src/build/version.jam index fa34d32d2a..e6f0c8fe08 100644 --- a/src/build/version.jam +++ b/src/build/version.jam @@ -21,7 +21,7 @@ rule print ( ) { if [ verify-engine-version ] { - ECHO "Boost.Build" [ boost-build ] ; + ECHO "B2" [ boost-build ] ; } } @@ -37,9 +37,9 @@ rule verify-engine-version ( ) local l = [ modules.binding version ] ; l = $(l:D) ; l = $(l:D) ; - ECHO "warning: mismatched versions of Boost.Build engine and core" ; - ECHO "warning: Boost.Build engine ($(e)) is $(v:J=.)" ; - ECHO "warning: Boost.Build core (at $(l)) is" [ boost-build ] ; + ECHO "warning: mismatched versions of B2 engine and core" ; + ECHO "warning: B2 engine ($(e)) is $(v:J=.)" ; + ECHO "warning: B2 core (at $(l)) is" [ boost-build ] ; } else { diff --git a/src/engine/Jambase b/src/engine/Jambase index 385c6f3138..b2f8ebf31f 100644 --- a/src/engine/Jambase +++ b/src/engine/Jambase @@ -46,7 +46,7 @@ rule find-to-root ( dir : patterns + ) BOOST_BUILD_PATH.user-value = $(BOOST_BUILD_PATH) ; # On Unix only, when BOOST_BUILD_PATH is not supplied by the user, set it to a -# sensible default value. This allows Boost.Build to work without any +# sensible default value. This allows B2 to work without any # environment variables, which is good in itself and also required by the Debian # Policy. if ! $(BOOST_BUILD_PATH) && $(UNIX) @@ -84,7 +84,7 @@ rule boost-build ( dir ? ) BOOST_BUILD_PATH = $(dir:R=$(.boost-build-file:D)) $(BOOST_BUILD_PATH) ; # We might have just modified the *global* value of BOOST_BUILD_PATH. The - # code that loads the rest of Boost.Build, in particular the site-config.jam + # code that loads the rest of B2, in particular the site-config.jam # and user-config.jam configuration files uses os.environ, so we need to # update the value there. _poke .ENVIRON : BOOST_BUILD_PATH : $(BOOST_BUILD_PATH) ; @@ -96,7 +96,7 @@ rule boost-build ( dir ? ) # There is no bootstrap.jam we can find, exit with an error. if ! $(.bootstrap-file) { - ECHO "Unable to load Boost.Build: could not find build system." ; + ECHO "Unable to load B2: could not find build system." ; ECHO --------------------------------------------------------- ; ECHO "$(.boost-build-file) attempted to load the build system by invoking" ; ECHO ; @@ -110,7 +110,7 @@ rule boost-build ( dir ? ) if [ MATCH .*(--debug-configuration).* : $(ARGV) ] { - ECHO "notice: loading Boost.Build from" + ECHO "notice: loading B2 from" [ NORMALIZE_PATH $(.bootstrap-file:D) ] ; } @@ -124,7 +124,7 @@ rule boost-build ( dir ? ) # invocation directory up to the root of the file-system. # # boost-build.jam is expected to invoke the "boost-build" rule to load the - # Boost.Build files. + # B2 files. local search-path = $(BOOST_BUILD_PATH) $(BOOST_ROOT) ; local self = [ SELF_PATH ] ; @@ -134,7 +134,7 @@ rule boost-build ( dir ? ) local boost-build-files = [ find-to-root [ PWD ] : boost-build.jam ] [ GLOB $(self-based-path) : boost-build.jam ] - # Another temporary measure so Jam works with Boost.Build v1. + # Another temporary measure so Jam works with B2 v1. [ GLOB $(search-path) : boost-build.jam ] ; .boost-build-file = $(boost-build-files[1]) ; @@ -143,7 +143,7 @@ rule boost-build ( dir ? ) # information. if ! $(.boost-build-file) { - ECHO "Unable to load Boost.Build: could not find \"boost-build.jam\"" ; + ECHO "Unable to load B2: could not find \"boost-build.jam\"" ; ECHO --------------------------------------------------------------- ; if ! [ MATCH .*(bjam).* : $(ARGV[1]:BL) ] @@ -176,7 +176,7 @@ rule boost-build ( dir ? ) # Check that, at minimum, the bootstrap file was found. if ! $(.bootstrap-file) { - ECHO "Unable to load Boost.Build" ; + ECHO "Unable to load B2" ; ECHO -------------------------- ; ECHO "\"$(.boost-build-file)\" was found by searching from" [ PWD ] "up to the root" ; ECHO "and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: "$(search-path:J=", ")"." ; diff --git a/src/engine/class.cpp b/src/engine/class.cpp index 8d1727f101..2e41e12f8f 100644 --- a/src/engine/class.cpp +++ b/src/engine/class.cpp @@ -151,7 +151,7 @@ OBJECT * make_class_module( LIST * xname, LIST * bases, FRAME * frame ) { /* - Initialize variables that Boost.Build inserts in every object. + Initialize variables that B2 inserts in every object. We want to avoid creating the object's hash if it isn't needed. */ int num = class_module->num_fixed_variables; diff --git a/src/engine/debian/control b/src/engine/debian/control index c7f151932e..46747d8388 100644 --- a/src/engine/debian/control +++ b/src/engine/debian/control @@ -8,9 +8,9 @@ Standards-Version: 3.5.2 Package: bjam Architecture: any Depends: ${shlibs:Depends} -Description: Build tool - Boost.Jam is a portable build tool with its own interpreted language, which - allows to implement rather complex logic in a readable way and without - resorting to external programs. It is a descendant of Jam/MR tool modified to - suit the needs of Boost.Build. In particular, modules and rule parameters +Description: Build tool + Boost.Jam is a portable build tool with its own interpreted language, which + allows to implement rather complex logic in a readable way and without + resorting to external programs. It is a descendant of Jam/MR tool modified to + suit the needs of B2. In particular, modules and rule parameters were added, as well as several new builtins. diff --git a/src/engine/jambase.cpp b/src/engine/jambase.cpp index 8575880b43..055c8f1d8a 100644 --- a/src/engine/jambase.cpp +++ b/src/engine/jambase.cpp @@ -46,7 +46,7 @@ const char *jambase[] = { ".bootstrap-file = $(bootstrap-file[1]) ;\n", "if ! $(.bootstrap-file)\n", "{\n", -"ECHO \"Unable to load Boost.Build: could not find build system.\" ;\n", +"ECHO \"Unable to load B2: could not find build system.\" ;\n", "ECHO --------------------------------------------------------- ;\n", "ECHO \"$(.boost-build-file) attempted to load the build system by invoking\" ;\n", "ECHO ;\n", @@ -59,7 +59,7 @@ const char *jambase[] = { "}\n", "if [ MATCH .*(--debug-configuration).* : $(ARGV) ]\n", "{\n", -"ECHO \"notice: loading Boost.Build from\"\n", +"ECHO \"notice: loading B2 from\"\n", "[ NORMALIZE_PATH $(.bootstrap-file:D) ] ;\n", "}\n", "include $(.bootstrap-file) ;\n", @@ -76,7 +76,7 @@ const char *jambase[] = { ".boost-build-file = $(boost-build-files[1]) ;\n", "if ! $(.boost-build-file)\n", "{\n", -"ECHO \"Unable to load Boost.Build: could not find \\\"boost-build.jam\\\"\" ;\n", +"ECHO \"Unable to load B2: could not find \\\"boost-build.jam\\\"\" ;\n", "ECHO --------------------------------------------------------------- ;\n", "if ! [ MATCH .*(bjam).* : $(ARGV[1]:BL) ]\n", "{\n", @@ -98,7 +98,7 @@ const char *jambase[] = { "include $(.boost-build-file) ;\n", "if ! $(.bootstrap-file)\n", "{\n", -"ECHO \"Unable to load Boost.Build\" ;\n", +"ECHO \"Unable to load B2\" ;\n", "ECHO -------------------------- ;\n", "ECHO \"\\\"$(.boost-build-file)\\\" was found by searching from\" [ PWD ] \"up to the root\" ;\n", "ECHO \"and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: \"$(search-path:J=\", \")\".\" ;\n", diff --git a/src/engine/jamgram.cpp b/src/engine/jamgram.cpp index 66210b34d0..d4ccc8e4f9 100644 --- a/src/engine/jamgram.cpp +++ b/src/engine/jamgram.cpp @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.5.1. */ +/* A Bison parser, made by GNU Bison 3.5.2. */ /* Bison implementation for Yacc-like parsers in C @@ -48,7 +48,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.5.1" +#define YYBISON_VERSION "3.5.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" diff --git a/src/engine/jamgram.hpp b/src/engine/jamgram.hpp index eb430d9f68..984761939f 100644 --- a/src/engine/jamgram.hpp +++ b/src/engine/jamgram.hpp @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.5.1. */ +/* A Bison parser, made by GNU Bison 3.5.2. */ /* Bison interface for Yacc-like parsers in C diff --git a/src/engine/modules/readme.txt b/src/engine/modules/readme.txt index 2edf6e17f8..2a08ba10e3 100644 --- a/src/engine/modules/readme.txt +++ b/src/engine/modules/readme.txt @@ -1,3 +1,3 @@ This directory constains sources which declare native -rules for Boost.Build modules. \ No newline at end of file +rules for B2 modules. \ No newline at end of file diff --git a/src/engine/native.h b/src/engine/native.h index 8df44cbbee..f80b0e0f04 100644 --- a/src/engine/native.h +++ b/src/engine/native.h @@ -20,7 +20,7 @@ typedef struct native_rule_t /* Version of the interface that the native rule provides. It is possible * that we want to change the set parameter for existing native rule. In - * that case, version number should be incremented so Boost.Build can check + * that case, version number should be incremented so B2 can check * for the version it relies on. * * Versions are numbered from 1. diff --git a/src/tools/acc.jam b/src/tools/acc.jam index a8f7137cd1..f7ecfe8c3a 100644 --- a/src/tools/acc.jam +++ b/src/tools/acc.jam @@ -48,7 +48,7 @@ Specifies additional command line options that will be passed to the linker. |# # end::doc[] # -# Boost.Build V2 toolset for the HP aC++ compiler. +# B2 V2 toolset for the HP aC++ compiler. # import toolset : flags ; diff --git a/src/tools/boostbook.jam b/src/tools/boostbook.jam index 925df80be5..e78a7d9514 100644 --- a/src/tools/boostbook.jam +++ b/src/tools/boostbook.jam @@ -287,7 +287,7 @@ rule find-tools ( docbook-xsl-dir ? : docbook-dtd-dir ? : boostbook-dir ? ) docbook-dtd-dir ?= [ modules.peek : DOCBOOK_DTD_DIR ] ; boostbook-dir ?= [ modules.peek : BOOSTBOOK_DIR ] ; - # Look for the boostbook stylesheets relative to BOOST_ROOT and Boost.Build. + # Look for the boostbook stylesheets relative to BOOST_ROOT and B2. local boost-build-root = [ path.make [ build-system.location ] ] ; local boostbook-search-dirs = [ path.join $(boost-build-root) .. .. ] ; diff --git a/src/tools/borland.jam b/src/tools/borland.jam index f8b8a0dcb3..6ad52e0de2 100644 --- a/src/tools/borland.jam +++ b/src/tools/borland.jam @@ -1,8 +1,8 @@ -# Copyright 2005 Dave Abrahams -# Copyright 2003 Rene Rivera -# Copyright 2003, 2004, 2005 Vladimir Prus -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +# Copyright 2005 Dave Abrahams +# Copyright 2003 Rene Rivera +# Copyright 2003, 2004, 2005 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) #| tag::doc[] @@ -30,7 +30,7 @@ using borland : [version] : [c++-compile-command] : [compiler options] ; This statement may be repeated several times, if you want to configure several versions of the compiler. -If the command is not specified, Boost.Build will search for a binary +If the command is not specified, B2 will search for a binary named `bcc32` in PATH. The following options can be provided, using @@ -69,22 +69,22 @@ rule init ( version ? : command * : options * ) { local condition = [ common.check-init-parameters borland : version $(version) ] ; - - local command = [ common.get-invocation-command borland : bcc32.exe + + local command = [ common.get-invocation-command borland : bcc32.exe : $(command) ] ; - - common.handle-options borland : $(condition) : $(command) : $(options) ; - + + common.handle-options borland : $(condition) : $(command) : $(options) ; + if $(command) { command = [ common.get-absolute-tool-path $(command[-1]) ] ; - } - root = $(command:D) ; - + } + root = $(command:D) ; + flags borland.compile STDHDRS $(condition) : $(root)/include/ ; flags borland.link STDLIBPATH $(condition) : $(root)/lib ; flags borland.link RUN_PATH $(condition) : $(root)/bin ; - flags borland .root $(condition) : $(root)/bin/ ; + flags borland .root $(condition) : $(root)/bin/ ; } @@ -101,7 +101,7 @@ generators.register-c-compiler borland.compile.c++ : CPP : OBJ : borlan generators.register-c-compiler borland.compile.c : C : OBJ : borland ; generators.register-standard borland.asm : ASM : OBJ : borland ; -# Declare flags +# Declare flags flags borland.compile OPTIONS on : -v ; flags borland.link OPTIONS on : -v ; @@ -131,7 +131,7 @@ flags borland.compile OPTIONS on : -w! ; # This should be not for DLL flags borland OPTIONS console : -tWC ; -# -tWR sets -tW as well, so we turn it off here and then turn it +# -tWR sets -tW as well, so we turn it off here and then turn it # on again later if we need it: flags borland OPTIONS shared : -tWR -tWC ; flags borland OPTIONS gui : -tW ; @@ -158,7 +158,7 @@ flags borland NEED_IMPLIB LIB/shared : "" ; # -q no banner # -c compile to object # -P C++ code regardless of file extension -# -a8 8 byte alignment, this option is on in the IDE by default +# -a8 8 byte alignment, this option is on in the IDE by default # and effects binary compatibility. # @@ -205,7 +205,7 @@ flags borland.archive AROPTIONS ; # values tlib fails when building large applications. # CONSIDER: don't know what 'together' is for... actions updated together piecemeal archive -{ +{ $(.set-path)$(.root:W)$(.old-path) tlib $(AROPTIONS) /P256 /u /a /C "$(<:W)" +-"$(>:W)" } @@ -215,7 +215,7 @@ if [ os.name ] = CYGWIN { .set-path = "cmd /S /C set \"PATH=" ; .old-path = ";%PATH%\" \"&&\"" ; - + # Couldn't get TLIB to stop being confused about pathnames # containing dashes (it seemed to treat them as option separators @@ -224,11 +224,11 @@ if [ os.name ] = CYGWIN # about pathname style! Forward slashes, too, are treated as # options. actions updated together piecemeal archive - { + { chdir $(<:D) echo +-$(>:BS) > $(<:BS).rsp $(.set-path)$(.root)$(.old-path) "tlib.exe" $(AROPTIONS) /P256 /C $(<:BS) @$(<:BS).rsp && $(RM) $(<:BS).rsp - } + } } else if [ os.name ] = NT { diff --git a/src/tools/cast.jam b/src/tools/cast.jam index 41b0ac338e..77a7710ddc 100644 --- a/src/tools/cast.jam +++ b/src/tools/cast.jam @@ -11,7 +11,7 @@ # # exe main : main.cpp [ cast _ moccable-cpp : widget.cpp ] ; # -# Boost.Build will assign target type CPP to both main.cpp and widget.cpp. Then, +# B2 will assign target type CPP to both main.cpp and widget.cpp. Then, # the cast rule will change target type of widget.cpp to MOCCABLE-CPP, and Qt # support will run the MOC tool as part of the build process. # diff --git a/src/tools/como.jam b/src/tools/como.jam index 9a840581e6..3e6051c1fa 100644 --- a/src/tools/como.jam +++ b/src/tools/como.jam @@ -21,7 +21,7 @@ using como : [version] : [c++-compile-command] : [compiler options] ; This statement may be repeated several times, if you want to configure several versions of the compiler. -If the command is not specified, Boost.Build will search for a binary +If the command is not specified, B2 will search for a binary named `como` in PATH. The following options can be provided, using @@ -63,7 +63,7 @@ rule init ( * : * ) { if [ os.name ] = LINUX { - toolset.using como-linux : + toolset.using como-linux : $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; } else @@ -71,5 +71,5 @@ rule init ( * : * ) toolset.using como-win : $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; - } + } } diff --git a/src/tools/cray.jam b/src/tools/cray.jam index 3ff7082041..107b3dbbc5 100644 --- a/src/tools/cray.jam +++ b/src/tools/cray.jam @@ -140,7 +140,7 @@ rule init ( : : options * : requirements * ) build = [ MATCH "(.......)................................." : $(build) ] ; } - # IMPORTANT: 'set-cray-feature-defaults' causes the Boost.Build tests to + # IMPORTANT: 'set-cray-feature-defaults' causes the B2 tests to # fail. I tried using an 'init' argument called 'ignore-cray-defaults' and # setting up 'test-config.jam' to pass 'ignore-cray-defaults' during # testing, but I couldn't get the test to read my 'test-config.jam' file @@ -153,7 +153,7 @@ rule init ( : : options * : requirements * ) # 'check-init-parameters' ensures that each time a toolset is initialized, # it is initialized with a unique configuration. The return value is a - # Boost.Build property condition which uniquely identifies this + # B2 property condition which uniquely identifies this # configured instance of this toolset. Typically, toolsets use the # returned condition as the conditional in a 'toolset.flags' call to set # flags specific to this configuration of this toolset. @@ -281,7 +281,7 @@ feature.extend toolset : cray ; feature.set-default toolset : cray ; # CCE is different from other compilers in that it optimizes, inlines, and -# vectorizes by default. Boost.Build assumes that 'off' is the default for +# vectorizes by default. B2 assumes that 'off' is the default for # all compilers. However, for CCE, 'off' and 'default' have different # meanings. For CCE, 'off' requires an additional command line argument to # turn the feature off. 'default' will not include an additional command @@ -904,8 +904,8 @@ generators.register [ new cray-linking-generator : SHARED_LIB : cray ] ; -# Tell Boost.Build to prefer 'cray' generators over other valid -# generators. This is used to resolve a tie when Boost.Build finds that +# Tell B2 to prefer 'cray' generators over other valid +# generators. This is used to resolve a tie when B2 finds that # there is more than one viable generator for a particular build request. generators.override cray.prebuilt : builtin.prebuilt ; diff --git a/src/tools/cw.jam b/src/tools/cw.jam index 8b4b3e18c5..531c9c9fa5 100644 --- a/src/tools/cw.jam +++ b/src/tools/cw.jam @@ -9,7 +9,7 @@ = Code Warrior The `cw` module support CodeWarrior compiler, originally produced by -Metrowerks and presently developed by Freescale. Boost.Build supports +Metrowerks and presently developed by Freescale. B2 supports only the versions of the compiler that target x86 processors. All such versions were released by Metrowerks before acquisition and are not sold any longer. The last version known to work is 9.4. @@ -23,7 +23,7 @@ using cw : [version] : [c++-compile-command] : [compiler options] ; This statement may be repeated several times, if you want to configure several versions of the compiler. -If the command is not specified, Boost.Build will search for a binary +If the command is not specified, B2 will search for a binary named `mwcc` in default installation paths and in PATH. The following options can be provided, using @@ -87,7 +87,7 @@ nl = " rule init ( version ? : command * : options * ) { # TODO: fix the $(command[1]) = $(compiler) issue - + setup = [ get-values : $(options) ] ; setup ?= cwenv.bat ; compiler = [ get-values : $(options) ] ; @@ -100,10 +100,10 @@ rule init ( version ? : command * : options * ) command = [ common.get-invocation-command cw : mwcc.exe : $(command) : [ default-paths $(version) ] ] ; - + common.handle-options cw : $(condition) : $(command) : $(options) ; - local root = [ feature.get-values : $(options) ] ; + local root = [ feature.get-values : $(options) ] ; if $(command) { command = [ common.get-absolute-tool-path $(command[-1]) ] ; @@ -116,11 +116,11 @@ rule init ( version ? : command * : options * ) other-tools = $(tool-root:D) ; root ?= $(other-tools:D) ; - - flags cw.link RUN_PATH $(condition) : + + flags cw.link RUN_PATH $(condition) : "$(root)\\Win32-x86 Support\\Libraries\\Runtime" - "$(root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ; - + "$(root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ; + setup = "set \"CWFOLDER="$(root)"\" && call \""$(setup)"\" > nul " ; if [ os.name ] = NT @@ -142,21 +142,21 @@ rule init ( version ? : command * : options * ) flags cw.link .LD $(condition) : $(prefix)$(linker) ; flags cw.archive .LD $(condition) : $(prefix)$(linker) ; - if [ MATCH "^([89]\\.)" : $(version) ] + if [ MATCH "^([89]\\.)" : $(version) ] { if [ os.name ] = NT { # The runtime libraries flags cw.compile CFLAGS static/single/off : -runtime ss ; flags cw.compile CFLAGS static/single/on : -runtime ssd ; - + flags cw.compile CFLAGS static/multi/off : -runtime sm ; flags cw.compile CFLAGS static/multi/on : -runtime smd ; - + flags cw.compile CFLAGS shared/off : -runtime dm ; flags cw.compile CFLAGS shared/on : -runtime dmd ; - } - } + } + } } diff --git a/src/tools/dmc.jam b/src/tools/dmc.jam index 4d3d0e24ad..cebeefa544 100644 --- a/src/tools/dmc.jam +++ b/src/tools/dmc.jam @@ -25,7 +25,7 @@ using dmc : [version] : [c++-compile-command] : [compiler options] ; This statement may be repeated several times, if you want to configure several versions of the compiler. -If the command is not specified, Boost.Build will search for a binary +If the command is not specified, B2 will search for a binary named `dmc` in PATH. The following options can be provided, using @@ -61,20 +61,20 @@ feature.extend toolset : dmc ; rule init ( version ? : command * : options * ) { local condition = [ common.check-init-parameters dmc : version $(version) ] ; - + local command = [ common.get-invocation-command dmc : dmc : $(command) ] ; command ?= dmc ; - common.handle-options dmc : $(condition) : $(command) : $(options) ; - + common.handle-options dmc : $(condition) : $(command) : $(options) ; + if $(command) { command = [ common.get-absolute-tool-path $(command[-1]) ] ; - } - root = $(command:D) ; - + } + root = $(command:D) ; + if $(root) - { + { # DMC linker is sensitive the the direction of slashes, and # won't link if forward slashes are used in command. root = [ sequence.join [ regex.split $(root) "/" ] : "\\" ] ; @@ -83,7 +83,7 @@ rule init ( version ? : command * : options * ) else { flags dmc .root $(condition) : "" ; - } + } } diff --git a/src/tools/doxygen.jam b/src/tools/doxygen.jam index 2041803686..a676b6c605 100644 --- a/src/tools/doxygen.jam +++ b/src/tools/doxygen.jam @@ -282,7 +282,7 @@ toolset.uses-features doxygen.headers-to-doxyfile : "" ; # rule headers-to-doxyfile ( target : sources * : properties * ) { - local text = "# Generated by Boost.Build version 2" ; + local text = "# Generated by B2 version 2" ; local output-dir ; @@ -733,7 +733,7 @@ rule doxygen ( target : sources + : requirements * : default-build * : images-location = $(images-location)/ ; } - requirements += + requirements += $(target).doxygen-xml-images boost.doxygen.formuladir=$(images-location) ; } diff --git a/src/tools/features/cflags-feature.jam b/src/tools/features/cflags-feature.jam index 6b1fb1b9a8..4586317f4d 100644 --- a/src/tools/features/cflags-feature.jam +++ b/src/tools/features/cflags-feature.jam @@ -12,7 +12,7 @@ The value of these features is passed without modification to the corresponding tools. For `cflags` that is both the C and {CPP} compilers, for `cxxflags` that is the {CPP} compiler, and for `linkflags` that is the linker. The features are handy when you are trying to do something special that cannot be achieved by a -higher-level feature in Boost.Build. +higher-level feature in B2. |# # end::doc[] diff --git a/src/tools/features/cxx-template-depth-feature.jam b/src/tools/features/cxx-template-depth-feature.jam index cc0fea0105..825b03a1c7 100644 --- a/src/tools/features/cxx-template-depth-feature.jam +++ b/src/tools/features/cxx-template-depth-feature.jam @@ -16,7 +16,7 @@ depth parameter. Specific toolsets may or may not provide support for this feature depending on whether their compilers provide a corresponding command-line option. + -NOTE: Due to some internal details in the current Boost.Build implementation it +NOTE: Due to some internal details in the current B2 implementation it is not possible to have features whose valid values are all positive integer. As a workaround a large set of allowed values has been defined for this feature and, if a different one is needed, user can easily add it by calling the diff --git a/src/tools/features/instruction-set-feature.jam b/src/tools/features/instruction-set-feature.jam index 09b445bbc2..d68c29afc6 100644 --- a/src/tools/features/instruction-set-feature.jam +++ b/src/tools/features/instruction-set-feature.jam @@ -14,7 +14,7 @@ Specifies for which specific instruction set the code should be generated. The code in general might not run on processors with older/different instruction sets. + -While Boost.Build allows a large set of possible values for this features, +While B2 allows a large set of possible values for this features, whether a given value works depends on which compiler you use. Please see the section <> for details. diff --git a/src/tools/features/os-feature.jam b/src/tools/features/os-feature.jam index 6a2c627902..98407e16a1 100644 --- a/src/tools/features/os-feature.jam +++ b/src/tools/features/os-feature.jam @@ -83,7 +83,7 @@ feature.set-default host-os : [ default-host-os ] ; + Specifies the operating system for which the code is to be generated. The compiler you used should be the compiler for that operating system. This option -causes Boost.Build to use naming conventions suitable for that operating +causes B2 to use naming conventions suitable for that operating system, and adjust build process accordingly. For example, with gcc, it controls if import libraries are produced for shared libraries or not. + diff --git a/src/tools/features/relevant-feature.jam b/src/tools/features/relevant-feature.jam index 8069c9f001..94ba69965f 100644 --- a/src/tools/features/relevant-feature.jam +++ b/src/tools/features/relevant-feature.jam @@ -11,7 +11,7 @@ import feature ; *Allowed values:* the name of any feature. + Indicates which other features are relevant for a given target. It is usually -not necessary to manage it explicitly, as Boost.Build can deduce it in most +not necessary to manage it explicitly, as B2 can deduce it in most cases. Features which are not relevant will not affect target paths, and will not cause conflicts. + @@ -39,7 +39,7 @@ like one. In particular, it does not support multiple comma-separated elements in the condition, and it does work correctly even in contexts where conditional properties are not allowed ** Action rules that read properties. Solution: add toolset.uses-features to - tell Boost.Build that the feature is actually used. + tell B2 that the feature is actually used. ** Generators and targets that manipulate property-sets directly. Solution: set manually. diff --git a/src/tools/features/tag-feature.jam b/src/tools/features/tag-feature.jam index 1376c67910..c03924edfb 100644 --- a/src/tools/features/tag-feature.jam +++ b/src/tools/features/tag-feature.jam @@ -22,7 +22,7 @@ rule tag ( name : type ? : property-set ) ---- + The rule will be called for each target with the default name computed by -Boost.Build, the type of the target, and property set. The rule can either +B2, the type of the target, and property set. The rule can either return a string that must be used as the name of the target, or an empty string, in which case the default name will be used. + diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 93552ec966..8910a55f2f 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -185,7 +185,7 @@ rule init ( version ? : command * : options * : requirement * ) # user (e.g. 4.4) and a 3-digit version reported by gcc. # Since only two digits are present in the binary name # anyway, insisting that user specify the 3-digit version - # when configuring Boost.Build, while it is not required on + # when configuring B2, while it is not required on # the command line, would be strange. local versionl = [ regex.split $(version) "[.]" ] ; local tool-versionl = [ regex.split $(tool-version) "[.]" ] ; diff --git a/src/tools/hp_cxx.jam b/src/tools/hp_cxx.jam index c58136db7e..82ef8080d6 100644 --- a/src/tools/hp_cxx.jam +++ b/src/tools/hp_cxx.jam @@ -21,7 +21,7 @@ using hp_cxx : [version] : [c++-compile-command] : [compiler options] ; This statement may be repeated several times, if you want to configure several versions of the compiler. -If the command is not specified, Boost.Build will search for a binary +If the command is not specified, B2 will search for a binary named `hp_cxx` in PATH. The following options can be provided, using @@ -86,9 +86,9 @@ generators.override hp_cxx.searched-lib-generator : searched-lib-generator ; rule init ( version ? : command * : options * ) { local condition = [ common.check-init-parameters hp_cxx : version $(version) ] ; - + local command = [ common.get-invocation-command hp_cxx : cxx : $(command) ] ; - + if $(command) { local root = [ common.get-absolute-tool-path $(command[-1]) ] ; @@ -96,12 +96,12 @@ rule init ( version ? : command * : options * ) if $(root) { flags hp_cxx .root $(condition) : "\"$(root)\"/" ; - } - } + } + } # If we can't find 'cxx' anyway, at least show 'cxx' in the commands command ?= cxx ; - - common.handle-options hp_cxx : $(condition) : $(command) : $(options) ; + + common.handle-options hp_cxx : $(condition) : $(command) : $(options) ; } generators.register-c-compiler hp_cxx.compile.c++ : CPP : OBJ : hp_cxx ; diff --git a/src/tools/intel-win.jam b/src/tools/intel-win.jam index b906fda898..f79fd530a2 100644 --- a/src/tools/intel-win.jam +++ b/src/tools/intel-win.jam @@ -52,7 +52,7 @@ rule init ( version ? : # the compiler version errors.error "Autodetect of version from command not implemented!" ; } local intel_versions = [ get-autodetect-versions () ] ; - if ! $(intel_versions) + if ! $(intel_versions) { errors.error "No intel compiler version found!" ; } @@ -85,7 +85,7 @@ local rule configure ( version ? : command * : options * ) errors.error "feature compatibility and vc version in toolset present!" ; } } - + if $(vc_in_version) && ! $(compatibility) { # vc Version must be stripped before check-init-parameters is called! @@ -107,11 +107,11 @@ local rule configure ( version ? : command * : options * ) toolset.using msvc : all ; msvc_versions = [ feature.values ] ; } - if ! $(.iclvars-$(version)-supported-vcs) + if ! $(.iclvars-$(version)-supported-vcs) { errors.error "Supported msvc versions not known for intel $(version)" ; } - + for local v in $(msvc_versions) { if [ MATCH "($(v))" : $(.iclvars-$(version)-supported-vcs) ] @@ -132,7 +132,7 @@ local rule configure ( version ? : command * : options * ) configure-really $(version) : $(command) : $(options) : $(v) ; } } - if ! [ feature.values ] + if ! [ feature.values ] { errors.error "Failed to register an intel toolset!" ; } @@ -144,7 +144,7 @@ local rule configure-really ( version ? : command * : options * : compatibility local rewrite-setupscript = [ feature.get-values : $(options) ] ; local condition = [ common.check-init-parameters intel-win : version $(version) : compatibility $(compatibility) ] ; - + local m = [ MATCH "([0-9]+).*" : $(version) ] ; local major = $(m[1]) ; if ! $(major) @@ -158,11 +158,11 @@ local rule configure-really ( version ? : command * : options * : compatibility errors.user-error "Invalid value for compatibility option:" $(compatibility) ; } - - command = [ get-compiler-invocation-cmd $(major) : $(command) ] ; - + + command = [ get-compiler-invocation-cmd $(major) : $(command) ] ; + common.handle-options intel-win : $(condition) : $(command) : $(options) ; - + local root = [ feature.get-values : $(options) ] ; if $(command) || $(root) { @@ -183,7 +183,7 @@ local rule configure-really ( version ? : command * : options * : compatibility setup = [ path.join $(root) "iclvars.bat" ] ; setup = [ path.native $(setup) ] ; } - + local target_types ; local iclvars_vs_arg ; if $(major) >= 12 @@ -218,17 +218,17 @@ local rule configure-really ( version ? : command * : options * : compatibility target_types = ia32 ia32_intel64 ; } } - else + else { target_types = default ; iclvars_vs_arg = $(compatibility) ; } - + local default-assembler-intel64 = ml64 ; local default-assembler-ia32_intel64 = ml64 ; local default-assembler-ia32 = "ml -coff" ; assembler = [ feature.get-values : $(options) ] ; - + for local c in $(target_types) { local cpu-conditions ; @@ -281,10 +281,10 @@ local rule configure-really ( version ? : command * : options * : compatibility ECHO "notice: [intel-cfg] condition: '$(cond)', setup: '$(setup-call)'" ; } } - + local cpu-assembler = $(assembler) ; cpu-assembler ?= $(default-assembler-$(c)) ; - + toolset.flags intel-win.compile .CC $(cpu-conditions) : icl ; toolset.flags intel-win.link .LD $(cpu-conditions) : xilink /nologo ; toolset.flags intel-win.archive .LD $(cpu-conditions) : xilink /lib /nologo ; @@ -296,7 +296,7 @@ local rule configure-really ( version ? : command * : options * : compatibility # Depending on the settings, running of tests require some runtime DLLs. toolset.flags intel-win RUN_PATH $(condition) : $(root) ; - + local C++FLAGS ; @@ -371,7 +371,7 @@ local rule configure-really ( version ? : command * : options * : compatibility toolset.flags intel-win CFLAGS $(condition) : $(C++FLAGS) ; # By default, when creating PCH, intel adds 'i' to the explicitly - # specified name of the PCH file. Of course, Boost.Build is not + # specified name of the PCH file. Of course, B2 is not # happy when compiler produces not the file it was asked for. # The option below stops this behaviour. toolset.flags intel-win CFLAGS $(condition) : -Qpchi- ; @@ -403,7 +403,7 @@ local rule get-autodetect-versions local rule get-icl-path-from-environment ( major_version ) { local path = [ os.environ ICPP_COMPILER$(major_version) ] ; - if $(path) + if $(path) { path = [ path.make $(path) ] ; local cmdpath ; @@ -446,16 +446,16 @@ local rule is-msvc-supported ( intel-version : msvc-version ) } else { - if $(.iclvars-$(intel-version)-supported-vcs) + if $(.iclvars-$(intel-version)-supported-vcs) { if [ MATCH "($(msvc-version))" : $(.iclvars-$(intel-version)-supported-vcs) ] { - return true ; + return true ; } } else { - return true ; + return true ; } } } diff --git a/src/tools/intel.jam b/src/tools/intel.jam index 04e85b9483..0c602a8c09 100644 --- a/src/tools/intel.jam +++ b/src/tools/intel.jam @@ -19,7 +19,7 @@ using intel : [version] : [c++-compile-command] : [compiler options] ; This statement may be repeated several times, if you want to configure several versions of the compiler. -If compiler command is not specified, then Boost.Build will look in PATH +If compiler command is not specified, then B2 will look in PATH for an executable `icpc` (on Linux), or `icl.exe` (on Windows). The following options can be provided, using @@ -68,17 +68,17 @@ rule init ( * : * ) { if [ os.name ] = LINUX { - toolset.using intel-linux : + toolset.using intel-linux : $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; } else if [ os.name ] = MACOSX { - toolset.using intel-darwin : + toolset.using intel-darwin : $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; } else { toolset.using intel-win : $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; - } + } } diff --git a/src/tools/mpi.jam b/src/tools/mpi.jam index 8f4b0907c5..1f1658c925 100644 --- a/src/tools/mpi.jam +++ b/src/tools/mpi.jam @@ -118,7 +118,7 @@ rule strip-eol ( string ) # Split a command-line into a set of features. Certain kinds of # compiler flags are recognized (e.g., -I, -D, -L, -l) and replaced -# with their Boost.Build equivalents (e.g., , , +# with their B2 equivalents (e.g., , , # , ). All other arguments are introduced # using the features in the unknown-features parameter, because we # don't know how to deal with them. For instance, if your compile and diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index afe08a0448..4b0fed892f 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -166,7 +166,7 @@ has an IA64 machine to test. It is believed that AMD64 and EM64T targets are essentially compatible. The compiler options `/favor:AMD64` and `/favor:EM64T`, which are accepted only by AMD64 targeting compilers, cause the generated code to -be tuned to a specific flavor of 64-bit x86. Boost.Build will make use +be tuned to a specific flavor of 64-bit x86. B2 will make use of those options depending on the value of the`instruction-set` feature. [[bbv2.reference.tools.compiler.msvc.winrt]] @@ -1402,7 +1402,7 @@ local rule configure-really ( version ? : options * ) { default-global-setup-options-amd64 = amd64 ; } - # When Boost.Build itself is running as a 32-bit process on 64-bit + # When B2 itself is running as a 32-bit process on 64-bit # Windows, the above test will fail (since WOW64 simulates a 32-bit # environment, including environment values). So check the WOW64 # variable PROCESSOR_ARCHITEW6432 as well. diff --git a/src/tools/pch.jam b/src/tools/pch.jam index 0c6e98fac7..4737bda303 100644 --- a/src/tools/pch.jam +++ b/src/tools/pch.jam @@ -61,7 +61,7 @@ class pch-generator : generator { # Unless this generator is invoked as the top-most generator for a # main target, fail. This allows using 'H' type as input type for - # this generator, while preventing Boost.Build to try this generator + # this generator, while preventing B2 to try this generator # when not explicitly asked for. # # One bad example is msvc, where pch generator produces both PCH diff --git a/src/tools/python.jam b/src/tools/python.jam index 00d2a36c6f..d510fcfb87 100644 --- a/src/tools/python.jam +++ b/src/tools/python.jam @@ -81,7 +81,7 @@ py3-version = ; # On MacOS/Darwin, you can also pass the path of the Python framework. # # - condition: if specified, should be a set of properties that are matched -# against the build configuration when Boost.Build selects a Python +# against the build configuration when B2 selects a Python # configuration to use. # # - extension-suffix: A string to append to the name of extension modules before @@ -809,7 +809,7 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : debug-message Python headers and libraries not found. ; return ; } - + .configured = true ; if ! $(interpreter-cmd) @@ -859,7 +859,7 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : # # End autoconfiguration sequence. # - + # Normalize and dissect any version number. local major-minor ; if $(version) @@ -867,8 +867,8 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : major-minor = [ split-version $(version) ] ; version = $(major-minor:J=.) ; } - - + + local target-requirements = $(condition) ; # Add the version, if any, to the target requirements. @@ -1042,7 +1042,7 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : : $(usage-requirements) ; } - + } # Conditional rule specification that will prevent building of a target diff --git a/src/tools/qt3.jam b/src/tools/qt3.jam index 945ba99b56..9b2e8f6f4c 100644 --- a/src/tools/qt3.jam +++ b/src/tools/qt3.jam @@ -1,10 +1,10 @@ -# Copyright 2006 Vladimir Prus -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +# Copyright 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Support for the Qt GUI library version 3 # (http://www.trolltech.com/products/qt3/index.html). -# For new developments, it is recommended to use Qt4 via the qt4 Boost.Build +# For new developments, it is recommended to use Qt4 via the qt4 B2 # module. import modules ; @@ -29,39 +29,39 @@ rule init ( prefix ? ) if ! $(prefix) { prefix = [ modules.peek : QTDIR ] ; - if ! $(prefix) + if ! $(prefix) { - errors.error + errors.error "QT installation prefix not given and QTDIR variable is empty" ; - } + } } - + if $(.initialized) { if $(prefix) != $(.prefix) { - errors.error + errors.error "Attempt the reinitialize QT with different installation prefix" ; - } - } + } + } else - { + { .initialized = true ; .prefix = $(prefix) ; - + generators.register-standard qt3.moc : H : CPP(moc_%) : qt3 ; # Note: the OBJ target type here is fake, take a look at # qt4.jam/uic-h-generator for explanations that apply in this case as # well. - generators.register [ new moc-h-generator-qt3 + generators.register [ new moc-h-generator-qt3 qt3.moc.cpp : MOCCABLE_CPP : OBJ : qt3 ] ; - + # The UI type is defined in types/qt.jam, and UIC_H is only used in # qt.jam, but not in qt4.jam, so define it here. type.register UIC_H : : H ; - + generators.register-standard qt3.uic-h : UI : UIC_H : qt3 ; - + # The following generator is used to convert UI files to CPP. It creates # UIC_H from UI, and constructs CPP from UI/UIC_H. In addition, it also # returns UIC_H target, so that it can be mocced. @@ -71,7 +71,7 @@ rule init ( prefix ? ) { generator.__init__ qt3.uic-cpp : UI UIC_H : CPP : qt3 ; } - + rule run ( project name ? : properties * : sources + ) { # Consider this: @@ -79,18 +79,18 @@ rule init ( prefix ? ) # # This generator will somehow be called in this case, and, # will fail -- which is okay. However, if there are - # properties they will be converted to sources, so the size of + # properties they will be converted to sources, so the size of # 'sources' will be more than 1. In this case, the base generator # will just crash -- and that's not good. Just use a quick test # here. - + local result ; if ! $(sources[2]) - { + { # Construct CPP as usual - result = [ generator.run $(project) $(name) + result = [ generator.run $(project) $(name) : $(properties) : $(sources) ] ; - + # If OK, process UIC_H with moc. It's pretty clear that # the object generated with UIC will have Q_OBJECT macro. if $(result) @@ -102,22 +102,22 @@ rule init ( prefix ? ) result += $(mocced[2-]) ; } } - + return $(result) ; - } + } } - + generators.register [ new "qt::uic-cpp-generator" ] ; - + # Finally, declare prebuilt target for QT library. - local usage-requirements = - $(.prefix)/include + local usage-requirements = + $(.prefix)/include $(.prefix)/lib - $(.prefix)/lib + $(.prefix)/lib qt3 - ; + ; lib qt : : qt-mt multi : : $(usage-requirements) ; - lib qt : : qt single : : $(usage-requirements) ; + lib qt : : qt single : : $(usage-requirements) ; } } @@ -129,30 +129,30 @@ class moc-h-generator-qt3 : generator } rule run ( project name ? : property-set : sources * ) - { + { if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_CPP - { + { name = [ $(sources[1]).name ] ; name = $(name:B) ; - + local a = [ new action $(sources[1]) : qt3.moc.cpp : $(property-set) ] ; - - local target = [ + + local target = [ new file-target $(name) : MOC : $(project) : $(a) ] ; - - local r = [ virtual-target.register $(target) ] ; - + + local r = [ virtual-target.register $(target) ] ; + # Since this generator will return a H target, the linking generator - # won't use it at all, and won't set any dependency on it. However, + # won't use it at all, and won't set any dependency on it. However, # we need the target to be seen by bjam, so that the dependency from # sources to this generated header is detected -- if Jam does not # know about this target, it won't do anything. DEPENDS all : [ $(r).actualize ] ; - - return $(r) ; - } - } + + return $(r) ; + } + } } @@ -160,15 +160,15 @@ class moc-h-generator-qt3 : generator # First, when re-using sources from the Qt-Tree. Second, to "install" custom Qt # plugins to the Qt-Tree. # -rule directory -{ - return $(.prefix) ; -} +rule directory +{ + return $(.prefix) ; +} # -f forces moc to include the processed source file. Without it, it would think # that .qpp is not a header and would not include it from the generated file. # -actions moc +actions moc { $(.prefix)/bin/moc -f $(>) -o $(<) } @@ -187,9 +187,9 @@ space = " " ; # Sometimes it's required to make 'plugins' available during uic invocation. To # help with this we add paths to all dependency libraries to uic commane line. # The intention is that it's possible to write -# -# exe a : ... a.ui ... : some_plugin ; -# +# +# exe a : ... a.ui ... : some_plugin ; +# # and have everything work. We'd add quite a bunch of unrelated paths but it # won't hurt. # diff --git a/src/tools/qt4.jam b/src/tools/qt4.jam index b1b44126ff..69b13bd559 100644 --- a/src/tools/qt4.jam +++ b/src/tools/qt4.jam @@ -498,7 +498,7 @@ rule initialized ( ) # This custom generator is needed because in QT4, UI files are translated only # into H files, and no C++ files are created. Further, the H files need not be # passed via MOC. The header is used only via inclusion. If we define a standard -# UI -> H generator, Boost.Build will run MOC on H, and then compile the +# UI -> H generator, B2 will run MOC on H, and then compile the # resulting cpp. It will give a warning, since output from moc will be empty. # # This generator is declared with a UI -> OBJ signature, so it gets invoked when diff --git a/src/tools/qt5.jam b/src/tools/qt5.jam index 4697e79995..eb2d6ddf30 100644 --- a/src/tools/qt5.jam +++ b/src/tools/qt5.jam @@ -541,7 +541,7 @@ rule initialized ( ) # This custom generator is needed because in QT5, UI files are translated only # into H files, and no C++ files are created. Further, the H files need not be # passed via MOC. The header is used only via inclusion. If we define a standard -# UI -> H generator, Boost.Build will run MOC on H, and then compile the +# UI -> H generator, B2 will run MOC on H, and then compile the # resulting cpp. It will give a warning, since output from moc will be empty. # # This generator is declared with a UI -> OBJ signature, so it gets invoked when diff --git a/src/tools/sun.jam b/src/tools/sun.jam index f09e00ccc6..da7d7fe824 100644 --- a/src/tools/sun.jam +++ b/src/tools/sun.jam @@ -22,7 +22,7 @@ using sun : [version] : [c++-compile-command] : [compiler options] ; This statement may be repeated several times, if you want to configure several versions of the compiler. -If the command is not specified, Boost.Build will search for a binary +If the command is not specified, B2 will search for a binary named `CC` in `/opt/SUNWspro/bin` and in PATH. When using this compiler on complex C++ code, such as the diff --git a/src/tools/vacpp.jam b/src/tools/vacpp.jam index a7c4f0ced8..168f465644 100644 --- a/src/tools/vacpp.jam +++ b/src/tools/vacpp.jam @@ -28,7 +28,7 @@ with the the `vacpp` module. |# # end::doc[] # -# Boost.Build V2 toolset for the IBM XL C++ compiler +# B2 V2 toolset for the IBM XL C++ compiler # import toolset : flags ; @@ -45,12 +45,12 @@ generators.override vacpp.searched-lib-generator : searched-lib-generator ; # Configure the vacpp toolset rule init ( version ? : command * : options * ) { - local condition = [ + local condition = [ common.check-init-parameters vacpp : version $(version) ] ; - + command = [ common.get-invocation-command vacpp : xlC : $(command) : "/usr/vacpp/bin/xlC" ] ; - + common.handle-options vacpp : $(condition) : $(command) : $(options) ; } @@ -154,7 +154,7 @@ actions vacpp.link bind NEEDLIBS actions vacpp.link.dll bind NEEDLIBS { - xlC_r -G $(LINKFLAGS) -o "$(<[1])" $(HAVE_SONAME)-Wl,-soname$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS) + xlC_r -G $(LINKFLAGS) -o "$(<[1])" $(HAVE_SONAME)-Wl,-soname$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS) } actions vacpp.compile.c diff --git a/src/tools/vmsdecc.jam b/src/tools/vmsdecc.jam index 28f2a9b160..8f1e8ed178 100644 --- a/src/tools/vmsdecc.jam +++ b/src/tools/vmsdecc.jam @@ -5,7 +5,7 @@ # http://www.boost.org/LICENSE_1_0.txt) # Implements OpenVMS-based HP DECC/C++ toolset. -# Relies on POSIX-style path handling bjam/Boost.Build implementation for VMS. +# Relies on POSIX-style path handling bjam/B2 implementation for VMS. import "class" : new ; import property ; diff --git a/src/tools/xlcpp.jam b/src/tools/xlcpp.jam index 93a50d777c..1b66301cf1 100644 --- a/src/tools/xlcpp.jam +++ b/src/tools/xlcpp.jam @@ -6,7 +6,7 @@ # or copy at http://www.boost.org/LICENSE_1_0.txt) # -# Boost.Build V2 toolset for the IBM XL C++ compiler +# B2 V2 toolset for the IBM XL C++ compiler # import toolset : flags ; @@ -23,12 +23,12 @@ generators.override xlcpp.searched-lib-generator : searched-lib-generator ; # Configure the xlcpp toolset rule init ( version ? : command * : options * ) { - local condition = [ + local condition = [ common.check-init-parameters xlcpp : version $(version) ] ; - + command = [ common.get-invocation-command xlcpp : xlC : $(command) : "/usr/xlcpp/bin/xlC" ] ; - + common.handle-options xlcpp : $(condition) : $(command) : $(options) ; } @@ -145,7 +145,7 @@ actions xlcpp.link bind NEEDLIBS actions xlcpp.link.dll bind NEEDLIBS { - xlC -G $(LINKFLAGS) -o "$(<[1])" $(HAVE_SONAME)-Wl,-soname$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS) + xlC -G $(LINKFLAGS) -o "$(<[1])" $(HAVE_SONAME)-Wl,-soname$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) $(USER_OPTIONS) } actions xlcpp.compile.c diff --git a/src/util/doc.jam b/src/util/doc.jam index 117cdd7675..8d03b7ee57 100644 --- a/src/util/doc.jam +++ b/src/util/doc.jam @@ -45,8 +45,8 @@ help-output-file = help ; # .option.debug ?= ; -# These are all the options available for enabling or disabling to control the -# help system in various ways. Options can be enabled or disabled with +# These are all the options available for enabling or disabling to control the +# help system in various ways. Options can be enabled or disabled with # '--help-enable-