[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <939391580.17560.1443895503898.JavaMail.zimbra@efficios.com>
Date: Sat, 3 Oct 2015 18:05:03 +0000 (UTC)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Josh Triplett <josh@...htriplett.org>
Cc: dvhart <dvhart@...radead.org>,
Wang Long <long.wanglong@...wei.com>, shuahkh@....samsung.com,
Michael Ellerman <mpe@...erman.id.au>, keescook@...omium.org,
davem@...emloft.net, luto@...capital.net, wad@...omium.org,
Andrew Morton <akpm@...ux-foundation.org>,
gorcunov <gorcunov@...nvz.org>, cov@...eaurora.org,
bobby prani <bobby.prani@...il.com>,
tyler baker <tyler.baker@...aro.org>,
Tim Bird <tim.bird@...ymobile.com>,
Andrea Arcangeli <aarcange@...hat.com>,
andrej skvortzov <andrej.skvortzov@...il.com>,
sjayaram <sjayaram@...mai.com>, treding@...dia.com,
Ingo Molnar <mingo@...nel.org>,
naresh kamboju <naresh.kamboju@...aro.org>,
alexey kodanev <alexey.kodanev@...cle.com>,
linux-api <linux-api@...r.kernel.org>,
linux-kernel@...r.kernel.org, wanglong <wanglong@...qinren.net>
Subject: Re: [PATCH] kselftest: replace $(RM) with rm -f command
----- On Oct 3, 2015, at 1:55 PM, Josh Triplett josh@...htriplett.org wrote:
> On Sat, Oct 03, 2015 at 02:11:57PM +0000, Mathieu Desnoyers wrote:
>> ----- On Oct 3, 2015, at 12:38 AM, dvhart dvhart@...radead.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@...wei.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?
Yes, it does. I was merely showing this as an example where
it can be useful to override the command name, although I don't
expect anyone to have to use "grm" rather than "rm" on that
specific platform.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists