Go to file
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
.github hacking-howto: Add warning 2020-05-06 17:25:28 +02:00
AnyEvent-I3 introduce the sync IPC command 2018-03-30 21:09:52 +02:00
contrib dump-asy.pl: Include floating_nodes 2018-09-14 14:05:51 +03:00
debian add meson build files (#4094) 2020-05-19 14:45:06 +02:00
docs add meson build files (#4094) 2020-05-19 14:45:06 +02:00
etc Mention rofi in default config file 2020-05-06 17:25:52 +02:00
i3-config-wizard update forgotten srcdir AnyEvent-I3 reference, remove xmacro files 2020-05-18 20:40:07 +02:00
i3-dump-log Remove unused headers 2020-04-20 04:25:06 +02:00
i3-input Remove unused headers 2020-04-20 04:25:06 +02:00
i3-msg Remove unused headers 2020-04-20 04:25:06 +02:00
i3-nagbar update forgotten srcdir AnyEvent-I3 reference, remove xmacro files 2020-05-18 20:40:07 +02:00
i3bar Call cont_child() more liberally (#3996) 2020-04-22 08:55:41 +02:00
include add meson build files (#4094) 2020-05-19 14:45:06 +02:00
libi3 add meson build files (#4094) 2020-05-19 14:45:06 +02:00
m4 fix lcov support 2019-09-01 19:19:12 +02:00
man Add proper return code for i3-msg 2019-02-21 19:52:55 +00:00
meson add meson build files (#4094) 2020-05-19 14:45:06 +02:00
parser-specs cmd_bar: Fix regression with invalid modes 2020-05-14 00:40:09 +02:00
share Move/rename config files/.desktop files into subdirs 2016-10-23 21:09:24 +02:00
src Merge pull request #4088 from stapelberg/san 2020-05-18 18:25:19 +02:00
testcases add meson build files (#4094) 2020-05-19 14:45:06 +02:00
travis add meson build files (#4094) 2020-05-19 14:45:06 +02:00
.clang-format clang-format: bring back ForeachMacros (#3948) 2020-02-19 11:31:09 +01:00
.dockerignore add meson build files (#4094) 2020-05-19 14:45:06 +02:00
.editorconfig Add .editorconfig (see editorconfig.org) (#2943) 2017-09-13 18:38:27 +02:00
.gitignore add meson build files (#4094) 2020-05-19 14:45:06 +02:00
.travis.yml add meson build files (#4094) 2020-05-19 14:45:06 +02:00
configure.ac autotools: place binaries in top level of build dir, not in subdirs (#4093) 2020-05-18 22:18:00 +02:00
DEPENDS Fix DEPENDS table 2018-05-01 13:49:55 +03:00
generate-command-parser.pl generate-command-parser: Add '#pragma once' 2020-04-20 04:25:45 +02:00
i3-dmenu-desktop i3-dmenu-desktop: Support symlinks 2020-04-11 22:57:29 +02:00
i3-migrate-config-to-v4 Remove dead documentation for non-existing feature "stack-limit". 2015-06-09 23:13:15 +02:00
i3-save-tree i3-save-tree: Exclude unsupported "transient_for" property 2018-09-12 14:13:56 +03:00
i3-sensible-editor Added gVim to i3-sensible-editor 2018-02-19 15:39:46 +01:00
i3-sensible-pager Quote the variables in i3-sensible-* correctly 2015-11-30 21:36:23 +00:00
i3-sensible-terminal enhancement: adds hyper as a sensible terminal option 2018-08-01 08:21:44 -05:00
I3_VERSION Set non-git version to 4.18.1-non-git. 2020-04-22 09:21:15 +02:00
LICENSE Remove copyright year range from License 2016-01-17 16:25:54 +05:30
logo.svg s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
Makefile.am autotools: place binaries in top level of build dir, not in subdirs (#4093) 2020-05-18 22:18:00 +02:00
meson_options.txt add meson build files (#4094) 2020-05-19 14:45:06 +02:00
meson.build add meson build files (#4094) 2020-05-19 14:45:06 +02:00
PACKAGE-MAINTAINER Update PACKAGE-MAINTAINER’s compilation instructions 2016-10-23 21:09:24 +02:00
pseudo-doc.doxygen Replace http:// with https:// where applicable 2017-09-24 10:19:07 +02:00
README.md Update badges in README 2018-10-26 09:58:04 -07:00
RELEASE-NOTES-4.18.1 Re-add v4.18.1 release notes (#4071) 2020-05-05 19:14:04 +02:00
RELEASE-NOTES-next add meson build files (#4094) 2020-05-19 14:45:06 +02:00
release.sh add meson build files (#4094) 2020-05-19 14:45:06 +02:00

Logo i3: A tiling window manager

Build Status Issue Stats Pull Request Stats

i3 is a tiling window manager for X11.

For more information about i3, please see the project's website and online documentation.

For information about contributing to i3, please see CONTRIBUTING.md.