diff mbox

kbuild: fix xargs error on make distclean

Message ID 20121023013257.GA21775@localhost (mailing list archive)
State New, archived
Headers show

Commit Message

Fengguang Wu Oct. 23, 2012, 1:32 a.m. UTC
/usr/bin/xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Marek Oct. 25, 2012, 1:41 p.m. UTC | #1
On 23.10.2012 03:32, Fengguang Wu wrote:
> /usr/bin/xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>  Makefile |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index bb9fff2..e5a64cc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Makefile b/Makefile
index bb9fff2..e5a64cc 100644
--- a/Makefile
+++ b/Makefile
@@ -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