From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/submitted 5/5] sim: ppc: merge configure logic into top-level
Date: Tue, 2 Jan 2024 01:42:58 -0500 [thread overview]
Message-ID: <20240102064258.21573-5-vapier@gentoo.org> (raw)
In-Reply-To: <20240102064258.21573-1-vapier@gentoo.org>
Now that the ppc configure script is just namespaced options, we can
move it to ppc/acinclude.m4 and include it directly in the top-level
configure script and kill off the last subdir configure script.
---
sim/Makefile.in | 30 +-
sim/configure | 571 +++--
sim/configure.ac | 7 +-
sim/ppc/Makefile.in | 12 +-
sim/ppc/{configure.ac => acinclude.m4} | 6 -
sim/ppc/aclocal.m4 | 15 -
sim/ppc/configure | 3234 ------------------------
7 files changed, 457 insertions(+), 3418 deletions(-)
rename sim/ppc/{configure.ac => acinclude.m4} (98%)
delete mode 100644 sim/ppc/aclocal.m4
delete mode 100755 sim/ppc/configure
diff --git a/sim/configure.ac b/sim/configure.ac
index 84a7e0a249e7..bc51492fd478 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -63,7 +63,8 @@ m4_define([SIM_BUILD_TARGET], [dnl
ENABLE_SIM=yes
AS_VAR_APPEND([SIM_ENABLED_ARCHES], [" $1"])
m4_if($2, [true], [dnl
- AC_CONFIG_SUBDIRS($1)
+ AC_CONFIG_FILES($1/Makefile)
+ subdirs="$subdirs $1"
])
AC_CONFIG_FILES($1/.gdbinit:common/gdbinit.in)
])
@@ -86,6 +87,9 @@ m4_define([SIM_TARGET], [dnl
AM_CONDITIONAL([SIM_ENABLE_ARCH_$2], [${sim_enable_arch_$2}])
])
+subdirs=""
+AC_SUBST(subdirs)
+
dnl WHEN ADDING ENTRIES TO THIS MATRIX:
dnl Make sure that the left side always has two dashes. Otherwise you can get
dnl spurious matches. Even for unambiguous cases, do this as a convention, else
@@ -158,6 +162,7 @@ SIM_AC_OPTION_WARNINGS
dnl Some arches have unique configure flags.
m4_include([frv/acinclude.m4])
m4_include([mips/acinclude.m4])
+m4_include([ppc/acinclude.m4])
m4_include([riscv/acinclude.m4])
m4_include([rx/acinclude.m4])
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 267b6a8bc99a..220e4b8e728b 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -559,7 +559,7 @@ sim-fpu.o: $(srcdir)/../common/sim-fpu.c
$(ECHO_CC) $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c
# Rebuild options whenever something changes so the date/time is up to date.
-options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
+options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) ../config.status Makefile
$(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_ppc_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c
#
@@ -679,16 +679,16 @@ clean mostlyclean:
rm -f tmp-* *.[oasi] core $(BUILT_SRC_WO_CONFIG)
distclean realclean: clean
- rm -f TAGS Makefile config.cache config.status stamp-h config.log
+ rm -f TAGS Makefile
maintainer-clean: distclean
rm -f *~ *.log core *.core
-Makefile: Makefile.in config.status
- CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+Makefile: Makefile.in ../config.status
+ cd .. && $(SHELL) ./config.status ppc/Makefile
-config.status: configure
- $(SHELL) ./config.status --recheck
+../config.status: ../configure
+ cd .. && $(SHELL) ./config.status --recheck
check:
diff --git a/sim/ppc/configure.ac b/sim/ppc/acinclude.m4
similarity index 98%
rename from sim/ppc/configure.ac
rename to sim/ppc/acinclude.m4
index 03b86126829a..535401918910 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/acinclude.m4
@@ -1,7 +1,3 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(Makefile.in)
-AC_CONFIG_MACRO_DIRS([../.. ../../config])
-
AC_MSG_CHECKING([for sim ppc bitsize settings])
AC_ARG_ENABLE(sim-ppc-bitsize,
[AS_HELP_STRING([--enable-sim-ppc-bitsize=n], [Specify target bitsize (32 or 64).])],
@@ -230,5 +226,3 @@ AC_SUBST(sim_ppc_monitor)
AC_SUBST(sim_ppc_model)
AC_SUBST(sim_ppc_default_model)
AC_SUBST(sim_ppc_model_issue)
-
-AC_OUTPUT(Makefile)
--
2.43.0
prev parent reply other threads:[~2024-01-02 7:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 6:42 [PATCH/submitted 1/5] sim: ppc: drop now unused config.in Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 2/5] sim: ppc: switch to AS_HELP_STRING for automatic formatting Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 3/5] sim: ppc: standardize configure option processing Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 4/5] sim: ppc: scope configure options to --enable-sim-ppc-xxx Mike Frysinger
2024-01-02 6:42 ` Mike Frysinger [this message]
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=20240102064258.21573-5-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).