From: Han-Wen Nienhuys Date: Sat, 15 Mar 2003 01:16:32 +0000 (+0000) Subject: * Documentation/user/music-glossary.tely: add @omf tags X-Git-Tag: release/1.7.15~11 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=de658c9789658317b265eb7f3fd34a87c7a8f953;p=lilypond.git * Documentation/user/music-glossary.tely: add @omf tags * Documentation/user/lilypond.tely: add @omf tags * scm/generate-documentation.scm (string-append): add @omf tags. * input/regression/multi-measure-rest.ly (texidoc): add doco * GNUmakefile.in (web-doc-install): add web-doc-install target * lily/scm-hash.cc (remove): prevent underflow of elt_count_. This fixes crashes while dumping MIDI. * ly/performer-init.ly (FiguredBassContext): add Figured bass for midi --- diff --git a/ChangeLog b/ChangeLog index 45c1b8a4b4..bb89efba68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2003-03-15 Han-Wen Nienhuys + + * Documentation/user/music-glossary.tely: add @omf tags + + * Documentation/user/lilypond.tely: add @omf tags + + * scm/generate-documentation.scm (string-append): add @omf tags. + + * stepmake/stepmake/omf-*: new files + + * input/regression/multi-measure-rest.ly (texidoc): add doco + + * GNUmakefile.in (web-doc-install): add web-doc-install target + + * lily/scm-hash.cc (remove): prevent underflow of elt_count_. This + fixes crashes while dumping MIDI. + + * ly/performer-init.ly (FiguredBassContext): add Figured bass for + midi + 2003-03-11 Han-Wen Nienhuys * buildscripts/texi2omf.py: new file. diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 08a901afd7..bb78b9dbf2 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -20,7 +20,10 @@ PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES)) INFO_DOCS = lilypond lilypond-internals music-glossary INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info) -STEPMAKE_TEMPLATES=tex texinfo documentation +STEPMAKE_TEMPLATES=tex texinfo omf documentation + +OMF_FILES += $(outdir)/lilypond-internals.html.omf + LOCALSTEPMAKE_TEMPLATES=lilypond ly LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"' @@ -143,3 +146,4 @@ $(outdir)/interfaces.itexi: cp dummy-interfaces.itexi $@ endif + diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index b0b8ab3e91..c6b0c58d39 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -29,6 +29,15 @@ Distributions will want to install lilypond.info doing: @end direntry +@ignore +@omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen +@omfdescription User manual of the LilyPond music engraving system +@omftype user manual +@omfcategory Music +@end ignore + + + @ifhtml This document is also available in @uref{../lilypond.ps.gz,gzipped PostScript} and @uref{../lilypond.pdf,PDF}. diff --git a/Documentation/user/music-glossary.tely b/Documentation/user/music-glossary.tely index e379ae11af..7dd4511ded 100644 --- a/Documentation/user/music-glossary.tely +++ b/Documentation/user/music-glossary.tely @@ -20,6 +20,16 @@ PostScript} and @uref{music-glossary.pdf,PDF}. Copyright @copyright{} 1999--2002 by the authors @end titlepage + + +@ignore +@omfcreator Christian Mondrup +@omfdescription Glossary of musical terms with translations +@omftype user manual +@omfcategory Music +@end ignore + + @ifnottex @node Top @top @@ -31,8 +41,6 @@ Copyright @copyright{} 1999--2002 by the authors @ifnottex Christian Mondrup @* -spanish by Davi Gonz@'alez -@* Copyright 1999-2002 by the authors @c License PD, BSD-ish, GNU GPL, GNU FDL? diff --git a/GNUmakefile.in b/GNUmakefile.in index 5e77962a85..6983fb6199 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -90,6 +90,11 @@ lily/$(outdir)/lilypond: local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web + +web-doc-install: web-doc + $(INSTALL) -m 755 -d $(local_package_docdir) + tar -C $(local_package_docdir)/ -xzf $(outdir)/web.tar.gz + web-ext = gz html midi pdf png txt ly top-web: cd $(builddir) && rm -f `find . -name \*.html~ -print` diff --git a/buildscripts/texi2omf.py b/buildscripts/texi2omf.py index f0c3d2859c..d6c01affb8 100644 --- a/buildscripts/texi2omf.py +++ b/buildscripts/texi2omf.py @@ -53,6 +53,7 @@ if not files: formats = { 'html' : 'text/html', 'pdf' : 'application/pdf', + 'ps.gz' : 'application/postscript', 'ps' : 'application/postscript', } diff --git a/config.make.in b/config.make.in index 1bfe4ca5d9..2796ce0c03 100644 --- a/config.make.in +++ b/config.make.in @@ -34,15 +34,24 @@ program_suffix = @program_suffix@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ stepmake = @stepmake@ +docdir = $(datadir)/doc/ +omfdir = $(datadir)/omf/ # move out of config.make.in? package_datadir = $(datadir)/$(package) package_libdir = $(libdir)/$(package) +package_docdir = $(docdir)/$(package) +package_omfdir = $(omfdir)/$(package) + local_package_datadir = $(lilypond_datadir)/$(TOPLEVEL_VERSION) local_package_libdir = $(lilypond_libdir)/$(TOPLEVEL_VERSION) +local_package_docdir = $(lilypond_docdir)/$(TOPLEVEL_VERSION) +local_package_omfdir = $(lilypond_docdir)/$(TOPLEVEL_VERSION) lilypond_datadir = $(package_datadir) lilypond_libdir = $(package_libdir) +lilypond_docdir = $(package_docdir) + local_lilypond_datadir = $(local_package_datadir) local_lilypond_libdir = $(local_package_libdir) diff --git a/input/regression/multi-measure-rest.ly b/input/regression/multi-measure-rest.ly index 52d6dafd98..57ef79a54b 100644 --- a/input/regression/multi-measure-rest.ly +++ b/input/regression/multi-measure-rest.ly @@ -7,10 +7,11 @@ are not expanded when you set @code{Score.skipBars}. Although the multi-measure-rest is a Spanner, minimum distances are set to keep it colliding from barlines. +Rests over measures during longer than 2 wholes use breve rests. When +more than 10 or more measures (tunable through @code{expand-limit}) +are used then a different symbol is used. -Rests over measures during longer than 2 wholes use breve rests. " - } @@ -20,7 +21,9 @@ Rests over measures during longer than 2 wholes use breve rests. R2. R2.*3 - R2.*27 + R2.*9 + R2.*11 + \time 8/4 R1*2 } \paper { diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc index d2f16f911a..1a49a39b54 100644 --- a/lily/scm-hash.cc +++ b/lily/scm-hash.cc @@ -11,14 +11,20 @@ #include "scm-hash.hh" #include "ly-smobs.icc" -void +/* + Return: number of objects. + */ +int copy_scm_hashes (SCM dest, SCM src) { - for (int i = SCM_SYMBOL_LENGTH (src); i--;) + int k = 0; + for (int i = SCM_VECTOR_LENGTH (src); i--;) for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_pair_p(s); s = ly_cdr (s)) { scm_hashq_set_x (dest, ly_caar (s), ly_cdar (s)); + k++; } + return k ; } @@ -35,11 +41,11 @@ Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src) { hash_tab_ = SCM_EOL; - elt_count_ = src.elt_count_; + elt_count_ = 0; smobify_self (); hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11 ), SCM_EOL); - copy_scm_hashes (hash_tab_, src.hash_tab_); + elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_); } void @@ -48,9 +54,8 @@ Scheme_hash_table::operator = (Scheme_hash_table const & src) if (&src == this) return; - elt_count_ = src.elt_count_; hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11), SCM_EOL); - copy_scm_hashes (hash_tab_, src.hash_tab_); + elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_); } SCM @@ -108,13 +113,12 @@ Scheme_hash_table::set (SCM k, SCM v) /* resize if getting too large. */ - if (elt_count_ > 2 * SCM_SYMBOL_LENGTH (hash_tab_)) + if (elt_count_ > 2 * SCM_VECTOR_LENGTH (hash_tab_)) { SCM nh = scm_make_vector (gh_int2scm (3* elt_count_+1), SCM_EOL); - copy_scm_hashes (nh, hash_tab_); + elt_count_ = copy_scm_hashes (nh, hash_tab_); hash_tab_ = nh; } - } // UGH. @@ -131,7 +135,10 @@ void Scheme_hash_table::remove (SCM k) { scm_hashq_remove_x (hash_tab_, k); - elt_count_ --; + /* + don't decrease elt_count_ , as this may cause underflow. The exact + value of elt_count_ is not important. + */ } Scheme_hash_table::~Scheme_hash_table () @@ -142,7 +149,7 @@ SCM Scheme_hash_table::to_alist () const { SCM l = SCM_EOL; - for (int i = SCM_SYMBOL_LENGTH (hash_tab_); i--;) + for (int i = SCM_VECTOR_LENGTH (hash_tab_); i--;) for (SCM s = scm_vector_ref (hash_tab_, gh_int2scm (i)); ly_pair_p(s); s = ly_cdr (s)) { l = scm_acons (ly_caar (s), ly_cdar (s), l); diff --git a/ly/performer-init.ly b/ly/performer-init.ly index 0735bce8f1..6b94d3d504 100644 --- a/ly/performer-init.ly +++ b/ly/performer-init.ly @@ -12,11 +12,6 @@ StaffContext = \translator { \consists "Time_signature_performer" } -\translator { \StaffContext } -\translator { \StaffContext - \name RhythmicStaff -} - VoiceContext = \translator { \type "Performer_group_performer" @@ -26,7 +21,6 @@ VoiceContext = \translator { \consists "Piano_pedal_performer" \accepts "Thread" } -\translator { \VoiceContext } ThreadContext = \translator { \type "Performer_group_performer" @@ -34,19 +28,11 @@ ThreadContext = \translator { \consists "Note_performer" \consists "Tie_performer" } -\translator { \ThreadContext } - -% retain for compatibility reasons (FIXME: convert-ly) -\translator { - \type "Performer_group_performer" - \name Grace -} -\translator -{ +FiguredBassContext = \translator { \type "Performer_group_performer" - \name VoiceTwo\consists "Note_performer" - + \name FiguredBass + \consists "Swallow_performer" } GrandStaffContext = \translator { @@ -55,14 +41,37 @@ GrandStaffContext = \translator { \accepts RhythmicStaff \accepts Staff } -\translator { \GrandStaffContext } PianoStaffContext = \translator { \type "Performer_group_performer" \name "PianoStaff" \accepts Staff } -\translator { \PianoStaffContext } + +ScoreContext = \translator { + \type "Score_performer" + + \name Score + \alias Timing + instrument = #"bright acoustic" + \accepts Staff + \accepts GrandStaff + \accepts PianoStaff + \accepts Lyrics + \accepts StaffGroup + \accepts ChoirStaff + \accepts RhythmicStaff + \accepts ChordNames + \accepts FiguredBass + + \alias "Timing" + \consists "Timing_translator" + \consists "Swallow_performer" + + dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume + instrumentEqualizer = #default-instrument-equalizer +} + \translator { \type "Performer_group_performer" @@ -102,26 +111,13 @@ PianoStaffContext = \translator { \accepts Staff } -ScoreContext = \translator { - \type "Score_performer" - \name Score - \alias Timing - instrument = #"bright acoustic" - \accepts Staff - \accepts GrandStaff - \accepts PianoStaff - \accepts Lyrics - \accepts StaffGroup - \accepts ChoirStaff - \accepts RhythmicStaff - \accepts ChordNames - \alias "Timing" - \consists "Timing_translator" - \consists "Swallow_performer" - - dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume - instrumentEqualizer = #default-instrument-equalizer -} -\translator { \ScoreContext } +\translator { \ScoreContext } +\translator { \StaffContext } +\translator { \StaffContext \name RhythmicStaff } +\translator { \VoiceContext } +\translator { \ThreadContext } +\translator { \PianoStaffContext } +\translator { \GrandStaffContext } +\translator { \FiguredBassContext } diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index cc4a211516..5a20cde752 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -46,8 +46,8 @@ LILYPOND_BOOK_FORMAT = texi LY2DVI = $(script-dir)/ly2dvi.py LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py - else + ### some versions apparently choke on $(message) ### $(message running from installed stepmake) diff --git a/make/lilypond.redhat.spec.in b/make/lilypond.redhat.spec.in index 916ccd5c43..a383ac56a6 100644 --- a/make/lilypond.redhat.spec.in +++ b/make/lilypond.redhat.spec.in @@ -52,6 +52,8 @@ make -C Documentation # make html make web-doc top-web +make -C Documentation/user/ omf + %install @@ -77,10 +79,9 @@ mkdir -p $RPM_BUILD_ROOT/etc/profile.d cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh +make prefix="$RPM_BUILD_ROOT%{_prefix}" web-doc-install +make -C Documentation/user/ prefix="$RPM_BUILD_ROOT%{_prefix}" omf-install -# again, make sure that main package installs even if doco fails -mkdir -p web/out -tar -C web -xzf out/web.tar.gz %post @@ -94,9 +95,12 @@ rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan chkfontpath --add=%{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/ +scrollkeeper-update + echo 'Please logout first before using LilyPond.' %preun +scrollkeeper-update %if %{info} if [ $1 = 0 ]; then @@ -141,11 +145,16 @@ chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/ %{_datadir}/lilypond/@TOPLEVEL_VERSION@/ %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo + +%{docdir}/lilypond/@TOPLEVEL_VERSION@ +%{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@ + /etc/profile.d/lilypond.* -%files documentation -%defattr(-, root, root) -%doc web/ +# % files documentation + +# % defattr(-, root, root) + diff --git a/make/ly-vars.make b/make/ly-vars.make index 0dc3e4695c..09272b6303 100644 --- a/make/ly-vars.make +++ b/make/ly-vars.make @@ -4,6 +4,9 @@ # huh ? these are for documentation?! TELY_FILES := $(wildcard *.tely) + +OMF_FILES += $(foreach format, html pdf ps.gz, $(foreach f, $(TELY_FILES), $(outdir)/$(f:.tely=.$(format)).omf)) + ITELY_FILES := $(wildcard *.itely) ITEXI_FILES := $(wildcard *.itexi) LY_FILES := $(wildcard *.ly) diff --git a/scm/generate-documentation.scm b/scm/generate-documentation.scm index 016d77af7a..d83a2b1796 100644 --- a/scm/generate-documentation.scm +++ b/scm/generate-documentation.scm @@ -73,6 +73,16 @@ @end macro @end ifinfo + +@ignore +@omftitle LilyPond internals +@omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen +@omfdescription Programmer's reference of the LilyPond music engraving system +@omftype user manual +@omfcategory Music +@end ignore + + ") out-port) (define top-node diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index fa9ff3a7f8..1bc58d14c9 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -572,3 +572,5 @@ functions set spanner positions.") (grob-property-description 'avoid-note-head boolean? "if set, the stem of a chord does not pass through all note head, but start at the last note head. Used by tablature.") (grob-property-description 'up-to-staff boolean? "if set, stems' lengths are set so as stems end out of the staff. Used by tablature.") (grob-property-description 'use-breve-rest boolean? "boolean that tells multi-measure-rest to use a breve rest to represent the duration of 1 measure instead of w whole rest. It defaults to false. It is set to true when the duration of a measure is a breve or longer.") + +; (display (length all-backend-properties)) diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make index 2c81310461..c5081c60e1 100644 --- a/stepmake/stepmake/generic-vars.make +++ b/stepmake/stepmake/generic-vars.make @@ -9,7 +9,10 @@ DEPTH = $(depth)/$(package-depth) ##deprecated #topdir := $(abs-srcdir) #endif -pwd := $(shell pwd) + +## `which pwd` is to prevent symlink resolving intelligence +pwd:=$(shell `which pwd`) +current-relative-dir:=$(subst $(strip $(shell cd $(depth); `which pwd`)),,$(pwd)) ifeq ($(srcdir),.) src-depth = $(depth) diff --git a/stepmake/stepmake/omf-rules.make b/stepmake/stepmake/omf-rules.make new file mode 100644 index 0000000000..29033347d6 --- /dev/null +++ b/stepmake/stepmake/omf-rules.make @@ -0,0 +1,2 @@ + +# empty diff --git a/stepmake/stepmake/omf-targets.make b/stepmake/stepmake/omf-targets.make new file mode 100644 index 0000000000..aff9243920 --- /dev/null +++ b/stepmake/stepmake/omf-targets.make @@ -0,0 +1,8 @@ + +omf: $(OMF_FILES) + + +omf-local-install: $(OMF_FILES) + $(foreach a, $(OMF_FILES), $(INSTALL) $(a) $(local_package_omfdir)/$(a) && ) true + +local-install: omf-local-install diff --git a/stepmake/stepmake/omf-vars.make b/stepmake/stepmake/omf-vars.make new file mode 100644 index 0000000000..cc305e0087 --- /dev/null +++ b/stepmake/stepmake/omf-vars.make @@ -0,0 +1,5 @@ + +#empty +# + +OMF_FILES += diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index 663c89bcdb..1430de5905 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -9,6 +9,14 @@ $(outdir)/%.html: $(outdir)/%.texi # we want footers even if website builds (or is built) partly $(footify) $@ +$(outdir)/%.html.omf: $(outdir)/%.texi + $(GENERATE_OMF) --format html --location $(local_package_docdir)/$(current-relative-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ +$(outdir)/%.pdf.omf: $(outdir)/%.texi + $(GENERATE_OMF) --format pdf --location $(local_package_docdir)/$(current-relative-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ + +$(outdir)/%.ps.gz.omf: $(outdir)/%.texi + $(GENERATE_OMF) --format ps.gz --location $(local_package_docdir)/$(current-relative-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ + # Generic rule not possible? $(outdir)/%/%.html: $(outdir)/%.texi $(MAKEINFO) --output=$@ --html $< diff --git a/stepmake/stepmake/texinfo-vars.make b/stepmake/stepmake/texinfo-vars.make index 75ffd21c0e..4ba56853ef 100644 --- a/stepmake/stepmake/texinfo-vars.make +++ b/stepmake/stepmake/texinfo-vars.make @@ -6,3 +6,6 @@ ALL_SOURCES += $(TEXI_FILES) TEXINFO_SOURCES = $(TEXI_FILES) OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt)) + +GENERATE_OMF = $(PYTHON) $(depth)/buildscripts/texi2omf.py +