From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425954AbdDUU4h (ORCPT ); Fri, 21 Apr 2017 16:56:37 -0400 Received: from smtprelay0006.hostedemail.com ([216.40.44.6]:44184 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1162540AbdDUU4e (ORCPT ); Fri, 21 Apr 2017 16:56:34 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:4321:5007:6120:10004:10400:10848:11026:11232:11473:11658:11914:12296:12740:12760:12895:13069:13255:13311:13357:13439:14659:14721:21080:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: milk79_1b075b6694a61 X-Filterd-Recvd-Size: 1727 Message-ID: <1492808184.30293.36.camel@perches.com> Subject: Re: [RFC PATCH 0/2] kbuild: use relative path from $(srctree) instead of __FILE__ From: Joe Perches To: Masahiro Yamada , 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 Date: Fri, 21 Apr 2017 13:56:24 -0700 In-Reply-To: <1492801407-26823-1-git-send-email-yamada.masahiro@socionext.com> References: <1492801407-26823-1-git-send-email-yamada.masahiro@socionext.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2017-04-22 at 04:03 +0900, Masahiro Yamada wrote: > 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. Good idea. Perhaps a lot of the in-tree __FILE__ uses should be KBUILD_BASENAME or another new type like KBUILD_PRETTY_FILE