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@).
This commit is contained in:
Rafal Jaworowski 2010-07-15 10:49:07 +00:00
parent 7832b1f674
commit 24c00a9054

View File

@ -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