Allow CPPFLAGS to be set on the make command line
authorTom Tromey <tom@tromey.com>
Tue, 7 Aug 2018 18:07:36 +0000 (12:07 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 7 Aug 2018 22:39:13 +0000 (16:39 -0600)
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
gdb/Makefile.in

index 352a8644b155625692d9f1d1b71d216416e667b5..838029bf239e47b375475dc7958c7f7ab43a7be6 100644 (file)
@@ -1,3 +1,8 @@
+2018-08-07  Tom Tromey  <tom@tromey.com>
+
+       * Makefile.in (CPPFLAGS): New variable.
+       (INTERNAL_CPPFLAGS): Use it.
+
 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
 
        * NEWS: Mention the index cache.
index 9e90a4608d6125c95db3b9cde8ee1b9710d26a9c..59e3dbf9de687b7a1eb080124f98a33fc538115e 100644 (file)
@@ -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 = \
This page took 0.033572 seconds and 4 git commands to generate.