qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: John Arbuckle <programmingkidx@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Yongbok Kim" <yongbok.kim@imgtec.com>,
	"James Hogan" <james.hogan@imgtec.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
	"Juan Quintela" <quintela@redhat.com>,
	qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <20170726214010.420-5-f4bug@amsat.org> (raw)
In-Reply-To: <20170726214010.420-1-f4bug@amsat.org>

Reported-by: John Arbuckle <programmingkidx@gmail.com>
Message-Id: <65ED9743-B53C-4E6A-866F-C883650914CE@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 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

  parent reply	other threads:[~2017-07-26 21:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 21:40 [Qemu-devel] [PATCH for 2.10 0/4] check dtc submodule is outdated Philippe Mathieu-Daudé
2017-07-26 21:40 ` [Qemu-devel] [PATCH 1/4] configure: remember the user to run 'git submodule' command in source dir Philippe Mathieu-Daudé
2017-07-26 21:51   ` Eric Blake
2017-07-26 22:02     ` Philippe Mathieu-Daudé
2017-07-26 21:40 ` [Qemu-devel] [PATCH for 2.10 2/4] fdt: check fdt_required condition can be satisfied _after_ testing libfdt Philippe Mathieu-Daudé
2017-07-26 21:53   ` Eric Blake
2017-07-27 21:46   ` Michael Roth
2017-07-26 21:40 ` [Qemu-devel] [PATCH for 2.10 3/4] fdt: probe for v1.4.2 using fdt_setprop_inplace_namelen_partial() Philippe Mathieu-Daudé
2017-07-27 21:43   ` Michael Roth
2017-07-27 22:45     ` Michael Roth
2017-07-26 21:40 ` Philippe Mathieu-Daudé [this message]
2017-07-26 21:47 ` [Qemu-devel] [PATCH for 2.10 0/4] check dtc submodule is outdated no-reply
2017-07-26 21:56   ` Eric Blake
2017-07-26 22:05     ` Philippe Mathieu-Daudé
2017-07-27  4:39 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170726214010.420-5-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aurelien@aurel32.net \
    --cc=crosthwaite.peter@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=yongbok.kim@imgtec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).