* [PATCH 1/2] sim: switch top level to automake
@ 2021-02-28 8:55 Mike Frysinger
2021-02-28 8:55 ` [PATCH 2/2] sim: testsuite: merge into toplevel automake Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2021-02-28 8:55 UTC (permalink / raw)
To: gdb-patches
This doesn't gain us much by itself, but it sets us up for using more
features as we try to unify ports and avoid recursive make.
---
sim/ChangeLog | 7 +
sim/Makefile.am | 36 +
sim/Makefile.in | 774 +++++++++++------
sim/aclocal.m4 | 1136 +++++++++++++++++++++++++
sim/configure | 1924 +++++++++++++++++++++++++++++++++---------
sim/configure.ac | 12 +-
sim/igen/Makefile.in | 1 +
sim/ppc/Makefile.in | 2 +
8 files changed, 3233 insertions(+), 659 deletions(-)
create mode 100644 sim/Makefile.am
create mode 100644 sim/aclocal.m4
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 4449c947274e..78e112cfa6c2 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,10 @@
+2021-02-28 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.am: New file.
+ * configure.ac: Update AC_INIT call. Move AC_CANONICAL_SYSTEM after
+ it. Call AM_INIT_AUTOMAKE. Delete AC_CONFIG_MACRO_DIRS.
+ * aclocal.m4, configure, Makefile.in: Regenerated.
+
2021-02-28 Mike Frysinger <vapier@gentoo.org>
* m4/sim_ac_common.m4 (SIM_AC_COMMON): Delete CC_FOR_BUILD test.
diff --git a/sim/Makefile.am b/sim/Makefile.am
new file mode 100644
index 000000000000..bcca70623e9a
--- /dev/null
+++ b/sim/Makefile.am
@@ -0,0 +1,36 @@
+## Process this file with automake to generate Makefile.in
+#
+# Copyright (C) 1993-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AUTOMAKE_OPTIONS = foreign no-dist subdir-objects
+ACLOCAL_AMFLAGS = -I.. -I../config
+
+srcroot = $(srcdir)/..
+
+SUBDIRS = @subdirs@
+
+MOSTLYCLEANFILES = core
+
+# Generate nltvals.def for newlib/libgloss using devo and build tree.
+# This file is shipped with distributions so we build in the source dir.
+# Use `make nltvals' to rebuild.
+# Note: If gdb releases begin to contain target header files (not a good idea,
+# but if they did ...), nltvals.def coud be generated at build time.
+# An alternative is to slurp in the tables at runtime.
+.PHONY: nltvals
+nltvals:
+ $(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot)
+ $(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def
diff --git a/sim/aclocal.m4 b/sim/aclocal.m4
new file mode 100644
index 000000000000..5f59833b91a4
diff --git a/sim/configure.ac b/sim/configure.ac
index 80e1b42d40b2..de5779642c50 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -1,13 +1,19 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(Makefile.in)
-AC_CONFIG_MACRO_DIRS([.. ../config])
+dnl NB: The version here is not used. If gdb ever changes from generating its
+dnl version at build time to autoconf time (like bfd et al do), we can switch.
+AC_INIT([sim], [0],
+ [https://sourceware.org/bugzilla/enter_bug.cgi?product=gdb&component=sim],
+ [], [https://sourceware.org/gdb/wiki/Sim/])
+
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AC_PROG_CC
AC_PROG_CPP
--
2.30.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] sim: testsuite: merge into toplevel automake
2021-02-28 8:55 [PATCH 1/2] sim: switch top level to automake Mike Frysinger
@ 2021-02-28 8:55 ` Mike Frysinger
0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-02-28 8:55 UTC (permalink / raw)
To: gdb-patches
This allows us to delete most of our custom test logic,
and avoids a recursive make for minor speed up.
sim/:
* configure.ac (AC_CONFIG_FILES): Delete testsuite/Makefile.
* Makefile.am: Include testsuite/local.mk.
* aclocal.m4, configure, Makefile.in: Regenerated.
sim/common/:
* Make-common.in (check): Delete body.
sim/testsuite/:
* Makefile.in: Delete.
* lib/sim-defs.exp (sim): Update default path.
* local.mk: New file based on Makefile.in.
---
sim/Makefile.am | 4 +-
sim/Makefile.in | 102 +++++++++++++++----
sim/common/Make-common.in | 1 -
sim/configure | 3 +-
sim/configure.ac | 2 +-
sim/testsuite/Makefile.in | 178 ---------------------------------
sim/testsuite/lib/sim-defs.exp | 2 +-
sim/testsuite/local.mk | 34 +++++++
8 files changed, 125 insertions(+), 201 deletions(-)
delete mode 100644 sim/testsuite/Makefile.in
create mode 100644 sim/testsuite/local.mk
diff --git a/sim/Makefile.am b/sim/Makefile.am
index bcca70623e9a..c6e2d04f33ae 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AUTOMAKE_OPTIONS = foreign no-dist subdir-objects
+AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
ACLOCAL_AMFLAGS = -I.. -I../config
srcroot = $(srcdir)/..
@@ -34,3 +34,5 @@ MOSTLYCLEANFILES = core
nltvals:
$(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot)
$(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def
+
+include testsuite/local.mk
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 3f16dc476ef5..cf92e94993c5 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -471,7 +471,6 @@ installdirs:
$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
check:
- cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
info:
clean-info:
diff --git a/sim/configure.ac b/sim/configure.ac
index de5779642c50..23478521e94c 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -152,5 +152,5 @@ if test "${enable_sim}" != no; then
fi
fi
-AC_CONFIG_FILES([Makefile testsuite/Makefile])
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 43a07050f508..0157f9bb2834 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -106,7 +106,7 @@ proc sim_run { prog sim_opts prog_opts redir options } {
# These global variables come from generated site.exp.
global objdir
global arch
- set sim "$objdir/../$arch/run"
+ set sim "$objdir/$arch/run"
}
if [is_remote host] {
diff --git a/sim/testsuite/local.mk b/sim/testsuite/local.mk
new file mode 100644
index 000000000000..bd8a20696434
--- /dev/null
+++ b/sim/testsuite/local.mk
@@ -0,0 +1,34 @@
+## See sim/Makefile.am.
+#
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tweak the site.exp so it works with plain `runtest` from user.
+EXTRA_DEJAGNU_SITE_CONFIG = site-srcdir.exp
+
+site-srcdir.exp: Makefile
+ echo "set srcdir \"$(srcdir)/testsuite\"" > $@
+
+check-DEJAGNU: site.exp
+ LC_ALL=C; export LC_ALL; \
+ EXPECT=${EXPECT} ; export EXPECT ; \
+ runtest=$(RUNTEST); \
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ $$runtest $(RUNTESTFLAGS); \
+ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+ fi
+
+MOSTLYCLEANFILES += \
+ site-srcdir.exp testrun.log testrun.sum
--
2.30.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] sim: switch top level to automake
2021-01-17 16:09 [PATCH] sim: testsuite: push $arch out to targets Mike Frysinger
@ 2021-01-18 17:54 ` Mike Frysinger
0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-01-18 17:54 UTC (permalink / raw)
To: gdb-patches
This doesn't gain us much by itself, but it sets us up for using more
features as we try to unify ports.
* Makefile.am: New file.
* configure.ac: Update AC_INIT call. Move AC_CANONICAL_SYSTEM after
it. Call AM_INIT_AUTOMAKE.
* aclocal.m4, configure, Makefile.in: Regenerated.
---
sim/Makefile.am | 36 +
sim/Makefile.in | 807 +++++++++++++------
sim/aclocal.m4 | 1152 +++++++++++++++++++++++++++
sim/configure | 1926 ++++++++++++++++++++++++++++++++++++----------
sim/configure.ac | 11 +-
5 files changed, 3281 insertions(+), 651 deletions(-)
create mode 100644 sim/Makefile.am
create mode 100644 sim/aclocal.m4
diff --git a/sim/Makefile.am b/sim/Makefile.am
new file mode 100644
index 000000000000..150209c565c8
--- /dev/null
+++ b/sim/Makefile.am
@@ -0,0 +1,36 @@
+## Process this file with automake to generate Makefile.in
+#
+# Copyright (C) 1993-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
+ACLOCAL_AMFLAGS = -I.. -I../config
+
+srcroot = $(srcdir)/..
+
+SUBDIRS = @subdirs@
+
+MOSTLYCLEANFILES = core
+
+# Generate nltvals.def for newlib/libgloss using devo and build tree.
+# This file is shipped with distributions so we build in the source dir.
+# Use `make nltvals' to rebuild.
+# Note: If gdb releases begin to contain target header files (not a good idea,
+# but if they did ...), nltvals.def coud be generated at build time.
+# An alternative is to slurp in the tables at runtime.
+.PHONY: nltvals
+nltvals:
+ $(SHELL) $(abs_srcdir)/common/gennltvals.sh --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot)
+ $(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def
diff --git a/sim/aclocal.m4 b/sim/aclocal.m4
new file mode 100644
index 000000000000..df8ff837794b
diff --git a/sim/configure.ac b/sim/configure.ac
index 99364cac7f4e..178abf41827e 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -1,13 +1,20 @@
dnl Process this file with autoconf to produce a configure script.
m4_include([../config/override.m4])
-AC_INIT(Makefile.in)
+dnl NB: The version here is not used. If gdb ever changes from generating its
+dnl version at build time to autoconf time (like bfd et al do), we can switch.
+AC_INIT([sim], [0],
+ [https://sourceware.org/bugzilla/enter_bug.cgi?product=gdb&component=sim],
+ [], [https://sourceware.org/gdb/wiki/Sim/])
+
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AC_PROG_CC
AC_PROG_CPP
--
2.28.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-28 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28 8:55 [PATCH 1/2] sim: switch top level to automake Mike Frysinger
2021-02-28 8:55 ` [PATCH 2/2] sim: testsuite: merge into toplevel automake Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2021-01-17 16:09 [PATCH] sim: testsuite: push $arch out to targets Mike Frysinger
2021-01-18 17:54 ` [PATCH 1/2] sim: switch top level to automake Mike Frysinger
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).