qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] configure: check for bison, flex before dtc submodule build
@ 2020-04-07 11:16 Claudio Fontana
  2020-04-07 11:20 ` Peter Maydell
  0 siblings, 1 reply; 8+ messages in thread
From: Claudio Fontana @ 2020-04-07 11:16 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: Peter Maydell, Alex Bennee, Claudio Fontana, qemu-devel

if fdt is required, and the system DTC (libfdt) is not usable,
check for the dtc submodule requirements before trying to build it,
and error out with a helpful message in case the dependencies are not met.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
 configure | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure b/configure
index 22870f3867..68b95b8e94 100755
--- a/configure
+++ b/configure
@@ -4276,6 +4276,14 @@ EOF
           git_submodules="${git_submodules} dtc"
       fi
       if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
+          for binary in ${BISON:-bison} ${LEX:-flex} ; do
+              if ! has $binary ; then
+                  error_exit "DTC (libfdt) version >= 1.4.2 not present on the system,\n" \
+                             "and using the dtc submodule replacement requires '${binary}'.\n" \
+                             "Please install the DTC (libfdt) devel package,\n" \
+                             "or the required binary '${binary}' to use the dtc submodule instead.\n"
+              fi
+          done
           fdt=git
           mkdir -p dtc
           if [ "$pwd_is_source_path" != "y" ] ; then
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-08  9:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-07 11:16 [PATCH] configure: check for bison, flex before dtc submodule build Claudio Fontana
2020-04-07 11:20 ` Peter Maydell
2020-04-07 15:21   ` Claudio Fontana
2020-04-08  1:57   ` David Gibson
2020-04-08  7:52     ` Claudio Fontana
2020-04-08  8:00       ` David Gibson
2020-04-08  8:08         ` Claudio Fontana
2020-04-08  8:36           ` David Gibson

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).