diff options
-rw-r--r-- | .gitmodules | 15 | ||||
-rw-r--r-- | BOOTSTRAP-UNIX.cli | 84 | ||||
-rw-r--r-- | README-GIT | 13 | ||||
m--------- | bdep | 0 | ||||
m--------- | bpkg | 0 | ||||
-rw-r--r-- | build.sh.in | 97 | ||||
-rw-r--r-- | build/bootstrap.build | 3 | ||||
m--------- | build2 | 0 | ||||
-rw-r--r-- | buildfile | 3 | ||||
m--------- | libbutl | 0 | ||||
m--------- | libodb | 0 | ||||
m--------- | libodb-sqlite | 0 | ||||
l--------- | libpkg-config | 1 | ||||
l--------- | libsqlite3 | 1 | ||||
m--------- | submodules/libpkg-config | 0 | ||||
m--------- | submodules/sqlite | 0 |
16 files changed, 60 insertions, 157 deletions
diff --git a/.gitmodules b/.gitmodules index b95cbe3..86337fe 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,24 +16,9 @@ [submodule "doc/style"] path = doc/style url = ../style.git -[submodule "libodb"] - path = libodb - url = https://scm.codesynthesis.com/odb/libodb.git - update = none -[submodule "libodb-sqlite"] - path = libodb-sqlite - url = https://scm.codesynthesis.com/odb/libodb-sqlite.git - update = none -[submodule "submodules/sqlite"] - path = submodules/sqlite - url = https://git.build2.org/packaging/sqlite/sqlite.git - update = none [submodule "submodules/libbuild2-kconfig"] path = submodules/libbuild2-kconfig url = https://github.com/build2/libbuild2-kconfig.git [submodule "submodules/libbuild2-autoconf"] path = submodules/libbuild2-autoconf url = https://github.com/build2/libbuild2-autoconf.git -[submodule "submodules/libpkg-config"] - path = submodules/libpkg-config - url = https://github.com/build2/libpkg-config.git diff --git a/BOOTSTRAP-UNIX.cli b/BOOTSTRAP-UNIX.cli index aee6fd9..26d5513 100644 --- a/BOOTSTRAP-UNIX.cli +++ b/BOOTSTRAP-UNIX.cli @@ -177,28 +177,6 @@ $ 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 @@ -244,18 +222,17 @@ 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, 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 \ - config.bin.rpath=/usr/local/lib/build2 \ - config.install.root=/usr/local \ - config.install.private=build2 \ +following step about only building shared libraries, 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 \ + config.bin.rpath=/usr/local/lib \ + config.install.root=/usr/local \ config.install.sudo=sudo $ build2/build2/b-boot install: build2/ bpkg/ bdep/ @@ -297,30 +274,20 @@ $ cd .. # Back to build2-build/ $ mkdir build2-toolchain-X.Y $ cd build2-toolchain-X.Y -$ bpkg-stage create \ - cc \ - config.config.hermetic=true \ - config.cxx=g++ \ - config.cc.coptions=-O3 \ - config.bin.lib=shared \ - config.bin.rpath=/usr/local/lib/build2 \ - config.install.root=/usr/local \ - config.install.private=build2 \ +$ bpkg-stage create \ + cc \ + config.config.hermetic=true \ + config.cxx=g++ \ + config.cc.coptions=-O3 \ + config.bin.lib=shared \ + config.bin.rpath=/usr/local/lib \ + config.install.root=/usr/local \ config.install.sudo=sudo \ \N|The above configuration will only build shared libraries. If you would like to build both shared and static, remove \c{config.bin.lib=shared}.| -\N|The above configuration will install shared libraries that \c{build2} -depends on into a private subdirectory. This is primarily useful when -installing into a shared location, such as \c{/usr/local/}. By hiding the -libraries in the private subdirectory we make sure that they will not -interfere with anything that is already installed into such a shared location -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=...}.| @@ -340,19 +307,6 @@ $ 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: @@ -24,16 +24,3 @@ A few additional notes: see the '(new commits, modified content)' status instead of just '(new commits)' next to submodules (i.e., git "thinks" you have modified the member project by "setting back" its subproject commit). - -2. The libpkg-config, sqlite and libodb* submodules are not updated by default - (e.g., with the above command). This is achieved with: - - git config --file .gitmodules submodule.sqlite.update none - - Instead, their updates (normally to something tagged) must be requested - explicitly: - - git submodule update --remote --checkout submodules/sqlite - - Note that you need a fairly recent git (e.g., 2.9) for this enforcement - to work. diff --git a/bdep b/bdep -Subproject 987793088141ebffef885be349e260672bbc40c +Subproject 2c10a3a40ab8333c066351c8fbf545425d55536 diff --git a/bpkg b/bpkg -Subproject a0f3569a4e349e12cb65103853f86be60b4b379 +Subproject 801593731e61efba2141cdad1ff0559e501f97a diff --git a/build.sh.in b/build.sh.in index 43c648a..8243098 100644 --- a/build.sh.in +++ b/build.sh.in @@ -93,10 +93,10 @@ while test $# -ne 0; do diag " --make <arg> Bootstrap using GNU make instead of script." diag " --verbose <level> Diagnostics verbosity level between 0 and 6." diag - diag "By default the script will install into /usr/local with private" - diag "library subdirectories and using sudo(1). To enable private" - diag "subdirectories and/or use sudo for a custom installation location," - diag "you need to specify --private and/or --sudo explicitly, for example:" + diag "By default the script will install into /usr/local using sudo(1). To" + diag "enable private library subdirectories and/or use sudo for a custom" + diag "installation location, you need to specify --private and/or --sudo" + diag "explicitly, for example:" diag diag "$0 --install-dir /opt/build2 --sudo sudo g++" diag @@ -124,10 +124,12 @@ while test $# -ne 0; do diag "$0 g++ -g" diag diag "Use --system <list> to specify a comma-separated list of dependencies" - diag "to use from the system rather than building them from source, for" - diag "example:" + diag "to use from the system rather than building them from source. Currently," + diag "only libsqlite3 and libpkgconf can be specified with this option and" + diag "using either from the system will likely result in limited functionality." + diag "For example:" diag - diag "$0 --system libsqlite3,libpkg-config g++" + diag "$0 --system libsqlite3,libpkgconf g++" diag diag "The script by default installs the following standard build system" diag "modules:" @@ -383,14 +385,9 @@ done # system_list="$(echo "$system" | sed 's/,/ /g')" -# If any dependencies are specified to be used from the system, then specify -# the respective config.import.*= variables for the bootstrap stage 2 command -# and for the local or staged build configurations. If the installation is not -# local, then also specify these dependencies as system for the bpkg-build -# commands. -# -# As a special case, recognize the libpkgconf dependency as a request to force -# build2 to use that instead of libpkg-config. +# If any dependencies are specified to be used from the system, then translate +# them to the correspinding config.* variables. To keep things simple, we will +# only support system dependencies for local installations. # # Note that the build2 driver bootstrapped at stage 1 doesn't read .pc # files. Thus, for the bootstrap stage 2 command it is assumed that the @@ -400,49 +397,35 @@ system_list="$(echo "$system" | sed 's/,/ /g')" # also specify its headers location via, for example, the CPATH environment # variable: # -# $ CPATH=/usr/local/include/pkgconf ./build.sh --local --system libpkgconf g++ +# $ CPATH=/usr/include/pkgconf ./build.sh --local --system libpkgconf g++ # -bootstrap_system_imports= -system_imports= -system_packages= +bootstrap_system_config= +system_config= for d in $system_list; do - v="$(echo "$d" | sed 's/[.+-]/_/g')" # Convert to variable name. - - if test "$d" != "libpkgconf"; then - si="config.import.$v=" - else - if test -z "$local"; then - diag "error: '--system libpkgconf' can only be used for local installation" - diag " info: additionally specify --local" - exit 1 - fi - - si="config.build2.libpkgconf=true" - fi - # For now these are the only third-party libraries that are used by the - # build system. - # - if test "$d" = "libpkg-config" -o "$d" = "libpkgconf"; then - bootstrap_system_imports="$si" + if test -z "$local"; then + diag "error: '--system $d' can only be used for local installation" + diag " info: additionally specify --local" + exit 1 fi - # Suppress the 'dropping no longer used variable' warnings. + # Note: prefix system_config variables with project directories to avoid the + # 'dropping no longer used ...' warnings. # - if test -z "$system_imports"; then - system_imports="config.config.persist='config.*'@unused=drop" - fi - - system_imports="$system_imports $si" - - if test -z "$local"; then - if test -n "$system_packages"; then - system_packages="$system_packages ?sys:$d" - else - system_packages="?sys:$d" - fi - fi + case "$d" in + libsqlite3) + system_config="$system_config libbutl/config.libbutl.system_libsqlite3=true" + ;; + libpkgconf) + bootstrap_system_config="config.build2.libpkgconf=true" + system_config="$system_config build2/config.build2.libpkgconf=true" + ;; + *) + diag "error: unknown system dependency '$d'" + exit 1 + ;; + esac done # If the installation directory is unspecified, then assume it is /usr/local. @@ -453,7 +436,6 @@ done # if test -z "$idir"; then idir=/usr/local - private=config.install.private=build2 # Only use default sudo for the default installation directory and only if # it wasn't specified by the user. @@ -614,7 +596,7 @@ run build2/b-boot --version # Bootstrap, stage 2. # -run build2/b-boot $verbose $jobs config.cxx="$cxx" config.bin.lib=static $bootstrap_system_imports build2/exe{b} +run build2/b-boot $verbose $jobs config.cxx="$cxx" config.bin.lib=static $bootstrap_system_config build2/exe{b} mv build2/b build2/b-boot run build2/b-boot --version @@ -635,7 +617,7 @@ config.install.root="$idir" \ config.install.sudo="$conf_sudo" \ $conf_exe_affixes \ $private \ -$system_imports +$system_config # Install toolchain. # @@ -696,8 +678,7 @@ config.bin.suffix="$stage_suffix" \ config.bin.rpath="$conf_rpath_stage" \ config.install.root="$idir" \ config.install.data_root=root/stage \ -config.install.sudo="$conf_sudo" \ -$system_imports +config.install.sudo="$conf_sudo" run build2/build2/b-boot $verbose $jobs install: build2/ bpkg/ @@ -735,7 +716,7 @@ fi run "$bpkg_stage" $verbose add "$BUILD2_REPO" run "$bpkg_stage" $verbose $bpkg_fetch_ops fetch -run "$bpkg_stage" $verbose $jobs $bpkg_build_ops build --for install --yes --plan= $packages $system_packages +run "$bpkg_stage" $verbose $jobs $bpkg_build_ops build --for install --yes --plan= $packages run "$bpkg_stage" $verbose $jobs install --all run command -v "$b" @@ -760,7 +741,7 @@ for m in $module_list; do done if test -n "$packages"; then - run "$bpkg" $verbose $jobs $bpkg_build_ops build --for install $packages $system_packages + run "$bpkg" $verbose $jobs $bpkg_build_ops build --for install $packages run "$bpkg" $verbose $jobs install '!config.install.scope=project' --all-pattern=libbuild2-* fi diff --git a/build/bootstrap.build b/build/bootstrap.build index 183578f..0a20cb1 100644 --- a/build/bootstrap.build +++ b/build/bootstrap.build @@ -8,8 +8,7 @@ amalgamation = # Disable amalgamation. # Note: list them (mostly) explicitly without using wildcards to handle stray # subdirectories in the root (debian/, installation location, etc). # -subprojects += libpkg-config/ libbutl/ build2/ libsqlite3/ libodb/ \ - libodb-sqlite/ libbpkg/ bpkg/ bdep/ +subprojects += libbutl/ build2/ libbpkg/ bpkg/ bdep/ subprojects += libbuild2-*/ subprojects += tests/*/ diff --git a/build2 b/build2 -Subproject c505faf0ed9588875542dc323044fc2fc1960d3 +Subproject 6f1c4669933a85c0875ac2721574bf50c2f310e @@ -21,8 +21,7 @@ build2_repo="https://stage.build2.org/1" # # NOTE: see also subprojects in bootstrap.build if changing anything here. # -d = libpkg-config/ libbutl/ build2/ libsqlite3/ libodb/ libodb-sqlite/ \ -libbpkg/ bpkg/ bdep/ doc/ libbuild2-*/ +d = libbutl/ build2/ libbpkg/ bpkg/ bdep/ doc/ libbuild2-*/ if ($build.meta_operation == 'dist') d += tests/*/ diff --git a/libbutl b/libbutl -Subproject 3a55e033e4fc9a18ede99c4f9dd69fd30c383cf +Subproject 7f28f2c4ca9fea040cc98fead3c8c5caa178b23 diff --git a/libodb b/libodb deleted file mode 160000 -Subproject 0074faad1b27f3cd52a606c438e4f1375956d73 diff --git a/libodb-sqlite b/libodb-sqlite deleted file mode 160000 -Subproject 73598cebc38cb5875cb6245b794cfb1194c61cc diff --git a/libpkg-config b/libpkg-config deleted file mode 120000 index 9e074db..0000000 --- a/libpkg-config +++ /dev/null @@ -1 +0,0 @@ -submodules/libpkg-config/libpkg-config
\ No newline at end of file diff --git a/libsqlite3 b/libsqlite3 deleted file mode 120000 index 3ab815d..0000000 --- a/libsqlite3 +++ /dev/null @@ -1 +0,0 @@ -submodules/sqlite/libsqlite3
\ No newline at end of file diff --git a/submodules/libpkg-config b/submodules/libpkg-config deleted file mode 160000 -Subproject 81bc60b381959b99cdef93d9326f3dd9522c307 diff --git a/submodules/sqlite b/submodules/sqlite deleted file mode 160000 -Subproject 5b013b5507eb14bf51e565ec844d1fc462302f6 |