From patchwork Tue Sep 9 11:03:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 4868521 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 83DB59F32E for ; Tue, 9 Sep 2014 11:04:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E73732011E for ; Tue, 9 Sep 2014 11:04:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D62820115 for ; Tue, 9 Sep 2014 11:04:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756513AbaIILET (ORCPT ); Tue, 9 Sep 2014 07:04:19 -0400 Received: from smtp.mei.co.jp ([133.183.100.20]:55544 "EHLO smtp.mei.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932340AbaIILER (ORCPT ); Tue, 9 Sep 2014 07:04:17 -0400 Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile14) with ESMTP id s89B454P025662; Tue, 9 Sep 2014 20:04:05 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili16) with ESMTP id s89B45M17135; Tue, 9 Sep 2014 20:04:05 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi15) id s89B45gw023627; Tue, 9 Sep 2014 20:04:05 +0900 Received: from poodle by lomi15.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s89B455k023608; Tue, 9 Sep 2014 20:04:05 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 59D7A2740043; Tue, 9 Sep 2014 20:04:05 +0900 (JST) From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , Sam Ravnborg , "H. Peter Anvin" , Andi Kleen , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: simplify build, clean, modbuiltin shorthands Date: Tue, 9 Sep 2014 20:03:58 +0900 Message-Id: <1410260638-23559-1-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-9.4 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 $(if $(KBUILD_SRC),$(srctree)/) was a useful strategy to omit a long absolute path for in-source-tree build prior to commit 890676c65d699db3ad82e7dddd0cf8fb449031af (kbuild: Use relative path when building in the source tree). Now $(srctree) is "." when building in the source tree. It would not be annoying to add "$(srctree)/" all the time. Signed-off-by: Masahiro Yamada Acked-by: Peter Foley --- Makefile | 2 +- scripts/Kbuild.include | 4 ++-- scripts/Makefile.clean | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1a60bdd..f7b9174 100644 --- a/Makefile +++ b/Makefile @@ -1574,7 +1574,7 @@ endif # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir # Usage: # $(Q)$(MAKE) $(clean)=dir -clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj +clean := -f $(srctree)/scripts/Makefile.clean obj endif # skip-makefile diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 8a9a4e1..65e7b08 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -171,13 +171,13 @@ ld-ifversion = $(shell [ $(call ld-version) $(1) $(2) ] && echo $(3)) # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= # Usage: # $(Q)$(MAKE) $(build)=dir -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj +build := -f $(srctree)/scripts/Makefile.build obj ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= # Usage: # $(Q)$(MAKE) $(modbuiltin)=dir -modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj +modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj # Prefix -I with $(srctree) if it is not an absolute path. # skip if -I has no parameter diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index c630ab5..b1c668d 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -10,7 +10,7 @@ __clean: # Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir # Usage: # $(Q)$(MAKE) $(clean)=dir -clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj +clean := -f $(srctree)/scripts/Makefile.clean obj # The filename Kbuild has precedence over Makefile kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))