All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com,
	samuel.thibault@ens-lyon.org
Subject: Re: [PATCH v2] stubdom: modify ioemu linkfarm only if necessary
Date: Tue, 13 Dec 2016 15:15:36 +0000	[thread overview]
Message-ID: <20161213151536.GU25175@citrix.com> (raw)
In-Reply-To: <20161213135827.31212-1-jgross@suse.com>

On Tue, Dec 13, 2016 at 02:58:27PM +0100, Juergen Gross wrote:
> Several stubdom libraries are being rebuilt each time a top level make
> is called as they depend on stubdom/ioemu/linkfarm.stamp which is
> depending on tools/qemu-xen-traditional-dir. Unfortunately this
> directory is modified by each "make tools" call.
> 
> This can be avoided by writing stubdom/ioemu/linkfarm.stamp only if
> a source file beneath tools/qemu-xen-traditional-dir has been added
> or removed.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

though ...

> ---
> V2: maintain a list of the to be linked files in linkfarm.stamp and
>     rebuild this list at each make call for detecting any change
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>  stubdom/Makefile | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index bc49cfe..38f1688 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -298,9 +298,13 @@ ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir
>  	(cd $$src && find *	! -type l  -type f  $(addprefix ! -name ,	\
>  			'*.[oda1]' 'config-*' config.mak qemu-dm qemu-img-xen	\
>  			'*.html' '*.pod'					\
> -			)) |							\
> -	    while read f; do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done
> -	touch ioemu/linkfarm.stamp
> +			)) >linkfarm.stamp.tmp;				\
> +	cmp linkfarm.stamp.tmp linkfarm.stamp 2>/dev/null &&		\

I think we want 'cmp -s' here.

> +		rm linkfarm.stamp.tmp || {				\
> +		mv linkfarm.stamp.tmp linkfarm.stamp;			\
> +		cat linkfarm.stamp | while read f;			\
> +			do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done;	\
> +	}
>  else
>  export QEMU_ROOT
>  
> -- 
> 2.10.2
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-12-13 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 13:58 [PATCH v2] stubdom: modify ioemu linkfarm only if necessary Juergen Gross
2016-12-13 15:15 ` Wei Liu [this message]
2016-12-13 15:24   ` Juergen Gross
2016-12-13 15:27     ` Wei Liu

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=20161213151536.GU25175@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=jgross@suse.com \
    --cc=samuel.thibault@ens-lyon.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.