public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/counter: Makefile: Remove useless 'include' when make clean
@ 2023-04-21 11:47 Rong Tao
  2023-04-22 14:11 ` William Breathitt Gray
  0 siblings, 1 reply; 3+ messages in thread
From: Rong Tao @ 2023-04-21 11:47 UTC (permalink / raw)
  To: william.gray; +Cc: rongtao, open list:COUNTER SUBSYSTEM, open list

From: Rong Tao <rongtao@cestc.cn>

'make' create 'include' directory, we should remove it when 'make clean'.

Signed-off-by: Rong Tao <rongtao@cestc.cn>
---
 tools/counter/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/counter/Makefile b/tools/counter/Makefile
index 8843f0fa6119..e2475a1f10d8 100644
--- a/tools/counter/Makefile
+++ b/tools/counter/Makefile
@@ -39,7 +39,7 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
 
 clean:
 	rm -f $(ALL_PROGRAMS)
-	rm -rf $(OUTPUT)include/linux/counter.h
+	rm -rf $(OUTPUT)include
 	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
 
 install: $(ALL_PROGRAMS)
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/counter: Makefile: Remove useless 'include' when make clean
  2023-04-21 11:47 [PATCH] tools/counter: Makefile: Remove useless 'include' when make clean Rong Tao
@ 2023-04-22 14:11 ` William Breathitt Gray
  2023-04-22 14:31   ` Rong Tao
  0 siblings, 1 reply; 3+ messages in thread
From: William Breathitt Gray @ 2023-04-22 14:11 UTC (permalink / raw)
  To: Rong Tao; +Cc: rongtao, open list:COUNTER SUBSYSTEM, open list

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

Hi Rong,

This is a nitpick, but I think the word "lingering" is better than
"useless" for the title.

On Fri, Apr 21, 2023 at 07:47:25PM +0800, Rong Tao wrote:
> From: Rong Tao <rongtao@cestc.cn>
> 
> 'make' create 'include' directory, we should remove it when 'make clean'.

There are a few typos here, so I think you mean something like this:

    'make' creates the 'include' directory, so we should remove it on
    'make clean'.

> 
> Signed-off-by: Rong Tao <rongtao@cestc.cn>
> ---
>  tools/counter/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/counter/Makefile b/tools/counter/Makefile
> index 8843f0fa6119..e2475a1f10d8 100644
> --- a/tools/counter/Makefile
> +++ b/tools/counter/Makefile
> @@ -39,7 +39,7 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
>  
>  clean:
>  	rm -f $(ALL_PROGRAMS)
> -	rm -rf $(OUTPUT)include/linux/counter.h
> +	rm -rf $(OUTPUT)include

The Makefile actually first creates the 'include/linux' directory via
the `mkdir -p` command, and then creates a symbolic link for
'include/linux/counter.h'. It would be more appropriate instead to
unroll these actions here in the `clean` section:

    rm -rf $(OUTPUT)include/linux/counter.h
    rmdir -p $(OUTPUT)include/linux

William Breathitt Gray

>  	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
>  
>  install: $(ALL_PROGRAMS)
> -- 
> 2.40.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/counter: Makefile: Remove useless 'include' when make clean
  2023-04-22 14:11 ` William Breathitt Gray
@ 2023-04-22 14:31   ` Rong Tao
  0 siblings, 0 replies; 3+ messages in thread
From: Rong Tao @ 2023-04-22 14:31 UTC (permalink / raw)
  To: william.gray; +Cc: linux-iio, linux-kernel, rongtao, rtoax

Thanks, William. I submit v2, please review.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-22 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-21 11:47 [PATCH] tools/counter: Makefile: Remove useless 'include' when make clean Rong Tao
2023-04-22 14:11 ` William Breathitt Gray
2023-04-22 14:31   ` Rong Tao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox