Why Sponsor Oils? | source | all docs for version 0.26.0 | all versions | oils.pub
--help
MirrorThis doc mirrors the --help
for the 3 shell tools in the build sytsem:
configure
- Detect system features_build/oils.sh
- Compile oils-for-unix
source into an executableinstall
- Install the executable, and symlinks to itTo minimize build deps, all 3 of these tools are hand-written POSIX shell
scripts. So this build system does not use GNU autotools, and it does not
use make
.
Keep these differences in mind:
./configure --cxx-for-configure mycc
, not CXX=mycc configure
../configure --cxx-for-configure mycc
, you should also pass
_build/oils.sh --cxx mycc
. The flag value is not remembered.Detect system features before a build of oils-for-unix.
Usage:
./configure FLAG*
./configure --help
Flags:
--cxx-for-configure CXX [default 'cc']
Use this compiler to detect system features
Installation dirs:
--prefix PREFIX [default '/usr/local']
Prefix for the bin/ directory
--datarootdir DATAROOTDIR [default $PREFIX/share]
Prefix for data files, including man page
Dependencies:
--with-readline Fail unless readline is available
--without-readline Don't compile with readline, even if it's available.
The shell won't have any interactive features.
--readline DIR An alternative readline installation to link against
--without-libc-features Assume no FNM_EXTMATCH, GLOB_PERIOD, *pwent()
--with-systemtap-sdt Fail unless systemtap-sdt is available
--without-systemtap-sdt Don't compile with systemtap-sdt, even if it's available
Compile the oils-for-unix source into an executable.
Usage:
_build/oils.sh FLAG*
_build/oils.sh --help
Flags:
--cxx CXX [default 'cxx']
The C++ compiler to use: 'cxx' for system compiler, 'clang', or custom
string
--variant ARG [default 'opt']
The build variant, e.g. dbg, opt, asan, which adds compile and link flags.
--translator ARG [default 'mycpp']
Which bundle of translated source code to compile: mycpp, mycpp-souffle
--skip-rebuild
If the output exists, skip the build
Env vars respected:
OILS_PARALLEL_BUILD= [default 1]
Set to 0 to disable parallel compilation.
OILS_CXX_VERBOSE= [default '']
Set to 1 to show build details.
Compile/link flags:
BASE_CXXFLAGS= (defined in build/common.sh)
Override this to disable basic flags like -fno-omit-frame-pointer
CXXFLAGS= [default ''] (defined in build/ninja-rules-cpp.sh)
Space-separated list of more compiler flags
LDFLAGS= [default ''] (defined in build/ninja-rules-cpp.sh)
Space-separated list of more linker flags
Compiler flags come from these sources:
1. The $BASE_CXXFLAGS var
2. -I $REPO_ROOT is hard-coded
3. The build --variant, e.g. 'asan' adds -fsanitizer=address and more
4. Flags detected by ./configure, e.g. for GNU readline
5. The $CXXFLAGS var
Linker flags come from these sources:
1. The build --variant, e.g. 'asan' adds -fsanitizer=address
2. Flags detected by ./configure, like $STRIP_FLAGS and -lreadline for GNU
readline
3. The $LDFLAGS var
Install the oils-for-unix binary, and symlinks to it, like osh.
Usage:
./install # install the stripped binary
./install _bin/cxx-opt-sh/oils-for-unix # or a given binary
./install --help # show this help
Env vars respected:
DESTDIR=/tmp/foo ./install
The DESTDIR var allows staged installs. This means that the installed files
are placed in a temp dir first, NOT the dir they are run from on the target
machine.
https://www.gnu.org/prep/standards/html_node/DESTDIR.html
Package managers such as gentoo-portage used staged installs by default.
https://devmanual.gentoo.org/quickstart/index.html