From 61f11056af686fde87a1b82936cf2a073b017b88 Mon Sep 17 00:00:00 2001 From: Phil Holmes Date: Sun, 4 Mar 2012 16:10:34 +0000 Subject: [PATCH] Various updates to reduce make doc output --- Documentation/GNUmakefile | 3 +- .../de/extending/scheme-tutorial.itely | 3 -- GNUmakefile.in | 4 --- make/abc-rules.make | 2 +- make/lilypond-book-rules.make | 2 +- make/lysdoc-rules.make | 1 - make/midi-rules.make | 4 +-- scripts/abc2ly.py | 36 ++++++++++++------- scripts/build/lys-to-tely.py | 2 -- scripts/midi2ly.py | 35 +++++++++--------- 10 files changed, 47 insertions(+), 45 deletions(-) diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 5f04dc880c..d798d3ce85 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -280,8 +280,7 @@ $(outdir)/ly-grammar.txt: $(top-src-dir)/lily/parser.yy # 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 # diff --git a/Documentation/de/extending/scheme-tutorial.itely b/Documentation/de/extending/scheme-tutorial.itely index 11a42bd60c..a4c5d1e4c6 100644 --- a/Documentation/de/extending/scheme-tutorial.itely +++ b/Documentation/de/extending/scheme-tutorial.itely @@ -761,9 +761,6 @@ Variable @code{twice} importiert: @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 diff --git a/GNUmakefile.in b/GNUmakefile.in index 2d22f9f378..0ad3c6e30b 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -120,10 +120,6 @@ WEB_TARGETS = offline 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}") \ diff --git a/make/abc-rules.make b/make/abc-rules.make index 876d54e4b5..39ca43b170 100644 --- a/make/abc-rules.make +++ b/make/abc-rules.make @@ -1,4 +1,4 @@ .SUFFIXES: .abc $(outdir)/%.ly: %.abc - $(PYTHON) $(ABC2LY) -o $@ $< + $(PYTHON) $(ABC2LY) --quiet -o $@ $< diff --git a/make/lilypond-book-rules.make b/make/lilypond-book-rules.make index b0cf7663b1..946e5a4759 100644 --- a/make/lilypond-book-rules.make +++ b/make/lilypond-book-rules.make @@ -26,7 +26,7 @@ $(outdir)/%.tex: %.latex # 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 ###################### diff --git a/make/lysdoc-rules.make b/make/lysdoc-rules.make index 001148aec2..11248f5030 100644 --- a/make/lysdoc-rules.make +++ b/make/lysdoc-rules.make @@ -3,7 +3,6 @@ # 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,$^)>>$@ diff --git a/make/midi-rules.make b/make/midi-rules.make index 7b3f149d96..18dcc17246 100644 --- a/make/midi-rules.make +++ b/make/midi-rules.make @@ -1,7 +1,7 @@ .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) @@ -10,7 +10,7 @@ $(outdir)/%.midi: %.ly $(LILYPOND_BINARY) $(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 $@ diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index 3a0aeaedab..d04068fa31 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -1313,8 +1313,9 @@ def parse_file (fn): 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: @@ -1360,7 +1361,8 @@ def parse_file (fn): 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 , Laura Conrad @@ -1381,16 +1383,21 @@ def get_option_parser (): 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') @@ -1410,12 +1417,14 @@ for f in files: 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 @@ -1428,4 +1437,5 @@ for f in files: dump_voices (outf) dump_score (outf) dump_lyrics (outf) - sys.stderr.write ('\n') + if not global_options.quiet: + sys.stderr.write ('\n') diff --git a/scripts/build/lys-to-tely.py b/scripts/build/lys-to-tely.py index a3bc4b576b..7a8684f194 100644 --- a/scripts/build/lys-to-tely.py +++ b/scripts/build/lys-to-tely.py @@ -163,11 +163,9 @@ if files: 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. diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py index 3a434193b0..bf9f09f26e 100644 --- a/scripts/midi2ly.py +++ b/scripts/midi2ly.py @@ -831,7 +831,8 @@ def dump_track (track, n): 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 @@ -1027,7 +1028,8 @@ def convert_midi (in_file, out_file): } ''' - 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 @@ -1050,27 +1052,30 @@ def get_option_parser (): 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', @@ -1083,15 +1088,13 @@ def get_option_parser (): 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') -- 2.39.2