Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Allow CPPFLAGS to be set on the make command line
@ 2018-08-07 18:10 Tom Tromey
  2018-08-07 21:25 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2018-08-07 18:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

While looking into PR build/8751 (which seems to be fixed), I noticed
that it's not possible to change CPPFLAGS for gdb on the "make"
command line.  It's reasonable to want to do this sometimes, and I
think this patch should suffice.

gdb/ChangeLog
2018-08-07  Tom Tromey  <tom@tromey.com>

	* Makefile.in (CPPFLAGS): New variable.
	(INTERNAL_CPPFLAGS): Use it.
---
 gdb/ChangeLog   | 5 +++++
 gdb/Makefile.in | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 8c744d70c0..7ff817d790 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -557,6 +557,7 @@ PROFILE_CFLAGS = @PROFILE_CFLAGS@
 # when running make.  I.E.: "make CFLAGS=-Wmissing-prototypes".
 CFLAGS = @CFLAGS@
 CXXFLAGS = @CXXFLAGS@
+CPPFLAGS = @CPPFLAGS@
 
 # Set by configure, for e.g. expat.  Python installations are such that
 # C headers are included using their basename (for example, we #include
@@ -564,7 +565,7 @@ CXXFLAGS = @CXXFLAGS@
 # are sometimes a little generic, we think that the risk of collision
 # with other header files is high.  If that happens, we try to mitigate
 # a bit the consequences by putting the Python includes last in the list.
-INTERNAL_CPPFLAGS = @CPPFLAGS@ @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
+INTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
 
 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
 INTERNAL_CFLAGS_BASE = \
-- 
2.13.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Allow CPPFLAGS to be set on the make command line
  2018-08-07 18:10 [PATCH] Allow CPPFLAGS to be set on the make command line Tom Tromey
@ 2018-08-07 21:25 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2018-08-07 21:25 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On 2018-08-07 14:09, Tom Tromey wrote:
> While looking into PR build/8751 (which seems to be fixed), I noticed
> that it's not possible to change CPPFLAGS for gdb on the "make"
> command line.  It's reasonable to want to do this sometimes, and I
> think this patch should suffice.
> 
> gdb/ChangeLog
> 2018-08-07  Tom Tromey  <tom@tromey.com>
> 
> 	* Makefile.in (CPPFLAGS): New variable.
> 	(INTERNAL_CPPFLAGS): Use it.
> ---
>  gdb/ChangeLog   | 5 +++++
>  gdb/Makefile.in | 3 ++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index 8c744d70c0..7ff817d790 100644
> --- a/gdb/Makefile.in
> +++ b/gdb/Makefile.in
> @@ -557,6 +557,7 @@ PROFILE_CFLAGS = @PROFILE_CFLAGS@
>  # when running make.  I.E.: "make CFLAGS=-Wmissing-prototypes".
>  CFLAGS = @CFLAGS@
>  CXXFLAGS = @CXXFLAGS@
> +CPPFLAGS = @CPPFLAGS@
> 
>  # Set by configure, for e.g. expat.  Python installations are such 
> that
>  # C headers are included using their basename (for example, we 
> #include
> @@ -564,7 +565,7 @@ CXXFLAGS = @CXXFLAGS@
>  # are sometimes a little generic, we think that the risk of collision
>  # with other header files is high.  If that happens, we try to 
> mitigate
>  # a bit the consequences by putting the Python includes last in the 
> list.
> -INTERNAL_CPPFLAGS = @CPPFLAGS@ @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
> +INTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
> 
>  # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
>  INTERNAL_CFLAGS_BASE = \

+1.

Simon


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-07 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 18:10 [PATCH] Allow CPPFLAGS to be set on the make command line Tom Tromey
2018-08-07 21:25 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox