diff mbox

[RFC,i-g-t,3/9] tools/Makefile: Don't build tools that depend on libdrm_intel.

Message ID 1463785173-17557-4-git-send-email-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss May 20, 2016, 10:59 p.m. UTC
From: Robert Foss <robert.foss@collabora.com>

Use the HAS_INTEL automake flag to avoid building tools that won't
compile unless libdrm_intel is available in the build system.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 tools/Makefile.sources | 50 +++++++++++++++++++++++++++++---------------------
 1 file changed, 29 insertions(+), 21 deletions(-)

Comments

Emil Velikov May 23, 2016, 2:09 p.m. UTC | #1
On Friday, May 20, 2016 23:59 BST, robert.foss@collabora.com wrote: 
> From: Robert Foss <robert.foss@collabora.com>
> 
> Use the HAS_INTEL automake flag to avoid building tools that won't

> compile unless libdrm_intel is available in the build system.
> 
> Signed-off-by: Robert Foss <robert.foss@collabora.com>
> ---
>  tools/Makefile.sources | 50 +++++++++++++++++++++++++++++---------------------
>  1 file changed, 29 insertions(+), 21 deletions(-)
> 
> diff --git a/tools/Makefile.sources b/tools/Makefile.sources
> index 5d5958d..c2dab8e 100644
> --- a/tools/Makefile.sources
> +++ b/tools/Makefile.sources
> @@ -1,42 +1,54 @@
> -noinst_PROGRAMS = \
> -	hsw_compute_wrpll \
> -	skl_compute_wrpll \
> -	skl_ddb_allocation \
> +noinst_PROGRAMS =		\
> +	hsw_compute_wrpll	\
> +	skl_compute_wrpll	\
> +	skl_ddb_allocation	\
>  	$(NULL)
>  
> -bin_PROGRAMS = 				\
> +bin_PROGRAMS =				\
>  	igt_stats			\
> -	intel_audio_dump 		\
> +	intel_audio_dump		\
>  	intel_reg			\
>  	intel_backlight 		\
>  	intel_bios_dumper 		\
>  	intel_bios_reader 		\
>  	intel_display_crc		\
>  	intel_display_poller		\
> -	intel_dump_decode 		\
> -	intel_error_decode 		\
>  	intel_forcewaked		\
>  	intel_gpu_frequency		\
> -	intel_framebuffer_dump 		\
>  	intel_firmware_decode		\
> -	intel_gpu_time 			\
> -	intel_gpu_top 			\
> -	intel_gtt 			\
> +	intel_gpu_time			\
> +	intel_gpu_top			\
> +	intel_gtt			\
>  	intel_infoframes		\
>  	intel_l3_parity			\
>  	intel_lid			\
>  	intel_opregion_decode		\
>  	intel_panel_fitter		\
> -	intel_perf_counters		\
> -	intel_reg_checker 		\
> +	intel_reg_checker		\
>  	intel_residency			\
> -	intel_stepping 			\
> +	intel_stepping			\
Please don't mix functionality and cosmetic changes. Apply the whitespace polish as a separate patch ?

>  	intel_watermark
>  
>  dist_bin_SCRIPTS = intel_gpu_abrt
>  
> -intel_dump_decode_SOURCES = 	\
> -	intel_dump_decode.c
> +if HAVE_INTEL
> +	bin_PROGRAMS +=			\
> +		intel_dump_decode	\
> +		intel_error_decode	\
> +		intel_framebuffer_dump	\
> +		intel_perf_counters	\
> +		$(NULL)
> +
> +	intel_dump_decode_SOURCES =	\
> +		intel_dump_decode.c	\
> +		$(NULL)
> +
> +	intel_error_decode_SOURCES =	\
> +		intel_error_decode.c	\
> +		$(NULL)
> +
> +	intel_error_decode_LDFLAGS = -lz
Apart from than my earlier comments, LDFLAGS variables should not live in this file. Please move it to Makefile.am.

Thanks
Emil
diff mbox

Patch

diff --git a/tools/Makefile.sources b/tools/Makefile.sources
index 5d5958d..c2dab8e 100644
--- a/tools/Makefile.sources
+++ b/tools/Makefile.sources
@@ -1,42 +1,54 @@ 
-noinst_PROGRAMS = \
-	hsw_compute_wrpll \
-	skl_compute_wrpll \
-	skl_ddb_allocation \
+noinst_PROGRAMS =		\
+	hsw_compute_wrpll	\
+	skl_compute_wrpll	\
+	skl_ddb_allocation	\
 	$(NULL)
 
-bin_PROGRAMS = 				\
+bin_PROGRAMS =				\
 	igt_stats			\
-	intel_audio_dump 		\
+	intel_audio_dump		\
 	intel_reg			\
 	intel_backlight 		\
 	intel_bios_dumper 		\
 	intel_bios_reader 		\
 	intel_display_crc		\
 	intel_display_poller		\
-	intel_dump_decode 		\
-	intel_error_decode 		\
 	intel_forcewaked		\
 	intel_gpu_frequency		\
-	intel_framebuffer_dump 		\
 	intel_firmware_decode		\
-	intel_gpu_time 			\
-	intel_gpu_top 			\
-	intel_gtt 			\
+	intel_gpu_time			\
+	intel_gpu_top			\
+	intel_gtt			\
 	intel_infoframes		\
 	intel_l3_parity			\
 	intel_lid			\
 	intel_opregion_decode		\
 	intel_panel_fitter		\
-	intel_perf_counters		\
-	intel_reg_checker 		\
+	intel_reg_checker		\
 	intel_residency			\
-	intel_stepping 			\
+	intel_stepping			\
 	intel_watermark
 
 dist_bin_SCRIPTS = intel_gpu_abrt
 
-intel_dump_decode_SOURCES = 	\
-	intel_dump_decode.c
+if HAVE_INTEL
+	bin_PROGRAMS +=			\
+		intel_dump_decode	\
+		intel_error_decode	\
+		intel_framebuffer_dump	\
+		intel_perf_counters	\
+		$(NULL)
+
+	intel_dump_decode_SOURCES =	\
+		intel_dump_decode.c	\
+		$(NULL)
+
+	intel_error_decode_SOURCES =	\
+		intel_error_decode.c	\
+		$(NULL)
+
+	intel_error_decode_LDFLAGS = -lz
+endif
 
 intel_reg_SOURCES =		\
 	intel_reg.c		\
@@ -44,10 +56,6 @@  intel_reg_SOURCES =		\
 	intel_reg_spec.c	\
 	intel_reg_spec.h
 
-intel_error_decode_SOURCES =	\
-	intel_error_decode.c
-intel_error_decode_LDFLAGS = -lz
-
 intel_bios_reader_SOURCES =	\
 	intel_bios_reader.c	\
 	intel_bios.h