Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/5] sim: drop configure scripts for simple ports
Date: Sun, 20 Jun 2021 01:55:17 -0400	[thread overview]
Message-ID: <20210620055519.22229-3-vapier@gentoo.org> (raw)
In-Reply-To: <20210620055519.22229-1-vapier@gentoo.org>

These ports only use the pieces that have been unified, so we can
merge them into the common configure script and get rid of their
unique one entirely.

We still compile & link separate run programs, and have dedicated
subdir Makefiles, but the configure script portion is merged.
---
 sim/Makefile.am                  |    2 +-
 sim/Makefile.in                  |   54 +-
 sim/aarch64/aclocal.m4           |   15 -
 sim/aarch64/configure            | 2873 ------------------------------
 sim/aarch64/configure.ac         |   25 -
 sim/arm/aclocal.m4               |   15 -
 sim/arm/configure                | 2873 ------------------------------
 sim/arm/configure.ac             |    5 -
 sim/avr/aclocal.m4               |   15 -
 sim/avr/configure                | 2873 ------------------------------
 sim/avr/configure.ac             |    5 -
 sim/bfin/configure               |    7 +
 sim/bpf/configure                |    7 +
 sim/common/Make-common.in        |   18 +-
 sim/configure                    |  465 ++++-
 sim/configure.ac                 |  108 +-
 sim/cr16/aclocal.m4              |   15 -
 sim/cr16/configure               | 2873 ------------------------------
 sim/cr16/configure.ac            |    5 -
 sim/cris/configure               |    7 +
 sim/d10v/aclocal.m4              |   15 -
 sim/d10v/configure               | 2873 ------------------------------
 sim/d10v/configure.ac            |    5 -
 sim/erc32/configure              |    7 +
 sim/example-synacor/aclocal.m4   |   15 -
 sim/example-synacor/configure    | 2873 ------------------------------
 sim/example-synacor/configure.ac |    5 -
 sim/frv/configure                |    7 +
 sim/ft32/aclocal.m4              |   15 -
 sim/ft32/configure               | 2873 ------------------------------
 sim/ft32/configure.ac            |    5 -
 sim/h8300/aclocal.m4             |   15 -
 sim/h8300/configure              | 2873 ------------------------------
 sim/h8300/configure.ac           |    5 -
 sim/iq2000/configure             |    7 +
 sim/lm32/configure               |    7 +
 sim/m32c/aclocal.m4              |   15 -
 sim/m32c/configure               | 2873 ------------------------------
 sim/m32c/configure.ac            |   24 -
 sim/m32r/configure               |    7 +
 sim/m4/sim_ac_output.m4          |    6 +
 sim/m68hc11/aclocal.m4           |   15 -
 sim/m68hc11/configure            | 2873 ------------------------------
 sim/m68hc11/configure.ac         |    5 -
 sim/mcore/aclocal.m4             |   15 -
 sim/mcore/configure              | 2873 ------------------------------
 sim/mcore/configure.ac           |    5 -
 sim/microblaze/aclocal.m4        |   15 -
 sim/microblaze/configure         | 2873 ------------------------------
 sim/microblaze/configure.ac      |    5 -
 sim/mips/configure               |    7 +
 sim/mn10300/configure            |    7 +
 sim/moxie/aclocal.m4             |   15 -
 sim/moxie/configure              | 2873 ------------------------------
 sim/moxie/configure.ac           |    5 -
 sim/msp430/aclocal.m4            |   15 -
 sim/msp430/configure             | 2873 ------------------------------
 sim/msp430/configure.ac          |   24 -
 sim/or1k/configure               |    7 +
 sim/pru/aclocal.m4               |   15 -
 sim/pru/configure                | 2873 ------------------------------
 sim/pru/configure.ac             |   24 -
 sim/riscv/configure              |    7 +
 sim/rl78/aclocal.m4              |   15 -
 sim/rl78/configure               | 2873 ------------------------------
 sim/rl78/configure.ac            |   24 -
 sim/rx/configure                 |    7 +
 sim/sh/aclocal.m4                |   15 -
 sim/sh/configure                 | 2873 ------------------------------
 sim/sh/configure.ac              |    5 -
 sim/v850/configure               |    7 +
 71 files changed, 638 insertions(+), 49390 deletions(-)
 delete mode 100644 sim/aarch64/aclocal.m4
 delete mode 100755 sim/aarch64/configure
 delete mode 100644 sim/aarch64/configure.ac
 delete mode 100644 sim/arm/aclocal.m4
 delete mode 100755 sim/arm/configure
 delete mode 100644 sim/arm/configure.ac
 delete mode 100644 sim/avr/aclocal.m4
 delete mode 100755 sim/avr/configure
 delete mode 100644 sim/avr/configure.ac
 delete mode 100644 sim/cr16/aclocal.m4
 delete mode 100755 sim/cr16/configure
 delete mode 100644 sim/cr16/configure.ac
 delete mode 100644 sim/d10v/aclocal.m4
 delete mode 100755 sim/d10v/configure
 delete mode 100644 sim/d10v/configure.ac
 delete mode 100644 sim/example-synacor/aclocal.m4
 delete mode 100755 sim/example-synacor/configure
 delete mode 100644 sim/example-synacor/configure.ac
 delete mode 100644 sim/ft32/aclocal.m4
 delete mode 100755 sim/ft32/configure
 delete mode 100644 sim/ft32/configure.ac
 delete mode 100644 sim/h8300/aclocal.m4
 delete mode 100755 sim/h8300/configure
 delete mode 100644 sim/h8300/configure.ac
 delete mode 100644 sim/m32c/aclocal.m4
 delete mode 100755 sim/m32c/configure
 delete mode 100644 sim/m32c/configure.ac
 delete mode 100644 sim/m68hc11/aclocal.m4
 delete mode 100755 sim/m68hc11/configure
 delete mode 100644 sim/m68hc11/configure.ac
 delete mode 100644 sim/mcore/aclocal.m4
 delete mode 100755 sim/mcore/configure
 delete mode 100644 sim/mcore/configure.ac
 delete mode 100644 sim/microblaze/aclocal.m4
 delete mode 100755 sim/microblaze/configure
 delete mode 100644 sim/microblaze/configure.ac
 delete mode 100644 sim/moxie/aclocal.m4
 delete mode 100755 sim/moxie/configure
 delete mode 100644 sim/moxie/configure.ac
 delete mode 100644 sim/msp430/aclocal.m4
 delete mode 100755 sim/msp430/configure
 delete mode 100644 sim/msp430/configure.ac
 delete mode 100644 sim/pru/aclocal.m4
 delete mode 100755 sim/pru/configure
 delete mode 100644 sim/pru/configure.ac
 delete mode 100644 sim/rl78/aclocal.m4
 delete mode 100755 sim/rl78/configure
 delete mode 100644 sim/rl78/configure.ac
 delete mode 100644 sim/sh/aclocal.m4
 delete mode 100755 sim/sh/configure
 delete mode 100644 sim/sh/configure.ac

