aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2024-12-02 11:03:34 +0000
committerAnup Patel <anup@brainfault.org>2024-12-15 12:30:47 +0530
commita36cd1b043d5f3f50fee43ab5b97754f6a8ec377 (patch)
treec4c14078332d01ddf88adb938dfc15474c77344d
parentc7866d99fe9a31f32c393a12b0251eacdc89a2b0 (diff)
downloadopensbi-a36cd1b043d5f3f50fee43ab5b97754f6a8ec377.zip
opensbi-a36cd1b043d5f3f50fee43ab5b97754f6a8ec377.tar.gz
opensbi-a36cd1b043d5f3f50fee43ab5b97754f6a8ec377.tar.bz2
Makefile: remove carry output if scripts/carray.sh fails
If the script fails, we end up trying to build either an empty or damaged .c file. Just remove it and let gcc fail on non-existent file. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Reviewed-by: Anup Patel <anup@brainfault.org>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3d8ddfb..419ce66 100644
--- a/Makefile
+++ b/Makefile
@@ -507,7 +507,7 @@ compile_d2c = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
compile_carray = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
echo " CARRAY $(subst $(build_dir)/,,$(1))"; \
$(eval CARRAY_VAR_LIST := $(carray-$(subst .carray.c,,$(shell basename $(1)))-y)) \
- $(src_dir)/scripts/carray.sh -i $(2) -l "$(CARRAY_VAR_LIST)" > $(1)
+ $(src_dir)/scripts/carray.sh -i $(2) -l "$(CARRAY_VAR_LIST)" > $(1) || rm $(1)
compile_gen_dep = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
echo " GEN-DEP $(subst $(build_dir)/,,$(1))"; \
echo "$(1:.dep=$(2)): $(3)" >> $(1)