Skip to content

Commit

Permalink
spi: spidev_test: Remove hidden temporary file when make clean
Browse files Browse the repository at this point in the history
In the current code, it only removes *.o and .*.o.d file when make clean,
there still exists useless .*.o.cmd file, just remove it.

Without this patch:

[yangtiezhu@linux spi]$ make
[yangtiezhu@linux spi]$ make clean
[yangtiezhu@linux spi]$ ls -1 .*.o.cmd
.spidev_fdx-in.o.cmd
.spidev_fdx.o.cmd
.spidev_test-in.o.cmd
.spidev_test.o.cmd

With this patch:

[yangtiezhu@linux spi]$ make
[yangtiezhu@linux spi]$ make clean
[yangtiezhu@linux spi]$ ls -1 .*.o.cmd
ls: cannot access .*.o.cmd: No such file or directory

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Link: https://lore.kernel.org/r/1586230512-5507-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Tiezhu Yang authored and broonie committed Apr 14, 2020
1 parent cb75b0c commit 0b93dd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/spi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ $(OUTPUT)spidev_fdx: $(SPIDEV_FDX_IN)
clean:
rm -f $(ALL_PROGRAMS)
rm -rf $(OUTPUT)include/
find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete
find $(if $(OUTPUT),$(OUTPUT),.) -name '\.*.o.d' -delete
find $(if $(OUTPUT),$(OUTPUT),.) -name '\.*.o.cmd' -delete

install: $(ALL_PROGRAMS)
install -d -m 755 $(DESTDIR)$(bindir); \
Expand Down

0 comments on commit 0b93dd9

Please sign in to comment.