diff mbox

[v4,3/3] linux: install dtc only in case package host dtc is not selected

Message ID 1421793790-32237-3-git-send-email-ps.report@gmx.net
State Superseded
Headers show

Commit Message

Peter Seiderer Jan. 20, 2015, 10:43 p.m. UTC
Suggested by Matthew Weber (see [1]) to avoid double installation
of host dtc.

[1] http://lists.busybox.net/pipermail/buildroot/2015-January/117121.html

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 linux/linux.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Yann E. MORIN March 20, 2015, 10:07 p.m. UTC | #1
Peter, All,

Sorry for the delay...

On 2015-01-20 23:43 +0100, Peter Seiderer spake thusly:
> Suggested by Matthew Weber (see [1]) to avoid double installation
> of host dtc.
> 
> [1] http://lists.busybox.net/pipermail/buildroot/2015-January/117121.html
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  linux/linux.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index 29f59e8..d598b44 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -292,13 +292,14 @@ endef
>  endif
>  
>  
> +ifeq ($BR2_PACKAGE_HOST_DTC,)

We usually put variables between parenthesis:

    ifeq ($(BR2_PACKAGE_HOST_DTC),)

Also, this should have been squashed into the first patch.

Otherwise, looks good:

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  define LINUX_INSTALL_HOST_TOOLS
>  	# Installing dtc (device tree compiler) as host tool, if selected
>  	if grep -q "CONFIG_DTC=y" $(@D)/.config; then 	\
>  		$(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc ;	\
>  	fi
>  endef
> -
> +endif
>  
>  define LINUX_INSTALL_IMAGES_CMDS
>  	cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
> -- 
> 2.1.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
diff mbox

Patch

diff --git a/linux/linux.mk b/linux/linux.mk
index 29f59e8..d598b44 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -292,13 +292,14 @@  endef
 endif
 
 
+ifeq ($BR2_PACKAGE_HOST_DTC,)
 define LINUX_INSTALL_HOST_TOOLS
 	# Installing dtc (device tree compiler) as host tool, if selected
 	if grep -q "CONFIG_DTC=y" $(@D)/.config; then 	\
 		$(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc ;	\
 	fi
 endef
-
+endif
 
 define LINUX_INSTALL_IMAGES_CMDS
 	cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)