From: Phil Holmes Date: Sun, 4 Dec 2011 16:08:35 +0000 (+0000) Subject: Initial reduction of make doc op - Issue 2075 X-Git-Tag: release/2.15.23-1~16 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=06aadb4af78fb061726d9f91ab7e2bb52eab59e8;p=lilypond.git Initial reduction of make doc op - Issue 2075 Some initial changes to implement Issue 2075 --- diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index cf1bc11203..57cddb16ee 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -55,13 +55,13 @@ $(LANG_TEXIDOC_FLAGS) \ -danti-alias-factor=$(ANTI_ALIAS_FACTOR) ifdef QUIET_BUILD -LILYPOND_BOOK_VERBOSE = +LILYPOND_BOOK_WARN = --loglevel=NONE else -LILYPOND_BOOK_VERBOSE = --verbose +LILYPOND_BOOK_WARN = --loglevel=WARN endif LILYPOND_BOOK_INFO_IMAGES_DIR = $(if $(INFO_IMAGES_DIR),--info-images-dir=$(INFO_IMAGES_DIR),) -LILYPOND_BOOK_FLAGS = $(LILYPOND_BOOK_VERBOSE) $(LILYPOND_BOOK_INFO_IMAGES_DIR) +LILYPOND_BOOK_FLAGS = $(LILYPOND_BOOK_WARN) $(LILYPOND_BOOK_INFO_IMAGES_DIR) ifeq ($(out),) LILYPOND_BOOK_PROCESS = true diff --git a/make/ly-rules.make b/make/ly-rules.make index 0df0643ee3..a876b04f18 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -22,11 +22,11 @@ $(eval $(firstword $(TEXI_FILES_FROM_TELY)):\ # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir. # it is not, for --srcdir builds $(outdir)/%.texi: %.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES) - LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< + LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) --redirect-lilypond-output $< $(outdir)/%.texi: $(outdir)/%.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES) - LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< + LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) --redirect-lilypond-output $< $(outdir)/%.html.omf: %.tely diff --git a/make/lysdoc-targets.make b/make/lysdoc-targets.make index e39fa1c58b..5290e3962f 100644 --- a/make/lysdoc-targets.make +++ b/make/lysdoc-targets.make @@ -16,6 +16,6 @@ local-test: echo -e '\n\n\n' ; \ (cd $(top-src-dir) && git diff ) ; \ fi > $(outdir)/tree.gittxt - $(MAKE) LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-lily-fonts --header=texidoc -I $(top-src-dir)/Documentation/included/ -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= $(outdir)/collated-files.html LYS_OUTPUT_DIR=$(top-build-dir)/out/lybook-testdb + $(MAKE) LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-lily-fonts --header=texidoc -I $(top-src-dir)/Documentation/included/ -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_WARN= $(outdir)/collated-files.html LYS_OUTPUT_DIR=$(top-build-dir)/out/lybook-testdb rsync -L -a --exclude 'out-*' --exclude 'out' --exclude mf --exclude source --exclude mf $(top-build-dir)/out/share $(outdir) diff --git a/python/lilylib.py b/python/lilylib.py index 7a36a8aaac..0f33ed4a2c 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -179,7 +179,7 @@ def subprocess_system (cmd, error_log_file = '' if redirect_output: - progress (_ ("Processing %s.ly") % log_file) + progress (_ ("Processing %s.ly \n") % log_file) else: if be_verbose: show_progress = 1 @@ -193,9 +193,7 @@ def subprocess_system (cmd, stdout_setting = subprocess.PIPE if redirect_output: - stdout_filename = ' '.join([log_file, '.log']) - stderr_filename = ' '.join([log_file, '.err.log']) - stdout_setting = open(stdout_filename, 'w') + stderr_filename = log_file + '.log' stderr_setting = open(stderr_filename, 'w') proc = subprocess.Popen (cmd, @@ -208,9 +206,8 @@ def subprocess_system (cmd, if redirect_output: while proc.poll()==None: - time.sleep(1) + time.sleep(0.01) retval = proc.returncode - stdout_setting.close() stderr_setting.close() else: if show_progress: @@ -227,7 +224,7 @@ def subprocess_system (cmd, print >>sys.stderr, "Child returned", retval if ignore_error: - print >>sys.stderr, "Error ignored" + print >>sys.stderr, "Error ignored by lilylib" else: if not show_progress: print log[0] diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 69156d715e..78e9130b07 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -380,11 +380,19 @@ def system_in_directory (cmd, directory, logfile): current = os.getcwd() os.chdir (directory) - ly.system(cmd, + """NB - ignore_error is deliberately set to the same value + as redirect_output - this is not a typo.""" + retval = ly.system(cmd, be_verbose=ly.is_verbose (), redirect_output=global_options.redirect_output, log_file=logfile, - progress_p=1) + progress_p=1, + ignore_error=global_options.redirect_output) + if retval != 0: + print ("Error trapped by lilypond-book") + print ("\nPlease see " + logfile + ".log\n") + sys.exit(1) + os.chdir (current)