From 51db84750ece4de58923d4ce43cb0638ef150f5f Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 7 Jul 2018 10:29:48 -0400 Subject: Add meson.build files to build with meson Provide both build systems in parallel for now, to ensure that we work out all the differences between the two. Some time from now, we'll give up on autotools. Meson tends to be faster and probably easier to read/maintain. On my machine, the full meson configure+build+install takes a little under half as long as a similar autotools-based invocation. Building with meson is a two step process. First, configure the build: meson build Then, compile the project: ninja -C build There's some mild differences in functionality between meson and autotools. specifically: 1) No singular update-po target. meson only generates individual update-po targets for each textdomain (of which we have 3). To make this easier, there's a build-aux/update-po script which finds all update-po targets and runs them. 2) No 'make dist' equivalent. Just run 'git archive' to generate a suitable tarball for distribution. --- src/common/meson.build | 4 ++++ src/pacman/meson.build | 23 +++++++++++++++++++++++ src/pacman/po/meson.build | 15 +++++++++++++++ src/util/meson.build | 3 +++ 4 files changed, 45 insertions(+) create mode 100644 src/common/meson.build create mode 100644 src/pacman/meson.build create mode 100644 src/pacman/po/meson.build create mode 100644 src/util/meson.build (limited to 'src') diff --git a/src/common/meson.build b/src/common/meson.build new file mode 100644 index 00000000..1443be3b --- /dev/null +++ b/src/common/meson.build @@ -0,0 +1,4 @@ +libcommon_sources = files(''' + ini.c ini.h + util-common.c util-common.h +'''.split()) diff --git a/src/pacman/meson.build b/src/pacman/meson.build new file mode 100644 index 00000000..6926f676 --- /dev/null +++ b/src/pacman/meson.build @@ -0,0 +1,23 @@ +pacman_sources = files(''' + check.h check.c + conf.h conf.c + database.c + deptest.c + files.c + package.h package.c + pacman.h pacman.c + query.c + remove.c + sighandler.h sighandler.c + sync.c + callback.h callback.c + upgrade.c + util.h util.c +'''.split()) + +pacman_conf_sources = files(''' + pacman-conf.c + util.h util.c + callback.h callback.c + conf.h conf.c +'''.split()) diff --git a/src/pacman/po/meson.build b/src/pacman/po/meson.build new file mode 100644 index 00000000..eb45fa1c --- /dev/null +++ b/src/pacman/po/meson.build @@ -0,0 +1,15 @@ +i18n.gettext( + 'pacman', + args : [ + '--directory=@0@'.format(meson.current_source_dir()), + '--msgid-bugs-address=http://bugs.archlinux.org/index.php?project=3', + '--copyright-holder="Pacman Development Team "', + '--language', 'c', + + '--keyword=_', + '--flag=_:1:c-format', + + '--keyword=_n:1,2', + '--flag=_n:1:c-format', + '--flag=_n:2:c-format', + ]) diff --git a/src/util/meson.build b/src/util/meson.build new file mode 100644 index 00000000..cc219670 --- /dev/null +++ b/src/util/meson.build @@ -0,0 +1,3 @@ +cleanupdelta_sources = files('cleanupdelta.c') +testpkg_sources = files('testpkg.c') +vercmp_sources = files('vercmp.c') -- cgit v1.2.3-70-g09d2