aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-19 21:33:30 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-22 19:26:13 -0400
commit36bb57e40c5062ff6c5cb16463e1c7233baf46bb (patch)
treedf77ebccb379772d96211f3b5d74e260b184cdfe /sim/common
parent224506e95d2d44aa6583cbcda9f4b7305f834ab3 (diff)
downloadgdb-36bb57e40c5062ff6c5cb16463e1c7233baf46bb.zip
gdb-36bb57e40c5062ff6c5cb16463e1c7233baf46bb.tar.gz
gdb-36bb57e40c5062ff6c5cb16463e1c7233baf46bb.tar.bz2
sim: drop configure scripts for simple ports
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.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog9
-rw-r--r--sim/common/Make-common.in18
2 files changed, 20 insertions, 7 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 9e1d300..bcf9242 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,12 @@
+2021-06-22 Mike Frysinger <vapier@gentoo.org>
+
+ * Make-common.in (VPATH): Use $(srcdir).
+ (config.status): New variable.
+ (stamp-hw): Depend on $(config.status).
+ (Makefile): Likewise. Change rule based on SIM_COMMON_BUILD.
+ (config.status): Disable when SIM_COMMON_BUILD is true.
+ (.gdbinit): Likewise.
+
2021-06-21 Mike Frysinger <vapier@gentoo.org>
* Make-common.in: Move sim-hw settings to ../arch-subdir.mk.in.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 41becaa..4bf1e2e 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