mapi/shared-glapi/test: rework glapitable.h handling
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 13 Oct 2017 15:35:47 +0000 (16:35 +0100)
committerDylan Baker <dylan@pnwbakers.com>
Fri, 13 Oct 2017 18:12:08 +0000 (11:12 -0700)
Currently all the build systems but Meson generate the header in
src/mapi/glapi. Meson cannot do that since:
 - it does not allow user control over the location of output files
 - moving the generation rule(s) causes explosion due to the unusual
structure of glapi and friends
 - copying the file into the correct location is a non-trivial task

To workaround the above deficiency in the least invasive way, let's
adjust the #include directive and add a few -I flags to the autotools
build.

Note: both builddir and srcdir, should be used. Otherwise building from
a release tarball fails badly.

Cc: Dylan Baker <dylanx.c.baker@intel.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/mapi/Makefile.am
src/mapi/shared-glapi/tests/check_table.cpp

index 83e32d2185edb884045febbddb85e209373e3123..3f8fcc02e55e7c14431badfdf1e7703baf5fccb3 100644 (file)
@@ -47,7 +47,9 @@ AM_CPPFLAGS =                                                 \
        -I$(top_srcdir)/include                                 \
        -I$(top_srcdir)/src                                     \
        -I$(top_builddir)/src/mapi                              \
-       -I$(top_srcdir)/src/mapi
+       -I$(top_srcdir)/src/mapi                                \
+       -I$(top_builddir)/src/mapi/glapi                        \
+       -I$(top_srcdir)/src/mapi/glapi
 
 include Makefile.sources
 
@@ -113,7 +115,6 @@ endif
 glapi_libglapi_la_SOURCES =
 glapi_libglapi_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
-       -I$(top_srcdir)/src/mapi/glapi \
        -I$(top_srcdir)/src/mesa
 
 if HAVE_APPLEDRI
index 02d313c22d30a0cef3e50354bd28560f0893d2b8..314e6769b493c2f6c60cc918318561fe482da0b7 100644 (file)
@@ -25,7 +25,7 @@
 #include "../../../mesa/main/glheader.h"
 
 #include "glapi/glapi.h"
-#include "glapi/glapitable.h"
+#include "glapitable.h"
 
 struct name_offset {
    const char *name;