From 1ee55930c06cc1e39da63c0096fce7e9facee103 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 11 Oct 2019 15:44:39 +0200 Subject: Rename BOOTSTRAP-{MINGW,MSVC} to BOOTSTRAP-WINDOWS-{...} Also mention WSL in addition to MSYS and Cygwin as a UNIX-like emulation on Windows. --- BOOTSTRAP-MINGW.cli | 224 -------------------------------------------- BOOTSTRAP-MSVC.cli | 194 -------------------------------------- BOOTSTRAP-UNIX.cli | 4 +- BOOTSTRAP-WINDOWS-MINGW.cli | 224 ++++++++++++++++++++++++++++++++++++++++++++ BOOTSTRAP-WINDOWS-MSVC.cli | 194 ++++++++++++++++++++++++++++++++++++++ BOOTSTRAP-WINDOWS.cli | 14 +-- INSTALL.cli | 8 +- build-mingw.bat | 2 +- build-msvc.bat | 2 +- buildfile | 16 ++-- doc/cli.sh | 6 +- doc/install.cli | 8 +- 12 files changed, 448 insertions(+), 448 deletions(-) delete mode 100644 BOOTSTRAP-MINGW.cli delete mode 100644 BOOTSTRAP-MSVC.cli create mode 100644 BOOTSTRAP-WINDOWS-MINGW.cli create mode 100644 BOOTSTRAP-WINDOWS-MSVC.cli diff --git a/BOOTSTRAP-MINGW.cli b/BOOTSTRAP-MINGW.cli deleted file mode 100644 index bc6fab1..0000000 --- a/BOOTSTRAP-MINGW.cli +++ /dev/null @@ -1,224 +0,0 @@ -// file : BOOTSTRAP-MINGW.cli -// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -" -Continuing from \l{#bootstrap-windows Bootstrapping on Windows}, if you are -using your own MinGW distribution, then the resulting \c{build2} binaries will -most likely require a number of DLLs in order to run. It is therefore -recommended that you copy the following files from your MinGW \c{bin\\} -subdirectory to \c{C:\\build2\\bin\\} (\c{*} in the last name will normally be -\c{dw2-1}, \c{seh-1}, or \c{sjlj-1}): - -\ -libwinpthread-1.dll -libstdc++-6.dll -libgcc_s_*.dll -\ - -To build with MinGW you can either perform the following steps manually or, if -after reviewing the steps, you are happy with using the defaults, run the -\c{build-mingw.bat} batch file. It performs (and echoes) the same set of steps -as outlined below but only allows you to customize the compiler, installation -directory, and a few other things (run \c{build-mingw.bat /?} for usage). - -For example, if your MinGW distribution is in \c{C:\\mingw\\}, then you could -run it (from the command prompt that we have started earlier) like this: - -\ -> .\build-mingw.bat C:\mingw\bin\g++ -\ - -If you are using the \c{build2-mingw} package then you should be able to -use just \c{g++} for the compiler: - -\ -> .\build-mingw.bat g++ -\ - -If you would like to speed the process up by compiling in parallel, then you -can instruct \c{build-mingw.bat} to bootstrap using GNU make (comes in -the \c{build2-mingw} package), for example: - -\ -> .\build-mingw.bat --make mingw32-make --make -j8 g++ -\ - -\N|Note that at about half way through (\c{bpkg fetch} at step 4 below) the -script will stop and prompt you to verify the authenticity of the repository -certificate. To run the script unattended you can specify the certificate -fingerprint with the \c{--trust} option (see \c{build-mingw.bat /?} for -details).| - -The end result of the bootstrap process (performed either with the script or -manually) is the installed toolchain as well as the \c{bpkg} configuration in -\c{build2-toolchain-X.Y\\} that can be used to \l{#upgrade upgrade} to newer -versions. It can also be used to uninstall the toolchain: - -\ -> cd build2-toolchain-X.Y -> bpkg uninstall build2 bpkg bdep -\ - -\N|Note that in both cases (manual or scripted bootstrap), if something goes -wrong and you need to restart the process, you \b{must} start with a clean -toolchain source by unpacking it afresh from the archive.| - -The rest of this section outlines the manual bootstrap process. - -\dl| - -\li|\b{1. Bootstrap, Phase 1}\n - -First, we build a minimal build system with the provided -\c{bootstrap-mingw.bat} batch file. Normally, the only argument you will pass -to this script is the C++ compiler to use but there is also a way to specify -compile options; run \c{bootstrap-mingw.bat /?} and see the -\c{build2\\INSTALL} file for details. - -\ -> cd build2 -> .\bootstrap-mingw.bat g++ -static - -> build2\b-boot --version -\ - -Alternatively, we can use the \c{bootstrap.gmake} GNU makefile to bootstrap -in parallel: - -\ -> cd build2 -> mingw32-make -f bootstrap.gmake -j 8 CXX=g++ LDFLAGS=-static - -> build2\b-boot --version -\ - -| - -\li|\n\b{2. Bootstrap, Phase 2}\n - -Then, we rebuild the build system with the result of Phase 1 linking -libraries statically. - -\ -> build2\b-boot config.cxx=g++ config.bin.lib=static build2\exe{b} -> move /y build2\b.exe build2\b-boot.exe - -> build2\b-boot --version -\ - -| - -\li|\n\b{3. Stage}\n - -At this step the build system and package manager are built with shared -libraries and then staged: - -\ -> cd .. # Back to build2-toolchain-X.Y.Z\ - -> build2\build2\b-boot configure ^ - config.cxx=g++ ^ - config.bin.suffix=-stage ^ - config.install.root=C:\build2 ^ - config.install.data_root=root\stage - -> build2\build2\b-boot install: build2/ bpkg/ -\ - -The strange-looking \c{config.install.data_root=root\\stage} means install -data files (as opposed to executable files) into the \c{stage\\} subdirectory -of wherever \c{config.install.root} points to (so in our case it will be -\c{C:\\build2\\stage\\}). This subdirectory is temporary and will be removed -in a few steps. - -Verify that the toolchain binaries can be found and work (this relies on the -\c{PATH} environment variable we have set earlier): - -\ -> where b-stage -C:\build2\bin\b-stage.exe - -> where bpkg-stage -C:\build2\bin\bpkg-stage.exe - -> b-stage --version -> bpkg-stage --version -\ - -At the next step we will use \c{bpkg} to build and install the entire -toolchain. If for some reason you prefer not to build from packages (for -example, because the machine is offline), then you can convert this step into -the \"final\" installation and skip the rest. For this you will need to change -the \c{configure} and \c{install} command lines above along these lines: - -\ -> build2\build2\b-boot configure ^ - config.cxx=g++ ^ - config.cc.coptions=-O3 ^ - config.install.root=C:\build2 - -> build2\build2\b-boot install: build2/ bpkg/ bdep/ -\ - -| - -\li|\n\b{4. Install}\n - -Next, we use the staged tools to build and install the entire toolchain from -the package repository with the \c{bpkg} package manager. First, we create -the \c{bpkg} configuration. The configuration values are pretty similar to the -previous step and you may want/need to make similar adjustments. - -\ -> cd .. # Back to build2-build\ -> md build2-toolchain-X.Y -> cd build2-toolchain-X.Y - -> bpkg-stage create ^ - cc ^ - config.cxx=g++ ^ - config.cc.coptions=-O3 ^ - config.install.root=C:\build2 -\ - -Next, we add the package repository, build, and install: - -\ -> bpkg-stage add https://pkg.cppget.org/1/alpha -> bpkg-stage fetch -> bpkg-stage build --for install build2 bpkg bdep -> bpkg-stage install build2 bpkg bdep -\ - -Finally, we verify the result (note that the \c{where} command is not -available on Windows XP without the Resource Kit installed): - -\ -> where b -C:\build2\bin\b.exe - -> where bpkg -C:\build2\bin\bpkg.exe - -> where bdep -C:\build2\bin\bdep.exe - -> b --version -> bpkg --version -> bdep --version -\ - -| - -\li|\n\b{5. Clean}\n - -The last thing we need to do is uninstall the staged tools: - -\ -> cd ..\build2-toolchain-X.Y.Z # Back to bootstrap. -> b uninstall: build2/ bpkg/ -\ - -|| -" diff --git a/BOOTSTRAP-MSVC.cli b/BOOTSTRAP-MSVC.cli deleted file mode 100644 index fc4066e..0000000 --- a/BOOTSTRAP-MSVC.cli +++ /dev/null @@ -1,194 +0,0 @@ -// file : BOOTSTRAP-MSVC.cli -// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -" -Continuing from \l{#bootstrap-windows Bootstrapping on Windows}, if you have -already started an appropriate Visual Studio command prompt, then you can -continue using it. Otherwise, start the \"x64 Native Tools Command Prompt\". -Also set the \c{PATH} environment variable: - -\ -> set PATH=C:\build2\bin;%PATH% -\ - -To build with MSVC you can either perform the following steps manually or, if -after reviewing the steps you are happy with using the defaults, run the -\c{build-msvc.bat} batch file. It performs (and echoes) the same set of steps -as outlined below but only allows you to customize the installation directory -and a few other things (run \c{build-msvc.bat /?} for usage). - -For example, you could run this batch file (from the above-mentioned command -prompt) like this: - -\ -> .\build-msvc.bat -\ - -\N|Note that at about half way through (\c{bpkg fetch} at step 4 below) the -script will stop and prompt you to verify the authenticity of the repository -certificate. To run the script unattended you can specify the certificate -fingerprint with the \c{--trust} option (see \c{build-msvc.bat /?} for -details).| - -The end result of the bootstrap process (performed either with the script or -manually) is the installed toolchain as well as the \c{bpkg} configuration in -\c{build2-toolchain-X.Y\\} that can be used to \l{#upgrade upgrade} to newer -versions. It can also be used to uninstall the toolchain: - -\ -> cd build2-toolchain-X.Y -> bpkg uninstall build2 bpkg bdep -\ - -\N|Note that in both cases (manual or scripted bootstrap), if something goes -wrong and you need to restart the process, you \b{must} start with a clean -toolchain source by unpacking it afresh from the archive.| - -The rest of this section outlines the manual bootstrap process. - -\dl| - -\li|\b{1. Bootstrap, Phase 1}\n - -First, we build a minimal build system with the provided -\c{bootstrap-msvc.bat} batch file. Normally, the only argument you will pass -to this script is the C++ compiler to use but there is also a way to specify -compile options; run \c{bootstrap-msvc.bat /?} and see the \c{build2\\INSTALL} -file for details. - -\ -> cd build2 -> .\bootstrap-msvc.bat cl - -> build2\b-boot --version -\ - -| - -\li|\n\b{2. Bootstrap, Phase 2}\n - -Then, we rebuild the build system with the result of Phase 1 linking libraries -statically. - -\ -> build2\b-boot config.cxx=cl config.bin.lib=static build2\exe{b} -> move /y build2\b.exe build2\b-boot.exe - -> build2\b-boot --version -\ - -| - -\li|\n\b{3. Stage}\n - -At this step the build system and package manager are built with shared -libraries and then staged: - -\ -> cd .. # Back to build2-toolchain-X.Y.Z\ - -> build2\build2\b-boot configure ^ - config.cxx=cl ^ - config.bin.suffix=-stage ^ - config.install.root=C:\build2 ^ - config.install.data_root=root\stage - -> build2\build2\b-boot install: build2/ bpkg/ -\ - -The strange-looking \c{config.install.data_root=root\\stage} means install -data files (as opposed to executable files) into the \c{stage\\} subdirectory -of wherever \c{config.install.root} points to (so in our case it will be -\c{C:\\build2\\stage\\}). This subdirectory is temporary and will be removed -in a few steps. - -Verify that the toolchain binaries can be found and work (this relies on the -\c{PATH} environment variable we have set earlier): - -\ -> where b-stage -C:\build2\bin\b-stage.exe - -> where bpkg-stage -C:\build2\bin\bpkg-stage.exe - -> b-stage --version -> bpkg-stage --version -\ - -At the next step we will use \c{bpkg} to build and install the entire -toolchain. If for some reason you prefer not to build from packages (for -example, because the machine is offline), then you can convert this step into -the \"final\" installation and skip the rest. For this you will need to change -the \c{configure} and \c{install} command lines above along these lines: - -\ -> build2\build2\b-boot configure ^ - config.cxx=cl ^ - config.cc.coptions=/O2 ^ - config.install.root=C:\build2 - -> build2\build2\b-boot install: build2/ bpkg/ bdep/ -\ - -| - -\li|\n\b{4. Install}\n - -Next, we use the staged tools to build and install the entire toolchain from -the package repository with the \c{bpkg} package manager. First, we create -the \c{bpkg} configuration. The configuration values are pretty similar to the -previous step and you may want/need to make similar adjustments. - -\ -> cd .. # Back to build2-build\ -> md build2-toolchain-X.Y -> cd build2-toolchain-X.Y - -> bpkg-stage create ^ - cc ^ - config.cxx=cl ^ - config.cc.coptions=/O2 ^ - config.install.root=C:\build2 -\ - -Next, we add the package repository, build, and install: - -\ -> bpkg-stage add https://pkg.cppget.org/1/alpha -> bpkg-stage fetch -> bpkg-stage build --for install build2 bpkg bdep -> bpkg-stage install build2 bpkg bdep -\ - -Finally, we verify the result: - -\ -> where b -C:\build2\bin\b.exe - -> where bpkg -C:\build2\bin\bpkg.exe - -> where bdep -C:\build2\bin\bdep.exe - -> b --version -> bpkg --version -> bdep --version -\ - -| - -\li|\n\b{5. Clean}\n - -The last thing we need to do is uninstall the staged tools: - -\ -> cd ..\build2-toolchain-X.Y.Z # Back to bootstrap. -> b uninstall: build2/ bpkg/ -\ - -|| -" diff --git a/BOOTSTRAP-UNIX.cli b/BOOTSTRAP-UNIX.cli index 24c15a5..0546a9d 100644 --- a/BOOTSTRAP-UNIX.cli +++ b/BOOTSTRAP-UNIX.cli @@ -6,7 +6,7 @@ The following instructions are for bootstrapping \c{build2} on UNIX-like operating systems (GNU/Linux, FreeBSD, etc). For Mac OS X first see \l{#bootstrap-macosx Bootstrapping on Mac OS X}. These instructions should -also be used for UNIX emulation layers on Windows (for example, MSYS or +also be used for UNIX emulation layers on Windows (for example, WSL, MSYS, or Cygwin) where you already have a UNIX shell with standard utilities. \dl| @@ -36,7 +36,7 @@ Place everything into \c{~/build2-build/} (build directory) and verify the archive checksum matches: \ -# Linux, MSYS, Cygwin: +# Linux, WSL, MSYS, Cygwin: # $ sha256sum -c build2-toolchain-X.Y.Z.tar.xz.sha256 diff --git a/BOOTSTRAP-WINDOWS-MINGW.cli b/BOOTSTRAP-WINDOWS-MINGW.cli new file mode 100644 index 0000000..163d3a7 --- /dev/null +++ b/BOOTSTRAP-WINDOWS-MINGW.cli @@ -0,0 +1,224 @@ +// file : BOOTSTRAP-WINDOWS-MINGW.cli +// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +" +Continuing from \l{#bootstrap-windows Bootstrapping on Windows}, if you are +using your own MinGW distribution, then the resulting \c{build2} binaries will +most likely require a number of DLLs in order to run. It is therefore +recommended that you copy the following files from your MinGW \c{bin\\} +subdirectory to \c{C:\\build2\\bin\\} (\c{*} in the last name will normally be +\c{dw2-1}, \c{seh-1}, or \c{sjlj-1}): + +\ +libwinpthread-1.dll +libstdc++-6.dll +libgcc_s_*.dll +\ + +To build with MinGW you can either perform the following steps manually or, if +after reviewing the steps, you are happy with using the defaults, run the +\c{build-mingw.bat} batch file. It performs (and echoes) the same set of steps +as outlined below but only allows you to customize the compiler, installation +directory, and a few other things (run \c{build-mingw.bat /?} for usage). + +For example, if your MinGW distribution is in \c{C:\\mingw\\}, then you could +run it (from the command prompt that we have started earlier) like this: + +\ +> .\build-mingw.bat C:\mingw\bin\g++ +\ + +If you are using the \c{build2-mingw} package then you should be able to +use just \c{g++} for the compiler: + +\ +> .\build-mingw.bat g++ +\ + +If you would like to speed the process up by compiling in parallel, then you +can instruct \c{build-mingw.bat} to bootstrap using GNU make (comes in +the \c{build2-mingw} package), for example: + +\ +> .\build-mingw.bat --make mingw32-make --make -j8 g++ +\ + +\N|Note that at about half way through (\c{bpkg fetch} at step 4 below) the +script will stop and prompt you to verify the authenticity of the repository +certificate. To run the script unattended you can specify the certificate +fingerprint with the \c{--trust} option (see \c{build-mingw.bat /?} for +details).| + +The end result of the bootstrap process (performed either with the script or +manually) is the installed toolchain as well as the \c{bpkg} configuration in +\c{build2-toolchain-X.Y\\} that can be used to \l{#upgrade upgrade} to newer +versions. It can also be used to uninstall the toolchain: + +\ +> cd build2-toolchain-X.Y +> bpkg uninstall build2 bpkg bdep +\ + +\N|Note that in both cases (manual or scripted bootstrap), if something goes +wrong and you need to restart the process, you \b{must} start with a clean +toolchain source by unpacking it afresh from the archive.| + +The rest of this section outlines the manual bootstrap process. + +\dl| + +\li|\b{1. Bootstrap, Phase 1}\n + +First, we build a minimal build system with the provided +\c{bootstrap-mingw.bat} batch file. Normally, the only argument you will pass +to this script is the C++ compiler to use but there is also a way to specify +compile options; run \c{bootstrap-mingw.bat /?} and see the +\c{build2\\INSTALL} file for details. + +\ +> cd build2 +> .\bootstrap-mingw.bat g++ -static + +> build2\b-boot --version +\ + +Alternatively, we can use the \c{bootstrap.gmake} GNU makefile to bootstrap +in parallel: + +\ +> cd build2 +> mingw32-make -f bootstrap.gmake -j 8 CXX=g++ LDFLAGS=-static + +> build2\b-boot --version +\ + +| + +\li|\n\b{2. Bootstrap, Phase 2}\n + +Then, we rebuild the build system with the result of Phase 1 linking +libraries statically. + +\ +> build2\b-boot config.cxx=g++ config.bin.lib=static build2\exe{b} +> move /y build2\b.exe build2\b-boot.exe + +> build2\b-boot --version +\ + +| + +\li|\n\b{3. Stage}\n + +At this step the build system and package manager are built with shared +libraries and then staged: + +\ +> cd .. # Back to build2-toolchain-X.Y.Z\ + +> build2\build2\b-boot configure ^ + config.cxx=g++ ^ + config.bin.suffix=-stage ^ + config.install.root=C:\build2 ^ + config.install.data_root=root\stage + +> build2\build2\b-boot install: build2/ bpkg/ +\ + +The strange-looking \c{config.install.data_root=root\\stage} means install +data files (as opposed to executable files) into the \c{stage\\} subdirectory +of wherever \c{config.install.root} points to (so in our case it will be +\c{C:\\build2\\stage\\}). This subdirectory is temporary and will be removed +in a few steps. + +Verify that the toolchain binaries can be found and work (this relies on the +\c{PATH} environment variable we have set earlier): + +\ +> where b-stage +C:\build2\bin\b-stage.exe + +> where bpkg-stage +C:\build2\bin\bpkg-stage.exe + +> b-stage --version +> bpkg-stage --version +\ + +At the next step we will use \c{bpkg} to build and install the entire +toolchain. If for some reason you prefer not to build from packages (for +example, because the machine is offline), then you can convert this step into +the \"final\" installation and skip the rest. For this you will need to change +the \c{configure} and \c{install} command lines above along these lines: + +\ +> build2\build2\b-boot configure ^ + config.cxx=g++ ^ + config.cc.coptions=-O3 ^ + config.install.root=C:\build2 + +> build2\build2\b-boot install: build2/ bpkg/ bdep/ +\ + +| + +\li|\n\b{4. Install}\n + +Next, we use the staged tools to build and install the entire toolchain from +the package repository with the \c{bpkg} package manager. First, we create +the \c{bpkg} configuration. The configuration values are pretty similar to the +previous step and you may want/need to make similar adjustments. + +\ +> cd .. # Back to build2-build\ +> md build2-toolchain-X.Y +> cd build2-toolchain-X.Y + +> bpkg-stage create ^ + cc ^ + config.cxx=g++ ^ + config.cc.coptions=-O3 ^ + config.install.root=C:\build2 +\ + +Next, we add the package repository, build, and install: + +\ +> bpkg-stage add https://pkg.cppget.org/1/alpha +> bpkg-stage fetch +> bpkg-stage build --for install build2 bpkg bdep +> bpkg-stage install build2 bpkg bdep +\ + +Finally, we verify the result (note that the \c{where} command is not +available on Windows XP without the Resource Kit installed): + +\ +> where b +C:\build2\bin\b.exe + +> where bpkg +C:\build2\bin\bpkg.exe + +> where bdep +C:\build2\bin\bdep.exe + +> b --version +> bpkg --version +> bdep --version +\ + +| + +\li|\n\b{5. Clean}\n + +The last thing we need to do is uninstall the staged tools: + +\ +> cd ..\build2-toolchain-X.Y.Z # Back to bootstrap. +> b uninstall: build2/ bpkg/ +\ + +|| +" diff --git a/BOOTSTRAP-WINDOWS-MSVC.cli b/BOOTSTRAP-WINDOWS-MSVC.cli new file mode 100644 index 0000000..59c08d1 --- /dev/null +++ b/BOOTSTRAP-WINDOWS-MSVC.cli @@ -0,0 +1,194 @@ +// file : BOOTSTRAP-WINDOWS-MSVC.cli +// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +" +Continuing from \l{#bootstrap-windows Bootstrapping on Windows}, if you have +already started an appropriate Visual Studio command prompt, then you can +continue using it. Otherwise, start the \"x64 Native Tools Command Prompt\". +Also set the \c{PATH} environment variable: + +\ +> set PATH=C:\build2\bin;%PATH% +\ + +To build with MSVC you can either perform the following steps manually or, if +after reviewing the steps you are happy with using the defaults, run the +\c{build-msvc.bat} batch file. It performs (and echoes) the same set of steps +as outlined below but only allows you to customize the installation directory +and a few other things (run \c{build-msvc.bat /?} for usage). + +For example, you could run this batch file (from the above-mentioned command +prompt) like this: + +\ +> .\build-msvc.bat +\ + +\N|Note that at about half way through (\c{bpkg fetch} at step 4 below) the +script will stop and prompt you to verify the authenticity of the repository +certificate. To run the script unattended you can specify the certificate +fingerprint with the \c{--trust} option (see \c{build-msvc.bat /?} for +details).| + +The end result of the bootstrap process (performed either with the script or +manually) is the installed toolchain as well as the \c{bpkg} configuration in +\c{build2-toolchain-X.Y\\} that can be used to \l{#upgrade upgrade} to newer +versions. It can also be used to uninstall the toolchain: + +\ +> cd build2-toolchain-X.Y +> bpkg uninstall build2 bpkg bdep +\ + +\N|Note that in both cases (manual or scripted bootstrap), if something goes +wrong and you need to restart the process, you \b{must} start with a clean +toolchain source by unpacking it afresh from the archive.| + +The rest of this section outlines the manual bootstrap process. + +\dl| + +\li|\b{1. Bootstrap, Phase 1}\n + +First, we build a minimal build system with the provided +\c{bootstrap-msvc.bat} batch file. Normally, the only argument you will pass +to this script is the C++ compiler to use but there is also a way to specify +compile options; run \c{bootstrap-msvc.bat /?} and see the \c{build2\\INSTALL} +file for details. + +\ +> cd build2 +> .\bootstrap-msvc.bat cl + +> build2\b-boot --version +\ + +| + +\li|\n\b{2. Bootstrap, Phase 2}\n + +Then, we rebuild the build system with the result of Phase 1 linking libraries +statically. + +\ +> build2\b-boot config.cxx=cl config.bin.lib=static build2\exe{b} +> move /y build2\b.exe build2\b-boot.exe + +> build2\b-boot --version +\ + +| + +\li|\n\b{3. Stage}\n + +At this step the build system and package manager are built with shared +libraries and then staged: + +\ +> cd .. # Back to build2-toolchain-X.Y.Z\ + +> build2\build2\b-boot configure ^ + config.cxx=cl ^ + config.bin.suffix=-stage ^ + config.install.root=C:\build2 ^ + config.install.data_root=root\stage + +> build2\build2\b-boot install: build2/ bpkg/ +\ + +The strange-looking \c{config.install.data_root=root\\stage} means install +data files (as opposed to executable files) into the \c{stage\\} subdirectory +of wherever \c{config.install.root} points to (so in our case it will be +\c{C:\\build2\\stage\\}). This subdirectory is temporary and will be removed +in a few steps. + +Verify that the toolchain binaries can be found and work (this relies on the +\c{PATH} environment variable we have set earlier): + +\ +> where b-stage +C:\build2\bin\b-stage.exe + +> where bpkg-stage +C:\build2\bin\bpkg-stage.exe + +> b-stage --version +> bpkg-stage --version +\ + +At the next step we will use \c{bpkg} to build and install the entire +toolchain. If for some reason you prefer not to build from packages (for +example, because the machine is offline), then you can convert this step into +the \"final\" installation and skip the rest. For this you will need to change +the \c{configure} and \c{install} command lines above along these lines: + +\ +> build2\build2\b-boot configure ^ + config.cxx=cl ^ + config.cc.coptions=/O2 ^ + config.install.root=C:\build2 + +> build2\build2\b-boot install: build2/ bpkg/ bdep/ +\ + +| + +\li|\n\b{4. Install}\n + +Next, we use the staged tools to build and install the entire toolchain from +the package repository with the \c{bpkg} package manager. First, we create +the \c{bpkg} configuration. The configuration values are pretty similar to the +previous step and you may want/need to make similar adjustments. + +\ +> cd .. # Back to build2-build\ +> md build2-toolchain-X.Y +> cd build2-toolchain-X.Y + +> bpkg-stage create ^ + cc ^ + config.cxx=cl ^ + config.cc.coptions=/O2 ^ + config.install.root=C:\build2 +\ + +Next, we add the package repository, build, and install: + +\ +> bpkg-stage add https://pkg.cppget.org/1/alpha +> bpkg-stage fetch +> bpkg-stage build --for install build2 bpkg bdep +> bpkg-stage install build2 bpkg bdep +\ + +Finally, we verify the result: + +\ +> where b +C:\build2\bin\b.exe + +> where bpkg +C:\build2\bin\bpkg.exe + +> where bdep +C:\build2\bin\bdep.exe + +> b --version +> bpkg --version +> bdep --version +\ + +| + +\li|\n\b{5. Clean}\n + +The last thing we need to do is uninstall the staged tools: + +\ +> cd ..\build2-toolchain-X.Y.Z # Back to bootstrap. +> b uninstall: build2/ bpkg/ +\ + +|| +" diff --git a/BOOTSTRAP-WINDOWS.cli b/BOOTSTRAP-WINDOWS.cli index 9676f8a..c99ffc7 100644 --- a/BOOTSTRAP-WINDOWS.cli +++ b/BOOTSTRAP-WINDOWS.cli @@ -5,9 +5,9 @@ " The following instructions are for bootstrapping \c{build2} with either MSVC or MinGW using the Windows command prompt. If you are using any kind of UNIX -emulation layer (for example, MSYS or Cygwin) and already have a UNIX shell -with standard utilities, then you most likely should follow \l{#bootstrap-unix -Bootstrapping on UNIX} instead. +emulation layer (for example, WSL, MSYS, or Cygwin) and already have a UNIX +shell with standard utilities, then you most likely should follow +\l{#bootstrap-unix Bootstrapping on UNIX} instead. \N|Note that if you continue with these instructions but you already have your own installation of MSYS and/or MinGW, then make sure that their paths are not @@ -138,9 +138,9 @@ directory: || -If building with MSVC, continue with \l{#bootstrap-msvc Bootstrapping with -MSVC}. +If building with MSVC, continue with \l{#bootstrap-windows-msvc Bootstrapping +on Windows with MSVC}. -If building with MinGW, continue with \l{#bootstrap-mingw Bootstrapping with -MinGW}. +If building with MinGW, continue with \l{#bootstrap-windows-mingw +Bootstrapping on Windows with MinGW}. " diff --git a/INSTALL.cli b/INSTALL.cli index ba4be67..b361164 100644 --- a/INSTALL.cli +++ b/INSTALL.cli @@ -72,12 +72,12 @@ prefer not to build from packages (for example, because the machine is offline).| For Windows, if you are using either MSVC or MinGW, continue with -\l{#bootstrap-windows Bootstrapping on Windows}. If using MSYS or Cygwin, -then instead refer to \l{#bootstrap-unix Bootstrapping on UNIX}. +\l{#bootstrap-windows Bootstrapping on Windows}. If using WSL, MSYS, or +Cygwin, then instead refer to \l{#bootstrap-unix Bootstrapping on UNIX}. For Mac OS X, continue with \l{#bootstrap-macosx Bootstrapping on Mac OS X}. For other UNIX-like operating systems (GNU/Linux, FreeBSD, etc; this also -includes MSYS/Cygwin), continue with \l{#bootstrap-unix Bootstrapping on -UNIX}. +includes WSL, MSYS, and Cygwin), continue with \l{#bootstrap-unix +Bootstrapping on UNIX}. " diff --git a/build-mingw.bat b/build-mingw.bat index b505c3d..53ba6a3 100644 --- a/build-mingw.bat +++ b/build-mingw.bat @@ -31,7 +31,7 @@ echo additional make options, for example: echo. echo %0 --make mingw32-make --make -j8 g++ echo. -echo See the BOOTSTRAP-MINGW file for details. +echo See the BOOTSTRAP-WINDOWS-MINGW file for details. echo. goto end diff --git a/build-msvc.bat b/build-msvc.bat index 7d1e31a..85e8244 100644 --- a/build-msvc.bat +++ b/build-msvc.bat @@ -24,7 +24,7 @@ echo. echo The --trust option recognizes two special values: 'yes' ^(trust everything^) echo and 'no' (trust nothing). echo. -echo See the BOOTSTRAP-MSVC file for details. +echo See the BOOTSTRAP-WINDOWS-MSVC file for details. echo. goto end diff --git a/buildfile b/buildfile index 8391cff..fd343d0 100644 --- a/buildfile +++ b/buildfile @@ -8,14 +8,14 @@ d = libpkgconf/ libbutl/ build2/ \ libsqlite3/ libodb/ libodb-sqlite/ libbpkg/ bpkg/ bdep/ doc/ -i = \ -INSTALL \ -UPGRADE \ -BOOTSTRAP-MACOSX \ -BOOTSTRAP-MINGW \ -BOOTSTRAP-MSVC \ -BOOTSTRAP-UNIX \ -BOOTSTRAP-WINDOWS +i = \ +INSTALL \ +UPGRADE \ +BOOTSTRAP-UNIX \ +BOOTSTRAP-MACOSX \ +BOOTSTRAP-WINDOWS \ +BOOTSTRAP-WINDOWS-MINGW \ +BOOTSTRAP-WINDOWS-MSVC ./: $d doc{$i README CONTRIBUTING.md} cli{$i} file{build.sh build-*} manifest diff --git a/doc/cli.sh b/doc/cli.sh index b2e2605..a520898 100755 --- a/doc/cli.sh +++ b/doc/cli.sh @@ -78,8 +78,8 @@ function gen_txt () # gen_txt INSTALL gen_txt UPGRADE -gen_txt BOOTSTRAP-MACOSX -gen_txt BOOTSTRAP-MINGW -gen_txt BOOTSTRAP-MSVC gen_txt BOOTSTRAP-UNIX +gen_txt BOOTSTRAP-MACOSX gen_txt BOOTSTRAP-WINDOWS +gen_txt BOOTSTRAP-WINDOWS-MINGW +gen_txt BOOTSTRAP-WINDOWS-MSVC diff --git a/doc/install.cli b/doc/install.cli index 83e4cc7..09e3679 100644 --- a/doc/install.cli +++ b/doc/install.cli @@ -37,14 +37,14 @@ source "../INSTALL.cli"; source "../BOOTSTRAP-WINDOWS.cli"; " -\h2#bootstrap-msvc|Bootstrapping with MSVC| +\h2#bootstrap-windows-msvc|Bootstrapping on Windows with MSVC| " -source "../BOOTSTRAP-MSVC.cli"; +source "../BOOTSTRAP-WINDOWS-MSVC.cli"; " -\h2#bootstrap-mingw|Bootstrapping with MinGW| +\h2#bootstrap-windows-mingw|Bootstrapping on Windows with MinGW| " -source "../BOOTSTRAP-MINGW.cli"; +source "../BOOTSTRAP-WINDOWS-MINGW.cli"; " \h#bootstrap-macosx|Bootstrapping on Mac OS X| -- cgit v1.1