aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules15
-rw-r--r--BOOTSTRAP-UNIX.cli84
-rw-r--r--README-GIT13
m---------bdep0
m---------bpkg0
-rw-r--r--build.sh.in97
-rw-r--r--build/bootstrap.build3
m---------build20
-rw-r--r--buildfile3
-rw-r--r--doc/packaging.cli2
m---------libbpkg0
m---------libbutl0
m---------libodb0
m---------libodb-sqlite0
l---------libpkg-config1
l---------libsqlite31
m---------submodules/libpkg-config0
m---------submodules/sqlite0
18 files changed, 61 insertions, 158 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:
diff --git a/README-GIT b/README-GIT
index ef48a70..88b7da1 100644
--- a/README-GIT
+++ b/README-GIT
@@ -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 93c3a46eecba45214731a81a302445c55d4147b
+Subproject 2c10a3a40ab8333c066351c8fbf545425d55536
diff --git a/bpkg b/bpkg
-Subproject f39088f3f43408eabdb95b7306531279de27521
+Subproject dcb8512ff90f75da37227e4d9bcc7c058a3b9ca
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 33be784e4b991a95d3ef14a6ef555f1299ec702
+Subproject a1b893afc5c58fee6df5fb895cd489ec83e6fac
diff --git a/buildfile b/buildfile
index aac3b8f..6ff7784 100644
--- a/buildfile
+++ b/buildfile
@@ -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/doc/packaging.cli b/doc/packaging.cli
index 3fbfe40..d861457 100644
--- a/doc/packaging.cli
+++ b/doc/packaging.cli
@@ -1110,7 +1110,7 @@ libfoo/
Once the overall layout looks right, the next step is to take a closer look at
the generated \c{buildfiles} to make sure that overall they match the upstream
build. Of particular interest are the header and source directory
-\c{buildfiles} (\c{libfoo/include/foo/buildifle} and \c{libfoo/src/buildifle}
+\c{buildfiles} (\c{libfoo/include/foo/buildfile} and \c{libfoo/src/buildfile}
in the above listing) which define how the library is built and installed.
Here we are focusing on the macro-level differences that are easier to change
diff --git a/libbpkg b/libbpkg
-Subproject 3f971b0055a5ad0e6af7b6923556e4263a119d7
+Subproject 3a005657f3576488f20b664eb01d35ad9fa7b7e
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