Re: [Intel-gfx] [PATCH i-g-t 05/13] chamelium: Fix build issues on Android

2017-05-16 Thread Michal Wajdeczko
On Tue, May 16, 2017 at 03:24:54PM +0200, Arkadiusz Hiler wrote:
> Makefile.sources are included 1:1 in Android.mk files, and are not
> parsed by automake. And yet those had some automake conditional logic.
> Moving it to .am file is enough for now.

Hmm, all sources shall be listed only in Makefile.sources, which in turn,
shall not have any logic.

> 
> Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
> guard, and the file itself was included unconditionally.
> 
> Signed-off-by: Arkadiusz Hiler 
> ---
>  lib/Makefile.am| 7 +++
>  lib/Makefile.sources   | 7 ---
>  lib/igt.h  | 2 ++
>  lib/igt_chamelium.h| 3 +++
>  tests/Makefile.am  | 6 ++
>  tests/Makefile.sources | 6 --
>  6 files changed, 18 insertions(+), 13 deletions(-)
> 
> diff --git a/lib/Makefile.am b/lib/Makefile.am
> index c0ddf29..91e72c4 100644
> --- a/lib/Makefile.am
> +++ b/lib/Makefile.am
> @@ -22,6 +22,13 @@ if !HAVE_LIBDRM_INTEL
>  stubs/drm/intel_bufmgr.h
>  endif
>  
> +if HAVE_CHAMELIUM
> +lib_source_list +=   \
> + igt_chamelium.h \
> + igt_chamelium.c \
> + $(NULL)
> +endif
> +

Try this:

if HAVE_CHAMELIUM
lib_source_list += $(chamelium_lib_source_list)
endif


>  AM_CPPFLAGS = -I$(top_srcdir)
>  AM_CFLAGS = \
>   $(CWARNFLAGS) \
> diff --git a/lib/Makefile.sources b/lib/Makefile.sources
> index 6348487..53fdb54 100644
> --- a/lib/Makefile.sources
> +++ b/lib/Makefile.sources
> @@ -85,13 +85,6 @@ lib_source_list =  \
>   igt_kmod.h  \
>   $(NULL)
>  
> -if HAVE_CHAMELIUM
> -lib_source_list +=   \
> - igt_chamelium.h \
> - igt_chamelium.c \
> - $(NULL)
> -endif

Try this:

chamelium_lib_source_list +=\
igt_chamelium.h \
igt_chamelium.c \
$(NULL)

> -
>  .PHONY: version.h.tmp
>  
>  # leaving a space here to work around automake's conditionals
> diff --git a/lib/igt.h b/lib/igt.h
> index a97923e..a069deb 100644
> --- a/lib/igt.h
> +++ b/lib/igt.h
> @@ -38,7 +38,9 @@
>  #include "igt_kms.h"
>  #include "igt_pm.h"
>  #include "igt_stats.h"
> +#ifdef HAVE_CHAMELIUM
>  #include "igt_chamelium.h"
> +#endif
>  #include "instdone.h"
>  #include "intel_batchbuffer.h"
>  #include "intel_chipset.h"
> diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> index f421d83..15f6024 100644
> --- a/lib/igt_chamelium.h
> +++ b/lib/igt_chamelium.h
> @@ -26,7 +26,10 @@
>  #ifndef IGT_CHAMELIUM_H
>  #define IGT_CHAMELIUM_H
>  
> +#ifdef HAVE_CONFIG_H
>  #include "config.h"
> +#endif
> +
>  #include "igt.h"
>  #include 
>  
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 05681d5..61c7a15 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -12,6 +12,12 @@ if HAVE_LIBDRM_VC4
>  TESTS_progs_M += $(VC4_TESTS_M)
>  endif
>  
> +if HAVE_CHAMELIUM
> +TESTS_progs_M += \
> + chamelium \
> + $(NULL)
> +endif
> +
>  if BUILD_TESTS
>  test-list.txt: Makefile.sources
>   @echo TESTLIST > $@
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 9553e4d..df1fee5 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -154,12 +154,6 @@ TESTS_progs_M = \
>   meta_test \
>   $(NULL)
>  
> -if HAVE_CHAMELIUM
> -TESTS_progs_M += \
> - chamelium \
> - $(NULL)
> -endif
> -

