-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
# 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
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)
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
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,
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:
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]
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)