From patchwork Wed Jun 14 10:48:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Knut Omang X-Patchwork-Id: 9786109 X-Patchwork-Delegate: ira.weiny@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C2CF60384 for ; Wed, 14 Jun 2017 10:48:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C3E0285BE for ; Wed, 14 Jun 2017 10:48:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80D3D285EE; Wed, 14 Jun 2017 10:48:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06F10285BE for ; Wed, 14 Jun 2017 10:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752243AbdFNKso (ORCPT ); Wed, 14 Jun 2017 06:48:44 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:43331 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbdFNKsm (ORCPT ); Wed, 14 Jun 2017 06:48:42 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5EAmeP0026989 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Jun 2017 10:48:40 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v5EAme67017142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Jun 2017 10:48:40 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v5EAmdno000692; Wed, 14 Jun 2017 10:48:39 GMT Received: from abi.no.oracle.com (/10.172.144.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Jun 2017 03:48:39 -0700 From: Knut Omang To: Ira Weiny Cc: linux-rdma@vger.kernel.org, Knut Omang Subject: [PATCH infiniband-diags] Fix the gen_chlog.sh script to support builds in a separate directory Date: Wed, 14 Jun 2017 12:48:24 +0200 Message-Id: <20170614104824.21599-1-knut.omang@oracle.com> X-Mailer: git-send-email 2.9.4 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Configuring and building in a separate directory breaks because gen_chlog.sh assumes it runs from the git tree. Instead of making this assumption, rather assume the more generic, that the gen_chlog.sh script itself is located in the top sourcedir. With this fix configuring and building in a separate tree from the source tree works. Signed-off-by: Knut Omang --- gen_chlog.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gen_chlog.sh b/gen_chlog.sh index 34dfa24..59a9e1f 100755 --- a/gen_chlog.sh +++ b/gen_chlog.sh @@ -10,6 +10,8 @@ if [ "$1" = "--spec" ] ; then spec_format=1 fi +cd `dirname $0` + GIT_DIR=`git rev-parse --git-dir 2>/dev/null` test -z "$GIT_DIR" && usage