[25.0 backport] Makefile: generate-files: fix check for empty TMP_OUT #47586
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.
backport: Makefile: generate-files: fix check for empty TMP_OUT #47569
relates to / introduced in Make sure that make doesn't rm -rf the system out of existence #47121
commit c655b7d added a check to make sure the TMP_OUT variable was not set to an empty value, as such a situation would perform an
rm -rf /**
during cleanup.However, it was a bit too eager, because Makefile conditionals (
ifeq
) are evaluated when parsing the Makefile, which happens before the make target is executed.As a result
$@_TMP_OUT
was always empty when theifeq
was evaluated, making it not possible to execute thegenerate-files
target.This patch changes the check to use a shell command to evaluate if the var is set to an empty value.
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)