Add meson build system. I tried to mimic the existing Makefile style
but there are a couple of noteworthy differentiation.
- meson has the concept of subprojects. It is able to download (via
git) the dependencies (libnvme) and add them directly into the
build system unless the library is found on the host machine
(PKG_CONFIG_PATH needs to point to libnvme). This makes git
submodules unnecessary. The nice thing is that we get a very simple
setup for CI. meson knows how to download and the dependencies into
the build.
To make all this work the git submodule needs to be removed when we
start using meson to build the project. 'meson dist' bundles
libnvme into the final tar. We could obviously remove it again via
add_dist_script but this seems not worth the time.
- meson uses project_version() to set the version string. This is
usually just a string (or read from a file). I added the script
hack so that we keep the versioning consistent with the Makefile,
e.g. that tar file has the 'git describe' version and 'nvme
--version' says the same. For a new release, the script
'nvme-cli-version' needs to be updated (like NVME-VERSION_GEN) and
the release needs to be tagged before one runs 'meson dist'. I
guess in the long run we could just set the project_version string
in meson.build and introduce a package_version which is based on
git. This is how systemd handles this.
- The github workflow disables the unit tests for nvme-cli (but not
for libnvme) by not installing nose2. Those tests fail at the
moment.
There are still many things very rough or missing, e.g. the install
targets. But this seems like a good first version to get things going.