Maybe instead of removing this from .sources, try this:

CHAMELIUM_TESTS_progs_M += \
chamelium \
$(NULL)

and then use it in .am under HAVE_CHAMELIUM 

Michal

>  TESTS_progs_XM = \
>  gem_concurrent_all \
>  $(NULL)
> -- 
> 2.9.3
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t 05/13] chamelium: Fix build issues on Android

2017-05-16 Thread Arkadiusz Hiler
Makefile.sources are included 1:1 in Android.mk files, and are not
parsed by automake. And yet those had some automake conditional logic.
Moving it to .am file is enough for now.

Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
guard, and the file itself was included unconditionally.

Signed-off-by: Arkadiusz Hiler 
---
 lib/Makefile.am| 7 +++
 lib/Makefile.sources   | 7 ---
 lib/igt.h  | 2 ++
 lib/igt_chamelium.h| 3 +++
 tests/Makefile.am  | 6 ++
 tests/Makefile.sources | 6 --
 6 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index c0ddf29..91e72c4 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -22,6 +22,13 @@ if !HAVE_LIBDRM_INTEL
 stubs/drm/intel_bufmgr.h
 endif
 
+if HAVE_CHAMELIUM
+lib_source_list += \
+   igt_chamelium.h \
+   igt_chamelium.c \
+   $(NULL)
+endif
+
 AM_CPPFLAGS = -I$(top_srcdir)
 AM_CFLAGS = \
$(CWARNFLAGS) \
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 6348487..53fdb54 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -85,13 +85,6 @@ lib_source_list =\
igt_kmod.h  \
$(NULL)
 
-if HAVE_CHAMELIUM
-lib_source_list += \
-   igt_chamelium.h \
-   igt_chamelium.c \
-   $(NULL)
-endif
-
 .PHONY: version.h.tmp
 
 # leaving a space here to work around automake's conditionals
diff --git a/lib/igt.h b/lib/igt.h
index a97923e..a069deb 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -38,7 +38,9 @@
 #include "igt_kms.h"
 #include "igt_pm.h"
 #include "igt_stats.h"
+#ifdef HAVE_CHAMELIUM
 #include "igt_chamelium.h"
+#endif
 #include "instdone.h"
 #include "intel_batchbuffer.h"
 #include "intel_chipset.h"
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index f421d83..15f6024 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -26,7 +26,10 @@
 #ifndef IGT_CHAMELIUM_H
 #define IGT_CHAMELIUM_H
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include "igt.h"
 #include 
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 05681d5..61c7a15 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -12,6 +12,12 @@ if HAVE_LIBDRM_VC4
 TESTS_progs_M += $(VC4_TESTS_M)
 endif
 
+if HAVE_CHAMELIUM
+TESTS_progs_M += \
+   chamelium \
+   $(NULL)
+endif
+
 if BUILD_TESTS
 test-list.txt: Makefile.sources
@echo TESTLIST > $@
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 9553e4d..df1fee5 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -154,12 +154,6 @@ TESTS_progs_M = \
meta_test \
$(NULL)
 
-if HAVE_CHAMELIUM
-TESTS_progs_M += \
-   chamelium \
-   $(NULL)
-endif
-
 TESTS_progs_XM = \
 gem_concurrent_all \
 $(NULL)
-- 
2.9.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t 05/13] chamelium: Fix build issues on Android

