[Intel-gfx] [PATCH i-g-t 2/5] tests: Convert to using the imported drm-uapi headers.

Lionel Landwerlin lionel.g.landwerlin at intel.com
Sat Nov 11 00:18:56 UTC 2017


On 10/11/17 21:26, Eric Anholt wrote:
> Tested by dropping garbage in my libdrm's headers and rebuilding.
>
> Signed-off-by: Eric Anholt <eric at anholt.net>
> ---
>   lib/Makefile.am   | 5 ++++-
>   meson.build       | 2 +-
>   tests/Makefile.am | 1 +
>   3 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/Makefile.am b/lib/Makefile.am
> index 30ddb92bd0bc..7b3d87780db9 100644
> --- a/lib/Makefile.am
> +++ b/lib/Makefile.am
> @@ -46,7 +46,10 @@ lib_source_list +=		\
>   	$(NULL)
>   endif
>   
> -AM_CPPFLAGS = -I$(top_srcdir)
> +AM_CPPFLAGS = \
> +	-I$(top_srcdir)/include/drm-uapi \
> +	-I$(top_srcdir)
> +
>   AM_CFLAGS = \
>   	    $(CWARNFLAGS) \
>   	    $(DRM_CFLAGS) \
> diff --git a/meson.build b/meson.build
> index fb81c4dbbd55..b14617a5f5d0 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -26,7 +26,7 @@ foreach cc_arg : cc_args
>     endif
>   endforeach
>   
> -inc = include_directories('lib', '.')
> +inc = include_directories('include/drm-uapi', 'lib', '.')
>   
>   config = configuration_data()
>   
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 89a970153992..ba5acefa68b4 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -85,6 +85,7 @@ EXTRA_DIST = \
>   CLEANFILES = $(EXTRA_PROGRAMS) test-list.txt test-list-full.txt .gitignore
>   
>   AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) -Wno-unused-result $(DEBUG_CFLAGS)\
> +	-I$(top_srcdir)/include/drm-uapi \

That seems to put include/drm-uapi after $(DRM_CFLAGS) which probably 
means you're picking up the system headers first.
I guess you want to have it the other way?

>   	-I$(srcdir)/.. \
>   	-I$(srcdir)/../lib \
>   	-include "$(srcdir)/../lib/check-ndebug.h" \




More information about the Intel-gfx mailing list