[72/83] sim: disable recursive make in (most) subdirs

Message ID 20230103075605.13606-73-vapier@gentoo.org
State Committed
Headers
Series sim: merge subdir makefiles into top-level |

Commit Message

Mike Frysinger Jan. 3, 2023, 7:55 a.m. UTC
  Now that all (other than ppc) build in the top-level, we can disable
the recursive make calls to them.  This speeds things up nicely.
---
 sim/Makefile.am  |   2 +-
 sim/Makefile.in  |  97 +-------
 sim/configure    | 600 +----------------------------------------------
 sim/configure.ac |  21 --
 4 files changed, 13 insertions(+), 707 deletions(-)
  

Patch

diff --git a/sim/Makefile.am b/sim/Makefile.am
index fa646ab1b051..29086d22d682 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -24,7 +24,7 @@  GNULIB_PARENT_DIR = ..
 srccom = $(srcdir)/common
 srcroot = $(srcdir)/..
 
-SUBDIRS = @subdirs@ $(SIM_SUBDIRS)
+SUBDIRS = @subdirs@
 
 SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@
 AM_MAKEFLAGS =
diff --git a/sim/configure.ac b/sim/configure.ac
index 45a9e1303045..8198780c1eb1 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -48,10 +48,6 @@  dnl used when installing files to see if they need to be suffixed.
 SIM_PRIMARY_TARGET=
 AC_SUBST(SIM_PRIMARY_TARGET)
 
-dnl Directories that we need to recurse into (i.e. add to $SUBDIRS).
-SIM_SUBDIRS=
-AC_SUBST(SIM_SUBDIRS)
-
 dnl List of enabled arch backends.
 SIM_ENABLED_ARCHES=
 AC_SUBST(SIM_ENABLED_ARCHES)
@@ -62,7 +58,6 @@  SIM_COMMON_BUILD_FALSE='#'
 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.
@@ -72,22 +67,6 @@  m4_define([SIM_BUILD_TARGET], [dnl
   AS_VAR_APPEND([SIM_ENABLED_ARCHES], [" $1"])
   m4_if($2, [true], [dnl
     AC_CONFIG_SUBDIRS($1)
-  ], [dnl
-    AC_CONFIG_FILES($1/Makefile.sim:$1/Makefile.in)
-    AC_CONFIG_COMMANDS([$1/Makefile],
-[sed -n \
-	-e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-		/^srcdir = / s:$:/$1:
-		p
-	}' \
-	<Make-common.sim >$1/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >$1/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r $1/Makesim1.tmp' \
-	-e '/^## COMMON_POST_/ r $1/Makesim2.tmp' \
-	<$1/Makefile.sim >$1/Makefile
- rm -f $1/Makesim1.tmp $1/Makesim2.tmp
-])
-    AS_VAR_APPEND([SIM_SUBDIRS], [" $1"])
   ])
   AC_CONFIG_FILES($1/.gdbinit:common/gdbinit.in)
   dnl Create the depdirs for ports until we can convert them to automake.