Commit Graph

26 Commits

Author SHA1 Message Date
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
Orestis
48fd6416c6 Add files generated by make check in AnyEvent-I3/ to .gitignore (#2915) 2017-09-09 14:47:32 +02:00
Michael Stapelberg
ca83fd566d pull autotools.gitignore into .gitignore 2016-10-23 21:09:24 +02:00
Deiz
5a987cfd6b Rebuild version.o when version.c or LAST_VERSION change
$(TOPDIR)/LAST_VERSION is a cached copy of common.mk's I3_VERSION var,
updated only if the two differ.
2015-04-12 12:31:58 -04:00
Jean-Philippe Ouellet
2eea82eb02 ignore symbol files on OS X (only for debugging, breaks git-add -A) 2013-11-26 19:56:59 +01:00
Tony Crisci
1110a1bed6 Add .clang_complete and Xdummy.so to gitignore
Adds two files to gitignore.

`.clang_complete` is created by the clang_complete vim plugin
[https://github.com/Rip-Rip/clang_complete]

`Xdummy.so` is created by compiling the Xdummy module.
2013-10-23 23:24:04 +02:00
Alexander Berntsen
d83b1f7851 Add a few things to .gitignore 2013-06-23 22:34:13 +02:00
Vivien Didelot
1d22fe42f2 split main .gitignore and ignore more files
This patch splits the main .gitignore with a specific
testcases/.gitignore and also add 4 patterns to the ignore list:

  i3-command-parser.stamp
  i3-config-parser.stamp
  testcases/-
  testcases/i3-cfg-for-*
2013-01-26 19:30:10 +01:00
Michael Stapelberg
44c16063ed add test.config_parser to .gitignore 2012-10-08 13:27:42 +02:00
Michael Stapelberg
3cdc5c5369 update .gitignore (Thanks SardemFF7) 2012-08-07 10:03:37 +02:00
Quentin Glidic
420019f2d0 Update .gitignore 2012-07-22 19:57:22 +02:00
Quentin Glidic
bdc078914b i3: Replace loglevels by a global debug logging
File-limited were not used nor really useful
Besides, they are painful to maintain in Makefile rules compared to the
benefit
2012-07-22 18:41:12 +02:00
stfn
7374633422 Fix up .gitignore 2012-06-24 21:22:26 +02:00
Michael Stapelberg
41d034a6db replace the refcard with an HTML version (by SardemFF7)
This eliminates our build-depedency on latex.
2012-04-12 16:04:29 +02:00
Maik Fischer
228671227d .gitignore: add generated testcases/Makefile 2011-11-23 00:03:03 +00:00
Michael Stapelberg
886aabe826 add libi3/libi3.a to .gitignore 2011-10-23 13:16:26 +01:00
Michael Stapelberg
559fd54334 add i3-config-wizard to .gitignore 2011-07-31 21:53:47 +02:00
Michael Stapelberg
ec88f6501d i3-config-wizard: use a managed, floating (dialog) window. fixes focus problems
Probably only when another window is already opened, but people can do that
(start i3 from within a terminal in their X session)
2011-07-27 13:28:32 +02:00
Michael Stapelberg
1a3f4c2f7d extend .gitignore 2011-07-25 00:25:42 +02:00
Michael Stapelberg
ba4967580a expand .gitignore (Thanks madroach) 2011-07-23 22:24:02 +02:00
Michael Stapelberg
43b97a1cee add binaries to .gitignore 2011-07-10 14:34:14 +02:00
Michael Stapelberg
49f1c2d8ca add *.gcda and *.gcno (code coverage files) to .gitignore 2011-06-12 13:01:16 +02:00
Michael Stapelberg
7fca97b151 gitignore: ignore tarballs 2011-05-25 21:00:46 +02:00
Michael Stapelberg
2491a155ee initial commit of the i3-config-wizard (GUI working, functionality incomplete) 2011-05-01 00:27:23 +02:00
Michael Stapelberg
18ff6ecb37 update .gitignore 2010-11-28 20:19:26 +01:00
Michael Stapelberg
979311deca Separate font stuff to font.c, beautify Makefile 2009-02-08 11:25:32 +01:00