From patchwork Fri Sep 25 16:18:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 50141 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8PGLJbh013319 for ; Fri, 25 Sep 2009 16:21:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753241AbZIYQUz (ORCPT ); Fri, 25 Sep 2009 12:20:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753226AbZIYQUz (ORCPT ); Fri, 25 Sep 2009 12:20:55 -0400 Received: from goliath.siemens.de ([192.35.17.28]:21569 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753224AbZIYQUs (ORCPT ); Fri, 25 Sep 2009 12:20:48 -0400 Received: from mail2.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n8PGKcbY007722; Fri, 25 Sep 2009 18:20:38 +0200 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n8PGKb8F004511; Fri, 25 Sep 2009 18:20:37 +0200 From: Jan Kiszka Subject: [PATCH 7/9] Fix fragile kernelsourcedir construction To: Avi Kivity Cc: kvm@vger.kernel.org Date: Fri, 25 Sep 2009 18:18:01 +0200 Message-ID: <20090925161801.3328.31043.stgit@mchn012c.ww002.siemens.net> In-Reply-To: <20090925161801.3328.30406.stgit@mchn012c.ww002.siemens.net> References: <20090925161801.3328.30406.stgit@mchn012c.ww002.siemens.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org So far, passing --kerneldir=/some/kernel/build could cause broken kernel source paths as '/build' was incorrectly cut off. Use a smarter approach. Signed-off-by: Jan Kiszka --- configure | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/configure b/configure index e01ba98..533313e 100755 --- a/configure +++ b/configure @@ -91,7 +91,10 @@ arch=${arch%%-*} # see if we have split build and source directories if [ -d "$kerneldir/include2" ]; then - kernelsourcedir=${kerneldir%/*}/source + kernelsourcedir=$kerneldir/source + if [ ! -L "$kernelsourcedir" ]; then + kernelsourcedir=${kerneldir%/build*}/source + fi fi if [ -n "$no_uname" -a "$want_module" ]; then