Cupid

Reference

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

OptionTypeDefaultMeaning
cupiddirstringlibdir/cupidDirectory for the Cupid libraries
librariesbooleantrueBuild the Haskell libraries and the tests
readlinefeatureautoCommand-line editing with GNU readline or libedit; enabled fails if neither is found, disabled never uses one
static-readlinebooleanfalseLink 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-encodingutf8, locale, noneutf8Encoding for character I/O; see Character encoding
profilingbooleanfalseHeap profiler: the -d option, output in profile.hp for hp2ps
checksbooleanfalseA 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

OptionDefaultMeaning
prefix/usr/localInstall prefix
bindirbinPrograms, under the prefix
libdirlib, lib64 or lib/<triplet>, as meson detectsParent of the default cupiddir
buildtypedebugoptimizedCompiler optimisation and debug info
c_stdc2xThe 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:

PathContents
/usr/local/bin/cupidThe 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.hHeader 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.1Manual 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

PathContents
build/src/cupidThe program
build/src/config.h, platform.hGenerated headers
build/libraries/cupiddir/The assembled libraries, in install layout
build/libraries/mksysconfigThe generator for the platform-dependent library parts

Targets

CommandEffect
ninja -C buildBuild everything
ninja -C build installInstall
ninja -C build clang-tidyRun the curated static analysis

See also

Edit this page on GitHub