-
Notifications
You must be signed in to change notification settings - Fork 36.6k
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: Add show-%
target for multi-line variables and debug info
#24283
Conversation
Concept ACK. I think this kind of debugging functionality is very useful, especially for complex makefiles such as those used in the depends system. |
Any reason for keeping this in draft status? |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Concept ACK |
show-%
target for multi-line variables and debug info
The wrong output here:
|
584b2bc
to
f323829
Compare
Ready for reviewing now. Thank you for your reminding. |
The PR description has been updated. |
concept ack |
@@ -6,7 +6,7 @@ $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b857327 | |||
$(package)_build_subdir=build_unix | |||
$(package)_patches=clang_cxx_11.patch | |||
|
|||
define $(package)_set_vars | |||
define $(package)_set_vars := |
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.
Maybe a dumb question, but what does the added :=
do?
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.
It makes $(package)_set_vars
a simply expanded variable which value is defined just after parsing.
Rebased f323829 -> 2d290d8 (pr24283.03 -> pr24283.04). |
Rebased 2d290d8 -> 6c18d85 (pr24283.04 -> pr24283.05) due to the conflict with #25697. |
This change guarantees that variable values are correct at any time. -BEGIN VERIFY SCRIPT- s() { sed --in-place --expression="s/$1$/$2/g" $(git grep --files-with-matches "$1" "$3"); } s 'define $(package)_set_vars' 'define $(package)_set_vars :=' './depends' -END VERIFY SCRIPT-
Rebased 6c18d85 -> 9d568cc (pr24283.05 -> pr24283.06) due to the conflict with #25633. |
Are you still working on this? |
I am. However, closing due to the lack of interest from other developers. |
This PR is a continuation of #17087.
Our depends builds system uses a bunch of variables which values consist of some lines, i.e., multi-line variables.
During debugging it is annoying that
print-%
is unable to handle such variables:This PR adds
show-%
target which prints multi-line variable value and its origin and flavor as well:For connoisseurs suggesting
make show-qt_set_vars
:)Other useful examples of usage:
Please note that it is unwanted to just modify the
print-%
rule as it is used in scripts.