qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH for 2.10 4/4] fdt: compile dtc submodule to chec


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [RFC PATCH for 2.10 4/4] fdt: compile dtc submodule to check it is up-to-date
Date: Wed, 26 Jul 2017 18:40:10 -0300

Reported-by: John Arbuckle <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 configure | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 2d803d6a77..386262ec33 100755
--- a/configure
+++ b/configure
@@ -3575,15 +3575,29 @@ EOF
     fdt=yes
   elif test -d ${source_path}/dtc/libfdt ; then
     # have submodule DTC - use it
-    fdt=yes
     dtc_internal="yes"
     mkdir -p dtc
     if [ "$pwd_is_source_path" != "y" ] ; then
-       symlink "$source_path/dtc/Makefile" "dtc/Makefile"
-       symlink "$source_path/dtc/scripts" "dtc/scripts"
+      for f in $(cd $source_path/dtc && ls Makefile* *.?); do
+        symlink "$source_path/dtc/$f" "dtc/$f"
+      done
+      for d in scripts libfdt tests; do
+        symlink "$source_path/dtc/$d" "dtc/$d"
+      done
+      SRC_PATH=$source_path
+    fi
+    make -C dtc 1>/dev/null
+
+    fdt_cflags="-I${source_path}/dtc/libfdt"
+    fdt_libs="-L$(pwd)/dtc/libfdt $fdt_libs"
+    if compile_prog "$fdt_cflags" "$fdt_libs" ; then
+      fdt=yes
+    else
+      error_exit "Your DTC submodule is outdated. Your options:" \
+        "  (1) Preferred: Install the DTC (libfdt) devel package" \
+        "  (2) Update the DTC submodule, using: $git_submodule_path_info" \
+        "      git submodule update --init dtc"
     fi
-    fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
-    fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
   elif test "$fdt" = "yes" ; then
     # have neither and want - prompt for system/submodule install
     error_exit "DTC (libfdt) version >= 1.4.2 not present. Your options:" \
-- 
2.13.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]