From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] include: parallelize compat/xlat.h generation
Date: Fri, 28 Feb 2014 17:06:32 +0000 [thread overview]
Message-ID: <5310C218.7050300@gmail.com> (raw)
In-Reply-To: <5310CE9C02000078001204D7@nat28.tlf.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1810 bytes --]
Jan Beulich wrote:
>
> Splitting this up into pieces signficantly speeds up building on multi-
> CPU systems when making use of make's -j option.
>
> Signed-off-by: Jan Beulich<jbeulich@suse.com>
Yes, very welcome!
Acked-by: Keir Fraser <keir@xen.org>
>
> --- a/xen/include/Makefile
> +++ b/xen/include/Makefile
> @@ -66,14 +66,24 @@ compat/%.c: public/%.h xlat.lst Makefile
> $(PYTHON) $(BASEDIR)/tools/compat-build-source.py>$@.new
> mv -f $@.new $@
>
> -compat/xlat.h: xlat.lst $(filter-out compat/xlat.h,$(headers-y))
> $(BASEDIR)/tools/get-fields.sh Makefile
> +compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst
> $(BASEDIR)/tools/get-fields.sh Makefile
> export PYTHON=$(PYTHON); \
> - grep -v '^[ ]*#' xlat.lst | \
> - while read what name hdr; do \
> - hdr="compat/$$(echo $$hdr | sed 's,@arch@,$(compat-arch-y),g')"; \
> - echo '$(headers-y)' | grep -q "$$hdr" || continue; \
> - $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $$hdr
> || exit $$?; \
> - done>$@.new
> + while read what name; do \
> + $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< ||
> exit $$?; \
> + done<$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst>$@.new
> + mv -f $@.new $@
> +
> +.PRECIOUS: compat/.xlat/%.lst
> +compat/.xlat/%.lst: xlat.lst Makefile
> + mkdir -p $(@D)
> + grep -v '^[ \t]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -e
> 's,[ \t]\+$*\.h[ \t]*$$,,p'>$@.new
> + $(call move-if-changed,$@.new,$@)
> +
> +xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -e 's,^[?!][
> \t]\+[^ \t]\+[ \t]\+,,p' xlat.lst | uniq)
> +xlat-y := $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y))
> +
> +compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) Makefile
> + cat $(filter %.h,$^)>$@.new
> mv -f $@.new $@
>
> ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
>
>
[-- Attachment #1.2: Type: text/html, Size: 2174 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2014-02-28 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 16:59 [PATCH] include: parallelize compat/xlat.h generation Jan Beulich
2014-02-28 17:06 ` Keir Fraser [this message]
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=5310C218.7050300@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@suse.com \
--cc=keir@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 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).