[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] include: parallelize compat/xlat.h generation
commit 7e9009891688202a7ffb63761b94e9ae0a53795a Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Mar 4 11:03:13 2014 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Mar 4 11:03:13 2014 +0100 include: parallelize compat/xlat.h generation 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@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> --- xen/include/Makefile | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 5f2bcf7..d6f0cf7 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -66,14 +66,24 @@ compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-source.py $(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)) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |