From patchwork Thu Dec 11 13:11:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lahtinen, Joonas" X-Patchwork-Id: 5475971 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E26DF9F1D4 for ; Thu, 11 Dec 2014 13:13:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 157F12017D for ; Thu, 11 Dec 2014 13:13:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BF2FA20173 for ; Thu, 11 Dec 2014 13:13:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F394C6E818; Thu, 11 Dec 2014 05:13:11 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 104D56E818 for ; Thu, 11 Dec 2014 05:13:10 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 11 Dec 2014 05:11:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,557,1413270000"; d="scan'208";a="622166590" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga001.jf.intel.com with ESMTP; 11 Dec 2014 05:11:39 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by IRSMSX102.ger.corp.intel.com ([169.254.2.213]) with mapi id 14.03.0195.001; Thu, 11 Dec 2014 13:11:38 +0000 From: "Lahtinen, Joonas" To: "intel-gfx@lists.freedesktop.org" Thread-Topic: Fix out of tree build of version.h Thread-Index: AQHQFUP/igQNHik6mU+UCZcoJEfa6Q== Date: Thu, 11 Dec 2014 13:11:38 +0000 Message-ID: <1418303497.2867.3.camel@jlahtine-mobl1.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.7.54] Content-ID: <14E77040C26C2C40AEEEE065C9B22809@intel.com> MIME-Version: 1.0 Cc: "Wood, Thomas" Subject: [Intel-gfx] lib: Fix out of tree build of version.h X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Currently out of tree build fails because the version.h.tmp is generated into the source directory instead of the build directory where it is later looked for. This commit fixes it. From 2c0617e21101d69e7219c6660936c0015f93f8ee Mon Sep 17 00:00:00 2001 From: Joonas Lahtinen Date: Thu, 11 Dec 2014 15:05:11 +0200 Subject: [PATCH] lib: Fix out of tree build of version.h Write the version.h.tmp file into the build directory instead of source directory. This allows out of tree building when those two are not the same. Signed-off-by: Joonas Lahtinen --- lib/Makefile.sources | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 1.7.9.5 --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. diff --git a/lib/Makefile.sources b/lib/Makefile.sources index 819b21a..34a3d31 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -55,16 +55,16 @@ libintel_tools_la_SOURCES = \ $(IGT_LIB_PATH)/version.h.tmp: @touch $@ @if test -d $(GPU_TOOLS_PATH)/.git; then \ - if which git > /dev/null 2>&1; then cd $(@D); \ + if which git > /dev/null 2>&1; then \ + cd $(GPU_TOOLS_PATH); \ git log -n 1 --oneline | \ - sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' \ - >> $(@F) ; \ + sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' ; \ else \ - echo '#define IGT_GIT_SHA1 "NO-GIT"' >> $@ ; \ + echo '#define IGT_GIT_SHA1 "NO-GIT"' ; \ fi \ else \ - echo '#define IGT_GIT_SHA1 "NOT-GIT"' >> $@ ; \ - fi + echo '#define IGT_GIT_SHA1 "NOT-GIT"' ; \ + fi >> $@ $(IGT_LIB_PATH)/version.h: $(IGT_LIB_PATH)/version.h.tmp