- coverity fixes
- new --version to ratbag-command
- cleaning up the meson build tools
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Unsurprisingly, meson does not support the ratbag keyword argument. Though it
should, because we're great. But anyway, this lead to the argument being
ignored which means it didn't get an 'input' argument, which means that
libratbag-version.h.in was ignored. And since it all works anyway (Behold! The
magic! Ooooh! Aaaah!) we can just drop that file.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Because, well, that's what we're supposed to do. Unless you want to think
outside the (array) box, but that has never helped anyone, has it?
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Now that we use meson exclusively and meson uses this for its config.h, you
wouldn't get around it anyway. Besides, the main compilers support it and
libratbag is too niche to worry about others.
This also *adds* the pragma to tools/shared.h where it was previously missing,
and changes it to be the top statement in hidpp-generic.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If we don't change count, the value of count < MAX_RETRY is always true.
Coverity is a champ, isn't it?
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Rather than having a bunch of gotos just define a cleanup for this device and
let the magic do the rest.
Found by coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
A semi false-positive from Coverity, because action.macro is unset. Doesn't
matter because we never use it, but having it zeroed is the nice thing to do
(and what we do in the other functions).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
As pointed out elsewhere, the build directory is decided by the user and
should thus be a user-specific gitignore configuration.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pkgconfig.generate() does not (yet) have a parameter for setting custom
variables - we need that for pkgdatadir to point to the SVG files. Swap to
using configure_file with the old .pc.in file that was forgotten in the tree
anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
And thus drop the code to parse the top_srcdir from the arguments to the
symbols-leak-test, not the env.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
For a builddir called 'builddir', the following commands are sufficient now:
meson builddir
ninja -C builddir
sudo ninja -C builddir install
Meson only needs to be run once after checkout or after the removal of the
builddir.
Fixes https://github.com/libratbag/libratbag/issues/142
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Prep work for meson, even though we'll eventuall drop the env bit. This just
removes the extra symbols-leak-test.in step.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Always build the tests, if someone doesn't want it disable it with a configure
flag but at least be explicit about it.
Justification: any developer should build the full stack as intended by
default. Distributions may disable bits and pieces, but they shouldn't rely on
auto-detection to figure it out, they should explicity disable those bits they
don't want.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Always build the documentation, if someone doesn't want it disable it with a
configure flag but at least be explicit about it.
Justification: any developer should build the full stack as intended by
default. Distributions may disable bits and pieces, but they shouldn't rely on
auto-detection to figure it out, they should explicity disable those bits they
don't want.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
And use this to start using C99 variable style, for pure loop variables it's
better to have them declared in the loop itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
../tools/shared.c:132:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>