From 24c00a9054d1fb218a41be45c2ddb05ce39745ce Mon Sep 17 00:00:00 2001 From: Rafal Jaworowski Date: Thu, 15 Jul 2010 10:49:07 +0000 Subject: [PATCH] Fix FDT_DTS_FILE parsing to properly retrieve its value. This unbreaks the 'builddtb' target. Make the processing more robust against non-existent kernel config files (pointed out by imp@). --- Makefile.inc1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d93928086b2..2aa48b1370c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1477,8 +1477,12 @@ _xi-links: DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) -FDT_DTS_FILE!= awk '/^makeoptions[[:space:]]+FDT_DTS_FILE/ {FS="=|[ \t]+"; print $$3}' \ +.if exists(${KERNCONFDIR}/${KERNCONF}) +FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ ${KERNCONFDIR}/${KERNCONF} +.else +.error ERROR: kernel config file not found. +.endif .endif .endif