From: Han-Wen Nienhuys Date: Tue, 2 Jan 2007 13:43:28 +0000 (+0100) Subject: Merge branch 'master-git.sv.gnu.org-lilypond.git' of /home/lilydev/vc/gub/downloads... X-Git-Tag: release/2.11.8-1~41 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7b3cd88d662454aac42797912d2dc0b7b36700fe;hp=4636871eb1553366d92750f1dc7aeb8012bb81a0;p=lilypond.git Merge branch 'master-git.sv.gnu.org-lilypond.git' of /home/lilydev/vc/gub/downloads/lilypond --- diff --git a/.gitignore b/.gitignore index 1f6b89a514..8971860688 100644 --- a/.gitignore +++ b/.gitignore @@ -54,5 +54,6 @@ configure gcstat*.scm lily-[0-9a-f][0-9a-f][0-9a-f]* out-scons +out-cov tags test-output-distance diff --git a/GNUmakefile.in b/GNUmakefile.in index 04a002a282..37fb44abf4 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -210,14 +210,11 @@ test-clean: $(MAKE) -C input/regression/ out=test clean test: -## no aa-scaling, no PDF - $(MAKE) -C input/regression/ out=test LILYPOND_BOOK_LILYPOND_FLAGS="--backend=eps --formats=ps,png $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= out-test/collated-files.html + $(MAKE) -C input/regression/ out=test LILYPOND_BOOK_LILYPOND_FLAGS="--backend=eps --formats=ps $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= out-test/collated-files.html @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g' - - RESULT_DIR=$(top-build-dir)/out/test-results/ local-check: test rm -rf $(RESULT_DIR) mkdir -p $(RESULT_DIR) - $(PYTHON) $(buildscript-dir)/output-distance.py --output-dir $(RESULT_DIR) $(CHECK_SOURCE) input/regression/out-test/ + $(PYTHON) $(buildscript-dir)/output-distance.py --create-images --output-dir $(RESULT_DIR) $(CHECK_SOURCE) input/regression/out-test/ diff --git a/buildscripts/build-coverage.sh b/buildscripts/build-coverage.sh index 5af2bb1d7f..13a073188b 100755 --- a/buildscripts/build-coverage.sh +++ b/buildscripts/build-coverage.sh @@ -1,12 +1,31 @@ #!/bin/sh -./configure --enable-config=cov --disable-optimising -make conf=cov -j2 clean -perl -i~ -pe 's/-pipe /-fprofile-arcs -ftest-coverage -pipe /g' config-cov.make -perl -i~ -pe 's/ -ldl / -lgcov -ldl /g' config-cov.make + +if test "$1" == "--fresh"; then + fresh=yes +fi + +if test ! -f config-cov.make; then + fresh=yes +fi + +if test "$fresh" = "yes"; +then + ./configure --enable-config=cov --disable-optimising + make conf=cov -j2 clean + perl -i~ -pe 's/-pipe /-fprofile-arcs -ftest-coverage -pipe /g' config-cov.make + perl -i~ -pe 's/ -ldl / -lgcov -ldl /g' config-cov.make +else + find -name '*.gcda' -exec rm '{}' ';' +fi + + make conf=cov -j2 make conf=cov test-clean LILYPOND_JOBS= make conf=cov test LILYPOND_JOBS= >& out-cov/test-run.log +rm -rf out-cov +mkdir out-cov + cd out-cov ln ../lily/* . ln ../lily/out-cov/*[ch] . @@ -16,3 +35,5 @@ for a in *[cyl] do gcov -o ../lily/out-cov/ -p $a > $a.gcov-summary done + +python buildscripts/coverage.py diff --git a/buildscripts/coverage.py b/buildscripts/coverage.py index e8cb903a97..62a68cb0bb 100644 --- a/buildscripts/coverage.py +++ b/buildscripts/coverage.py @@ -27,6 +27,12 @@ for f in glob.glob ('*.gcov-summary'): results.sort () results.reverse() + +print 'files sorted by number of untested lines (decreasing)' +print +print '%5s (%6s): %s' % ('cov %', 'lines', 'file') +print '----------------------------------------------' + for (pain, d) in results: print '%(cov)5.2f (%(lines)6d): %(file)s' % d diff --git a/buildscripts/output-distance.py b/buildscripts/output-distance.py index 5a83c490d0..ec8b5d9e10 100644 --- a/buildscripts/output-distance.py +++ b/buildscripts/output-distance.py @@ -435,21 +435,50 @@ class SignatureFileLink (FileLink): self.add_system_link (link, system_index[0]) + + def create_images (self, old_dir, new_dir, dest_dir): + + files_created = [[], []] + for oldnew in (0, 1): + pat = self.base_names[oldnew] + '.eps' + + for f in glob.glob (pat): + infile = f + outfile = (dest_dir + '/' + f).replace ('.eps', '.png') + + mkdir (os.path.split (outfile)[0]) + cmd = ('gs -sDEVICE=png16m -dGraphicsAlphaBits=4 -dTextAlphaBits=4 ' + ' -r101 ' + ' -sOutputFile=%(outfile)s -dNOSAFER -dEPSCrop -q -dNOPAUSE ' + ' %(infile)s -c quit ' % locals ()) + + files_created[oldnew].append (outfile) + system (cmd) + + return files_created + def link_files_for_html (self, old_dir, new_dir, dest_dir): - png_linked = [[], []] - for ext in ('.png', '.ly', '-page*png'): - + to_compare = [[], []] + + exts = ['.ly'] + if options.create_images: + to_compare = self.create_images (old_dir, new_dir, dest_dir) + else: + exts += ['.png', '-page*png'] + + for ext in exts: for oldnew in (0,1): for f in glob.glob (self.base_names[oldnew] + ext): dst = dest_dir + '/' + f link_file (f, dst) if f.endswith ('.png'): - png_linked[oldnew].append (f) + to_compare[oldnew].append (f) if options.compare_images: - for (old,new) in zip (png_linked[0], png_linked[1]): + for (old, new) in zip (to_compare[0], to_compare[1]): compare_png_images (old, new, dest_dir) + def html_record_string (self, old_dir, new_dir): def img_cell (ly, img, name): @@ -467,7 +496,6 @@ class SignatureFileLink (FileLink): ''' % locals () - def multi_img_cell (ly, imgs, name): if not name: name = 'source' @@ -800,14 +828,15 @@ def test_paired_files (): def test_compare_trees (): system ('rm -rf dir1 dir2') system ('mkdir dir1 dir2') - system ('cp 20{-*.signature,.ly,.png} dir1') - system ('cp 20{-*.signature,.ly,.png} dir2') - system ('cp 20expr{-*.signature,.ly,.png} dir1') - system ('cp 19{-*.signature,.ly,.png} dir2/') - system ('cp 19{-*.signature,.ly,.png} dir1/') + system ('cp 20{-*.signature,.ly,.png,.eps} dir1') + system ('cp 20{-*.signature,.ly,.png,.eps} dir2') + system ('cp 20expr{-*.signature,.ly,.png,.eps} dir1') + system ('cp 19{-*.signature,.ly,.png,.eps} dir2/') + system ('cp 19{-*.signature,.ly,.png,.eps} dir1/') system ('cp 19-1.signature 19-sub-1.signature') system ('cp 19.ly 19-sub.ly') system ('cp 19.png 19-sub.png') + system ('cp 19.eps 19-sub.eps') system ('cp 20multipage* dir1') system ('cp 20multipage* dir2') @@ -815,10 +844,10 @@ def test_compare_trees (): system ('mkdir -p dir1/subdir/ dir2/subdir/') - system ('cp 19-sub{-*.signature,.ly,.png} dir1/subdir/') - system ('cp 19-sub{-*.signature,.ly,.png} dir2/subdir/') - system ('cp 20grob{-*.signature,.ly,.png} dir2/') - system ('cp 20grob{-*.signature,.ly,.png} dir1/') + system ('cp 19-sub{-*.signature,.ly,.png,.eps} dir1/subdir/') + system ('cp 19-sub{-*.signature,.ly,.png,.eps} dir2/subdir/') + system ('cp 20grob{-*.signature,.ly,.png,.eps} dir2/') + system ('cp 20grob{-*.signature,.ly,.png,.eps} dir1/') ## introduce differences system ('cp 19-1.signature dir2/20-1.signature') @@ -996,6 +1025,12 @@ def main (): action="store_false", help="Don't run graphical comparisons") + p.add_option ('--create-images', + dest="create_images", + default=False, + action="store_true", + help="Create PNGs from EPSes") + p.add_option ('-o', '--output-dir', dest="output_dir", default=None, diff --git a/input/regression/cluster-break.ly b/input/regression/cluster-break.ly new file mode 100644 index 0000000000..9b42b923c0 --- /dev/null +++ b/input/regression/cluster-break.ly @@ -0,0 +1,21 @@ + +\version "2.10.7" +\header { + texidoc = "Clusters behave well across line breaks." +} + +\layout { ragged-right = ##t } + +fragment = \relative c' { + \time 2/4 + 4 + 4 | \break + + +} + +<< \new Staff \makeClusters \fragment + \new Staff \fragment +>> + + diff --git a/input/regression/cluster-style.ly b/input/regression/cluster-style.ly new file mode 100644 index 0000000000..9d4dfc8236 --- /dev/null +++ b/input/regression/cluster-style.ly @@ -0,0 +1,34 @@ + + +\version "2.10.7" +\header { + texidoc = "Clusters behave well across line breaks." +} + +\layout { ragged-right = ##t } + +fragment = \relative c' { + 4 + 4 + 4 +} + +<< + \time 2/4 + \new Staff { + \override ClusterSpanner #'style = #'ramp + \makeClusters \fragment + r4 + \override ClusterSpanner #'style = #'leftsided-stairs + \makeClusters \fragment + r4 + \override ClusterSpanner #'style = #'rightsided-stairs + \makeClusters \fragment + r4 + \override ClusterSpanner #'style = #'centered-stairs + \makeClusters \fragment + } + +>> + + diff --git a/input/regression/cluster.ly b/input/regression/cluster.ly index 289c1f8984..a05f2ac73d 100644 --- a/input/regression/cluster.ly +++ b/input/regression/cluster.ly @@ -15,7 +15,7 @@ fragment = \relative c' { << \new Staff \fragment - \new Staff \applyMusic #notes-to-clusters \fragment + \new Staff \makeClusters \fragment >> diff --git a/input/regression/lyric-extender-no-heads.ly b/input/regression/lyric-extender-no-heads.ly new file mode 100644 index 0000000000..958805ab85 --- /dev/null +++ b/input/regression/lyric-extender-no-heads.ly @@ -0,0 +1,24 @@ +\header +{ + texidoc = "Extender engraver also notices the lack of note heads. +Here the extender ends on the 2nd quarter note, despite the grace note +without a lyric attached." + +} + +\version "2.10.7" + +\layout { + ragged-right = ##t +} + +\relative c'' { + \time 3/4 + d4~ d4 r4 + \grace es8 + + d4 + +} +\addlyrics { x __ x } + diff --git a/input/regression/measure-grouping.ly b/input/regression/measure-grouping.ly index 64a1e8153d..cfea330422 100644 --- a/input/regression/measure-grouping.ly +++ b/input/regression/measure-grouping.ly @@ -9,10 +9,16 @@ brackets above beats when the beats of a time signature are grouped. " \version "2.10.0" +\layout { + ragged-right = ##t +} %% TODO: should have 2/4 + 5/8 time sig style. -\context Staff +\context Staff \with { + \consists "Measure_grouping_engraver" + } + \relative c' { #(set-time-signature 2 4) c8 a'4 a8~ @@ -23,12 +29,5 @@ brackets above beats when the beats of a time signature are grouped. " #(set-time-signature 5 8 '(3 2)) g8 a4 g a4.-> } -\layout { - ragged-right = ##t - \context { - \Staff - \consists "Measure_grouping_engraver" - } -} diff --git a/input/regression/spacing-mark-width.ly b/input/regression/spacing-mark-width.ly new file mode 100644 index 0000000000..b0b461440b --- /dev/null +++ b/input/regression/spacing-mark-width.ly @@ -0,0 +1,18 @@ +\header { + + texidoc = "Width of marks does not affect spacing." + +} + +\version "2.10.7" + +\paper { + ragged-right = ##t +} + +\relative c'' +{ + \override Score.RehearsalMark #'break-visibility = #begin-of-line-invisible + c1 + \mark "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " +} diff --git a/input/test/makam.ly b/input/test/makam.ly index 53dd69cc1a..549df765c8 100644 --- a/input/test/makam.ly +++ b/input/test/makam.ly @@ -112,6 +112,20 @@ pitchnames = \makamPitchNames ragged-right = ##t } + +makamGlyphs = #'((1 . "accidentals.doublesharp") + (8/9 . "accidentals.sharp.slashslashslash.stemstem") + (5/9 . "accidentals.sharp.slashslashslash.stem") + (4/9 . "accidentals.sharp") + (1/9 . "accidentals.sharp.slashslash.stem") + (0 . "accidentals.natural") + (-1/9 . "accidentals.mirroredflat") + (-4/9 . "accidentals.flat.slash") + (-5/9 . "accidentals.flat") + (-8/9 . "accidentals.flat.slashslash") + (-1 . "accidentals.flatflat") + ) + \relative { %{ define alteration <-> symbol mapping. The following glyphs are available. @@ -133,21 +147,12 @@ pitchnames = \makamPitchNames %} + \override Accidental #'glyph-name-alist = \makamGlyphs - \override Accidental #'glyph-name-alist = #'((1 . "accidentals.doublesharp") - (8/9 . "accidentals.sharp.slashslashslash.stemstem") - (5/9 . "accidentals.sharp.slashslashslash.stem") - (4/9 . "accidentals.sharp") - (1/9 . "accidentals.sharp.slashslash.stem") - (0 . "accidentals.natural") - (-1/9 . "accidentals.mirroredflat") - (-4/9 . "accidentals.flat.slash") - (-5/9 . "accidentals.flat") - (-8/9 . "accidentals.flat.slashslash") - (-1 . "accidentals.flatflat") - ) - - + \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs + \set Staff.keySignature = #'( + (3 . 4/9) + (6 . -1/9)) c cc db fk gbm gfc gfb efk dfbm } diff --git a/lily/cluster.cc b/lily/cluster.cc index 90c2adcf50..2c41b9a174 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -164,32 +164,22 @@ Cluster::print (SCM smob) /* Across a line break we anticipate on the next pitches. */ - if (spanner->original ()) + if (Spanner *next = spanner->broken_neighbor (RIGHT)) { - Spanner *orig = dynamic_cast (spanner->original ()); - - if (spanner->get_break_index () < orig->broken_intos_.size () - 1) + extract_grob_set (next, "columns", next_cols); + if (next_cols.size () > 0) { - Spanner *next = orig->broken_intos_[spanner->get_break_index () + 1]; - vector const &next_cols = extract_grob_array (next, "columns"); - if (next_cols.size () > 0) - { - Grob *next_commony = common_refpoint_of_array (next_cols, next, Y_AXIS); - Grob *col = next_cols[0]; - - Interval v = col->extent (next_commony, Y_AXIS); - Real x = right_bound->relative_coordinate (commonx, X_AXIS) - left_coord; - - bottom_points.insert (bottom_points.begin (), - Offset (x, v[DOWN])); - top_points.insert (top_points.begin (), Offset (x, v[UP])); - } + Grob *next_commony = common_refpoint_of_array (next_cols, next, Y_AXIS); + Grob *col = next_cols[0]; + + Interval v = col->extent (next_commony, Y_AXIS); + Real x = right_bound->relative_coordinate (commonx, X_AXIS) - left_coord; + + bottom_points.push_back (Offset (x, v[DOWN])); + top_points.push_back (Offset (x, v[UP])); } } - reverse (bottom_points); - reverse (top_points); - Stencil out = brew_cluster_piece (me, bottom_points, top_points); out.translate_axis (- me->relative_coordinate (commony, Y_AXIS), Y_AXIS); return out.smobbed_copy (); @@ -203,9 +193,12 @@ ADD_INTERFACE (Cluster, "The property @code{style} controls the shape of cluster segments. Valid values " "include @code{leftsided-stairs}, @code{rightsided-stairs}, @code{centered-stairs}, " "and @code{ramp}.\n", + + /* props */ "style " "padding " - "columns "); + "columns " + ); struct Cluster_beacon { diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index efea867822..c6998c5dde 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -98,7 +98,15 @@ Extender_engraver::stop_translation_timestep () ly_symbol2scm ("heads"), h); } } - + else + { + if (pending_extender_) + { + completize_extender (pending_extender_); + pending_extender_ = 0; + } + + } if (extender_) { pending_extender_ = extender_; diff --git a/lily/note-spacing-engraver.cc b/lily/note-spacing-engraver.cc index 7b5f2ad7bd..8772ceec7b 100644 --- a/lily/note-spacing-engraver.cc +++ b/lily/note-spacing-engraver.cc @@ -9,6 +9,7 @@ #include "engraver.hh" +#include "grob-array.hh" #include "context.hh" #include "item.hh" #include "pointer-group-interface.hh" @@ -86,7 +87,8 @@ Note_spacing_engraver::finalize () { if (last_spacing_ && last_spacing_parent_context_ - && last_spacing_parent_context_ == context ()->get_parent_context ()) + && last_spacing_parent_context_ == context ()->get_parent_context () + && !unsmob_grob_array (last_spacing_->get_object ("right-items"))) { SCM ccol = get_property ("currentCommandColumn"); Grob *column = unsmob_grob (ccol); diff --git a/scm/backend-library.scm b/scm/backend-library.scm index 42c04b6e57..eaefaf7867 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -120,6 +120,7 @@ (let* ((completed (completize-formats formats)) (base (string-regexp-substitute "\\.[a-z]+$" "" filename)) (intermediate (remove (lambda (x) (member x formats)) completed))) + (for-each (lambda (f) ((eval (string->symbol (format "convert-to-~a" f)) module) paper-book filename)) completed) diff --git a/scm/lily.scm b/scm/lily.scm index 786c075d68..8f2b1e1873 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -359,8 +359,7 @@ The syntax is the same as `define*-public'." (stats (gc-stats))) (list - (- (+ (tms:utime t) - (tms:stime t)) + (- (tms:utime t) (ly:assoc-get 'gc-time-taken stats)) ;; difficult to put memory amount stats into here. diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 89a974879e..6a8fcc1963 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -1448,10 +1448,12 @@ def process_snippets (cmd, ly_snippets, texstr_snippets, png_snippets): be_verbose=global_options.verbose, progress_p=1) - if global_options.format in (HTML, TEXINFO): + if global_options.format in (HTML, TEXINFO) and '--formats' not in cmd: cmd += ' --formats=png ' - if global_options.format in (DOCBOOK): + elif global_options.format in (DOCBOOK) and '--formats' not in cmd: cmd += ' --formats=png,pdf ' + + # UGH # the --process=CMD switch is a bad idea # it is too generic for lilypond-book.