Makefile: Make .carray.c files depend on carray.sh
PATCH 1/1 Makefile: Make .carray.c files depend on carray.sh
Force carray C source files to be regenerated when the script changes, since their contents depend on the script's output.
---
I have an upcoming patch series that modifies carray.sh, and it would be helpful to have this fix already merged, to avoid needing to make clean after trying out the series.
Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Makefile +3 -3
@@ -528,7 +528,7 @@ $(build_dir)/%.dep: $(src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(build_dir)/%.carray.c: $(src_dir)/%.carray +$(build_dir)/%.carray.c: $(src_dir)/%.carray $(src_dir)/scripts/carray.sh $(call compile_carray,$@,$<) $(build_dir)/%.dep: $(src_dir)/%.c $(KCONFIG_AUTOHEADER)
@@ -556,7 +556,7 @@ $(platform_build_dir)/%.dep: $(platform_src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(platform_build_dir)/%.carray.c: $(platform_src_dir)/%.carray +$(platform_build_dir)/%.carray.c: $(platform_src_dir)/%.carray $(src_dir)/scripts/carray.sh $(call compile_carray,$@,$<) $(platform_build_dir)/%.dep: $(platform_src_dir)/%.c $(KCONFIG_AUTOHEADER)
@@ -599,7 +599,7 @@ $(platform_build_dir)/%.dep: $(src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(platform_build_dir)/%.carray.c: $(src_dir)/%.carray +$(platform_build_dir)/%.carray.c: $(src_dir)/%.carray $(src_dir)/scripts/carray.sh $(call compile_carray,$@,$<) $(platform_build_dir)/%.dep: $(src_dir)/%.c $(KCONFIG_AUTOHEADER)
Signature · 1 line
2.45.1
PATCH 1/1 Makefile: Make .carray.c files depend on carray.sh
Quoted 10 lines · Samuel Holland
Force carray C source files to be regenerated when the script changes, since their contents depend on the script's output.
Signed-off-by Samuel Holland <[email protected]>---
I have an upcoming patch series that modifiescarray.sh, and it would be
helpful to have this fix already merged, to avoid needing tomake clean
after trying out the series.
That looks reasobable, but not had the chance to test
Quoted 43 lines
Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile +1
-1@@ -528,7 +528,7 @@ $(build_dir)/%.dep: $(src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(build_dir)/%.carray.c: $(src_dir)/%.carray +$(build_dir)/%.carray.c: $(src_dir)/%.carray$(src_dir)/scripts/carray.sh
Makefile +1
-1$(call compile_carray,$@,$<) $(build_dir)/%.dep: $(src_dir)/%.c $(KCONFIG_AUTOHEADER)@@ -556,7 +556,7 @@ $(platform_build_dir)/%.dep: $(platform_src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(platform_build_dir)/%.carray.c: $(platform_src_dir)/%.carray +$(platform_build_dir)/%.carray.c: $(platform_src_dir)/%.carray$(src_dir)/scripts/carray.sh
$(call compile_carray,$@,$<)$(platform_build_dir)/%.dep: $(platform_src_dir)/%.c
$(KCONFIG_AUTOHEADER)Makefile +1
-1@@ -599,7 +599,7 @@ $(platform_build_dir)/%.dep: $(src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(platform_build_dir)/%.carray.c: $(src_dir)/%.carray +$(platform_build_dir)/%.carray.c: $(src_dir)/%.carray$(src_dir)/scripts/carray.sh
$(call compile_carray,$@,$<)$(platform_build_dir)/%.dep: $(src_dir)/%.c $(KCONFIG_AUTOHEADER)
--
2.45.1
Anup Patel
AppliedPATCH 1/1 Makefile: Make .carray.c files depend on carray.sh
In reply to Samuel HollandQuoted 9 lines · On Sun, Sep 1, 2024 at 10:07?PM Samuel Holland <[email protected]>…
Force carray C source files to be regenerated when the script changes, since their contents depend on the script's output.
Signed-off-by Samuel Holland <[email protected]>---
I have an upcoming patch series that modifiescarray.sh, and it would be helpful to have this fix already merged, to avoid needing tomake cleanafter trying out the series.
LGTM.
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
Quoted 43 lines
Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile +3
-4@@ -528,7 +528,7 @@ $(build_dir)/%.dep: $(src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(build_dir)/%.carray.c: $(src_dir)/%.carray +$(build_dir)/%.carray.c: $(src_dir)/%.carray $(src_dir)/scripts/carray.sh $(call compile_carray,$@,$<) $(build_dir)/%.dep: $(src_dir)/%.c $(KCONFIG_AUTOHEADER)@@ -556,7 +556,7 @@ $(platform_build_dir)/%.dep: $(platform_src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(platform_build_dir)/%.carray.c: $(platform_src_dir)/%.carray +$(platform_build_dir)/%.carray.c: $(platform_src_dir)/%.carray $(src_dir)/scripts/carray.sh $(call compile_carray,$@,$<) $(platform_build_dir)/%.dep: $(platform_src_dir)/%.c $(KCONFIG_AUTOHEADER)@@ -599,7 +599,7 @@ $(platform_build_dir)/%.dep: $(src_dir)/%.carray $(KCONFIG_AUTOHEADER) $(call compile_gen_dep,$@,.c,$< $(KCONFIG_AUTOHEADER)) $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) -$(platform_build_dir)/%.carray.c: $(src_dir)/%.carray +$(platform_build_dir)/%.carray.c: $(src_dir)/%.carray $(src_dir)/scripts/carray.sh $(call compile_carray,$@,$<) $(platform_build_dir)/%.dep: $(src_dir)/%.c $(KCONFIG_AUTOHEADER) --2.45.1
--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi