diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2025-02-19 14:27:13 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2025-02-19 14:27:13 +0100 |
commit | 1dcac56d3f2b170617aba19726b92e267261c876 (patch) | |
tree | 84ea46de049bec5eddd5558fbfcff36cb080e9b3 /CC/include_scan | |
parent | dd143d2ccf1d60ab4b2c077827db800269049393 (diff) | |
download | rules-cc-1dcac56d3f2b170617aba19726b92e267261c876.tar.gz |
Fix include scanner implementations
... which should abort if the preprocessor failed.
Diffstat (limited to 'CC/include_scan')
-rwxr-xr-x | CC/include_scan | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CC/include_scan b/CC/include_scan index 2876075..b7c1590 100755 --- a/CC/include_scan +++ b/CC/include_scan @@ -30,7 +30,8 @@ set -eu readonly OUT_DIR="$1" shift -for FILE in $("$@" | tr ' ' '\n' | sort | uniq); do +STDOUT="$("$@")" || exit $? +for FILE in $(echo "$STDOUT" | tr ' ' '\n' | sort | uniq); do FILE="$(realpath -s -m --relative-to=. "${FILE}")" if expr match "${FILE}" 'include/' >/dev/null; then OUT_PATH="${OUT_DIR}/${FILE}" |