public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: merge gnulib logic into the top-level
@ 2022-11-03  8:24 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-11-03  8:24 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=46a1e1f20b1192da31104f9ed436ea33328c79d4

commit 46a1e1f20b1192da31104f9ed436ea33328c79d4
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon Oct 31 18:31:44 2022 +0545

    sim: merge gnulib logic into the top-level
    
    We aren't using this just yet, but we will, so make it available to
    building of common sim files.

Diff:
---
 sim/Makefile.am  | 4 ++++
 sim/Makefile.in  | 6 +++++-
 sim/configure    | 8 ++++++--
 sim/configure.ac | 5 +++++
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/sim/Makefile.am b/sim/Makefile.am
index 594c91ff19b..d3125028b90 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -18,6 +18,9 @@
 AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
 ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
 
+GNULIB_PARENT_DIR = ..
+@include_makefile@ $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
+
 srccom = $(srcdir)/common
 srcroot = $(srcdir)/..
 
@@ -39,6 +42,7 @@ MOSTLYCLEANFILES = core
 
 AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
 AM_CPPFLAGS = \
+	$(INCGNU) \
 	-I$(srcroot)/include \
 	$(SIM_INLINE)
 
diff --git a/sim/Makefile.in b/sim/Makefile.in
index 36e95cf3046..8e2385ec9ed 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -891,6 +891,7 @@ host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
+include_makefile = @include_makefile@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
@@ -927,6 +928,7 @@ zlibdir = @zlibdir@
 zlibinc = @zlibinc@
 AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
 ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
+GNULIB_PARENT_DIR = ..
 srccom = $(srcdir)/common
 srcroot = $(srcdir)/..
 SUBDIRS = @subdirs@ $(SIM_SUBDIRS)
@@ -945,7 +947,8 @@ MOSTLYCLEANFILES = core $(am__append_5) site-sim-config.exp \
 	$(am__append_26) $(am__append_29) $(am__append_31) \
 	$(am__append_34) $(am__append_37) $(am__append_39)
 AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
-AM_CPPFLAGS = -I$(srcroot)/include $(SIM_INLINE) -I$(srcdir)/common
+AM_CPPFLAGS = $(INCGNU) -I$(srcroot)/include $(SIM_INLINE) \
+	-I$(srcdir)/common
 AM_CPPFLAGS_FOR_BUILD = -I$(srcroot)/include $(SIM_INLINE) \
 	-I$(srcdir)/common
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
@@ -2423,6 +2426,7 @@ uninstall-am: uninstall-armdocDATA uninstall-dtbDATA \
 
 .PRECIOUS: Makefile
 
+@include_makefile@ $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
 
 # Generate target constants for newlib/libgloss from its source tree.
 # This file is shipped with distributions so we build in the source dir.
diff --git a/sim/configure b/sim/configure
index 5283ef9c0dc..538e528cb1b 100755
--- a/sim/configure
+++ b/sim/configure
@@ -638,6 +638,7 @@ enable_option_checking=no
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
+include_makefile
 SIM_RX_CYCLE_ACCURATE_FLAGS
 SIM_FRV_TRAPDUMP_FLAGS
 sim_float
@@ -12775,7 +12776,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12778 "configure"
+#line 12779 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12881,7 +12882,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12884 "configure"
+#line 12885 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16509,6 +16510,9 @@ fi
 
 
 
+include_makefile="include"
+
+
 ac_config_files="$ac_config_files arch-subdir.mk Makefile .gdbinit:gdbinit.in"
 
 cat >confcache <<\_ACEOF
diff --git a/sim/configure.ac b/sim/configure.ac
index be0cfdbea32..30479aebc49 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -198,5 +198,10 @@ dnl Some arches have unique configure flags.
 m4_include([frv/acinclude.m4])
 m4_include([rx/acinclude.m4])
 
+dnl Hack to output an "include" statement in the Makefile so automake doesn't
+dnl try to follow it itself while processing Makefile.am.
+include_makefile="include"
+AC_SUBST(include_makefile)
+
 AC_CONFIG_FILES([arch-subdir.mk Makefile .gdbinit:gdbinit.in])
 AC_OUTPUT

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-03  8:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03  8:24 [binutils-gdb] sim: merge gnulib logic into the top-level Michael 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).