sim: fix arch Makefile regen when unified
authorMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 00:44:55 +0000 (20:44 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 02:27:16 +0000 (22:27 -0400)
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/ChangeLog
sim/common/Make-common.in

index da6511c89c97cd5c06aa76a4aac6be2f0d0ab5f2..5d86dcbe7d02603dfbf8740356806b0a1ec36956 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-29  Mike Frysinger  <vapier@gentoo.org>
+
+       * Make-common.in (Makefile): Replace $(arch) and pass more files to
+       config.status.
+
 2021-06-29  Mike Frysinger  <vapier@gentoo.org>
 
        * callback.c [!HAVE_KILL] (os_kill): Return ENOSYS.
index c203b4e1c7bf6bd2f1458868d4d1995964fa2d18..723bda589c9b8a8560dbb460903af21c4378ff4b 100644 (file)
@@ -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