linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix xargs error on make distclean
@ 2012-10-23  1:32 Fengguang Wu
  2012-10-25 13:41 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Fengguang Wu @ 2012-10-23  1:32 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Michal Marek, LKML

/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
 
 
 # Packaging of the kernel to various formats
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: fix xargs error on make distclean
  2012-10-23  1:32 [PATCH] kbuild: fix xargs error on make distclean Fengguang Wu
@ 2012-10-25 13:41 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2012-10-25 13:41 UTC (permalink / raw)
  To: Fengguang Wu; +Cc: linux-kbuild, LKML

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-25 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23  1:32 [PATCH] kbuild: fix xargs error on make distclean Fengguang Wu
2012-10-25 13:41 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).