sim: merge gnulib logic into the top-level
authorMike Frysinger <vapier@gentoo.org>
Mon, 31 Oct 2022 12:46:44 +0000 (18:31 +0545)
committerMike Frysinger <vapier@gentoo.org>
Thu, 3 Nov 2022 07:08:49 +0000 (12:53 +0545)
We aren't using this just yet, but we will, so make it available to
building of common sim files.

sim/Makefile.am
sim/Makefile.in
sim/configure
sim/configure.ac

index 594c91ff19bd3df994c07e9f39a1418778eab69a..d3125028b90298b5fc3a91c220ce148ea0fa053c 100644 (file)
@@ -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)
 
index 36e95cf3046a1fbdf148ae38861e1b0b49a12d8f..8e2385ec9ed2bd65381fc15ffb0e38d3a522fc7f 100644 (file)
@@ -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.
index 5283ef9c0dcafee3f5f965ef37474ef1b7537750..538e528cb1b54c82a4a89498acdc4354354f09d1 100755 (executable)
@@ -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
index be0cfdbea32169a60834e6f42e70b5a7d5f53030..30479aebc491129aea5e1186e383fb4eabf14c87 100644 (file)
@@ -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