* [PATCH] sim: build: add var for tracking sim enable directly
@ 2023-01-03 3:43 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2023-01-03 3:43 UTC (permalink / raw)
To: gdb-patches
Rather than rely on SIM_SUBDIRS being set, add a dedicated variable
to track whether to enable the sim. While the current code works
fine, it won't work as we remove the recursive make logic (i.e. the
SIM_SUBDIRS variable).
---
sim/configure | 99 ++++++++++++++++++++++++++++++++----------------
sim/configure.ac | 4 +-
2 files changed, 69 insertions(+), 34 deletions(-)
diff --git a/sim/configure.ac b/sim/configure.ac
index 8a2082f0a4dc..45a9e1303045 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -63,10 +63,12 @@ AC_SUBST(SIM_COMMON_BUILD_TRUE)
AC_SUBST(SIM_COMMON_BUILD_FALSE)
AC_CONFIG_FILES(Make-common.sim:common/Make-common.in)
+ENABLE_SIM=no
dnl Build a particular arch subdir.
dnl arg[1] is the arch subdir name.
dnl arg[2] is whether the arch has a dedicated configure script.
m4_define([SIM_BUILD_TARGET], [dnl
+ ENABLE_SIM=yes
AS_VAR_APPEND([SIM_ENABLED_ARCHES], [" $1"])
m4_if($2, [true], [dnl
AC_CONFIG_SUBDIRS($1)
@@ -165,7 +167,7 @@ if test "${enable_sim}" != no; then
AM_CONDITIONAL([SIM_ENABLE_ARCH_examples], [test "${enable_example_sims}" = "yes"])
fi
AM_CONDITIONAL([SIM_ENABLE_IGEN], [test "$sim_igen" = "yes"])
-AM_CONDITIONAL([ENABLE_SIM], [test -n "$SIM_SUBDIRS"])
+AM_CONDITIONAL([ENABLE_SIM], [test "$ENABLE_SIM" = "yes"])
dnl Standard (and optional) simulator options.
dnl Eventually all simulators will support these.
--
2.39.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-03 3:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 3:43 [PATCH] sim: build: add var for tracking sim enable directly Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).