diff --git a/sim/Makefile.am b/sim/Makefile.am
index 1c5b276d4e97..24d07c84988a 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -20,7 +20,7 @@ ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
 
 srcroot = $(srcdir)/..
 
-SUBDIRS = @subdirs@
+SUBDIRS = @subdirs@ $(SIM_SUBDIRS)
 
 SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@
 AM_MAKEFLAGS = SIM_PRIMARY_TARGET=$(SIM_PRIMARY_TARGET)
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 41becaa05f16..4bf1e2e21e27 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -34,12 +34,15 @@
 
 ## COMMON_PRE_CONFIG_FRAG
 
-VPATH = @srcdir@:$(srccom)
 srcdir = @srcdir@
+VPATH = $(srcdir):$(srccom)
 srccom = $(srcdir)/../common
 srcroot = $(srcdir)/../..
 srcsim = $(srcdir)/..
 
+@SIM_COMMON_BUILD_FALSE@config.status = config.status
+@SIM_COMMON_BUILD_TRUE@config.status = ../config.status
+
 include $(srcroot)/gdb/silent-rules.mk
 
 # Helper code from gnulib.
@@ -413,7 +416,7 @@ endif
 
 # FIXME This is one very simple-minded way of generating the file hw-config.h
 hw-config.h: stamp-hw ; @true
-stamp-hw: Makefile.in $(srccom)/Make-common.in config.status Makefile
+stamp-hw: Makefile.in $(srccom)/Make-common.in $(config.status) Makefile
 	rm -f tmp-hw.h
 	echo "/* generated by Makefile */" > tmp-hw.h
 	sim_hw="$(SIM_HW_DEVICES)"; \
@@ -529,14 +532,15 @@ distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
 # Dummy target to force execution of dependent targets.
 force:
 
-Makefile: Makefile.in $(srccom)/Make-common.in config.status
-	CONFIG_HEADERS= $(SHELL) ./config.status
+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
 
-config.status: configure
-	$(SHELL) ./config.status --recheck
+@SIM_COMMON_BUILD_FALSE@config.status: configure
+@SIM_COMMON_BUILD_FALSE@	$(SHELL) ./config.status --recheck
 
 .gdbinit: # config.status $(srccom)/gdbinit.in
-	CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
+@SIM_COMMON_BUILD_FALSE@	CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
 
 
 # CGEN support
diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4
index aba45b0bc33e..f9f70167e59c 100644
--- a/sim/m4/sim_ac_output.m4
+++ b/sim/m4/sim_ac_output.m4
@@ -51,5 +51,11 @@ AC_SUBST(sim_scache)
 AC_SUBST(sim_default_model)
 AC_SUBST(sim_reserved_bits)
 
+dnl Used by common/Make-common.in to see which configure script created it.
+SIM_COMMON_BUILD_TRUE='#'
+SIM_COMMON_BUILD_FALSE=
+AC_SUBST(SIM_COMMON_BUILD_TRUE)
+AC_SUBST(SIM_COMMON_BUILD_FALSE)
+
 AC_OUTPUT
 ])
-- 
2.31.1


  parent reply	other threads:[~2021-06-20  5:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20  5:55 [PATCH 1/5] sim: hw: rework configure option & device selection Mike Frysinger via Gdb-patches
2021-06-20  5:55 ` [PATCH 2/5] sim: unify hardware settings Mike Frysinger via Gdb-patches
2021-06-20  5:55 ` Mike Frysinger via Gdb-patches [this message]
2021-06-23  1:05   ` [PATCH 3/5] sim: drop configure scripts for simple ports Simon Marchi via Gdb-patches
2021-06-23  2:09     ` Mike Frysinger via Gdb-patches
2021-06-23  2:59     ` [PATCH] sim: switch common srcdir to abs_srcdir Mike Frysinger via Gdb-patches
2021-06-23 13:01       ` Simon Marchi via Gdb-patches
2021-06-20  5:55 ` [PATCH 4/5] sim: rx: merge with common configure script Mike Frysinger via Gdb-patches
2021-06-20  5:55 ` [PATCH 5/5] sim: hw: move cfi & glue to common code Mike Frysinger via Gdb-patches

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=20210620055519.22229-3-vapier@gentoo.org \
    --to=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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