All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: Don't create symlinks to nonexistent targets
@ 2011-05-25 17:20 Peter Maydell
  0 siblings, 0 replies; only message in thread
From: Peter Maydell @ 2011-05-25 17:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, patches

When we create the symlinks to source tree files, don't create them
if the file is not actually present in the source tree; this will
happen if the file is in a git submodule that wasn't checked out.

This also avoids the odd effect where an in-source-tree configure
will end up creating the missing file as a symlink to itself.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index a318d37..e4d29d9 100755
--- a/configure
+++ b/configure
@@ -3564,7 +3564,10 @@ for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.rom $source_p
 done
 mkdir -p $DIRS
 for f in $FILES ; do
-    test -e $f || symlink $source_path/$f $f
+    if [ -e "$source_path/$f" -a ! -e "$f" ]; then
+        echo "symlinking $source_path/$f $f"
+        symlink "$source_path/$f" "$f"
+    fi
 done
 
 # temporary config to build submodules
-- 
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-25 17:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 17:20 [Qemu-devel] [PATCH] configure: Don't create symlinks to nonexistent targets Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.