bootstrap Autotools Initialization Script
About bootstrap
GNU Autotools requires a certain amount of boilerplate
initialization in order to generate a
configure
script. Software projects that use
Autotools usually place this initialization in a shell script,
often called bootstrap. I've been using such a
script (implemented with bash) for many years,
intermittently adding new features to accommodate my needs.
The latest version of this software is now maintained by Savarese Software Research Corporation. You can find the new project page at https://www.savarese.com/software/bootstrap/
bootstrap Usage
Using bootstrap is largely self-explanatory from the help
and the code if you already understand Autotools, but the ability
to use a bootstrap.conf
configuration file
requires some explanation. In the course of development, you may
want to maintain different build trees from the same source
checkout. For example, you may have a debug build and a non-debug
build. These builds must reside in different directories and
require different configuration options. Or perhaps you have an
installation tree in your home directory for individual testing
and a system-wide installation tree for continuous integration
testing. You can store build-specific options and associate them with
a configuration name in bootstrap.conf
. Here
is an example adapted from a real project:
Configuration names are prefixed by the
conf_
prefix. Each configuration is a shell
variable containing configure arguments. Each
argument must be separated by a newline. This allows whitespace
to be preserved in assignments such as CFLAGS=-O2
-DNDEBUG
. When you pass a configuration name to
bootstrap, the arguments defined by the
configuration are passed along to configure.
For example, the following command will configure, build, and
install libsavaspread using the release
configuration:
The
build directory generated to perform the build will contain a
suffix of .release
as in
build/i686-redhat-linux-gnu.release/
.
If a bootstrap.conf
file exists and no
configuration name is specified for a bootstrap
run, then the value of conf_default
is used.
You do not need to use bootstrap.conf
to use
bootstrap. If you want to pass arguments to
configure, however, you will have to type
the arguments each time.
bootstrap expects to reside at the top
of the source tree. It can be run from anywhere, but the command
itself must be placed at the root of the source directory tree along
with configure.ac
. Therefore, the convention is
to run bootstrap -init
from the top of your
source tree and then execute the instance of
bootstrap in your source tree for all future
operations related to that source tree. This avoids having to check
in a copy of the bootstrap
script with every
project.
As of version 1.1.5 you can define
pre_bootstrap
and
post_bootstrap
functions in
bootstrap.conf
to perform custom actions
before and after running autotools.
License
bootstrap is released under the Apache License 2.0.
Download
Version | Source | License | Changes |
---|---|---|---|
1.1.5 | bootstrap-1.1.5.tar.bz2 | LICENSE | CHANGES |
Version | Source | License |
---|---|---|
1.1.4 | bootstrap-1.1.4.tar.gz | LICENSE |