mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
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>
This commit is contained in:
2
Makefile
2
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)
|
||||
|
Reference in New Issue
Block a user