sim: create a makefile fragment to pass common settings down
authorMike Frysinger <vapier@gentoo.org>
Wed, 16 Jun 2021 03:01:45 +0000 (23:01 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 18 Jun 2021 14:11:58 +0000 (10:11 -0400)
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/ChangeLog
sim/Makefile.in
sim/arch-subdir.mk.in [new file with mode: 0644]
sim/common/ChangeLog
sim/common/Make-common.in
sim/configure
sim/configure.ac
sim/ppc/ChangeLog
sim/ppc/Makefile.in

index 9740e1311bc44851bfe03fc2fcdb440fde3afb7c..65d0f11f41e58b9ced77a5f661ee51e7a782c653 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-18  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Output arch-subdir.mk.
+       * Makefile.in, configure: Regenerate.
+       * arch-subdir.mk.in: New file.
+
 2021-06-17  Mike Frysinger  <vapier@gentoo.org>
 
        * configure.ac: Call SIM_AC_OPTION_ENDIAN.
index f77abe38d8ad44a18548ca424da50a91826e4845..3a852206c6b0307c1068c06caf523bdaac8431df 100644 (file)
@@ -217,7 +217,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = arch-subdir.mk
 CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
 ARFLAGS = cru
@@ -866,6 +866,8 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 
 distclean-hdr:
        -rm -f config.h stamp-h1
+arch-subdir.mk: $(top_builddir)/config.status $(srcdir)/arch-subdir.mk.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
 
 clean-noinstLIBRARIES:
        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
new file mode 100644 (file)
index 0000000..9eae1f3
--- /dev/null
@@ -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/>.
index 61da7e916efc0756784db0c205e4963bd7d5262d..842a8973f68fbff74a886ad4235d9584f46e788e 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-18  Mike Frysinger  <vapier@gentoo.org>
+
+       * Make-common.in: Include ../arch-subdir.mk.
+
 2021-06-18  Mike Frysinger  <vapier@gentoo.org>
 
        * cgen-run.c: Include sim-signal.h.
index 7a6a2030a47b5ac6a0b112029887c3c79f0e2ce7..b82e76c91f6f8d8ac4c653e2ac88f19f99ec0687 100644 (file)
@@ -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@
 
index 959fa9037ade6be57688ee64c7f1d179caa1938f..74ca8eb806d3dbe0260a1db1bbe40448e79a48e5 100755 (executable)
@@ -6883,7 +6883,7 @@ _ACEOF
 $as_echo "$sim_trace" >&6; }
 
 
-ac_config_files="$ac_config_files Makefile"
+ac_config_files="$ac_config_files arch-subdir.mk Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -7622,6 +7622,7 @@ do
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "arch-subdir.mk") CONFIG_FILES="$CONFIG_FILES arch-subdir.mk" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
index 4ba2921ebaf35eb305f65a1b59e23ed40f12f7a7..91af0bba5860575a6b3f61213e6dd0d26f8ea056 100644 (file)
@@ -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
index 6f2531fcc3d32a7124dceec9febce65e9f51f7e8..9f4f58b3a205b931e0df728aa11faba9e7c1fe86 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-18  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in: Include ../arch-subdir.mk.
+
 2021-06-18  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h: Delete sim-signal.h include.
index 4446922dede3b2ed4532611818e0a2fb9dc1af6b..b4cb587f9056959d7c7a3983110333e5a0c401b1 100644 (file)
@@ -25,6 +25,9 @@ srccom = $(srcdir)/../common
 srcroot = $(srcdir)/../..
 srcsim = $(srcdir)/..
 
+# Settings from top-level configure.
+include ../arch-subdir.mk
+
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
This page took 0.030503 seconds and 4 git commands to generate.