q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0a252c4463c8d3d2e72c7b23ab7429775afd126b
commit 0a252c4463c8d3d2e72c7b23ab7429775afd126b Author: Daniel Kolesa <[email protected]> Date: Fri Mar 3 17:43:19 2017 +0100 docgen: add a simple script that does doc generation in parallel --- src/Makefile_Elua.am | 1 + src/scripts/elua/apps/gendoc.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/src/Makefile_Elua.am b/src/Makefile_Elua.am index d743e6c..bd1da51 100644 --- a/src/Makefile_Elua.am +++ b/src/Makefile_Elua.am @@ -59,6 +59,7 @@ eluaappsdir = $(datadir)/elua/apps eluaapps_DATA = \ scripts/elua/apps/lualian.lua \ scripts/elua/apps/gendoc.lua \ + scripts/elua/apps/gendoc.sh \ scripts/elua/apps/README-docgen.md EXTRA_DIST2 += $(eluaapps_DATA) diff --git a/src/scripts/elua/apps/gendoc.sh b/src/scripts/elua/apps/gendoc.sh new file mode 100755 index 0000000..780652b --- /dev/null +++ b/src/scripts/elua/apps/gendoc.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# a parallel doc generation script + +# exit on failure +set -e + +gendoc() { + elua gendoc.lua --pass $@ +} + +gendoc rm $@ +gendoc ref $@ + +# limit jobs otherwise stuff starts complaining in eldbus etc +MAXJ=192 + +I=0 +for cl in $(gendoc clist $@); do + gendoc "$cl" $@ & + I=$(($I + 1)) + if [ $I -gt $MAXJ ]; then + I=0 + # wait for the batch to finish + wait + fi +done + +# wait for all remaining stuff to finish +wait + +gendoc types $@ & +gendoc vars $@ & + +# types and vars run in parallel +wait + +# final results +gendoc stats $@ + +exit 0 --
