From patchwork Mon Mar 9 12:08:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 5966581 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B662EBF440 for ; Mon, 9 Mar 2015 12:05:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EABDE2025A for ; Mon, 9 Mar 2015 12:05:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E6B772021A for ; Mon, 9 Mar 2015 12:05:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 216D96E4E7; Mon, 9 Mar 2015 05:05:14 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by gabe.freedesktop.org (Postfix) with ESMTP id EC05E6E400 for ; Mon, 9 Mar 2015 05:05:11 -0700 (PDT) Received: by wggy19 with SMTP id y19so10466770wgg.2 for ; Mon, 09 Mar 2015 05:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GYEA5LoHJiGEfm0SKUeDjpBVz/tyat3Syvmi02U2aHo=; b=zGNb8pJE03zRBq04A1SIxeRMHsdVi8zHZBtzC/P8HbR3ZhRiJ1Bv2iEa4RitFCvJ8K JzhyiPSmVQihbSrBUiZScmRWZ70i8A2Wrhjc3WG+eYGAKP7UxTxHYxKoY5/zEFFXJ6S2 rlck3MQfhOwyPyghABM82FklKK4jKNyb7T9YPHeqr2LypCKqkVcC7DhTBc7kSWT4QLaO HfyM3iHbK6dxNvExTB0cGfZY1H9zmH0e2PpM07uqPcOYLmYdpfo7hR4+fKL93L8GlLlO MIQjdOnJziEP/cXYR6MCvBsB6cA8PP3iB2hIyS/v18X9DzlPfNsDZeHfWCXb+oiviX+g UqCg== X-Received: by 10.194.48.12 with SMTP id h12mr58736085wjn.74.1425902711174; Mon, 09 Mar 2015 05:05:11 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by mx.google.com with ESMTPSA id dz6sm15261375wib.0.2015.03.09.05.05.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Mar 2015 05:05:10 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 2/2] autogen.sh: handle out-of-tree invokation Date: Mon, 9 Mar 2015 12:08:17 +0000 Message-Id: <1425902897-13398-2-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1425902897-13398-1-git-send-email-emil.l.velikov@gmail.com> References: <1425902897-13398-1-git-send-email-emil.l.velikov@gmail.com> Cc: emil.l.velikov@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Emil Velikov --- autogen.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh index 30d679f..c896097 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,14 @@ #! /bin/sh -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. -autoreconf --force --install --verbose "$srcdir" -test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" +srcdir=`dirname "$0"` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd "$srcdir" + +autoreconf --force --verbose --install || exit 1 +cd "$ORIGDIR" || exit $? + +if test -z "$NOCONFIGURE"; then + "$srcdir"/configure "$@" +fi