[PATCH] sim: fix arch Makefile regen when unified
Mike Frysinger
vapier@gentoo.org
Wed Jun 30 00:51:25 GMT 2021
The $(arch) variable is only setup for cgen ports, so calculate this
value dynamically. We also need to generate multiple inputs in order
to properly recreate the subdir Makefile, so list them all.
---
sim/common/Make-common.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index c203b4e1c7bf..723bda589c9b 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -534,7 +534,8 @@ force:
Makefile: Makefile.in $(srccom)/Make-common.in $(config.status)
@SIM_COMMON_BUILD_FALSE@ CONFIG_HEADERS= $(SHELL) ./config.status
-@SIM_COMMON_BUILD_TRUE@ cd .. && $(SHELL) ./config.status $(arch)/Makefile
+@SIM_COMMON_BUILD_TRUE@ pwd=`pwd` && subdir=`basename "$$pwd"` && cd .. && \
+@SIM_COMMON_BUILD_TRUE@ $(SHELL) ./config.status Make-common.sim $$subdir/Makefile.sim $$subdir/Makefile
@SIM_COMMON_BUILD_FALSE@config.status: configure
@SIM_COMMON_BUILD_FALSE@ $(SHELL) ./config.status --recheck
--
2.31.1
More information about the Gdb-patches
mailing list