From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750949AbbJCRzr (ORCPT ); Sat, 3 Oct 2015 13:55:47 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:58987 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbbJCRzp (ORCPT ); Sat, 3 Oct 2015 13:55:45 -0400 X-Originating-IP: 50.43.35.112 Date: Sat, 3 Oct 2015 10:55:28 -0700 From: Josh Triplett To: Mathieu Desnoyers Cc: dvhart , Wang Long , shuahkh@osg.samsung.com, Michael Ellerman , keescook@chromium.org, davem@davemloft.net, luto@amacapital.net, wad@chromium.org, Andrew Morton , gorcunov , cov@codeaurora.org, bobby prani , tyler baker , Tim Bird , Andrea Arcangeli , andrej skvortzov , sjayaram , treding@nvidia.com, Ingo Molnar , naresh kamboju , alexey kodanev , linux-api , linux-kernel@vger.kernel.org, wanglong Subject: Re: [PATCH] kselftest: replace $(RM) with rm -f command Message-ID: <20151003175528.GA4455@x> References: <20150925154415.GC38748@vmdeb7> <1443406217-137773-1-git-send-email-long.wanglong@huawei.com> <1201012824.5792.1443410213729.JavaMail.zimbra@efficios.com> <20151003043808.GA90454@vmdeb7> <1486799898.16862.1443881517178.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1486799898.16862.1443881517178.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 03, 2015 at 02:11:57PM +0000, Mathieu Desnoyers wrote: > ----- On Oct 3, 2015, at 12:38 AM, dvhart dvhart@infradead.org wrote: > > > On Mon, Sep 28, 2015 at 03:16:53AM +0000, Mathieu Desnoyers wrote: > >> ----- On Sep 27, 2015, at 10:10 PM, Wang Long long.wanglong@huawei.com wrote: > >> > >> > Some test's Makefile using "$(RM)" while the other's > >> > using "rm -f". It is better to use one of them in all > >> > tests. > >> > >> I agree that this disparity appears to be unwanted. We > >> should settle on one or the other. > >> > >> > > >> > "rm -f" is better, because it is less magic, and everyone > >> > konws what is does. > >> > >> "$(RM)" is clearly defined as a Makefile implicit variable > >> which defaults to "rm -f". > >> Ref. https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html > >> > >> Leaving it as a variable is more flexible because then the > >> default behavior can be overridden if need be, which is > >> not the case of a hardcoded "rm -f". > >> > >> Following your line of argumentation, we should then > >> invoke "gcc" directly in every Makefile because it is > >> less magic than "$(CC)". This makes no sense. > > > > I don't think they can be compared so simply. Specifying a compiler is a common > > use case. Customizing the rm command is not, in my experience anyway, and like > > Michael, I would definately have to look up what RM means. > > > > That said, I care more about consistency than which is used. Both are valid, but > > $(RM), while more flexible, will cost more people time to look up what it does > > as it isn't commonly used than any benefit we're likely to see from its use. > > > > Meh. :-) > > An example is "grm" when you install the opencsw repository > packages on Solaris. In the unlikely example where someone > would have a Solaris machine to build Linux, overriding > various command names, including "rm", can be useful. This > is just one example, there are probably others. Does Solaris rm not support -f?