Enable building via Meson build system#268
Conversation
ecf46a9 to
2603961
Compare
Codecov Report
@@ Coverage Diff @@
## main #268 +/- ##
==========================================
- Coverage 99.07% 99.07% -0.01%
==========================================
Files 61 61
Lines 10867 10864 -3
==========================================
- Hits 10767 10764 -3
Misses 100 100
Continue to review full report at Codecov.
|
| systemd_unit_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir') | ||
| bash_completions_dir = completions.get_variable(pkgconfig: 'completionsdir', default_value: '/etc/bash_completion.d') | ||
|
|
||
| pandoc = find_program('pandoc', required: false) |
There was a problem hiding this comment.
You might want to use a meson_options.txt feature option for this. That would allow people to specify -Ddoc=disabled and force disable trying to detect pandoc or build anything with it.
There was a problem hiding this comment.
I guess I'd like to land an initial basic version first, before starting with customization and optimizations.
Thank you very much for your hints, though, those are very welcome!
| endforeach | ||
| else | ||
| warning('Program "pandoc" not found! Cannot generate documentation/man pages') | ||
| endif |
There was a problem hiding this comment.
... and then you can skip this warning, because people who absolutely want the docs can configure it with enabled, people who are okay gracefully degrading can configure it with auto, and people who absolutely don't want a pandoc dependency can disable it and not get a big yellow warning.
94793b6 to
8fe20ce
Compare
schopin-pro
left a comment
There was a problem hiding this comment.
I'm not really familiar with Meson, so I'm discovering it here, but this all looks good, I only have a couple of minor questions/suggestions that can be skipped if in a hurry.
Co-authored-by: Simon Chopin <simon.chopin@canonical.com>
|
Thank you for all your comments! I'm going to merge this once all the tests passed. |
Description
Adding a Meson build environment in addition to the plain
Makefilenetplan is using currently.The new build system should be able to support all the Makefile's features and implement them in a more standard conform way. Furthermore, using Meson we'll be able to extend the build-time features more easily in the future, like implementing build-time options and properly acknowledging dpkg buildflags (hardening/LTO/...).
Meson is easy to use, here are some sample commands, to do the usual netplan stuff:
All things are done inside the build directory, specified during the
meson setupcommand ("build" in the example above), except the code generated insrc/_features.handpython/_features.py, that is still inside the source directory.Checklist
make checksuccessfully.make check-coverage).