-
Notifications
You must be signed in to change notification settings - Fork 41
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
Move decompression functions to separate files #58
Conversation
c4b12b0
to
8f7c8a4
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.
Can we use if ENABLE_XZ
within the C file(s) instead?
I'm not a huge fan of conditionals in the build system, especially since if the option evaluates to false the file will be missing from the dist tarball.
With --without-xz ...
the default, I think we'll get some issues ... that is unless you explicitly use --with-xz
for the release tarballs. IMHO DISTCHECK_CONFIGURE_FLAG
should also be updated to include it regardless of this PR.
I don't see a point in having the compiler handle a completely empty file. IMO it also makes it harder to understand how something is disabled by having to open each individual file. It's not how it's usually done in projects like kernel (with files being included according to kconfig) or systemd (with meson). |
Make sure to pass enable all compression libraries so all sources are included. Signed-off-by: Lucas De Marchi <[email protected]>
Move xz-related function to a separate file so it's easier to isolate the dependency on each decompression library. Declare struct kmod_file in a shared libkmod-internal-file.h that will be included only by sources implementing kmod_file decompression routines. Signed-off-by: Lucas De Marchi <[email protected]>
Move zlib-related function to a separate file so it's easier to isolate the dependency on each decompression library. Signed-off-by: Lucas De Marchi <[email protected]>
Move zstd-related function to a separate file so it's easier to isolate the dependency on each decompression library. Signed-off-by: Lucas De Marchi <[email protected]>
8f7c8a4
to
4c0507d
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.
Right, that works. Fwiw the series:
Reviewed-by: Emil Velikov <[email protected]>
Make sure to pass enable all compression libraries so all sources are included. Reviewed-by: Emil Velikov <[email protected]> Link: #58 Signed-off-by: Lucas De Marchi <[email protected]>
Move xz-related function to a separate file so it's easier to isolate the dependency on each decompression library. Declare struct kmod_file in a shared libkmod-internal-file.h that will be included only by sources implementing kmod_file decompression routines. Reviewed-by: Emil Velikov <[email protected]> Link: #58 Signed-off-by: Lucas De Marchi <[email protected]>
Move zlib-related function to a separate file so it's easier to isolate the dependency on each decompression library. Reviewed-by: Emil Velikov <[email protected]> Link: #58 Signed-off-by: Lucas De Marchi <[email protected]>
Move zstd-related function to a separate file so it's easier to isolate the dependency on each decompression library. Reviewed-by: Emil Velikov <[email protected]> Link: #58 Signed-off-by: Lucas De Marchi <[email protected]>
Applied, thanks. |
Closes: #47