[PATCH/submitted,5/5] sim: ppc: merge configure logic into top-level
Commit Message
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
@@ -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])
@@ -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:
similarity index 98%
rename from sim/ppc/configure.ac
rename to 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)