[4/5] sim: unify general maintainer settings

Message ID 20210619202721.10432-4-vapier@gentoo.org
State New
Headers show
Series
  • [1/5] sim: ppc: rename inline defines to match common code
Related show

Commit Message

Simon Marchi via Gdb-patches June 19, 2021, 8:27 p.m.
Move these options up to the common dir so we only test & export
them once across all ports.  This takes a page from the cgen maint
logic to make $(MAINT) work for non-automake Makefiles which will
allow us to merge it together.
---
 sim/aarch64/aclocal.m4         | 87 ----------------------------------
 sim/aarch64/configure          | 37 ---------------
 sim/arch-subdir.mk.in          |  7 +++
 sim/arm/aclocal.m4             | 87 ----------------------------------
 sim/arm/configure              | 37 ---------------
 sim/avr/aclocal.m4             | 87 ----------------------------------
 sim/avr/configure              | 37 ---------------
 sim/bfin/Makefile.in           |  2 +-
 sim/bfin/aclocal.m4            | 87 ----------------------------------
 sim/bfin/configure             | 37 ---------------
 sim/bpf/aclocal.m4             | 87 ----------------------------------
 sim/bpf/configure              | 37 ---------------
 sim/cr16/aclocal.m4            | 87 ----------------------------------
 sim/cr16/configure             | 37 ---------------
 sim/cris/aclocal.m4            | 87 ----------------------------------
 sim/cris/configure             | 37 ---------------
 sim/d10v/aclocal.m4            | 87 ----------------------------------
 sim/d10v/configure             | 37 ---------------
 sim/erc32/aclocal.m4           | 87 ----------------------------------
 sim/erc32/configure            | 37 ---------------
 sim/example-synacor/aclocal.m4 | 87 ----------------------------------
 sim/example-synacor/configure  | 37 ---------------
 sim/frv/aclocal.m4             | 87 ----------------------------------
 sim/frv/configure              | 37 ---------------
 sim/ft32/aclocal.m4            | 87 ----------------------------------
 sim/ft32/configure             | 37 ---------------
 sim/h8300/aclocal.m4           | 87 ----------------------------------
 sim/h8300/configure            | 37 ---------------
 sim/iq2000/aclocal.m4          | 87 ----------------------------------
 sim/iq2000/configure           | 37 ---------------
 sim/lm32/aclocal.m4            | 87 ----------------------------------
 sim/lm32/configure             | 37 ---------------
 sim/m32c/aclocal.m4            | 87 ----------------------------------
 sim/m32c/configure             | 37 ---------------
 sim/m32r/aclocal.m4            | 87 ----------------------------------
 sim/m32r/configure             | 37 ---------------
 sim/m4/sim_ac_common.m4        |  3 --
 sim/m68hc11/aclocal.m4         | 87 ----------------------------------
 sim/m68hc11/configure          | 37 ---------------
 sim/mcore/aclocal.m4           | 87 ----------------------------------
 sim/mcore/configure            | 37 ---------------
 sim/microblaze/aclocal.m4      | 87 ----------------------------------
 sim/microblaze/configure       | 37 ---------------
 sim/mips/aclocal.m4            | 87 ----------------------------------
 sim/mips/configure             | 37 ---------------
 sim/mn10300/aclocal.m4         | 87 ----------------------------------
 sim/mn10300/configure          | 37 ---------------
 sim/moxie/Makefile.in          |  2 +-
 sim/moxie/aclocal.m4           | 87 ----------------------------------
 sim/moxie/configure            | 37 ---------------
 sim/msp430/aclocal.m4          | 87 ----------------------------------
 sim/msp430/configure           | 37 ---------------
 sim/or1k/aclocal.m4            | 87 ----------------------------------
 sim/or1k/configure             | 37 ---------------
 sim/pru/aclocal.m4             | 87 ----------------------------------
 sim/pru/configure              | 37 ---------------
 sim/riscv/aclocal.m4           | 87 ----------------------------------
 sim/riscv/configure            | 37 ---------------
 sim/rl78/aclocal.m4            | 87 ----------------------------------
 sim/rl78/configure             | 37 ---------------
 sim/rx/aclocal.m4              | 87 ----------------------------------
 sim/rx/configure               | 37 ---------------
 sim/sh/aclocal.m4              | 87 ----------------------------------
 sim/sh/configure               | 37 ---------------
 sim/v850/aclocal.m4            | 87 ----------------------------------
 sim/v850/configure             | 37 ---------------
 66 files changed, 9 insertions(+), 3849 deletions(-)

-- 
2.31.1

Patch

diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index 6922b9719f39..dc8ccadec62c 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -53,6 +53,13 @@  COMMON_LIBS = @LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WERROR_CFLAGS = @WERROR_CFLAGS@
 
+# Maintainer support, enable with --enable-maintainer-mode.
+# Once all subdirs are moved to automake, we can drop this custom logic and
+# switch back to using @MAINTAINER_MODE_TRUE@ directly.
+MAINT = ; @true
+# The following line is commented depending upon --enable-maintainer-mode.
+@MAINTAINER_MODE_TRUE@MAINT =
+
 # cgen support, enable with --enable-cgen-maint
 CGEN_MAINT = ; @true
 # The following line is commented in or out depending upon --enable-cgen-maint.
diff --git a/sim/bfin/Makefile.in b/sim/bfin/Makefile.in
index c53acd11030a..e3536158a2ad 100644
--- a/sim/bfin/Makefile.in
+++ b/sim/bfin/Makefile.in
@@ -31,7 +31,7 @@  SIM_EXTRA_LIBS = @SDL_LIBS@ -lm
 
 ## COMMON_POST_CONFIG_FRAG
 
-$(srcdir)/linux-fixed-code.h: @MAINTAINER_MODE_TRUE@ $(srcdir)/linux-fixed-code.s Makefile.in
+$(srcdir)/linux-fixed-code.h: $(MAINT) $(srcdir)/linux-fixed-code.s Makefile.in
 	$(AS_FOR_TARGET) $(srcdir)/linux-fixed-code.s -o linux-fixed-code.o
 	(	set -e; \
 		echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s.  */"; \
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 658789581471..e15ec02edf9f 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -21,7 +21,4 @@  dnl
 dnl See README-HACKING for more details.
 AC_DEFUN([SIM_AC_COMMON],
 [dnl
-dnl We don't use automake, but we still want to support
-dnl --enable-maintainer-mode.
-AM_MAINTAINER_MODE
 ]) dnl End of SIM_AC_COMMON
diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in
index bd58074491fc..fa4238572d43 100644
--- a/sim/moxie/Makefile.in
+++ b/sim/moxie/Makefile.in
@@ -34,7 +34,7 @@  SIM_EXTRA_CFLAGS = -DDTB="\"$(dtbdir)/moxie-gdb.dtb\""
 
 all: moxie-gdb.dtb
 
-moxie-gdb.dtb: @MAINTAINER_MODE_TRUE@ moxie-gdb.dts
+moxie-gdb.dtb: $(MAINT) moxie-gdb.dts
 	@echo Regenerating moxie-gdb.dtb
 	if test "x$(DTC)" != x; then \
 	  $(DTC) -O dtb -o moxie-gdb.dtb ${srcdir}/moxie-gdb.dts || exit 1; \