From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: dvhart <dvhart@infradead.org>,
Wang Long <long.wanglong@huawei.com>,
shuahkh@osg.samsung.com, Michael Ellerman <mpe@ellerman.id.au>,
keescook@chromium.org, davem@davemloft.net, luto@amacapital.net,
wad@chromium.org, Andrew Morton <akpm@linux-foundation.org>,
gorcunov <gorcunov@openvz.org>,
cov@codeaurora.org, bobby prani <bobby.prani@gmail.com>,
tyler baker <tyler.baker@linaro.org>,
Tim Bird <tim.bird@sonymobile.com>,
Andrea Arcangeli <aarcange@redhat.com>,
andrej skvortzov <andrej.skvortzov@gmail.com>,
sjayaram <sjayaram@akamai.com>,
treding@nvidia.com, Ingo Molnar <mingo@kernel.org>,
naresh kamboju <naresh.kamboju@linaro.org>,
alexey kodanev <alexey.kodanev@oracle.com>,
linux-api <linux-api@vger.kernel.org>,
linux-kernel@vger.kernel.org, wanglong <wanglong@laoqinren.net>
Subject: Re: [PATCH] kselftest: replace $(RM) with rm -f command
Date: Sat, 3 Oct 2015 18:05:03 +0000 (UTC) [thread overview]
Message-ID: <939391580.17560.1443895503898.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20151003175528.GA4455@x>
----- On Oct 3, 2015, at 1:55 PM, Josh Triplett josh@joshtriplett.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@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?
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
next prev parent reply other threads:[~2015-10-03 18:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150925154415.GC38748@vmdeb7>
2015-09-28 2:10 ` [PATCH] kselftest: replace $(RM) with rm -f command Wang Long
[not found] ` <1443406217-137773-1-git-send-email-long.wanglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-09-28 3:16 ` Mathieu Desnoyers
[not found] ` <1201012824.5792.1443410213729.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-09-29 9:57 ` Michael Ellerman
[not found] ` <1443520665.11041.1.camel-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2015-09-29 11:21 ` [PATCH] kselftest: replace rm -f command with $(RM) Wang Long
2015-09-29 17:45 ` [PATCH] kselftest: replace $(RM) with rm -f command Kees Cook
2015-10-03 4:38 ` Darren Hart
2015-10-03 14:11 ` Mathieu Desnoyers
[not found] ` <1486799898.16862.1443881517178.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-10-03 17:55 ` Josh Triplett
2015-10-03 18:05 ` Mathieu Desnoyers [this message]
2015-09-28 7:26 ` Yuan Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=939391580.17560.1443895503898.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexey.kodanev@oracle.com \
--cc=andrej.skvortzov@gmail.com \
--cc=bobby.prani@gmail.com \
--cc=cov@codeaurora.org \
--cc=davem@davemloft.net \
--cc=dvhart@infradead.org \
--cc=gorcunov@openvz.org \
--cc=josh@joshtriplett.org \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=long.wanglong@huawei.com \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=naresh.kamboju@linaro.org \
--cc=shuahkh@osg.samsung.com \
--cc=sjayaram@akamai.com \
--cc=tim.bird@sonymobile.com \
--cc=treding@nvidia.com \
--cc=tyler.baker@linaro.org \
--cc=wad@chromium.org \
--cc=wanglong@laoqinren.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).