lkml.org 
[lkml]   [2020]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dtc: also check <yaml.h> for libyaml
Date
yamltree.c includes <yaml.h>, If /usr/include/yaml.h does not exist,
it fails to build.

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
scripts/dtc/Makefile | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index b5a5b1c..b49dfea 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \
endif
HOST_EXTRACFLAGS += -DNO_YAML
else
+ifeq ($(wildcard /usr/include/yaml.h),)
+HOST_EXTRACFLAGS += -DNO_YAML
+else
dtc-objs += yamltree.o
HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs)
endif
+endif

# Generated files need one more search path to include headers in source tree
HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src)
--
1.9.1
\
 
 \ /
  Last update: 2020-06-08 10:42    [W:0.042 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site