Received: from eggs.gnu.org ([140.186.70.92]:40993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSWxY-0006Vt-71 for qemu-devel@nongnu.org; Fri, 03 Jun 2011 12:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSWxW-0000E3-KH for qemu-devel@nongnu.org; Fri, 03 Jun 2011 12:10:51 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:33579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSWxW-0000D8-2e for qemu-devel@nongnu.org; Fri, 03 Jun 2011 12:10:50 -0400 From: Peter Maydell Date: Fri, 3 Jun 2011 17:10:40 +0100 Message-Id: <1307117440-18655-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v3] configure: Don't create symlinks to nonexistent targets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , patches@linaro.org 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 --- v1->v2: remove debug printing v2->v3: don't use test constructs marked by POSIX as obsolete, as pointed out by Paolo Bonzini configure | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure b/configure index a318d37..7f8ad24 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" ] && ! [ -e "$f" ]; then + symlink "$source_path/$f" "$f" + fi done # temporary config to build submodules -- 1.7.1