From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi <stefanha@gmail.com>,
patches@linaro.org
Subject: [Qemu-devel] [PATCH v2] configure: Don't create symlinks to nonexistent targets
Date: Wed, 25 May 2011 18:30:17 +0100 [thread overview]
Message-ID: <1306344617-1645-1-git-send-email-peter.maydell@linaro.org> (raw)
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>
---
v2: Remove the debug printing. Oops.
configure | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index a318d37..a648f3d 100755
--- a/configure
+++ b/configure
@@ -3564,7 +3564,9 @@ 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
+ symlink "$source_path/$f" "$f"
+ fi
done
# temporary config to build submodules
--
1.7.1
next reply other threads:[~2011-05-25 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 17:30 Peter Maydell [this message]
2011-05-25 17:49 ` [Qemu-devel] [PATCH v2] configure: Don't create symlinks to nonexistent targets Stefan Weil
2011-05-25 20:05 ` Paolo Bonzini
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=1306344617-1645-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@gmail.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).