Build options and install layout
The meson options that configure a Cupid build, and where ninja install
puts things.
Setting options
Options are given as -Dname=value to meson setup, or changed later
with meson configure build -Dname=value. meson configure build
with no arguments lists every option with its current value.
Cupid options
| Option | Type | Default | Meaning |
|---|---|---|---|
cupiddir | string | libdir/cupid | Directory for the Cupid libraries |
libraries | boolean | true | Build the Haskell libraries and the tests |
readline | feature | auto | Command-line editing with GNU readline or libedit; enabled fails if neither is found, disabled never uses one |
static-readline | boolean | false | Link the line-editing library and the terminal database library statically rather than against their shared libraries; always on on Windows. The Linux release archive uses it, because distributions do not agree on libedit's soname or on libtinfo's symbol versions |
char-encoding | utf8, locale, none | utf8 | Encoding for character I/O; see Character encoding |
profiling | boolean | false | Heap profiler: the -d option, output in profile.hp for hp2ps |
checks | boolean | false | A developer build: keep assertions enabled; check at the type checker's entry points that a type, kind or predicate has that shape and that a table handle is in its table, reporting a failure as an internal error naming the function (see src/tagcheck.h); add the +D toggle that prints generated bytecode |
The platform facts are not options: they are written down in
src/sysdeps.h and the generated src/platform.h, and the type widths
and constants for the base library are computed at build time by
libraries/tools/mksysconfig.c.
Standard meson options used
| Option | Default | Meaning |
|---|---|---|
prefix | /usr/local | Install prefix |
bindir | bin | Programs, under the prefix |
libdir | lib, lib64 or lib/<triplet>, as meson detects | Parent of the default cupiddir |
buildtype | debugoptimized | Compiler optimisation and debug info |
c_std | c2x | The C dialect, C23 under the name meson 1.3 accepts; the sources need it |
Install layout
With the default prefix, on a system where libdir is lib; elsewhere
read libdir for lib in the paths under lib/cupid:
| Path | Contents |
|---|---|
/usr/local/bin/cupid | The interpreter |
/usr/local/lib/cupid/packages/cupid/ | Cupid.Prelude and the other Cupid.* modules |
/usr/local/lib/cupid/packages/base/ | The base library, with the Prelude module |
/usr/local/lib/cupid/include/HsFFI.h | Header for FFI stubs |
/usr/local/lib/cupid/demos/ | Example programs |
/usr/local/lib/cupid/docs/ | This documentation |
/usr/local/lib/cupid/README.md, License, Credits | |
/usr/local/share/man/man1/cupid.1 | Manual page |
ninja -C build install honours DESTDIR. The library directory can
be moved with -Dcupiddir=DIR; the compiled-in default search path and
CUPIDDIR default follow it.
Build tree layout
| Path | Contents |
|---|---|
build/src/cupid | The program |
build/src/config.h, platform.h | Generated headers |
build/libraries/cupiddir/ | The assembled libraries, in install layout |
build/libraries/mksysconfig | The generator for the platform-dependent library parts |
Targets
| Command | Effect |
|---|---|
ninja -C build | Build everything |
ninja -C build install | Install |
ninja -C build clang-tidy | Run the curated static analysis |
See also
- Build Cupid on Linux and macOS
- Platforms and the build on why nothing is probed