-
Notifications
You must be signed in to change notification settings - Fork 556
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
build: allow overriding certain tools & sync targets with CI #6222
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allow overriding the following tools at configure-time and build-time: * codespell * cppcheck * gawk * scan-build For example, instead of hardcoding `gawk`, enable overriding it at configure-time with: ./configure GAWK=/path/to/gawk To override it for a single `make` invocation: make GAWK=/path/to/gawk Also, add default values for the programs that are not found (rather than leaving the variables empty), to make error messages clearer when trying to run them: $ make CPPCHECK= cppcheck-old [...] force --error-exitcode=1 --enable=warning,performance . make: force: No such file or directory $ make CPPCHECK=cppcheck cppcheck-old [...] cppcheck --force --error-exitcode=1 --enable=warning,performance . make: cppcheck: No such file or directory
Changes: * Use the same command from the cppcheck CI job in the cppcheck target * Add cppcheck-old target based on the cppcheck_old CI job * Call the make targets in CI to avoid duplicating the commands
Changes: * Use --status-bugs in the scan-build target to exit with an error if bugs are found * Call the make target in the CI job
Cc: @reinerh @rusty-snake Hello, you might find this interesting since you also worked on these checks. This PR enables overrides for certain tools, which should allow more |
reinerh
approved these changes
Feb 26, 2024
glitsj16
approved these changes
Feb 26, 2024
kmk3
added a commit
that referenced
this pull request
Mar 1, 2024
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 17, 2024
Cleaning does not appear to make a difference; the same amount of files is checked with/without cleaning. Environment: cppcheck 2.12.0-3 on Artix Linux. Added on commit 4e22add ("llvm scan", 2015-11-29). This is a follow-up to netblue30#6222.
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 24, 2024
Just in case the value is not defined in config.mk and `make` is first executed from another directory (such as in src/man) instead of the root directory. This amends commit 93d623f ("build: allow overriding certain tools", 2024-02-23) / PR netblue30#6222.
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 24, 2024
Tools: * gzip * install * rm * strip * tar For the programs not checked in configure.ac: From the manual of GNU Autoconf (version 2.69): > If you use `AC_PROG_INSTALL`, you must include `install-sh` in your > distribution So set `install` just in the Makefile. Use `$(RM)` to make it easier to spot when `-r` is used. See commit 93d623f ("build: allow overriding certain tools", 2024-02-23) / PR netblue30#6222.
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 29, 2024
Tools: * gzip * install * rm * strip * tar For the programs not checked in configure.ac: From the manual of GNU Autoconf (version 2.69): > If you use `AC_PROG_INSTALL`, you must include `install-sh` in your > distribution So set `install` just in the Makefile. Use `$(RM)` to ensure that `-f` is always used and to make it easier to spot when `-r` is used. See commit 93d623f ("build: allow overriding certain tools", 2024-02-23) / PR netblue30#6222.
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 29, 2024
Tools: * gzip * install * rm * strip * tar For the programs not checked in configure.ac: From the manual of GNU Autoconf (version 2.71): > If you use `AC_PROG_INSTALL`, you must include `install-sh` in your > distribution So set `install` just in the Makefile. Use `$(RM)` to ensure that `-f` is always used and to make it easier to spot when `-r` is used. See commit 93d623f ("build: allow overriding certain tools", 2024-02-23) / PR netblue30#6222.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow overriding the following tools at configure-time and build-time:
For example, instead of hardcoding
gawk
, enable overriding it atconfigure-time with:
To override it for a single
make
invocation:Also, add default values for the programs that are not found (rather
than leaving the variables empty), to make error messages clearer when
trying to run them: