i3/docs
Michael Stapelberg aba6ec3e52
add meson build files (#4094)
Motivation:

• faster builds (on an Intel Core i9-9900K):
  ( ../configure --disable-sanitizers && make -j8; )
  19,47s user 2,78s system 395% cpu 5,632 total

  ( meson .. -Dmans=true -Ddocs=true -Dprefix=/usr && ninja; )
  38,67s user 3,73s system 1095% cpu 3,871 total

• more approachable build system configuration in the
  python-esque meson domain specific language instead of
  the autotools m4 macro language

• built-in language server support thanks to ninja:
  the required compile_commands.json is built automatically
  and only needs to be linked from the source dir, e.g.:
  ln -s build/compile_commands.json .

Changes:

• the embedded vcs version info format changed from e.g.
  4.18-282-gabe46f69 (2020-05-16, branch "next")
  to:
  4.18-282-gabe46f69
  I think it’s better to lose a little bit of detail for
  the gained cleanliness of using meson’s vcs_tag()

• Drop unused xcb-event dependency.

• We can no longer enable sanitizers and debug options
  based on whether we are in a release or non-release build,
  because our new version logic runs at ninja build time,
  not at meson configure time.

  The new behavior is probably for the better in terms of
  what people expect, and we can make the CI use address sanitizer
  explicitly to ensure it is still exercised.

• We lose the AX_EXTEND_SRCDIR behavior, i.e. including the
  path component of the parent of the source dir in all paths.
  This was a trick we used for easier debugging, so that stack
  traces would contain e.g. ../i3-4.18.1/src/main.c, instead of
  just src/main.c.

  The other mechanism (_i3_version symbol) that we have for including
  the version number in the “backtrace full” (but not merely
  “backtrace”) output of gdb still works.

• Release tarballs now use tar.xz. Why not.

Migration plan

This commit adds the meson build files to the tree, but does not remove
autotools yet. For the development phase, we will keep both build systems
functional (and built on travis).

Then, just before the i3 v4.19 release, we will remove autotools from the tree
and the release tarball will require meson to compile.

This way, we incentivize maintainers to change, while also offering them an easy
way out (if desired) by reverting the most recent commit. In practice, switching
a distribution package from autotools to meson should only be a few line change,
easier than applying the provided patch :). Take a look at the debian/ changes
in this commit for an example.

meson is broadly available everywhere that i3 is available: Both xorg-server and
systemd gained meson build files in 2017, so we can follow suit:
https://anholt.livejournal.com/52574.html
https://in.waw.pl/~zbyszek/blog/systemd-meson.html

How do I?

For producing a coverage report, enable the b_coverage meson base option
and run ninja coverage-html:
% cd build
% meson .. -Db_coverage=true
% ninja
% ninja test
% ninja coverage-html
See also https://mesonbuild.com/howtox.html#producing-a-coverage-report

For using the address sanitizer, memory sanitizer or undefined behavior
sanitizer, use the b_sanitize meson base option:
% cd build
% meson .. -Db_sanitize=address
% ninja
See also https://mesonbuild.com/Builtin-options.html#base-options

related to #4086
2020-05-19 14:45:06 +02:00
..
GPN-2009-06-27 s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
NoName-2009-03-12 docs/NoName-2009-03-12: add missing screenshot 2014-01-26 16:39:09 +01:00
slides-2012-01-25 Add presentation slides from 2012-01-25 2012-01-25 21:16:21 +00:00
slides-2012-03-16 add slides from 2012-03-16 (German) 2012-06-10 18:17:02 +02:00
asciidoc-git.conf Replace http:// with https:// where applicable 2017-09-24 10:19:07 +02:00
bigpicture.asy hacking-howto: Update 'data structures' section 2020-05-06 17:25:28 +02:00
bigpicture.png hacking-howto: Update 'data structures' section 2020-05-06 17:25:28 +02:00
debugging Add an i3bar flag: --verbose 2018-04-13 23:09:44 +08:00
hacking-howto add meson build files (#4094) 2020-05-19 14:45:06 +02:00
i3-pod2html pod2html: render without stylesheet by default (#4016) 2020-04-12 11:07:43 +02:00
i3-sync-working.dia Add docs/testsuite 2011-09-24 20:10:01 +01:00
i3-sync-working.png Add docs/testsuite 2011-09-24 20:10:01 +01:00
i3-sync.dia Add docs/testsuite 2011-09-24 20:10:01 +01:00
i3-sync.png Add docs/testsuite 2011-09-24 20:10:01 +01:00
i3bar-protocol Documentation: fix links pointing to Pango markup 2019-10-22 06:45:40 +02:00
ipc Improved documentation for "window_properties" field in GET_TREE reply. 2020-02-08 11:41:48 +01:00
keyboard-layer1.png docs/userguide: update keyboard-layer images, remove incomplete warning 2011-07-31 23:53:26 +02:00
keyboard-layer1.svg docs/userguide: update keyboard-layer images, remove incomplete warning 2011-07-31 23:53:26 +02:00
keyboard-layer2.png docs/userguide: update keyboard-layer images, remove incomplete warning 2011-07-31 23:53:26 +02:00
keyboard-layer2.svg Include graphic of the default keyboard layout in user’s guide 2010-03-07 21:12:59 +01:00
layout-saving Remanage window after property updates (like titles) (#3759) 2019-08-13 08:50:48 +02:00
layout-saving-1.png add missing docs/layout-saving-1.png 2014-04-26 12:46:25 +02:00
logo-30.png replace the refcard with an HTML version (by SardemFF7) 2012-04-12 16:04:29 +02:00
modes.png Update userguide 2009-10-23 19:53:36 +02:00
multi-monitor docs/multi-monitor: nVidia ≥ 302.17 works just fine (Thanks HedgeMage) 2013-04-06 22:49:14 +02:00
refcard_style.css add missing docs/refcard_style.css to git 2012-04-13 13:38:06 +02:00
refcard.html Replace http:// with https:// where applicable 2017-09-24 10:19:07 +02:00
single_terminal.png userguide: Document most features 2009-06-01 14:59:25 +02:00
snapping.png userguide: Document most features 2009-06-01 14:59:25 +02:00
testsuite tests: run under Xvfb by default (if available) (#2951) 2017-10-13 00:18:49 -07:00
tree-layout1.png docs: add tree-*.png (for tree-migrating) 2011-01-29 18:31:09 +01:00
tree-layout2.png docs: add tree-*.png (for tree-migrating) 2011-01-29 18:31:09 +01:00
tree-shot1.png docs: add tree-*.png (for tree-migrating) 2011-01-29 18:31:09 +01:00
tree-shot2.png docs: add tree-*.png (for tree-migrating) 2011-01-29 18:31:09 +01:00
tree-shot3.png docs: add tree-*.png (for tree-migrating) 2011-01-29 18:31:09 +01:00
tree-shot4.png docs: add tree-*.png (for tree-migrating) 2011-01-29 18:31:09 +01:00
two_columns.png userguide: Document most features 2009-06-01 14:59:25 +02:00
two_terminals.png userguide: Document most features 2009-06-01 14:59:25 +02:00
userguide Extend tiling/floating criteria with optional auto/user values (#4006) 2020-04-12 13:49:08 +02:00
wsbar Replace http:// with https:// where applicable 2017-09-24 10:19:07 +02:00
wsbar.dia Add documentation for external workspace bars 2011-01-29 15:19:11 +01:00
wsbar.png Add documentation for external workspace bars 2011-01-29 15:19:11 +01:00