From: Anh Tuan Phan <tuananhlfc@gmail.com>
To: william.gray@linaro.org, rongtao@cestc.cn, ricardo@pardini.net
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees
<linux-kernel-mentees@lists.linuxfoundation.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: [PATCH v2] tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure
Date: Sun, 16 Jul 2023 22:44:56 +0700 [thread overview]
Message-ID: <d4080db5-1825-2848-079a-8bb674d8ee44@gmail.com> (raw)
Use rm -df instead of rmdir -p since rmdir requires the directory exist
so it causes "make -C tools clean" failed if someone only builds other
tools but not counter.
Fixes: 228354ed692f ("tools/counter: Makefile: Remove lingering
'include' directories on make clean")
Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com>
---
Changes from v1:
- Use rm -df instead of checking the directory exists
- Add Fixes tag
- Update the patch title
Reference:
- v1:
https://lore.kernel.org/all/362e127d-6018-5fc6-247b-3c729b99d946@gmail.com/
---
tools/counter/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/counter/Makefile b/tools/counter/Makefile
index a0f4cab71fe5..b2c2946f44c9 100644
--- a/tools/counter/Makefile
+++ b/tools/counter/Makefile
@@ -40,7 +40,8 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
clean:
rm -f $(ALL_PROGRAMS)
rm -rf $(OUTPUT)include/linux/counter.h
- rmdir -p $(OUTPUT)include/linux
+ rm -df $(OUTPUT)include/linux
+ rm -df $(OUTPUT)include
find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
install: $(ALL_PROGRAMS)
--
2.34.1
next reply other threads:[~2023-07-16 15:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-16 15:44 Anh Tuan Phan [this message]
2023-07-21 13:10 ` [PATCH v2] tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure William Breathitt Gray
2023-07-23 15:01 ` Anh Tuan Phan
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=d4080db5-1825-2848-079a-8bb674d8ee44@gmail.com \
--to=tuananhlfc@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ricardo@pardini.net \
--cc=rongtao@cestc.cn \
--cc=skhan@linuxfoundation.org \
--cc=william.gray@linaro.org \
/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