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
Add option to turn on/off all example modules #4668
Add option to turn on/off all example modules #4668
Conversation
b957bef
to
db474e9
Compare
Just pushed a small fixup patch to make it work on automake for me. |
737e720
to
8799422
Compare
oh, thanks for the fixes! |
configure.ac
Outdated
@@ -2332,6 +2336,7 @@ echo " JSON support : $with_jsonc" | |||
echo " Build options:" | |||
echo " Generate manual pages : ${enable_manpages:=no}" | |||
echo " Install manual pages : ${enable_manpages_install:=no}" | |||
echo " Example modules : ${enable_example_modules:=yes}" |
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.
Sorry, I just noticed:
Can we move this under the modules section?
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.
done
@@ -39,4 +40,6 @@ EXTRA_DIST += modules/examples/CMakeLists.txt | |||
|
|||
modules/examples modules/examples/ mod-examples: modules/examples/libexamples.la | |||
|
|||
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.
Shouldn't we have a line like this in an else block?
modules/examples modules/examples/ mod-examples:
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.
sorry, surely my bad, but i do not really get this
this endif
belongs to the starting if ENABLE_EXAMPLE_MODULES
that tries to exclude everything in this makefile if the example modules are disabled
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.
oh, you meant like this
...
modules/grpc/loki modules/grpc/loki/ mod-loki: modules/grpc/loki/libloki.la
else
modules/grpc/loki modules/grpc/loki/ mod-loki:
endif
I do not know what the empty module definition does here, could you explain please?
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.
We usually have this for our modules (e.g.: https://github.com/syslog-ng/syslog-ng/blob/master/modules/http/Makefile.am#L44)
My understanding was that this is needed so make mod-examples
does not fail if we configured --disable-example-modules
, but it seems like it works either way.
@MrAnno do you know why we add empty targets for our modules?
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.
just to be consistent with other modules I've added the else
branch with the empty module, but still curious about what it does
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.
They are there to make per-module compilation work.
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.
They are there to make per-module compilation work.
my problem is that it is absolutely stochastic if it's presented or not, and not a strict habit/requirement/rule, so, it's hard to decide if it's really needed or not.
…LE_EXAMPLE_DESTINATION Signed-off-by: Hofi <hofione@gmail.com>
8799422
to
7524a5f
Compare
7524a5f
to
05a5797
Compare
…ULES both to autotools and cmake builds Signed-off-by: Hofi <hofione@gmail.com>
05a5797
to
dc64f0b
Compare
I never used those targets myself, do maybe we can drop them?
…On Tue, Oct 24, 2023, 15:44 Hofi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In modules/examples/Makefile.am
<#4668 (comment)>:
> @@ -39,4 +40,6 @@ EXTRA_DIST += modules/examples/CMakeLists.txt
modules/examples modules/examples/ mod-examples: modules/examples/libexamples.la
+endif
They are there to make per-module compilation work.
my problem is that it is absolutely stochastic if it's presented or not,
and not a strict habit/requirement/rule, so, it's hard to decide if it's
really needed to not.
—
Reply to this email directly, view it on GitHub
<#4668 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOK5RQMGQLYXH33YKDBYTYA7A4PAVCNFSM6AAAAAA53XERBCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMOJUHEYDENJRGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This is a bit more generic version of #4660 that allows switching on/off all the example modules both in cmake and autotools builds
example_destination
example only compile switch ENABLE_EXAMPLE_DESTINATIONSigned-off-by: Hofi hofione@gmail.com