Skip to content
Success

Changes

Summary

  1. Makefile: generate-files: fix check for empty TMP_OUT (details)
Commit 25c9e6e8df956fe342e6f1969c96921c4f15b4e4 by Sebastiaan van Stijn
Makefile: generate-files: fix check for empty TMP_OUT

commit c655b7dc78b3a0773f33f92e9c923a2e48e9c62b 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 the `ifeq` was evaluated,
making it not possible to execute the `generate-files` target.

This patch changes the check to use a shell command to evaluate if the var
is set to an empty value.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The file was modified Makefile (diff)