All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Anh Tuan Phan <tuananhlfc@gmail.com>,
	william.gray@linaro.org,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] tools/counter: Add checking directory exists for make clean
Date: Thu, 13 Jul 2023 13:42:24 -0600	[thread overview]
Message-ID: <8a14a99d-ce54-4fe3-ab42-e41f002080ce@linuxfoundation.org> (raw)
In-Reply-To: <362e127d-6018-5fc6-247b-3c729b99d946@gmail.com>

On 7/7/23 08:08, Anh Tuan Phan wrote:
> rmdir requires the directory exist so it causes "make -C tools clean"
> failed if someone only builds other tools but not counter. This commit
> adds checking the directory exist before doing rmdir.
> 
> Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com>
> ---
>   tools/counter/Makefile | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/counter/Makefile b/tools/counter/Makefile
> index a0f4cab71fe5..2907f3b3094b 100644
> --- a/tools/counter/Makefile
> +++ b/tools/counter/Makefile
> @@ -40,7 +40,9 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
>   clean:
>   	rm -f $(ALL_PROGRAMS)
>   	rm -rf $(OUTPUT)include/linux/counter.h
> -	rmdir -p $(OUTPUT)include/linux
> +	@if [ -d $(OUTPUT)include/linux ]; then \
> +		rmdir -p $(OUTPUT)include/linux; \
> +	fi
>   	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
> 
>   install: $(ALL_PROGRAMS)

Please cc appropriate linux kernel mailing lists and reviewers.
You can find them by running get_maintainers.pl script.

thanks,
-- Shuah


_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  parent reply	other threads:[~2023-07-13 19:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 14:08 [PATCH] tools/counter: Add checking directory exists for make clean Anh Tuan Phan
2023-07-10  1:07 ` William Breathitt Gray
2023-07-10  1:07   ` William Breathitt Gray
2023-07-14 13:57   ` Anh Tuan Phan
2023-07-14 13:57     ` Anh Tuan Phan
2023-07-14 11:34     ` William Breathitt Gray
2023-07-14 11:34       ` William Breathitt Gray
2023-07-13 19:42 ` Shuah Khan [this message]
2023-07-14 13:59   ` 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=8a14a99d-ce54-4fe3-ab42-e41f002080ce@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=tuananhlfc@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.