public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] sim: create a makefile fragment to pass common settings
@ 2021-06-18  5:21 Mike Frysinger
  2021-06-18  5:21 ` [PATCH 2/2] sim: unify werror build settings Mike Frysinger
  2021-06-18  6:25 ` [PATCH 1.5/2] sim: move -Werror disabling to Makefile Mike Frysinger
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Frysinger @ 2021-06-18  5:21 UTC (permalink / raw)
  To: gdb-patches

As we merge settings from subdirs into the common configure, we
sometimes need to keep the settings working in both dirs.  Create
a makefile fragment to pass them down so we don't have to run the
checks twice.  For now, the file is empty, but we'll start moving
logic in shortly.
---
 sim/Makefile.in           |  4 +++-
 sim/arch-subdir.mk.in     | 18 ++++++++++++++++++
 sim/common/Make-common.in |  3 +++
 sim/configure             |  3 ++-
 sim/configure.ac          |  2 +-
 sim/ppc/Makefile.in       |  3 +++
 6 files changed, 30 insertions(+), 3 deletions(-)
 create mode 100644 sim/arch-subdir.mk.in

diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
new file mode 100644
index 000000000000..9eae1f3e4998
--- /dev/null
+++ b/sim/arch-subdir.mk.in
@@ -0,0 +1,18 @@
+## Fragment to pass common settings into arch subdir builds.
+## NB: This should eventually be merged into sim/Makefile.am once there are no
+## subdir configure scripts.
+#
+#   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/>.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 7a6a2030a47b..b82e76c91f6f 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -46,6 +46,9 @@ include $(srcroot)/gdb/silent-rules.mk
 GNULIB_PARENT_DIR = ../..
 include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
 
+# Settings from top-level configure.
+include ../arch-subdir.mk
+
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
diff --git a/sim/configure.ac b/sim/configure.ac
index 4ba2921ebaf3..91af0bba5860 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -118,5 +118,5 @@ SIM_AC_OPTION_PROFILE
 SIM_AC_OPTION_STDIO
 SIM_AC_OPTION_TRACE
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([arch-subdir.mk Makefile])
 AC_OUTPUT
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-20  1:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18  5:21 [PATCH 1/2] sim: create a makefile fragment to pass common settings Mike Frysinger
2021-06-18  5:21 ` [PATCH 2/2] sim: unify werror build settings Mike Frysinger
2021-06-19 14:39   ` Simon Marchi
2021-06-19 19:57     ` Mike Frysinger
2021-06-20  1:33       ` Simon Marchi
2021-06-18  6:25 ` [PATCH 1.5/2] sim: move -Werror disabling to Makefile 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).