# compilation during install, which is a bad thing (tm).
$(outdir)/internals.texi: $(LILYPOND_BINARY)
- cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
-
+ cd $(outdir) && $(buildscript-dir)/run-and-check "$(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation" "generate-documentation.log"
###############################################
# Documentation and translations maintenance #
@lilypond[verbatim]
traLaLa = { c'4 d'4 }
-%% dummy action to deal with parser lookahead
-#(display "this needs to be here, sorry!")
-
#(define newLa (map ly:music-deep-copy
(list traLaLa traLaLa)))
#(define twice
WEB_ROOT_FILES = $(WEB_TARGETS:%=$(outdir)/%-root/index.html)
-WEB_EXAMPLE_FILES = $(wildcard input/$(outdir)/*.ly) \
- $(wildcard input/*/$(outdir)/*.ly) \
- $(wildcard input/*/*/$(outdir)/*.ly)
-
WEB_TRACKED_FILES = $(filter-out $(outdir)/index.html, \
$(shell bash -O nullglob -c "echo $(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}")) \
$(shell bash -O nullglob -c "echo input/$(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}") \
.SUFFIXES: .abc
$(outdir)/%.ly: %.abc
- $(PYTHON) $(ABC2LY) -o $@ $<
+ $(PYTHON) $(ABC2LY) --quiet -o $@ $<
# Add the tex => pdf rule only if we have pdflatex
ifeq (,$(findstring pdflatex,$(MISSING_OPTIONAL)))
$(outdir)/%.pdf: $(outdir)/%.tex
- cd $(outdir) && $(PDFLATEX) $(notdir $<)
+ cd $(outdir) && $(buildscript-dir)/run-and-check "$(PDFLATEX) -halt-on-error $(notdir $<)" "$*.pdflatex.log"
endif
############## Texinfo ######################
# Split it up into 10 300-element chunks, and one chunk containing the rest
# if we have more than 3000 elements.
$(outdir)/collated-files.list: $(COLLATED_FILES)
- echo "(Re-)Generating $@"
@echo $(wordlist 1, 299,$^)>$@
@echo $(wordlist 300, 599,$^)>>$@
@echo $(wordlist 600, 899,$^)>>$@
.SUFFIXES: .midi
$(outdir)/%.ly: %.midi
- $(PYTHON) $(MIDI2LY) -o $(outdir) $<
+ $(PYTHON) $(MIDI2LY) --quiet -o $(outdir) $<
$(outdir)/%.midi: %.ly $(LILYPOND_BINARY)
touch $(foreach f, $(HEADER_FIELDS), $(outdir)/$*.$f)
$(outdir)/%-midi.ly: $(outdir)/%.midi $(MIDI2LY)
(echo '\header {'; for f in $(HEADER_FIELDS); do echo -n $$f'="'; cat $(outdir)/$*.$$f; echo '"'; done; echo '}') > $(outdir)/$*.header
- $(PYTHON) $(MIDI2LY) $(shell cat $(outdir)/$*.options) --include-header=$(outdir)/$*.header -o $(outdir) $<
+ $(PYTHON) $(MIDI2LY) $(shell cat $(outdir)/$*.options) --quiet --include-header=$(outdir)/$*.header -o $(outdir) $<
$(outdir)/%.diff: %.ly $(outdir)/%-midi.ly
$(DIFF) -puN $(MIDI2LY_IGNORE_RES) $^ > $@ || cat $@
select_voice('default', '')
global lineno
lineno = 0
- sys.stderr.write ("Line ... ")
- sys.stderr.flush ()
+ if not global_options.quiet:
+ sys.stderr.write ("Line ... ")
+ sys.stderr.flush ()
__main__.state = state_list[current_voice_idx]
for ln in ls:
def identify():
- sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version))
+ if not global_options.quiet:
+ sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version))
authors = """
Written by Han-Wen Nienhuys <hanwen@xs4all.nl>, Laura Conrad
p.add_option("--version",
action="version",
help=_ ("show version number and exit"))
-
p.add_option("-h", "--help",
action="help",
help=_ ("show this help and exit"))
- p.add_option ('-o', '--output', metavar='FILE',
- help=_ ("write output to FILE"),
- action='store')
- p.add_option ('-s', '--strict', help=_ ("be strict about success"),
- action='store_true')
- p.add_option ('-b', '--beams', help=_ ("preserve ABC's notion of beams"), action="store_true")
+ p.add_option ("-o", "--output", metavar='FILE',
+ action="store",
+ help=_ ("write output to FILE"))
+ p.add_option ("-s", "--strict",
+ action="store_true",
+ help=_ ("be strict about success"))
+ p.add_option ('-b', '--beams',
+ action="store_true",
+ help=_ ("preserve ABC's notion of beams"))
+ p.add_option ('-q', '--quiet',
+ action="store_true",
+ help=_ ("suppress progress messages"))
p.add_option_group ('',
description=(
_ ('Report bugs via %s')
if f == '-':
f = ''
- sys.stderr.write ('Parsing `%s\'...\n' % f)
+ if not global_options.quiet:
+ sys.stderr.write ('Parsing `%s\'...\n' % f)
parse_file (f)
if not global_options.output:
global_options.output = os.path.basename (os.path.splitext (f)[0]) + ".ly"
- sys.stderr.write ('lilypond output to: `%s\'...' % global_options.output)
+ if not global_options.quiet:
+ sys.stderr.write ('lilypond output to: `%s\'...' % global_options.output)
outf = open (global_options.output, 'w')
# don't substitute @VERSION@. We want this to reflect
dump_voices (outf)
dump_score (outf)
dump_lyrics (outf)
- sys.stderr.write ('\n')
+ if not global_options.quiet:
+ sys.stderr.write ('\n')
s = "\n".join (map (name2line, files))
s = template.replace (include_snippets, s, 1)
f = "%s/%s" % (dir, name)
- sys.stderr.write ("%s: writing %s..." % (program_name, f))
h = open (f, "w")
h.write (s)
h.close ()
- sys.stderr.write ('\n')
else:
# not Unix philosophy, but hey, at least we notice when
# we don't distribute any .ly files.
if vl:
s += ' \\voice' + vl + '\n'
else:
- warning (_ ('found more than 5 voices on a staff, expect bad output'))
+ if not global_options.quiet:
+ warning (_ ('found more than 5 voices on a staff, expect bad output'))
s += ' ' + dump_voice (voice, skip)
s += '}\n\n'
v += 1
}
'''
- progress (_ ("%s output to `%s'...") % ('LY', out_file))
+ if not global_options.quiet:
+ progress (_ ("%s output to `%s'...") % ('LY', out_file))
if out_file == '-':
handle = sys.stdout
metavar=_ ('DUR'),
help=_ ('quantise note durations on DUR'))
p.add_option ('-D', '--debug',
- action='store_true',
- help=_ ('debug printing'))
+ action='store_true',
+ help=_ ('debug printing'))
p.add_option ('-e', '--explicit-durations',
action='store_true',
help=_ ('print explicit durations'))
p.add_option('-h', '--help',
- action='help',
- help=_ ('show this help and exit'))
+ action='help',
+ help=_ ('show this help and exit'))
p.add_option('-i', '--include-header',
- help=_ ('prepend FILE to output'),
- action='append',
- default=[],
- metavar=_ ('FILE'))
+ help=_ ('prepend FILE to output'),
+ action='append',
+ default=[],
+ metavar=_ ('FILE'))
p.add_option('-k', '--key', help=_ ('set key: ALT=+sharps|-flats; MINOR=1'),
- metavar=_ ('ALT[:MINOR]'),
- default=None),
+ metavar=_ ('ALT[:MINOR]'),
+ default=None),
p.add_option ('-o', '--output', help=_ ('write output to FILE'),
metavar=_ ('FILE'),
action='store')
p.add_option ('-p', '--preview', help=_ ('preview of first 4 bars'),
action='store_true')
+ p.add_option ('-q', '--quiet',
+ action="store_true",
+ help=_ ("suppress progress messages and warnings about excess voices"))
p.add_option ('-s', '--start-quant',help= _ ('quantise note starts on DUR'),
metavar=_ ('DUR'))
p.add_option ('-S', '--skip',
help=_ ('allow tuplet durations DUR*NUM/DEN'),
default=[])
p.add_option ('-V', '--verbose', help=_ ('be verbose'),
- action='store_true'
- ),
+ action='store_true')
p.version = 'midi2ly (LilyPond) @TOPLEVEL_VERSION@'
p.add_option ('--version',
action='version',
help=_ ('show version number and exit'))
p.add_option ('-w', '--warranty', help=_ ('show warranty and copyright'),
- action='store_true',
- ),
+ action='store_true',)
p.add_option ('-x', '--text-lyrics', help=_ ('treat every text as a lyric'),
action='store_true')