package/dtc: fix build without libyaml
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 13 Aug 2019 18:02:25 +0000 (20:02 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 13 Aug 2019 19:39:00 +0000 (21:39 +0200)
- Pass NO_YAML=1 to make when libyaml is disabled
- Move BR2_PACKAGE_LIBYAML block outside
  BR2_PACKAGE_DTC_PROGRAMS block to avoid duplicating NO_YAML=1 even if
  libyaml is only used / needed with dtc program

Fixes:
 - http://autobuild.buildroot.org/results/68a1ba8d615951931567bc8a409c1d16624c902b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/dtc/dtc.mk

index 1188e954b26e9856abb5a99d76576b9801c9ef54..0ed914ba41ebd4b97cc8326b9e974fcc4293bb4d 100644 (file)
@@ -24,6 +24,12 @@ HOST_DTC_MAKE_OPTS = \
        NO_VALGRIND=1 \
        NO_YAML=1
 
+ifeq ($(BR2_PACKAGE_LIBYAML),y)
+DTC_DEPENDENCIES += host-pkgconf libyaml
+else
+DTC_MAKE_OPTS += NO_YAML=1
+endif
+
 define DTC_POST_INSTALL_TARGET_RM_DTDIFF
        rm -f $(TARGET_DIR)/usr/bin/dtdiff
 endef
@@ -36,10 +42,6 @@ ifeq ($(BR2_PACKAGE_BASH),)
 DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF
 endif
 
-ifeq ($(BR2_PACKAGE_LIBYAML),y)
-DTC_DEPENDENCIES += host-pkgconf libyaml
-endif
-
 else # $(BR2_PACKAGE_DTC_PROGRAMS) != y
 
 DTC_INSTALL_GOAL = install-lib