From patchwork Fri Jun 24 16:56:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 101851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E51E7B6F87 for ; Sat, 25 Jun 2011 04:20:54 +1000 (EST) Received: from localhost ([::1]:50594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaAzp-00022B-Mw for incoming@patchwork.ozlabs.org; Fri, 24 Jun 2011 14:20:49 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa9hD-0004R7-IF for qemu-devel@nongnu.org; Fri, 24 Jun 2011 12:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qa9hB-0001UG-9O for qemu-devel@nongnu.org; Fri, 24 Jun 2011 12:57:30 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:64284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa9hA-0001QQ-Ma for qemu-devel@nongnu.org; Fri, 24 Jun 2011 12:57:28 -0400 Received: by mail-fx0-f45.google.com with SMTP id 12so94133fxg.4 for ; Fri, 24 Jun 2011 09:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=O6aT03rEc6DvGKuSDd913zu9vRtusYUKMm/Q6/8EkOM=; b=AClvitqn4f/UxxVvNfH5OayCO96OOzUjSs168lwG2T2NlFnrfUAFsi8zMet89FqTjz G4ali5SloGGpmHNpQK/Jr5mdGhInzH2z7E4c5MY0ERfdfDDiBCp2x1UfBte/BQPOOjlQ QIaZQo2AbyQs/HG4lJl4L55UtIHBZ5U9GFv6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=TLHkfuHjMaRx1CmpiRP77wOJvKhERRQl323wH16WBILhYGcOti0Ismb1hRXZaRRbsh R75Uw9ECZ68jjTPBkBf2vk/XN9OudCw+OOXEAQtmRy5cvtMEoLKlyXk9jUX1nUi/S50m J+jKPW+OvS/mnEjjO87H6ObowaH6qhM/ix2Eg= Received: by 10.223.160.131 with SMTP id n3mr4688199fax.111.1308934648185; Fri, 24 Jun 2011 09:57:28 -0700 (PDT) Received: from localhost.localdomain (gbibp9ph1--blueice3n2.emea.ibm.com [195.212.29.84]) by mx.google.com with ESMTPS id h28sm1763884faj.5.2011.06.24.09.57.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 09:57:27 -0700 (PDT) From: Stefan Hajnoczi To: Date: Fri, 24 Jun 2011 17:56:37 +0100 Message-Id: <1308934609-20824-2-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1308934609-20824-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1308934609-20824-1-git-send-email-stefanha@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.45 Cc: Peter Maydell , Anthony Liguori , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 01/13] configure: Don't create symlinks to nonexistent targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Maydell 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 Signed-off-by: Stefan Hajnoczi --- configure | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 856b41e..4fa9a57 100755 --- a/configure +++ b/configure @@ -3479,7 +3479,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