diff mbox series

tools: iio: rm .*.cmd when make clean

Message ID 20240829053309.10563-1-zhangjiao2@cmss.chinamobile.com (mailing list archive)
State Accepted
Headers show
Series tools: iio: rm .*.cmd when make clean | expand

Commit Message

zhangjiao2 Aug. 29, 2024, 5:33 a.m. UTC
From: zhangjiao <zhangjiao2@cmss.chinamobile.com>

rm .*.cmd when make clean

Signed-off-by: zhangjiao <zhangjiao2@cmss.chinamobile.com>
---
 tools/iio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron Aug. 31, 2024, 10:59 a.m. UTC | #1
On Thu, 29 Aug 2024 13:33:09 +0800
zhangjiao2 <zhangjiao2@cmss.chinamobile.com> wrote:

> From: zhangjiao <zhangjiao2@cmss.chinamobile.com>
> 
> rm .*.cmd when make clean
Where do those come from? 

> 
> Signed-off-by: zhangjiao <zhangjiao2@cmss.chinamobile.com>
> ---
>  tools/iio/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
> index fa720f062229..3bcce0b7d10f 100644
> --- a/tools/iio/Makefile
> +++ b/tools/iio/Makefile
> @@ -58,7 +58,7 @@ $(OUTPUT)iio_generic_buffer: $(IIO_GENERIC_BUFFER_IN)
>  clean:
>  	rm -f $(ALL_PROGRAMS)
>  	rm -rf $(OUTPUT)include/linux/iio
> -	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
> +	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete -o -name '\.*.cmd' -delete
>  
>  install: $(ALL_PROGRAMS)
>  	install -d -m 755 $(DESTDIR)$(bindir);		\
zhangjiao2 Sept. 2, 2024, 3:54 a.m. UTC | #2
From: zhangjiao <zhangjiao2@cmss.chinamobile.com>

Hi

On Sat, 31 Aug 2024 11:59:31, Jonathan Cameron wrote:
>> On Thu, 29 Aug 2024 13:33:09 +0800
>> zhangjiao2 <zhangjiao2@cmss.chinamobile.com> wrote:
>> From: zhangjiao <zhangjiao2@cmss.chinamobile.com>
>> 
>> rm .*.cmd when make clean
> Where do those come from?
	Those come from tools/build/Build.include.
These .*.cmd files ware created when make.
So clean them when make clean.
>> Signed-off-by: zhangjiao <zhangjiao2@cmss.chinamobile.com>
>> ---
>>  tools/iio/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
>> index fa720f062229..3bcce0b7d10f 100644
>> --- a/tools/iio/Makefile
>> +++ b/tools/iio/Makefile
>> @@ -58,7 +58,7 @@ $(OUTPUT)iio_generic_buffer: $(IIO_GENERIC_BUFFER_IN)
>>  clean:
>>  	rm -f $(ALL_PROGRAMS)
>>  	rm -rf $(OUTPUT)include/linux/iio
>> -	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
>> +	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete -o -name '\.*.cmd' -delete
>>  
>>  install: $(ALL_PROGRAMS)
>>  	install -d -m 755 $(DESTDIR)$(bindir);		\
Jonathan Cameron Sept. 3, 2024, 7:09 p.m. UTC | #3
On Mon,  2 Sep 2024 11:54:12 +0800
zhangjiao2 <zhangjiao2@cmss.chinamobile.com> wrote:

> From: zhangjiao <zhangjiao2@cmss.chinamobile.com>
> 
> Hi
> 
> On Sat, 31 Aug 2024 11:59:31, Jonathan Cameron wrote:
> >> On Thu, 29 Aug 2024 13:33:09 +0800
> >> zhangjiao2 <zhangjiao2@cmss.chinamobile.com> wrote:
> >> From: zhangjiao <zhangjiao2@cmss.chinamobile.com>
> >> 
> >> rm .*.cmd when make clean  
> > Where do those come from?  
> 	Those come from tools/build/Build.include.
> These .*.cmd files ware created when make.
> So clean them when make clean.
Hmm. I'm still a little curious about the path to those getting created as
I don't see them. when testing.

Ah well, I don't feel strongly about it and I'm sure there is
something to make them appear

Applied.

Thanks,

Jonathan

> >> Signed-off-by: zhangjiao <zhangjiao2@cmss.chinamobile.com>
> >> ---
> >>  tools/iio/Makefile | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
> >> index fa720f062229..3bcce0b7d10f 100644
> >> --- a/tools/iio/Makefile
> >> +++ b/tools/iio/Makefile
> >> @@ -58,7 +58,7 @@ $(OUTPUT)iio_generic_buffer: $(IIO_GENERIC_BUFFER_IN)
> >>  clean:
> >>  	rm -f $(ALL_PROGRAMS)
> >>  	rm -rf $(OUTPUT)include/linux/iio
> >> -	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
> >> +	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete -o -name '\.*.cmd' -delete
> >>  
> >>  install: $(ALL_PROGRAMS)
> >>  	install -d -m 755 $(DESTDIR)$(bindir);		\
Andy Shevchenko Sept. 3, 2024, 10:43 p.m. UTC | #4
Tue, Sep 03, 2024 at 08:09:23PM +0100, Jonathan Cameron kirjoitti:
> On Mon,  2 Sep 2024 11:54:12 +0800
> zhangjiao2 <zhangjiao2@cmss.chinamobile.com> wrote:
> > On Sat, 31 Aug 2024 11:59:31, Jonathan Cameron wrote:
> > >> On Thu, 29 Aug 2024 13:33:09 +0800
> > >> zhangjiao2 <zhangjiao2@cmss.chinamobile.com> wrote:

...

> > >> rm .*.cmd when make clean  
> > > Where do those come from?  
> > 	Those come from tools/build/Build.include.
> > These .*.cmd files ware created when make.
> > So clean them when make clean.
> Hmm. I'm still a little curious about the path to those getting created as
> I don't see them. when testing.

At least this is documented here
https://elixir.bootlin.com/linux/v6.11-rc6/source/tools/build/Documentation/Build.txt#L149

Here is where they are being created
https://elixir.bootlin.com/linux/v6.11-rc6/source/tools/build/Build.include#L58

And it seems it is only created when there are actual dependencies.
diff mbox series

Patch

diff --git a/tools/iio/Makefile b/tools/iio/Makefile
index fa720f062229..3bcce0b7d10f 100644
--- a/tools/iio/Makefile
+++ b/tools/iio/Makefile
@@ -58,7 +58,7 @@  $(OUTPUT)iio_generic_buffer: $(IIO_GENERIC_BUFFER_IN)
 clean:
 	rm -f $(ALL_PROGRAMS)
 	rm -rf $(OUTPUT)include/linux/iio
-	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
+	find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete -o -name '\.*.cmd' -delete
 
 install: $(ALL_PROGRAMS)
 	install -d -m 755 $(DESTDIR)$(bindir);		\