From patchwork Fri Apr 21 19:03:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 97919 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp461499qgf; Fri, 21 Apr 2017 12:06:48 -0700 (PDT) X-Received: by 10.98.131.197 with SMTP id h188mr13610278pfe.99.1492801608841; Fri, 21 Apr 2017 12:06:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j88si11053203pfj.117.2017.04.21.12.06.48; Fri, 21 Apr 2017 12:06:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424551AbdDUTG0 (ORCPT + 13 others); Fri, 21 Apr 2017 15:06:26 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:26425 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424457AbdDUTGW (ORCPT ); Fri, 21 Apr 2017 15:06:22 -0400 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-09.nifty.com with ESMTP id v3LJ3vv3021371; Sat, 22 Apr 2017 04:04:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com v3LJ3vv3021371 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1492801444; bh=zL4x69Xug9QW/MhlmdFZspInvJQFs2YWgy5NsE0PTaI=; h=From:To:Cc:Subject:Date:From; b=bu0CzYgNbAJbsMANjTxMiPYI1HwmjjztPBP+4pYm0se8FZBGS2F8wZGr4ufHefCDQ mZ3V2jsIvrrtcwcD1YgomL3z4/EaAoI3f7G1uGdVwuVoz71XG+RvAMfZBg8BYRKXi0 9/pvP0GLPCoZ1h52rGVAPmoRQwiEW5frKA3AGUTU5yBm8Hs4oRAS609VeUdk83I8mC +LMb68GJBlugAeCySuBOSIE1lkWvjmQ7oW645DET8Lav7mwNx3mX4uwQbl47fl+2zp MuO0UNfyfimnkQxulLFkdvtSGNQnWAb84qys28smpihMeOpW6jNws03DNhxJbvmo2X lVjI8GnRv2lug== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Andrew Morton , Greg KH , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, x86@kernel.org, Michal Marek , Sam Ravnborg , Linus Torvalds , Masahiro Yamada Subject: [RFC PATCH 0/2] kbuild: use relative path from $(srctree) instead of __FILE__ Date: Sat, 22 Apr 2017 04:03:25 +0900 Message-Id: <1492801407-26823-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kbuild works in objtree, not in srctree. So, __FILE__ is prefixed with $(srctree)/ for out-of-tree build. It would be nice to see the same log regardless in-tree, or out-of-tree build. 1/2 adds a new macro KBUILD_FILE. This points the relative path of the file we are building. This is intended to replace __FILE__. 2/2 replaces __FILE__ in bug.h as an example. This will improve the output of WARN_ON() etc. Masahiro Yamada (2): kbuild: add KBUILD_FILE to point relative file path from $(srctree) bug.h: replace __FILE__ with KBUILD_FILE for shorter names in log arch/alpha/include/asm/bug.h | 2 +- arch/arc/include/asm/bug.h | 2 +- arch/arm/include/asm/bug.h | 4 ++-- arch/arm64/include/asm/bug.h | 2 +- arch/avr32/include/asm/bug.h | 2 +- arch/blackfin/include/asm/bug.h | 2 +- arch/cris/include/arch-v10/arch/bug.h | 6 +++--- arch/cris/include/arch-v32/arch/bug.h | 2 +- arch/frv/include/asm/bug.h | 2 +- arch/ia64/include/asm/bug.h | 2 +- arch/m68k/include/asm/bug.h | 4 ++-- arch/mn10300/include/asm/bug.h | 2 +- arch/parisc/include/asm/bug.h | 4 ++-- arch/powerpc/include/asm/bug.h | 8 ++++---- arch/s390/include/asm/bug.h | 2 +- arch/score/include/asm/bug.h | 4 ++-- arch/sh/include/asm/bug.h | 8 ++++---- arch/sparc/include/asm/bug.h | 2 +- arch/x86/include/asm/bug.h | 2 +- include/asm-generic/bug.h | 8 ++++---- scripts/Kbuild.include | 4 ++++ scripts/Makefile.lib | 5 +++-- 22 files changed, 42 insertions(+), 37 deletions(-) -- 2.7.4