Skip to content

Commit aead781

Browse files
tuananhlfcWilliam Breathitt Gray
authored andcommitted
tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure
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: 228354e ("tools/counter: Makefile: Remove lingering 'include' directories on make clean") Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com> Link: https://lore.kernel.org/r/d4080db5-1825-2848-079a-8bb674d8ee44@gmail.com/ Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
1 parent 272ffb9 commit aead781

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/counter/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ $(OUTPUT)counter_example: $(COUNTER_EXAMPLE)
4040
clean:
4141
rm -f $(ALL_PROGRAMS)
4242
rm -rf $(OUTPUT)include/linux/counter.h
43-
rmdir -p $(OUTPUT)include/linux
43+
rm -df $(OUTPUT)include/linux
44+
rm -df $(OUTPUT)include
4445
find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
4546

4647
install: $(ALL_PROGRAMS)

0 commit comments

Comments
 (0)