Mesa (master): glapi: don't walk backwards for includes

Dylan Baker dbaker at kemper.freedesktop.org
Tue Feb 6 23:00:56 UTC 2018


Module: Mesa
Branch: master
Commit: 9be7487f3076b2470ca547e2d9d7d54492718090
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9be7487f3076b2470ca547e2d9d7d54492718090

Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Tue Nov  7 09:40:06 2017 -0800

glapi: don't walk backwards for includes

Instead just set the proper -I flags and include it from a more standard
path. In this case we'll add -Isrc/mesa (which is common), and #include
main/foo.h.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/mapi/Makefile.am                 | 6 ++++--
 src/mapi/glapi/tests/check_table.cpp | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
index 135e18aca1..3da1a193d2 100644
--- a/src/mapi/Makefile.am
+++ b/src/mapi/Makefile.am
@@ -92,7 +92,8 @@ check_PROGRAMS += shared-glapi-test
 shared_glapi_test_SOURCES = shared-glapi/tests/check_table.cpp
 shared_glapi_test_CPPFLAGS = \
 	$(AM_CPPFLAGS) \
-	-I$(top_srcdir)/src/gtest/include
+	-I$(top_srcdir)/src/gtest/include \
+	-I$(top_srcdir)/src/mesa
 shared_glapi_test_LDADD = \
 	$(top_builddir)/src/mapi/shared-glapi/libglapi.la \
 	$(top_builddir)/src/gtest/libgtest.la
@@ -154,7 +155,8 @@ check_PROGRAMS += glapi-test
 glapi_test_SOURCES = glapi/tests/check_table.cpp
 glapi_test_CPPFLAGS = \
 	$(AM_CPPFLAGS) \
-	-I$(top_srcdir)/src/gtest/include
+	-I$(top_srcdir)/src/gtest/include \
+	-I$(top_srcdir)/src/mesa
 
 glapi_test_LDADD = \
 	$(top_builddir)/src/mapi/glapi/libglapi.la \
diff --git a/src/mapi/glapi/tests/check_table.cpp b/src/mapi/glapi/tests/check_table.cpp
index 09bf4f3585..62b3a43d22 100644
--- a/src/mapi/glapi/tests/check_table.cpp
+++ b/src/mapi/glapi/tests/check_table.cpp
@@ -22,7 +22,7 @@
  */
 
 #include <gtest/gtest.h>
-#include "../mesa/main/glheader.h"
+#include "main/glheader.h"
 
 extern "C" {
 #include "glapi/glapi.h"




More information about the mesa-commit mailing list