public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: build: add var for tracking sim enable directly
Date: Mon,  2 Jan 2023 22:43:28 -0500	[thread overview]
Message-ID: <20230103034328.31511-1-vapier@gentoo.org> (raw)

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


                 reply	other threads:[~2023-01-03  3:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230103034328.31511-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).