From patchwork Fri May 9 12:52:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 4143071 Return-Path: X-Original-To: patchwork-linux-kbuild@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 E9EFE9F1E1 for ; Fri, 9 May 2014 12:53:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E8D920171 for ; Fri, 9 May 2014 12:53:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27D86201FA for ; Fri, 9 May 2014 12:53:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756201AbaEIMwm (ORCPT ); Fri, 9 May 2014 08:52:42 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44005 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755778AbaEIMwl (ORCPT ); Fri, 9 May 2014 08:52:41 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 529F6AD32; Fri, 9 May 2014 12:52:40 +0000 (UTC) Received: by sepie.suse.cz (Postfix, from userid 10020) id 1B71D40806; Fri, 9 May 2014 14:52:40 +0200 (CEST) From: Michal Marek To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Sam Ravnborg Subject: [PATCH v2 3/5] kbuild: Use relative path for $(objtree) Date: Fri, 9 May 2014 14:52:22 +0200 Message-Id: <1399639944-20551-4-git-send-email-mmarek@suse.cz> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1399639944-20551-1-git-send-email-mmarek@suse.cz> References: <1399639944-20551-1-git-send-email-mmarek@suse.cz> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The main Makefile sets its working directory to the object tree and never changes it again. Therefore, we can use '.' instead of the absolute path. The only case where we need the absolute path is when creating the 'build' symlink in /lib/modules. Acked-by: Sam Ravnborg Signed-off-by: Michal Marek --- v1->v2: Fix the 'build' symlink Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 60ccbfe..480503a 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ _all: modules endif srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) -objtree := $(CURDIR) +objtree := . src := $(srctree) obj := $(objtree) @@ -1057,7 +1057,7 @@ _modinst_: @ln -s $(srctree) $(MODLIB)/source @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ rm -f $(MODLIB)/build ; \ - ln -s $(objtree) $(MODLIB)/build ; \ + ln -s $(CURDIR) $(MODLIB)/build ; \ fi @cp -f $(objtree)/modules.order $(MODLIB)/ @cp -f $(objtree)/modules.builtin $(MODLIB)/