All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <iwj@xenproject.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Ian Jackson" <iwj@xenproject.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH v2 1/2][4.15] tools/x86: don't rebuild cpuid-autogen.h every time
Date: Fri, 12 Mar 2021 10:22:03 +0000	[thread overview]
Message-ID: <24651.16587.79927.894745@mariner.uk.xensource.com> (raw)
In-Reply-To: <1b8aee19-9194-153c-8dbb-0aec3412e255@suse.com>

Jan Beulich writes ("[PATCH v2 1/2][4.15] tools/x86: don't rebuild cpuid-autogen.h every time"):
> Ian did suggest to pass -0r to xargs (and -print0 to find), but I
> couldn't convince myself that these are standard compliant options. We
> don't use any special characters in file names, so -print0 / -0
> shouldn't be necessary at all. The stray rm invocation when there is no
> output from find can be taken care of by passing -f to it.

I addressed these portability questions in my original mail.

I said that I had checked FreeBSD find and xargs have all these
options.  I didn't check the other *BSDs but I see no reason to think
they would be different.

find -print0 and xargs -0 are not in SuS (for bad reasons) but these
are obviously necessary (unless one thinks people are supposed to use
  -exec printf "%s\n" '{}' \;
when the output is going to something more complicated an just some
command's arguments.

IOW we are IMO find to rely on both these options.

I would be OK with find -exec + in this case.  The {} must be quoted.

> --- a/tools/include/Makefile
> +++ b/tools/include/Makefile
> @@ -19,7 +19,7 @@ xen-foreign:
>  	$(MAKE) -C xen-foreign
>  
>  xen-dir:
> -	@rm -rf xen acpi
> +	find xen/ acpi/ -type l 2>/dev/null | xargs rm -f --

I disapprove of the 2>/dev/null and the -f because I disapprove of
suppressing.

Ian.


  parent reply	other threads:[~2021-03-12 10:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 14:38 [PATCH v2 0/2] tools/x86: adjust populating of tools/include/xen/ Jan Beulich
2021-03-11 14:40 ` [PATCH v2 1/2][4.15] tools/x86: don't rebuild cpuid-autogen.h every time Jan Beulich
2021-03-11 15:29   ` Roger Pau Monné
2021-03-11 16:00     ` Jan Beulich
2021-03-11 16:21       ` Roger Pau Monné
2021-03-12  8:45     ` Jan Beulich
2021-03-12  9:17       ` Roger Pau Monné
2021-03-12  9:22         ` Jan Beulich
2021-03-12 10:22   ` Ian Jackson [this message]
2021-03-11 14:40 ` [PATCH v2 2/2] tools/x86: move arch-specific include/xen/ population into arch-specific rule Jan Beulich
2021-03-12 10:24   ` Ian Jackson
2021-03-12 16:50 ` [PATCH v3][4.15] tools/x86: don't rebuild cpuid-autogen.h every time Jan Beulich
2021-03-12 16:59   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24651.16587.79927.894745@mariner.uk.xensource.com \
    --to=iwj@xenproject.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.