Skip to contentSkip to conversation

kbuild: fix 'No such file or directory' warning when cleaning

PATCH In review Masahiro Yamada 1 participant 2 messages Dec 4, 2019 – Dec 5, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: fix 'No such file or directory' warning when cleaning

Since commit fcbb8461fd23 ("kbuild: remove header compile test"), 'make clean' with O= option in the pristine source tree emits 'No such file or directory' warning.

$ git clean -d -f -x
$ make O=foo clean
make[1]: Entering directory '/home/masahiro/linux/foo'
find: ‘usr/include’: No such file or directory
make[1]: Leaving directory '/home/masahiro/linux/foo'
Fixes fcbb8461fd23 ("kbuild: remove header compile test")

---

 usr/include/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
usr/include/Makefile +1 -1
index 24543a30b9f0..e5895a79c45f 100644
@@ -95,7 +95,7 @@ endif
 # asm-generic/*.h is used by asm/*.h, and should not be included directly
 header-test- += asm-generic/%
 
-extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h'))
+extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null))
 
 quiet_cmd_hdrtest = HDRTEST $<
       cmd_hdrtest = \
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Masahiro Yamada

Since commit fcbb8461fd23 ("kbuild: remove header compile test"), 'make clean' with O= option in the pristine source tree emits 'No such file or directory' warning.

$ git clean -d -f -x
$ make O=foo clean
make[1]: Entering directory '/home/masahiro/linux/foo'
find: ‘usr/include’: No such file or directory
make[1]: Leaving directory '/home/masahiro/linux/foo'
Quoted 4 lines
Fixes fcbb8461fd23 ("kbuild: remove header compile test")

---

Applied to linux-kbuild.

Quoted 19 lines
 usr/include/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
usr/include/Makefile +1 -2
index 24543a30b9f0..e5895a79c45f 100644
@@ -95,7 +95,7 @@ endif
 # asm-generic/*.h is used by asm/*.h, and should not be included directly
 header-test- += asm-generic/%
 
-extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h'))
+extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null))
 
 quiet_cmd_hdrtest = HDRTEST $<
       cmd_hdrtest = \
--

2.17.1

Signature · 2 lines
Best Regards
Masahiro Yamada