2017-05-05 Thread Arkadiusz Hiler
On Tue, May 02, 2017 at 12:53:16PM +0300, Petri Latvala wrote:
> On Wed, Apr 19, 2017 at 01:01:47PM +0200, Arkadiusz Hiler wrote:
> > Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
> > guard, and the file itself was included unconditionally.
> 
> I see unconditional config.h inclusion in several other places,
> is igt_chamelium.h the only file where it causes problems?

Yes that we the reason for this ifdef, but that might have been fixed in
other way by different patch as I can't reproduce the error anymore.

I'll drop that from this patch and later we can have one dedicated to
adding ifdefs everywhere.

The approach with config_android.h would need that, so that would be
good series to do it.

-- 
Cheers,
Arek
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t 05/13] chamelium: Fix build issues on Android

2017-05-02 Thread Petri Latvala
On Wed, Apr 19, 2017 at 01:01:47PM +0200, Arkadiusz Hiler wrote:
> Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
> guard, and the file itself was included unconditionally.

I see unconditional config.h inclusion in several other places,
is igt_chamelium.h the only file where it causes problems?


--
Petri Latvala
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t 05/13] chamelium: Fix build issues on Android

2017-04-19 Thread Arkadiusz Hiler
Makefile.sources are included 1:1 in Android.mk files, and are not
parsed by automake. And yet those had some automake conditional logic.
Moving it to .am file is enough for now.

Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
guard, and the file itself was included unconditionally.

Signed-off-by: Arkadiusz Hiler 
---
 lib/Makefile.am| 7 +++
 lib/Makefile.sources   | 7 ---
 lib/igt.h  | 2 ++
 lib/igt_chamelium.h| 3 +++
 tests/Makefile.am  | 6 ++
 tests/Makefile.sources | 6 --
 6 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index c0ddf29..91e72c4 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -22,6 +22,13 @@ if !HAVE_LIBDRM_INTEL
 stubs/drm/intel_bufmgr.h
 endif
 
+if HAVE_CHAMELIUM
+lib_source_list += \
+   igt_chamelium.h \
+   igt_chamelium.c \
+   $(NULL)
+endif
+
 AM_CPPFLAGS = -I$(top_srcdir)
 AM_CFLAGS = \
$(CWARNFLAGS) \
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 6348487..53fdb54 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -85,13 +85,6 @@ lib_source_list =\
igt_kmod.h  \
$(NULL)
 
-if HAVE_CHAMELIUM
-lib_source_list += \
-   igt_chamelium.h \
-   igt_chamelium.c \
-   $(NULL)
-endif
-
 .PHONY: version.h.tmp
 
 # leaving a space here to work around automake's conditionals
diff --git a/lib/igt.h b/lib/igt.h
index a97923e..a069deb 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -38,7 +38,9 @@
 #include "igt_kms.h"
 #include "igt_pm.h"
 #include "igt_stats.h"
+#ifdef HAVE_CHAMELIUM
 #include "igt_chamelium.h"
+#endif
 #include "instdone.h"
 #include "intel_batchbuffer.h"
 #include "intel_chipset.h"
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index f421d83..15f6024 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -26,7 +26,10 @@
 #ifndef IGT_CHAMELIUM_H
 #define IGT_CHAMELIUM_H
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include "igt.h"
 #include 
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8930c24..f2358d5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,6 +8,12 @@ if HAVE_LIBDRM_VC4
 TESTS_progs_M += $(VC4_TESTS_M)
 endif
 
+if HAVE_CHAMELIUM
+TESTS_progs_M += \
+   chamelium \
+   $(NULL)
+endif
+
 if BUILD_TESTS
 test-list.txt: Makefile.sources
@echo TESTLIST > $@
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 7fa9b8f..3f10cd2 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -146,12 +146,6 @@ TESTS_progs_M = \
meta_test \
$(NULL)
 
-if HAVE_CHAMELIUM
-TESTS_progs_M += \
-   chamelium \
-   $(NULL)
-endif
-
 TESTS_progs_XM = \
 gem_concurrent_all \
 $(NULL)
-- 
2.9.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx