From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 1DB893858D38; Mon, 7 Nov 2022 14:51:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DB893858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667832718; bh=upHJDldAEAWnZgSvvVtDNkBTjH9JhXchr+orHjaSWvc=; h=From:To:Subject:Date:From; b=UMFGyu2yYJnJdWR6OobCQ9t6uwfFRQlMLoCt/3o8lO1VJ/hOCHEYeJMTz+MNhOMK9 GgR6F/IJZsr3plJtU989+D/HltajUKu29AYBzmf2m6XNCjwkcS09zfO8CEIdLbqNMV t917Jm3QYRBG+9Sxs01U1fLtfJ86pp0YL8sunT2g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: build: add a proper var for enabled arches X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 200164d46732f6a2fb9d81aa9650c006db4148e6 X-Git-Newrev: 2ba09f42f1e0a9ad44235c0cea991396b2fc520d Message-Id: <20221107145158.1DB893858D38@sourceware.org> Date: Mon, 7 Nov 2022 14:51:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2ba09f42f1e0= a9ad44235c0cea991396b2fc520d commit 2ba09f42f1e0a9ad44235c0cea991396b2fc520d Author: Mike Frysinger Date: Mon Nov 7 21:30:10 2022 +0700 sim: build: add a proper var for enabled arches =20 The install code was using $SUBDIRS to track all enabled arches. This works, but isn't great if we want to add a subdir that isn't an arch port, or as we merge the subdirs into the top-level. Create a new var explicitly to track the list of enabled arches instead. Diff: --- sim/Makefile.am | 26 ++++++-------- sim/Makefile.in | 27 +++++++-------- sim/configure | 102 +++++++++++++++++++++++++++++++++++++--------------= ---- sim/configure.ac | 6 ++++ 4 files changed, 98 insertions(+), 63 deletions(-) diff --git a/sim/Makefile.am b/sim/Makefile.am index 7cdcc601307..7197590035f 100644 --- a/sim/Makefile.am +++ b/sim/Makefile.am @@ -198,29 +198,25 @@ all-recursive: $(SIM_ALL_RECURSIVE_DEPS) install-data-local: installdirs $(SIM_INSTALL_DATA_LOCAL_DEPS) $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(libdir) lib=3D`echo sim | sed '$(program_transform_name)'`; \ - for d in $(SUBDIRS); do \ - if [ -e $$d/run$(EXEEXT) ]; then \ - n=3D"$$lib"; \ - [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ - n=3D"lib$$n.a"; \ - $(INSTALL_DATA) $$d/libsim.a $(DESTDIR)$(libdir)/$$n || exit 1; \ - fi; \ + for d in $(SIM_ENABLED_ARCHES); do \ + n=3D"$$lib"; \ + [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ + n=3D"lib$$n.a"; \ + $(INSTALL_DATA) $$d/libsim.a $(DESTDIR)$(libdir)/$$n || exit 1; \ done =20 install-exec-local: installdirs $(SIM_INSTALL_EXEC_LOCAL_DEPS) $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir) run=3D`echo run | sed '$(program_transform_name)'`; \ - for d in $(SUBDIRS); do \ - if [ -e $$d/run$(EXEEXT) ]; then \ - n=3D"$$run"; \ - [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ - $(LIBTOOL) --mode=3Dinstall \ - $(INSTALL_PROGRAM) $$d/run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) |= | exit 1; \ - fi; \ + for d in $(SIM_ENABLED_ARCHES); do \ + n=3D"$$run"; \ + [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ + $(LIBTOOL) --mode=3Dinstall \ + $(INSTALL_PROGRAM) $$d/run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) ||= exit 1; \ done =20 uninstall-local: $(SIM_UNINSTALL_LOCAL_DEPS) rm -f $(DESTDIR)$(bindir)/run $(DESTDIR)$(libdir)/libsim.a - for d in $(SUBDIRS); do \ + for d in $(SIM_ENABLED_ARCHES); do \ rm -f $(DESTDIR)$(bindir)/run-$$d $(DESTDIR)$(libdir)/libsim-$$d.a; \ done diff --git a/sim/Makefile.in b/sim/Makefile.in index 34df0f82606..b50993a20d4 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -1084,6 +1084,7 @@ SET_MAKE =3D @SET_MAKE@ SHELL =3D @SHELL@ SIM_COMMON_BUILD_FALSE =3D @SIM_COMMON_BUILD_FALSE@ SIM_COMMON_BUILD_TRUE =3D @SIM_COMMON_BUILD_TRUE@ +SIM_ENABLED_ARCHES =3D @SIM_ENABLED_ARCHES@ SIM_FRV_TRAPDUMP_FLAGS =3D @SIM_FRV_TRAPDUMP_FLAGS@ SIM_HW_CFLAGS =3D @SIM_HW_CFLAGS@ SIM_HW_SOCKSER =3D @SIM_HW_SOCKSER@ @@ -3514,30 +3515,26 @@ all-recursive: $(SIM_ALL_RECURSIVE_DEPS) install-data-local: installdirs $(SIM_INSTALL_DATA_LOCAL_DEPS) $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(libdir) lib=3D`echo sim | sed '$(program_transform_name)'`; \ - for d in $(SUBDIRS); do \ - if [ -e $$d/run$(EXEEXT) ]; then \ - n=3D"$$lib"; \ - [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ - n=3D"lib$$n.a"; \ - $(INSTALL_DATA) $$d/libsim.a $(DESTDIR)$(libdir)/$$n || exit 1; \ - fi; \ + for d in $(SIM_ENABLED_ARCHES); do \ + n=3D"$$lib"; \ + [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ + n=3D"lib$$n.a"; \ + $(INSTALL_DATA) $$d/libsim.a $(DESTDIR)$(libdir)/$$n || exit 1; \ done =20 install-exec-local: installdirs $(SIM_INSTALL_EXEC_LOCAL_DEPS) $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir) run=3D`echo run | sed '$(program_transform_name)'`; \ - for d in $(SUBDIRS); do \ - if [ -e $$d/run$(EXEEXT) ]; then \ - n=3D"$$run"; \ - [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ - $(LIBTOOL) --mode=3Dinstall \ - $(INSTALL_PROGRAM) $$d/run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) |= | exit 1; \ - fi; \ + for d in $(SIM_ENABLED_ARCHES); do \ + n=3D"$$run"; \ + [ "$(SIM_PRIMARY_TARGET)" =3D "$$d" ] || n=3D"$$n-$$d"; \ + $(LIBTOOL) --mode=3Dinstall \ + $(INSTALL_PROGRAM) $$d/run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) ||= exit 1; \ done =20 uninstall-local: $(SIM_UNINSTALL_LOCAL_DEPS) rm -f $(DESTDIR)$(bindir)/run $(DESTDIR)$(libdir)/libsim.a - for d in $(SUBDIRS); do \ + for d in $(SIM_ENABLED_ARCHES); do \ rm -f $(DESTDIR)$(bindir)/run-$$d $(DESTDIR)$(libdir)/libsim-$$d.a; \ done =20 diff --git a/sim/configure b/sim/configure index 0a0eb6dbf0c..e7807723f68 100755 --- a/sim/configure +++ b/sim/configure @@ -821,6 +821,7 @@ AS_FOR_TARGET CC_FOR_TARGET SIM_COMMON_BUILD_FALSE SIM_COMMON_BUILD_TRUE +SIM_ENABLED_ARCHES SIM_SUBDIRS SIM_PRIMARY_TARGET AM_BACKSLASH @@ -12428,7 +12429,7 @@ else lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2 lt_status=3D$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12431 "configure" +#line 12432 "configure" #include "confdefs.h" =20 #if HAVE_DLFCN_H @@ -12534,7 +12535,7 @@ else lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2 lt_status=3D$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12537 "configure" +#line 12538 "configure" #include "confdefs.h" =20 #if HAVE_DLFCN_H @@ -14216,6 +14217,9 @@ SIM_PRIMARY_TARGET=3D SIM_SUBDIRS=3D =20 =20 +SIM_ENABLED_ARCHES=3D + + SIM_COMMON_BUILD_TRUE=3D SIM_COMMON_BUILD_FALSE=3D'#' =20 @@ -14236,7 +14240,8 @@ if test "${enable_sim}" !=3D no; then if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Daarch64 fi - ac_config_files=3D"$ac_config_files aarch64/.gdbinit:common/gd= binit.in" + as_fn_append SIM_ENABLED_ARCHES " aarch64" + ac_config_files=3D"$ac_config_files aarch64/.gdbinit:common/gdbinit.= in" =20 ac_config_files=3D"$ac_config_files aarch64/Makefile.sim:aarch64/Makef= ile.in" =20 @@ -14406,7 +14411,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Darm fi - ac_config_files=3D"$ac_config_files arm/.gdbinit:common/gdbini= t.in" + as_fn_append SIM_ENABLED_ARCHES " arm" + ac_config_files=3D"$ac_config_files arm/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files arm/Makefile.sim:arm/Makefile.in" =20 @@ -14449,7 +14455,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Davr fi - ac_config_files=3D"$ac_config_files avr/.gdbinit:common/gdbini= t.in" + as_fn_append SIM_ENABLED_ARCHES " avr" + ac_config_files=3D"$ac_config_files avr/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files avr/Makefile.sim:avr/Makefile.in" =20 @@ -14492,7 +14499,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dbfin fi - ac_config_files=3D"$ac_config_files bfin/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " bfin" + ac_config_files=3D"$ac_config_files bfin/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files bfin/Makefile.sim:bfin/Makefile.in" =20 @@ -14535,6 +14543,7 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dbpf fi + as_fn_append SIM_ENABLED_ARCHES " bpf" =20 =20 subdirs=3D"$subdirs bpf" @@ -14575,7 +14584,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dcr16 fi - ac_config_files=3D"$ac_config_files cr16/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " cr16" + ac_config_files=3D"$ac_config_files cr16/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files cr16/Makefile.sim:cr16/Makefile.in" =20 @@ -14618,7 +14628,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dcris fi - ac_config_files=3D"$ac_config_files cris/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " cris" + ac_config_files=3D"$ac_config_files cris/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files cris/Makefile.sim:cris/Makefile.in" =20 @@ -14661,7 +14672,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dd10v fi - ac_config_files=3D"$ac_config_files d10v/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " d10v" + ac_config_files=3D"$ac_config_files d10v/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files d10v/Makefile.sim:d10v/Makefile.in" =20 @@ -14704,7 +14716,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dfrv fi - ac_config_files=3D"$ac_config_files frv/.gdbinit:common/gdbini= t.in" + as_fn_append SIM_ENABLED_ARCHES " frv" + ac_config_files=3D"$ac_config_files frv/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files frv/Makefile.sim:frv/Makefile.in" =20 @@ -14747,7 +14760,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dft32 fi - ac_config_files=3D"$ac_config_files ft32/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " ft32" + ac_config_files=3D"$ac_config_files ft32/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files ft32/Makefile.sim:ft32/Makefile.in" =20 @@ -14790,7 +14804,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dh8300 fi - ac_config_files=3D"$ac_config_files h8300/.gdbinit:common/gdbi= nit.in" + as_fn_append SIM_ENABLED_ARCHES " h8300" + ac_config_files=3D"$ac_config_files h8300/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files h8300/Makefile.sim:h8300/Makefile.= in" =20 @@ -14833,7 +14848,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Diq2000 fi - ac_config_files=3D"$ac_config_files iq2000/.gdbinit:common/gdb= init.in" + as_fn_append SIM_ENABLED_ARCHES " iq2000" + ac_config_files=3D"$ac_config_files iq2000/.gdbinit:common/gdbinit.i= n" =20 ac_config_files=3D"$ac_config_files iq2000/Makefile.sim:iq2000/Makefil= e.in" =20 @@ -14876,7 +14892,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dlm32 fi - ac_config_files=3D"$ac_config_files lm32/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " lm32" + ac_config_files=3D"$ac_config_files lm32/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files lm32/Makefile.sim:lm32/Makefile.in" =20 @@ -14919,7 +14936,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dm32c fi - ac_config_files=3D"$ac_config_files m32c/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " m32c" + ac_config_files=3D"$ac_config_files m32c/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files m32c/Makefile.sim:m32c/Makefile.in" =20 @@ -14962,7 +14980,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dm32r fi - ac_config_files=3D"$ac_config_files m32r/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " m32r" + ac_config_files=3D"$ac_config_files m32r/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files m32r/Makefile.sim:m32r/Makefile.in" =20 @@ -15005,7 +15024,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dm68hc11 fi - ac_config_files=3D"$ac_config_files m68hc11/.gdbinit:common/gd= binit.in" + as_fn_append SIM_ENABLED_ARCHES " m68hc11" + ac_config_files=3D"$ac_config_files m68hc11/.gdbinit:common/gdbinit.= in" =20 ac_config_files=3D"$ac_config_files m68hc11/Makefile.sim:m68hc11/Makef= ile.in" =20 @@ -15048,7 +15068,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dmcore fi - ac_config_files=3D"$ac_config_files mcore/.gdbinit:common/gdbi= nit.in" + as_fn_append SIM_ENABLED_ARCHES " mcore" + ac_config_files=3D"$ac_config_files mcore/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files mcore/Makefile.sim:mcore/Makefile.= in" =20 @@ -15091,7 +15112,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dmicroblaze fi - ac_config_files=3D"$ac_config_files microblaze/.gdbinit:common= /gdbinit.in" + as_fn_append SIM_ENABLED_ARCHES " microblaze" + ac_config_files=3D"$ac_config_files microblaze/.gdbinit:common/gdbin= it.in" =20 ac_config_files=3D"$ac_config_files microblaze/Makefile.sim:microblaze= /Makefile.in" =20 @@ -15134,7 +15156,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dmips fi - subdirs=3D"$subdirs mips" + as_fn_append SIM_ENABLED_ARCHES " mips" + subdirs=3D"$subdirs mips" =20 =20 ac_config_commands=3D"$ac_config_commands depdir-mips" @@ -15172,7 +15195,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dmn10300 fi - subdirs=3D"$subdirs mn10300" + as_fn_append SIM_ENABLED_ARCHES " mn10300" + subdirs=3D"$subdirs mn10300" =20 =20 ac_config_commands=3D"$ac_config_commands depdir-mn10300" @@ -15210,7 +15234,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dmoxie fi - ac_config_files=3D"$ac_config_files moxie/.gdbinit:common/gdbi= nit.in" + as_fn_append SIM_ENABLED_ARCHES " moxie" + ac_config_files=3D"$ac_config_files moxie/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files moxie/Makefile.sim:moxie/Makefile.= in" =20 @@ -15253,7 +15278,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dmsp430 fi - ac_config_files=3D"$ac_config_files msp430/.gdbinit:common/gdb= init.in" + as_fn_append SIM_ENABLED_ARCHES " msp430" + ac_config_files=3D"$ac_config_files msp430/.gdbinit:common/gdbinit.i= n" =20 ac_config_files=3D"$ac_config_files msp430/Makefile.sim:msp430/Makefil= e.in" =20 @@ -15296,7 +15322,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dor1k fi - subdirs=3D"$subdirs or1k" + as_fn_append SIM_ENABLED_ARCHES " or1k" + subdirs=3D"$subdirs or1k" =20 =20 ac_config_commands=3D"$ac_config_commands depdir-or1k" @@ -15334,7 +15361,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dppc fi - subdirs=3D"$subdirs ppc" + as_fn_append SIM_ENABLED_ARCHES " ppc" + subdirs=3D"$subdirs ppc" =20 =20 ac_config_commands=3D"$ac_config_commands depdir-ppc" @@ -15372,7 +15400,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dpru fi - ac_config_files=3D"$ac_config_files pru/.gdbinit:common/gdbini= t.in" + as_fn_append SIM_ENABLED_ARCHES " pru" + ac_config_files=3D"$ac_config_files pru/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files pru/Makefile.sim:pru/Makefile.in" =20 @@ -15415,7 +15444,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Driscv fi - subdirs=3D"$subdirs riscv" + as_fn_append SIM_ENABLED_ARCHES " riscv" + subdirs=3D"$subdirs riscv" =20 =20 ac_config_commands=3D"$ac_config_commands depdir-riscv" @@ -15453,7 +15483,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Drl78 fi - ac_config_files=3D"$ac_config_files rl78/.gdbinit:common/gdbin= it.in" + as_fn_append SIM_ENABLED_ARCHES " rl78" + ac_config_files=3D"$ac_config_files rl78/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files rl78/Makefile.sim:rl78/Makefile.in" =20 @@ -15496,7 +15527,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Drx fi - ac_config_files=3D"$ac_config_files rx/.gdbinit:common/gdbinit= .in" + as_fn_append SIM_ENABLED_ARCHES " rx" + ac_config_files=3D"$ac_config_files rx/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files rx/Makefile.sim:rx/Makefile.in" =20 @@ -15539,7 +15571,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dsh fi - ac_config_files=3D"$ac_config_files sh/.gdbinit:common/gdbinit= .in" + as_fn_append SIM_ENABLED_ARCHES " sh" + ac_config_files=3D"$ac_config_files sh/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files sh/Makefile.sim:sh/Makefile.in" =20 @@ -15582,7 +15615,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Derc32 fi - ac_config_files=3D"$ac_config_files erc32/.gdbinit:common/gdbi= nit.in" + as_fn_append SIM_ENABLED_ARCHES " erc32" + ac_config_files=3D"$ac_config_files erc32/.gdbinit:common/gdbinit.in" =20 ac_config_files=3D"$ac_config_files erc32/Makefile.sim:erc32/Makefile.= in" =20 @@ -15625,7 +15659,8 @@ fi if test "${targ}" =3D "${target}"; then SIM_PRIMARY_TARGET=3Dv850 fi - subdirs=3D"$subdirs v850" + as_fn_append SIM_ENABLED_ARCHES " v850" + subdirs=3D"$subdirs v850" =20 =20 ac_config_commands=3D"$ac_config_commands depdir-v850" @@ -15670,7 +15705,8 @@ fi =20 as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_EXAMPLE_SYNACOR LD_FOR_TAR= GET_EXAMPLE_SYNACOR CC_FOR_TARGET_EXAMPLE_SYNACOR" =20 - ac_config_files=3D"$ac_config_files example-synacor/.gdbinit:com= mon/gdbinit.in" + as_fn_append SIM_ENABLED_ARCHES " example-synacor" + ac_config_files=3D"$ac_config_files example-synacor/.gdbinit:common/= gdbinit.in" =20 ac_config_files=3D"$ac_config_files example-synacor/Makefile.sim:examp= le-synacor/Makefile.in" =20 diff --git a/sim/configure.ac b/sim/configure.ac index 135aa2198cf..3c374377922 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -48,9 +48,14 @@ dnl used when installing files to see if they need to be= suffixed. SIM_PRIMARY_TARGET=3D AC_SUBST(SIM_PRIMARY_TARGET) =20 +dnl Directories that we need to recurse into (i.e. add to $SUBDIRS). SIM_SUBDIRS=3D AC_SUBST(SIM_SUBDIRS) =20 +dnl List of enabled arch backends. +SIM_ENABLED_ARCHES=3D +AC_SUBST(SIM_ENABLED_ARCHES) + dnl Used by common/Make-common.in to see which configure script created it. SIM_COMMON_BUILD_TRUE=3D SIM_COMMON_BUILD_FALSE=3D'#' @@ -62,6 +67,7 @@ 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 + AS_VAR_APPEND([SIM_ENABLED_ARCHES], [" $1"]) m4_if($2, [true], [dnl AC_CONFIG_SUBDIRS($1) ], [dnl