From: fred Date: Sun, 24 Mar 2002 20:09:08 +0000 (+0000) Subject: lilypond-0.1.53 X-Git-Tag: release/1.5.59~3242 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=78cd25d4c9ed8ecfb4994f730bb0b24fbee567ca;p=lilypond.git lilypond-0.1.53 --- diff --git a/bin/wild-perl b/bin/wild-perl index a61caf335b..ede94c23fc 100644 --- a/bin/wild-perl +++ b/bin/wild-perl @@ -4,7 +4,7 @@ use Getopt::Long; GetOptions("top-srcdir:s"); -$my_topdir = $opt_top_srcdir ? $opt_top_srcdir : "\$(top_srcdir)"; +$my_topsrcdir = $opt_top_srcdir ? $opt_top_srcdir : "\$(top_srcdir)"; @ignorestuff = (); @@ -25,6 +25,7 @@ while (<>) { foreach $i (@ignorelist) { print "# ignoring wildcards for \`$i\'\n"; push @ignorestuff, $i; # concat ? uh? + print "IGNORE_WILDCARDS=$ignore"; } @@ -43,5 +44,6 @@ while (<>) { print "\$(srcdir)/Makefile.am: \$(srcdir)/Makefile.am.wild\n" . - "\t\$(PERL) $my_topdir/bin/wild-perl --top-srcdir=\"\$(real_topdir)\" < \$< > \$@"; +# "\t\$(PERL) $my_topsrcdir/bin/wild-perl --top-srcdir=\"\$(real_topsrcdir)\" < \$< > \$@"; + "\t\$(PERL) $my_topsrcdir/bin/wild-perl < \$< > \$@"; diff --git a/lily/GNUmakefile b/lily/GNUmakefile index 0fe59e0fe1..0a05b26849 100644 --- a/lily/GNUmakefile +++ b/lily/GNUmakefile @@ -7,25 +7,66 @@ # automake/wild-make should generate this file from Makefile.am.wild +#ugh +Makefile=$(wildcard Makefile) +# are we configured here, or are we using --srcdir +ifeq ($(Makefile),Makefile) + include Makefile -# Makefile.am.wild: lilypond_SOURCES = $(wildcard *.cc) -CURRENT_lilypond_SOURCES = $(wildcard *.cc) +biltdir=. + +else + +#ugh +biltdir=../../build/lily + +make-in-build: wild-check + echo exec $(MAKE) -C $(biltdir) + exec $(MAKE) -C $(biltdir) + +include $(biltdir)/Makefile + +clean: wild-check + exec $(MAKE) -C $(biltdir) $@ + +dist: wild-check + exec $(MAKE) -C $(biltdir) $@ + +distclean: wild-check + exec $(MAKE) -C $(biltdir) $@ + +lexer.cc: wild-check + exec $(MAKE) -C $(biltdir) $@ + +parser.hh: wild-check + exec $(MAKE) -C $(biltdir) $@ + +parser.cc: wild-check + exec $(MAKE) -C $(biltdir) $@ + +#ugh OMIT_DEPENDENCIES does not seem to work +.deps/lexer.P: + exec $(MAKE) -C $(biltdir) $@ + +.deps/parser.P: + exec $(MAKE) -C $(biltdir) $@ + +endif -# ugh: there is a dummy file 'wild-check' to satisfy the wild-check target -# for non-GNU makes in Makefile(.test) -# but we'll ignore that -# .PHONY: wild-check +# Makefile.am.wild: lilypond_SOURCES = $(wildcard *.cc *.ll *.yy) +# ugh +CURRENT_lilypond_SOURCES = $(wildcard *.cc lexer.ll parser.yy) # ugh: stupid lexer.cc/parser.cc cluttering sourcedir! -# but it works fine in other dirs (see ../mi2mu) -# wild-check: check-lilypond-sources +wild-check: check-lilypond-sources check-lilypond-sources: -ifneq ($(lilypond_SOURCES),$(CURRENT_mi2mu_SOURCES)) +ifneq ($(lilypond_SOURCES),$(filter-out $(IGNORE_WILDCARDS), $(CURRENT_lilypond_SOURCES))) @echo \"$(lilypond_SOURCES)\" @echo \"$(CURRENT_lilypond_SOURCES)\" - @echo lilypond_SOURCES changed: NOT yet rerunning make-wild. Please type: - @echo "$(PERL) $(top_srcdir)/bin/wild-perl < Makefile.am.wild > Makefile.am" + @echo lilypond_SOURCES changed: rerunning make-wild. + @-rm -f Makefile.am + $(PERL) $(top_srcdir)/bin/wild-perl < Makefile.am.wild > Makefile.am endif diff --git a/lily/Makefile.am b/lily/Makefile.am index 7262ac7da7..ceab122e88 100644 --- a/lily/Makefile.am +++ b/lily/Makefile.am @@ -1,5 +1,3 @@ -# Automatically generated from ./lily/Makefile.am.wild by autowild -# Do not edit # Generated automatically by wild-perl 0.1 # project LilyPond -- the musical typesetter # title makefile for lilypond # file lily/Makefile.am.wild @@ -14,9 +12,15 @@ SUBDIRS = include bin_PROGRAMS = lilypond # ignoring wildcards for `lexer.cc' -# ignoring wildcards for `parser.cc' - +IGNORE_WILDCARDS=lexer.cc parser.cc# ignoring wildcards for `parser.cc' +IGNORE_WILDCARDS=lexer.cc parser.cc lilypond_SOURCES = abbrev.cc abbreviation-beam-engraver.cc abbreviation-beam.cc atom.cc audio-column.cc audio-element.cc audio-item.cc audio-staff.cc axis-group-administration.cc axis-group-element.cc axis-group-item.cc axis-group-spanner.cc axis.cc bar-column-grav.cc bar-column.cc bar-grav.cc bar-number-grav.cc bar.cc beam-grav.cc beam-swallow-trans.cc beam.cc bow.cc boxes.cc break-align-item.cc break.cc change-iterator.cc change-translator.cc chord-iterator.cc clef-grav.cc clef-item.cc col-info.cc colhpos.cc collision-grav.cc collision.cc command-request.cc crescendo.cc debug.cc dimen.cc directional-spanner.cc dot-column-grav.cc dot-column.cc dots.cc dynamic-grav.cc engraver-group.cc engraver.cc general-script-def.cc global-translator.cc gourlay-breaking.cc graphical-element.cc grouping.cc head-grav.cc header.cc horizontal-align-item.cc horizontal-group-elem.cc horizontal-group-item.cc horizontal-vertical-group-elem.cc horizontal-vertical-group-item.cc idealspacing.cc identifier.cc ineq-constrained-qp.cc item.cc key-grav.cc key-item.cc key-performer.cc key.cc keyword.cc leastsquares.cc lexerinit.cc lily-version.cc line-group-grav.cc line-spacer.cc linear-programming.cc local-key-grav.cc local-key-item.cc lookup.cc lyric-grav.cc lyric-performer.cc main.cc meter-grav.cc meter-performer.cc meter.cc midi-def.cc midi-item.cc midi-stream.cc midi-walker.cc misc.cc molecule.cc music-iterator.cc music-list.cc music-output-def.cc music.cc musical-request.cc my-lily-lexer.cc my-lily-parser.cc note-column.cc note-head.cc note-performer.cc note.cc notename-table.cc offset.cc outputter.cc p-col.cc p-score.cc paper-def.cc performance.cc performer-group-performer.cc performer.cc pitch-squash-grav.cc plet-engraver.cc plet-spanner.cc plet-swallow-engraver.cc priority-halign-grav.cc property-iterator.cc ps-plet.cc qlp.cc qlpsolve.cc request-iterator.cc request.cc rest-collision-grav.cc rest-collision.cc rest-grav.cc rest.cc rhythmic-column-grav.cc rhythmic-head.cc rod.cc score-bar.cc score-column.cc score-elem-info.cc score-elem.cc score-grav.cc score-performer.cc score-priority-grav.cc score.cc scoreline.cc scores.cc script-column.cc script-def.cc script-grav.cc script.cc separating-group-spanner.cc separating-line-group-grav.cc single-malt-grouping-item.cc slur-grav.cc slur.cc span-bar-grav.cc span-bar.cc span-score-bar-grav.cc span-score-bar.cc spanner.cc spring-spacer.cc staff-info.cc staff-performer.cc staff-side.cc staff-sym-grav.cc staff-sym.cc stem-grav.cc stem-info.cc stem.cc super-elem.cc swallow-grav.cc swallow-perf.cc symtable.cc template1.cc template2.cc template3.cc template4.cc template5.cc template6.cc template7.cc template8.cc tex-beam.cc tex-slur.cc tex-stream.cc tex.cc text-def.cc text-item.cc text-spanner.cc tie-grav.cc tie.cc time-description.cc timing-grav.cc timing-translator.cc translation-property.cc translator-ctors.cc translator-group.cc translator.cc type-swallow-trans.cc version.cc vertical-align-elem.cc vertical-align-grav.cc vertical-align-spanner.cc vertical-group-elem.cc vertical-group-spanner.cc voice-iterator.cc warn.cc word-wrap.cc lexer.ll parser.yy + +# howto do this? info is not all that clear... +# OMIT_DEPENDENCIES = lexer.cc parser.cc +# lilypond_OMIT_DEPENDENCIES = lexer.cc parser.cc +# lilypondOMIT_DEPENDENCIES = lexer.cc parser.cc + noinst_HEADERS = parser.hh #lilypond_LDADD = -llily -lflower @LEXLIB@ @@ -24,7 +28,7 @@ lilypond_LDADD = $(top_builddir)/lib/liblily.la $(top_builddir)/flower/libflower lilypond_LDFLAGS = -L$(absolute_builddir)/lib/.libs -L$(absolute_builddir)/flower/.libs -INCLUDES = -I$(srcdir)/include -I$(srcdir)/../lib/include -I$(srcdir)/../flower/include +INCLUDES = -I$(top_srcdir)/lily/include -I$(top_srcdir)/lib/include -I$(top_srcdir)/flower/include EXTRA_DIST = Makefile.am.wild GNUmakefile Stable.make VERSION @@ -42,13 +46,16 @@ parser.hh: parser.yy mv $<.tab.h $@ mv $<.tab.c $(shell basename $@ .hh).cc +distclean-local: + -rm -rf .deps + # override default target for all-am: to get an extra dependency all-am: Makefile $(PROGRAMS) wild-check # dummy target for non-GNU makes; is overridden in GNUmakefile wild-check: -distclean-local: - -rm -rf .deps +# dummy target for non-GNU makes; is overridden in GNUmakefile +make-in-build: $(srcdir)/Makefile.am: $(srcdir)/Makefile.am.wild - $(PERL) $(top_srcdir)/bin/wild-perl --top-srcdir="$(real_topdir)" < $< > $@ \ No newline at end of file + $(PERL) $(top_srcdir)/bin/wild-perl < $< > $@ \ No newline at end of file diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 0a5487a138..918800a7c6 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -36,7 +36,7 @@ public: void preprocess (); /// set a minimum distance - void add_rod (Paper_column * to, Real distance, Direction d); + void add_rod (Paper_column * to, Real distance); /** prebreak is put before end of line. if broken here, then (*this) column is discarded, and prebreak diff --git a/lily/include/rod.hh b/lily/include/rod.hh index 42509d453e..c71b6b3484 100644 --- a/lily/include/rod.hh +++ b/lily/include/rod.hh @@ -16,7 +16,7 @@ struct Column_rod { Paper_column *other_l_; Real distance_f_; - Direction dir_; + Column_rod (); static int compare (const Column_rod &r1, const Column_rod &r2); void print () const; @@ -28,7 +28,7 @@ struct Rod Real distance_f_; void add_to_cols (); - Rod (Item*,Item*); + Rod (Single_malt_grouping_item*,Single_malt_grouping_item*); Rod (); }; diff --git a/lily/p-col.cc b/lily/p-col.cc index 898c7357ab..7da23d8d90 100644 --- a/lily/p-col.cc +++ b/lily/p-col.cc @@ -11,9 +11,9 @@ #include "debug.hh" void -Paper_column::add_rod (Paper_column * p, Real d, Direction dir) +Paper_column::add_rod (Paper_column * p, Real d) { - assert( sign (p->rank_i () - rank_i ()) == dir); + Direction dir = Direction (sign (p->rank_i () - rank_i ())); for (int i=0; i < minimal_dists_arr_drul_[dir].size (); i++) { Column_rod &rod = minimal_dists_arr_drul_[dir][i]; @@ -26,8 +26,7 @@ Paper_column::add_rod (Paper_column * p, Real d, Direction dir) Column_rod cr; cr.distance_f_ = d; - cr.other_l_ = p; - cr.dir_ = dir; + cr.other_l_ = p; minimal_dists_arr_drul_[dir].push (cr); @@ -69,8 +68,13 @@ Paper_column::do_print() const DOUT <<'\n' << ((break_status_i_ == LEFT) ? "prebreak" : "postbreak"); DOUT << '\n'; } - // DOUT << "extent: " << width().str () << "\n"; + DOUT << "Left: "; + for (int i=0; i < minimal_dists_arr_drul_[LEFT].size (); i++) + { + minimal_dists_arr_drul_[LEFT][i].print (); + } + DOUT << "Right: "; for (int i=0; i < minimal_dists_arr_drul_[RIGHT].size (); i++) { minimal_dists_arr_drul_[RIGHT][i].print (); diff --git a/lily/rod.cc b/lily/rod.cc index 707f5572e6..f624d01253 100644 --- a/lily/rod.cc +++ b/lily/rod.cc @@ -9,12 +9,13 @@ #include "rod.hh" #include "p-col.hh" #include "debug.hh" +#include "single-malt-grouping-item.hh" -Rod::Rod (Item *l, Item *r) +Rod::Rod (Single_malt_grouping_item *l, Single_malt_grouping_item *r) { item_l_drul_[LEFT] =l; item_l_drul_[RIGHT]=r; - distance_f_ = l->width () [RIGHT] + r->width ()[LEFT]; + distance_f_ = l->my_width () [RIGHT] + r->my_width ()[LEFT]; } Rod::Rod () @@ -35,7 +36,6 @@ Column_rod::print () const Column_rod::Column_rod () { distance_f_ = 0; - dir_ = CENTER; other_l_ = 0; } @@ -48,7 +48,7 @@ void Rod::add_to_cols () { item_l_drul_[RIGHT]->column_l ()->add_rod - (item_l_drul_[LEFT]->column_l (), distance_f_, LEFT); + (item_l_drul_[LEFT]->column_l (), distance_f_); item_l_drul_[LEFT]->column_l ()->add_rod - (item_l_drul_[RIGHT]->column_l (), distance_f_,RIGHT); + (item_l_drul_[RIGHT]->column_l (), distance_f_); }