From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id AA2703858D1E for ; Tue, 3 Jan 2023 03:43:31 +0000 (GMT) Received: by smtp.gentoo.org (Postfix, from userid 559) id D6964340C40; Tue, 3 Jan 2023 03:43:30 +0000 (UTC) From: Mike Frysinger 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 Message-Id: <20230103034328.31511-1-vapier@gentoo.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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