Skip to contentSkip to conversation

kbuild: fix xargs error on make distclean

PATCH In review Fengguang Wu 2 participants 2 messages Oct 23, 2012 – Oct 25, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: fix xargs error on make distclean

/usr/bin/xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index bb9fff2..e5a64cc 100644
@@ -1033,7 +1033,7 @@ distclean: mrproper
 		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
 		-o -name '.*.rej' \
 		-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
-		-type f -print | xargs rm -f
+		-type f -print0 | xargs -0 rm -f
 
 
 # Packaging of the kernel to various formats
Signature · 1 line
1.7.10
#1 lore raw
Quoted 12 lines · Fengguang Wu

/usr/bin/xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index bb9fff2..e5a64cc 100644

Makefile distclean: mrproper · line 1036

Quoted 5 lines
Makefile +1 -1
@@ -1033,7 +1033,7 @@ distclean: mrproper
 		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
 		-o -name '.*.rej' \
 		-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
-		-type f -print | xargs rm -f
+		-type f -print0 | xargs -0 rm -f

As much as I like the find -print0 | xargs -0 construct, it is not portable unfortunately.

Michal