diff mbox

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

Message ID 20171110212618.904-3-eric@anholt.net (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Anholt Nov. 10, 2017, 9:26 p.m. UTC
Tested by dropping garbage in my libdrm's headers and rebuilding.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 lib/Makefile.am   | 5 ++++-
 meson.build       | 2 +-
 tests/Makefile.am | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

Comments

Lionel Landwerlin Nov. 11, 2017, 12:18 a.m. UTC | #1
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@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" \
Eric Anholt Nov. 13, 2017, 8:59 p.m. UTC | #2
Lionel Landwerlin <lionel.g.landwerlin@intel.com> writes:

> 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@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?

Oh, that had accidentally ended up in patch 5.  Thanks!
diff mbox

Patch

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 \
 	-I$(srcdir)/.. \
 	-I$(srcdir)/../lib \
 	-include "$(srcdir)/../lib/check-ndebug.h" \