]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/user/music-glossary.tely: add @omf tags
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 15 Mar 2003 01:16:32 +0000 (01:16 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 15 Mar 2003 01:16:32 +0000 (01:16 +0000)
* 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

21 files changed:
ChangeLog
Documentation/user/GNUmakefile
Documentation/user/lilypond.tely
Documentation/user/music-glossary.tely
GNUmakefile.in
buildscripts/texi2omf.py
config.make.in
input/regression/multi-measure-rest.ly
lily/scm-hash.cc
ly/performer-init.ly
make/lilypond-vars.make
make/lilypond.redhat.spec.in
make/ly-vars.make
scm/generate-documentation.scm
scm/grob-property-description.scm
stepmake/stepmake/generic-vars.make
stepmake/stepmake/omf-rules.make [new file with mode: 0644]
stepmake/stepmake/omf-targets.make [new file with mode: 0644]
stepmake/stepmake/omf-vars.make [new file with mode: 0644]
stepmake/stepmake/texinfo-rules.make
stepmake/stepmake/texinfo-vars.make

index 45c1b8a4b425824c86f4c2bd50301763f08b58d4..bb89efba68832e61c84bc621527c335a5f1b1285 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2003-03-15  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * 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  <hanwen@cs.uu.nl>
 
        * buildscripts/texi2omf.py: new file.
index 08a901afd7856cd91177c64d9311a320414744c3..bb78b9dbf2bfeda304a1ed4a108a90e0e4e40997 100644 (file)
@@ -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
 
+
index b0b8ab3e91c8d5c7c0795245194d5a0749ec39f1..c6b0c58d39597e239cff5a80a5bc93d7a5ea183a 100644 (file)
@@ -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}.
index e379ae11aff1bcbeb160f9db354a957aa2aa98fc..7dd4511dedd519fa953c46f4ff52c49f4091fec8 100644 (file)
@@ -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?
index 5e77962a8567debb84477a6ee1710804bc94b687..6983fb6199cfbbfce873b076fb6de0e263aa6987 100644 (file)
@@ -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`
index f0c3d2859cce10bd0cdad37470cfdd376787fa7c..d6c01affb82dd2b13a42776e70763fa368e4c1ba 100644 (file)
@@ -53,6 +53,7 @@ if not files:
 formats = {
        'html' : 'text/html',
        'pdf' : 'application/pdf',
+       'ps.gz' : 'application/postscript',
        'ps' : 'application/postscript',
        }
 
index 1bfe4ca5d94aa842fb1eba26db42a5e9eeaaa735..2796ce0c03cc974b2cdcaa186c4a40b778b3a23c 100644 (file)
@@ -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)
 
index 52d6dafd98314c0d3080efa49f7bd29cc6267282..57ef79a54bb2706bda884809c49be8e19f754497 100644 (file)
@@ -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 {
index d2f16f911aebe63506367e5eeaea7441ad6eac0e..1a49a39b549f4e4b75785e58efa594e7d2db52f3 100644 (file)
 #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);
index 0735bce8f11ed7920ad47a857664cd351704fe66..6b94d3d504d1712e045655bfa8716a30234b607e 100644 (file)
@@ -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 }
index cc4a21151633939b7e4177a9c764ef6b3f40001a..5a20cde7529c183f450063765d1d06338e41f9ba 100644 (file)
@@ -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)
 
index 916ccd5c4333c36dd90d1ad06c566903fe34230c..a383ac56a631a1e9cc8b2bd684c499928ac6c9a7 100644 (file)
@@ -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)
+
 
 
index 0dc3e4695cca6ef9e1ffe9ccfef7a7b336e02274..09272b63033ae12012f6130fc96a7332bd22b60f 100644 (file)
@@ -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)
index 016d77af7aa24058c1675dbc3538310c82b77875..d83a2b179636d4c6bfcba6b1b260eb5d5f146fa3 100644 (file)
 @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
index fa9ff3a7f8a946aad9c462e866037325155b9cfb..1bc58d14c90c8d62744f6f47047ce3efc04b8594 100644 (file)
@@ -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))
index 2c8131046139f0ce0cd226b04cf222ce6da2f961..c5081c60e1f960665f16d961c24c8fd879868229 100644 (file)
@@ -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 (file)
index 0000000..2903334
--- /dev/null
@@ -0,0 +1,2 @@
+
+# empty
diff --git a/stepmake/stepmake/omf-targets.make b/stepmake/stepmake/omf-targets.make
new file mode 100644 (file)
index 0000000..aff9243
--- /dev/null
@@ -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 (file)
index 0000000..cc305e0
--- /dev/null
@@ -0,0 +1,5 @@
+
+#empty
+#
+
+OMF_FILES += 
index 663c89bcdb182c58ef176c42592ce3824534f90a..1430de5905888d6e7286b435981da0c4fa917691 100644 (file)
@@ -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 $<
index 75ffd21c0e5c1e1e02381edfd0cc6f00d20d483a..4ba56853efed77959fa931257045b5ef78bbe869 100644 (file)
@@ -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
+