[Pdbg] [PATCH 02/18] configure: Add configure test for dtc command
Amitay Isaacs
amitay at ozlabs.org
Wed May 16 16:17:20 AEST 2018
From: Amitay Isaacs <amitay at gmail.com>
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
---
Makefile.am | 2 +-
configure.ac | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index c2173e2..d785cba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,7 +73,7 @@ p9r-fsi.dtb: p9r-fsi.dts p9-fsi.dtsi
p9z-fsi.dtb: p9z-fsi.dts p9-fsi.dtsi
%.dtb: %.dts
- $(DTC_V)dtc -q -i$(dir $@) -I dts $< -O dtb > $@
+ $(DTC_V)$(DTC) -q -i$(dir $@) -I dts $< -O dtb > $@
%.dtb.o: %.dtb
$(AM_V_CC)$(CC) -c $(srcdir)/template.S -DSYMBOL_PREFIX=$(shell echo $@ | tr '.-' '_') -DFILENAME=\"$<\" -o $@
diff --git a/configure.ac b/configure.ac
index 740d926..dcfbfde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,12 @@ if test x"$ac_cv_path_M4" = "x" ; then
fi
AC_SUBST([M4])
+AC_PATH_PROG([DTC], [dtc])
+if test x"$ac_cv_path_DTC" = x ; then
+ AC_MSG_ERROR([Command 'dtc' not found.])
+fi
+AC_SUBST([DTC])
+
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
--
2.17.0
More information about the Pdbg
mailing list