package/linux-tools: perf: ditch redundant -f 'rm' flag
PATCH 1/2 package/linux-tools: perf: ditch redundant -f 'rm' flag
The value of the RM variable in make is 'rm -f', thus the additional -f is redundant.
--- package/linux-tools/linux-tool-perf.mk.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/linux-tools/linux-tool-perf.mk.in +2 -2
@@ -166,8 +166,8 @@ endef # target unless BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS is enabled ifeq ($(BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS),) define PERF_INSTALL_REMOVE_SCRIPTS - $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/ - $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/ + $(RM) -r $(TARGET_DIR)/usr/libexec/perf-core/scripts/ + $(RM) -r $(TARGET_DIR)/usr/libexec/perf-core/tests/ endef endif
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 docs/manual: ditch redundant -f 'rm' flag
The value of the RM variable in make is 'rm -f', thus the additional -f is redundant. Avoid it on the docs to avoid developers taking it as a good example to follow.
--- docs/manual/writing-rules.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
docs/manual/writing-rules.txt +3 -3
@@ -78,7 +78,7 @@ Do not align the +=+ signs. + --------------------- define LIBFOO_REMOVE_DOC - $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \ + $(RM) -r $(TARGET_DIR)/usr/share/libfoo/doc \ $(TARGET_DIR)/usr/share/man/man3/libfoo* endef ---------------------
@@ -118,7 +118,7 @@ YES: --------------------- ifneq ($(BR2_LIBFOO_INSTALL_DATA),y) define LIBFOO_REMOVE_DATA - $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data + $(RM) -r $(TARGET_DIR)/usr/share/libfoo/data endef LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA endif
@@ -128,7 +128,7 @@ NO: + --------------------- define LIBFOO_REMOVE_DATA - $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data + $(RM) -r $(TARGET_DIR)/usr/share/libfoo/data endef ifneq ($(BR2_LIBFOO_INSTALL_DATA),y)
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH 2/2] docs/manual: ditch redundant -f 'rm' flag
Luca, All,
On 2023-03-27 16:11 +0200, Luca Ceresoli spake thusly:
Quoted 5 lines
The value of the RM variable in make is 'rm -f', thus the additional -f is redundant. Avoid it on the docs to avoid developers taking it as a good example to follow.
Signed-off-by Luca Ceresoli <[email protected]>
Applied to master, thanks.
Will you send a tree-wide cleanup, now? ;-)
$ git grep -E '\$\(RM\) -r?f' |wc -l
47Regards,
Yann E. MORIN.
Quoted 38 lines
--- docs/manual/writing-rules.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)docs/manual/writing-rules.txt +3
-3@@ -78,7 +78,7 @@ Do not align the +=+ signs. + --------------------- define LIBFOO_REMOVE_DOC - $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \ + $(RM) -r $(TARGET_DIR)/usr/share/libfoo/doc \ $(TARGET_DIR)/usr/share/man/man3/libfoo* endef ---------------------@@ -118,7 +118,7 @@ YES: --------------------- ifneq ($(BR2_LIBFOO_INSTALL_DATA),y) define LIBFOO_REMOVE_DATA - $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data + $(RM) -r $(TARGET_DIR)/usr/share/libfoo/data endef LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA endif@@ -128,7 +128,7 @@ NO: + --------------------- define LIBFOO_REMOVE_DATA - $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data + $(RM) -r $(TARGET_DIR)/usr/share/libfoo/data endef ifneq ($(BR2_LIBFOO_INSTALL_DATA),y)Signature · 1 line
2.34.1
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] docs/manual: ditch redundant -f 'rm' flag
Hi Yann,
Quoted 9 lines · On Tue, 28 Mar 2023 21:38:49 +0200 "Yann E. MORIN" <[email protected]>…
Luca, All,
On 2023-03-27 16:11 +0200, Luca Ceresoli spake thusly:
Quoted 5 lines
The value of the RM variable in make is 'rm -f', thus the additional -f is redundant. Avoid it on the docs to avoid developers taking it as a good example to follow.
Signed-off-by Luca Ceresoli <[email protected]>
Quoted 7 lines
Applied to master, thanks.
Will you send a tree-wide cleanup, now? ;-)
$ git grep -E '\$\(RM\) -r?f' |wc -l 47
I think I will leave it as an exercise for the motivated party. ;)
Signature · 7 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] docs/manual: ditch redundant -f 'rm' flag
In reply to Luca Ceresoli via buildrootQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Luca" == Luca Ceresoli via buildroot <[email protected]> writes:
The value of the RM variable in make is 'rm -f', thus the additional -f is redundant. Avoid it on the docs to avoid developers taking it as a good example to follow.
Signed-off-by Luca Ceresoli <[email protected]>
Committed to 2023.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Luca, All,
On 2023-03-27 16:11 +0200, Luca Ceresoli spake thusly:
Quoted 2 lines
The value of the RM variable in make is 'rm -f', thus the additional -f is redundant.
I've added a pointer to the documentation:
https://www.gnu.org/software/make/manual/make.html#index-RM
Quoted 1 line
Signed-off-by Luca Ceresoli <[email protected]>
Both applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 22 lines
--- package/linux-tools/linux-tool-perf.mk.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/linux-tools/linux-tool-perf.mk.in +2
-2@@ -166,8 +166,8 @@ endef # target unless BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS is enabled ifeq ($(BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS),) define PERF_INSTALL_REMOVE_SCRIPTS - $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/ - $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/ + $(RM) -r $(TARGET_DIR)/usr/libexec/perf-core/scripts/ + $(RM) -r $(TARGET_DIR)/usr/libexec/perf-core/tests/ endef endifSignature · 1 line
2.34.1
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Luca" == Luca Ceresoli via buildroot <[email protected]> writes:
The value of the RM variable in make is 'rm -f', thus the additional -f is redundant.
Signed-off-by Luca Ceresoli <[email protected]>
Committed to 2023.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot