For bootstrapping `b2` itself, the current `borland` toolset is broken
now as `bcc32.exe` doesn't support C++11. Update that toolset to use
the Clang-based `bcc32c.exe`, which has largely the same cmdline args.
Commit de026bc61e changed the order to first detect the unusable vcunk
toolset before the vc142 and vc141 toolsets. This breaks building from
the Visual Studio Preview command prompt if no other Visual Studio
version is detected. Move the vcunk block down to where it was before
to restore this functionality.
* Fix "bootstrap.bat borland" failing to find label "Test_Path"
If an override toolset is given in the `bootstrap.bat` command-line,
`bootstrap.bat` -> `src/engine/build.bat` bypasses loading
`src/engine/guess_toolset.bat` entirely. Later on the call to
`Test_Path` from `build.bat` -> `config_toolset.bat` fails to find that
label.
Fix this by making a new parameterized entry-point `test_path` inside
`guess_toolset.bat` for this caller in `config_toolset.bat`.
Fixes: #382.
* Handle spaces in C++Builder toolchain path
Nowadays a default installation goes into %PROGRAMFILES%, e.g.
"C:\Program Files (x86)\Embarcadero\Studio\20.0\Bin".
* Add "-Nd" before "/D"-options for bcc32.exe
The preprocessor of the old Borland/C++Builder compiler (bcc32.exe) by
default does not accept preprocessor statements of the form:
#if SYMBOL_NAME
where `SYMBOL_NAME` was `#define`-ed without a value. It insists on the
`#if defined(SYMBOL_NAME)` or `#ifdef SYMBOL_NAME` forms (emitting error
E2188 "expression syntax"). The workaround is to specify the `-Nd`
option before the offending `/D` options, which effectively provides a
value of "1" to the symbols being #define-ed. Apply this workaround in
the recipes of `bjam` and `b2` to satisfy the preprocessor.
The alternative here would be to migrate to the Clang-based (and much
more standard-compliant) bcc32c.exe, but that would be a more involved
change.
* Separate :Guess_Yacc logic from :Guess_Toolset in build.bat
This was an existing benign issue introduced in 00c2358, but it became
apparent after 9339693.
* Fixed `build.bat` stack overflow on some machines by splitting up to several files
* CSharp script simplified and now will check VC++ toolset version