diff options
Diffstat (limited to 'BOOTSTRAP-UNIX.cli')
-rw-r--r-- | BOOTSTRAP-UNIX.cli | 62 |
1 files changed, 55 insertions, 7 deletions
diff --git a/BOOTSTRAP-UNIX.cli b/BOOTSTRAP-UNIX.cli index 21f502d..aee6fd9 100644 --- a/BOOTSTRAP-UNIX.cli +++ b/BOOTSTRAP-UNIX.cli @@ -118,7 +118,7 @@ file for details. \ $ cd build2 -$ ./bootstrap.sh g++ +$ ./bootstrap.sh g++ -w $ build2/b-boot --version \ @@ -128,7 +128,7 @@ in parallel: \ $ cd build2 -$ make -f bootstrap.gmake -j 8 CXX=g++ +$ make -f bootstrap.gmake -j 8 CXX=g++ CXXFLAGS=-w $ build2/b-boot --version \ @@ -177,6 +177,28 @@ $ build2/build2/b-boot configure \ $ build2/build2/b-boot install: build2/ bpkg/ \ +\N|The above command will build all the dependencies of \c{build2} and +\c{bpkg} from sources bundled with \c{build2-toolchain}. If instead you would +like to use system-installed versions for some of them, then you can specify +empty \c{config.import.*} values to disable the use of the bundled versions. +For example, to use the system-installed SQLite: + +\ +$ build2/build2/b-boot configure \ + ... \ + config.import.libsqlite3= +\ + +If performing an installation with the \c{build.sh} script, then to use the +system-installed dependencies pass the \c{--system} option, specifying such +dependencies as a comma-separated list. For example: + +\ +$ ./build.sh --system libsqlite3,libpkg-config g++ +\ + +| + 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 @@ -222,11 +244,12 @@ a local installation and skip the rest of the steps. To perform a local installation you will need to change the \c{configure} and \c{install} command lines above along these lines (see also notes on the -following step about only building shared libraries and private installation -subdirectory): +following step about only building shared libraries, private installation +subdirectory, toolchain executables prefix/suffix, etc): \ $ build2/build2/b-boot configure \ + config.config.hermetic=true \ config.cxx=g++ \ config.cc.coptions=-O3 \ config.bin.lib=shared \ @@ -241,7 +264,7 @@ $ build2/build2/b-boot install: build2/ bpkg/ bdep/ You will also need to build and install the standard build system modules: \ -$ b install: libbuild2-*/ +$ b install: '!config.install.scope=project' libbuild2-*/ \ \N|To verify the build system modules installation you can load them with the @@ -276,6 +299,7 @@ $ cd build2-toolchain-X.Y $ bpkg-stage create \ cc \ + config.config.hermetic=true \ config.cxx=g++ \ config.cc.coptions=-O3 \ config.bin.lib=shared \ @@ -297,6 +321,16 @@ and that any further such installations won't interfere with \c{build2}. If, however, you are installing into a private location, such as \c{/opt/build2/}, then you can remove \c{config.install.private=build2}.| +\N|To add a custom prefix/suffix to the toolchain executables names, add +\c{config.bin.exe.prefix=...} and/or \c{config.bin.exe.suffix=...}.| + +\N|The \c{config.config.hermetic=true} configuration variable in the above +command makes sure the embedded \c{~host} and \c{~build2} configurations +include the current environment. This is especially important for \c{~build2} +which is used to dynamically build and load ad hoc recipes and build system +modules and must therefore match the environment that was used to build the +build system itself.| + Next, we add the package repository, build, and install: \ @@ -306,6 +340,19 @@ $ bpkg-stage build --for install build2 bpkg bdep $ bpkg-stage install --all \ +\N|The above command will build all the dependencies of \c{build2}, \c{bpkg}, +and \c{bdep} from source packages. If instead you would like to use +system-installed versions for some of them, then you can list them with the +\c{sys} scheme to make \c{bpkg-stage} treat them as available from the system +rather than building them from source. For example, to use the +system-installed SQLite: + +\ +$ bpkg-stage build --for install build2 bpkg bdep ?sys:libsqlite3 +\ + +| + \N|By default \c{bpkg} will build the latest available version of each package. You can, however, specify the desired versions explicitly, for example: @@ -336,8 +383,9 @@ $ bdep --version Finally, we build and install the standard build system modules: \ -$ bpkg build --for install libbuild2-kconfig -$ bpkg install --all-pattern=libbuild2-* +$ bpkg build --for install libbuild2-autoconf libbuild2-kconfig +$ bpkg install '!config.install.scope=project' \ + --all-pattern=libbuild2-* \ \N|To get a list of the standard pre-installed build system modules in a |