public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 08/10] Define autoconf substitution variables early in Make-common.in
Date: Thu,  8 Apr 2021 14:33:10 -0600	[thread overview]
Message-ID: <20210408203312.2938165-9-tom@tromey.com> (raw)
In-Reply-To: <20210408203312.2938165-1-tom@tromey.com>

This hoists any autoconf substitution (like "@var@") to a definition
early in Make-common.in, and changes the uses to refer to the
corresponding Makefile variable.  This will make the coming Makefile
split a bit simpler.

2021-04-08  Tom Tromey  <tom@tromey.com>

	* Make-common.in (DEFS, LIBS, INCINTL, zlibdir)
	(@PLUGINS_TRUE@LIBDL, LIBINTL, LIBINTL_DEP, CGENDIR): Define
	early.
	(CONFIG_CFLAGS, CSEARCH, ZLIB, CONFIG_LIBS): Update.
---
 sim/common/ChangeLog      |  7 +++++++
 sim/common/Make-common.in | 21 +++++++++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index c3c5748d061..d76b3a681f6 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -104,6 +104,15 @@ DEPMODE = @CCDEPMODE@
 DEPDIR = @DEPDIR@
 depcomp = $(SHELL) $(srcroot)/depcomp
 
+DEFS = @DEFS@
+LIBS = @LIBS@
+INCINTL = @INCINTL@
+zlibdir = @zlibdir@
+@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
+CGENDIR = @cgendir@
+
 # Note that these are overridden by GNU make-specific code below if
 # GNU make is used.  The overrides implement dependency tracking.
 COMPILE.pre = $(CC) $(C_DIALECT)
@@ -215,7 +224,7 @@ CGEN_INCLUDE_DEPS = \
 ## COMMON_POST_CONFIG_FRAG
 
 CONFIG_CFLAGS = \
-	@DEFS@ \
+	$(DEFS) \
 	$(SIM_DEFAULT_MODEL) \
 	$(SIM_ALIGNMENT) \
 	$(SIM_BITSIZE) \
@@ -233,20 +242,17 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
   -I../../include -I$(srcroot)/include \
   -I../../bfd -I$(srcroot)/bfd \
   -I../../opcodes -I$(srcroot)/opcodes \
-  @INCINTL@
+  $(INCINTL)
 ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS)
 BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
 
 COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH)
 
-ZLIB = @zlibdir@ -lz
+ZLIB = $(zlibdir) -lz
 LIBIBERTY_LIB = ../../libiberty/libiberty.a
 BFD_LIB = ../../bfd/libbfd.a
-@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
 OPCODES_LIB = ../../opcodes/libopcodes.a
-LIBINTL = @LIBINTL@
-LIBINTL_DEP = @LIBINTL_DEP@
-CONFIG_LIBS = @LIBS@ $(ZLIB)
+CONFIG_LIBS = $(LIBS) $(ZLIB)
 LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB)
 EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
 	$(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL)
@@ -544,7 +550,6 @@ stamp-h: config.in config.status
 
 # CGEN support
 
-CGENDIR = @cgendir@
 CGEN = "`if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi` -l $(CGENDIR)/guile.scm -s"
 CGENFLAGS = -v
 CGEN_CPU_DIR = $(CGENDIR)/cpu
-- 
2.26.2


  parent reply	other threads:[~2021-04-08 20:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 20:33 [PATCH 00/10] sim build improvements Tom Tromey
2021-04-08 20:33 ` [PATCH 01/10] Make mostlyclean an alias for clean Tom Tromey
2021-04-09  0:25   ` Mike Frysinger
2021-04-08 20:33 ` [PATCH 02/10] Introduce stamp file for hw-config.h Tom Tromey
2021-04-09  0:25   ` Mike Frysinger
2021-04-08 20:33 ` [PATCH 03/10] Add stamp files for generated files in sim/ppc Tom Tromey
2021-04-09  0:25   ` Mike Frysinger
2021-04-08 20:33 ` [PATCH 04/10] Require GNU make Tom Tromey
2021-04-09  0:31   ` Mike Frysinger
2021-04-09 17:18     ` Tom Tromey
2021-04-09 22:45       ` Mike Frysinger
2021-04-21 23:14         ` Tom Tromey
2021-04-22  3:17           ` Mike Frysinger
2021-04-22 14:14             ` Tom Tromey
2021-04-08 20:33 ` [PATCH 05/10] Remove and modernize dependencies in sim Tom Tromey
2021-04-11 17:50   ` Mike Frysinger
2021-04-22 14:15     ` Tom Tromey
2021-04-23  0:44       ` Mike Frysinger
2021-04-08 20:33 ` [PATCH 06/10] Remove INCLUDE variable from some sim Makefiles Tom Tromey
2021-04-09  0:27   ` Mike Frysinger
2021-04-08 20:33 ` [PATCH 07/10] Remove LIBS from two " Tom Tromey
2021-04-09  0:27   ` Mike Frysinger
2021-04-08 20:33 ` Tom Tromey [this message]
2021-04-09  0:44   ` [PATCH 08/10] Define autoconf substitution variables early in Make-common.in Mike Frysinger
2021-04-08 20:33 ` [PATCH 09/10] Use prologue and epilogue Makefile fragments Tom Tromey
2021-04-08 20:33 ` [PATCH 10/10] Do not check for sys/time.h or sys/times.h Tom Tromey
2021-04-09  0:35   ` Mike Frysinger
2021-04-09 17:18     ` Tom Tromey
2021-04-09  0:26 ` [PATCH 00/10] sim build improvements Mike Frysinger
2021-04-09 17:14   ` Tom Tromey
2021-04-09 22:27     ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210408203312.2938165-9-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).