Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu via Gdb-patches" <gdb-patches@sourceware.org>
To: binutils@sourceware.org
Cc: Matthias Klose <doko@ubuntu.com>,
	gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
Subject: V3 [PATCH 5/5] gnulib: Support variables from the top level Makefile
Date: Sat, 19 Dec 2020 10:10:36 -0800	[thread overview]
Message-ID: <20201219181036.178248-6-hjl.tools@gmail.com> (raw)
In-Reply-To: <20201219181036.178248-1-hjl.tools@gmail.com>

Work around what appears to be a GNU make bug handling MAKEFLAGS
values defined in terms of make variables, as is the case for CC and
friends when we are called from the top level Makefile.

	* Makefile.am (AM_MAKEFLAGS): New.
	* Makefile.in: Regenerated.
---
 gnulib/Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++
 gnulib/Makefile.in | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)

diff --git a/gnulib/Makefile.am b/gnulib/Makefile.am
index 3732e4d0dc..fc8da2c52e 100644
--- a/gnulib/Makefile.am
+++ b/gnulib/Makefile.am
@@ -26,3 +26,42 @@
 MAKEOVERRIDES =
 
 SUBDIRS = import
+
+# Work around what appears to be a GNU make bug handling MAKEFLAGS
+# values defined in terms of make variables, as is the case for CC and
+# friends when we are called from the top level Makefile.
+AM_MAKEFLAGS = \
+	"AR_FLAGS=$(AR_FLAGS)" \
+	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+	"CFLAGS=$(CFLAGS)" \
+	"CXXFLAGS=$(CXXFLAGS)" \
+	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+	"INSTALL=$(INSTALL)" \
+	"INSTALL_DATA=$(INSTALL_DATA)" \
+	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+	"MAKE=$(MAKE)" \
+	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+	"PICFLAG=$(PICFLAG)" \
+	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+	"SHELL=$(SHELL)" \
+	"exec_prefix=$(exec_prefix)" \
+	"infodir=$(infodir)" \
+	"libdir=$(libdir)" \
+	"prefix=$(prefix)" \
+	"includedir=$(includedir)" \
+	"tooldir=$(tooldir)" \
+	"AR=$(AR)" \
+	"AS=$(AS)" \
+	"CC=$(CC)" \
+	"CXX=$(CXX)" \
+	"LD=$(LD)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"NM=$(NM)" \
+	"PICFLAG=$(PICFLAG)" \
+	"RANLIB=$(RANLIB)" \
+	"DESTDIR=$(DESTDIR)"
diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in
index c1c2168094..9f843e6b0c 100644
--- a/gnulib/Makefile.in
+++ b/gnulib/Makefile.in
@@ -1590,6 +1590,46 @@ top_srcdir = @top_srcdir@
 # as GCC 4.8.5 (Centos 7).
 MAKEOVERRIDES = 
 SUBDIRS = import
+
+# Work around what appears to be a GNU make bug handling MAKEFLAGS
+# values defined in terms of make variables, as is the case for CC and
+# friends when we are called from the top level Makefile.
+AM_MAKEFLAGS = \
+	"AR_FLAGS=$(AR_FLAGS)" \
+	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+	"CFLAGS=$(CFLAGS)" \
+	"CXXFLAGS=$(CXXFLAGS)" \
+	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+	"INSTALL=$(INSTALL)" \
+	"INSTALL_DATA=$(INSTALL_DATA)" \
+	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+	"MAKE=$(MAKE)" \
+	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+	"PICFLAG=$(PICFLAG)" \
+	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+	"SHELL=$(SHELL)" \
+	"exec_prefix=$(exec_prefix)" \
+	"infodir=$(infodir)" \
+	"libdir=$(libdir)" \
+	"prefix=$(prefix)" \
+	"includedir=$(includedir)" \
+	"tooldir=$(tooldir)" \
+	"AR=$(AR)" \
+	"AS=$(AS)" \
+	"CC=$(CC)" \
+	"CXX=$(CXX)" \
+	"LD=$(LD)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"NM=$(NM)" \
+	"PICFLAG=$(PICFLAG)" \
+	"RANLIB=$(RANLIB)" \
+	"DESTDIR=$(DESTDIR)"
+
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
-- 
2.29.2


  parent reply	other threads:[~2020-12-19 18:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19 18:10 V3 [PATCH 0/5] Support the PGO build for binutils+gdb H.J. Lu via Gdb-patches
2020-12-19 18:10 ` V3 [PATCH 1/5] GCC: Pass --plugin to AR and RANLIB H.J. Lu via Gdb-patches
2020-12-19 18:10 ` V3 [PATCH 2/5] Binutils: " H.J. Lu via Gdb-patches
2020-12-19 18:10 ` V3 [PATCH 3/5] Support the PGO build for binutils+gdb H.J. Lu via Gdb-patches
2021-02-28  7:01   ` Mike Frysinger via Gdb-patches
2021-02-28 12:44     ` [PATCH] Add missing changes to Makefile.tpl H.J. Lu via Gdb-patches
2020-12-19 18:10 ` V3 [PATCH 4/5] Set TESTS to gdb.dwarf2/*.exp for PGO build training H.J. Lu via Gdb-patches
2020-12-19 18:10 ` H.J. Lu via Gdb-patches [this message]
2020-12-31 23:50   ` V3 [PATCH 5/5] gnulib: Support variables from the top level Makefile Joseph Myers
2021-01-01  0:06     ` H.J. Lu via Gdb-patches
2021-01-05 13:26       ` Christian Biesinger via Gdb-patches
2021-01-05 14:06         ` H.J. Lu via Gdb-patches
2021-01-02 19:22 ` V3 [PATCH 0/5] Support the PGO build for binutils+gdb Segher Boessenkool
2021-01-02 19:46   ` H.J. Lu via Gdb-patches

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=20201219181036.178248-6-hjl.tools@gmail.com \
    --to=gdb-patches@sourceware.org \
    --cc=binutils@sourceware.org \
    --cc=doko@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    /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