summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2010-07-15 10:49:07 +0000
committerraj <raj@FreeBSD.org>2010-07-15 10:49:07 +0000
commit011cc501353510f39d24c3f68c85ea3b7a915c87 (patch)
tree87422d10d199c818b66c4efc8b9e36d2c01c7adc /Makefile.inc1
parentf67e656794cfb03ecc8df0db2ee47df236537927 (diff)
downloadFreeBSD-src-011cc501353510f39d24c3f68c85ea3b7a915c87.zip
FreeBSD-src-011cc501353510f39d24c3f68c85ea3b7a915c87.tar.gz
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@).
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc16
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index d939280..2aa48b13 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
OpenPOWER on IntegriCloud