From 36bb57e40c5062ff6c5cb16463e1c7233baf46bb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 19 Jun 2021 21:33:30 -0400 Subject: 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. --- sim/common/ChangeLog | 9 +++++++++ sim/common/Make-common.in | 18 +++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'sim/common') 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 + + * 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 * 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 -- cgit v1.1