-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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
Makefile
netplan 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 setup
command ("build" in the example above), except the code generated insrc/_features.h
andpython/_features.py
, that is still inside the source directory.Checklist
make check
successfully.make check-coverage
).