From: fred Date: Tue, 26 Mar 2002 22:41:13 +0000 (+0000) Subject: lilypond-1.2.12 X-Git-Tag: release/1.5.59~2061 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0dc714c7bf11517193f22a0d40231b715614be4f;p=lilypond.git lilypond-1.2.12 --- diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index e8d8df44ff..716212ddb6 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -3,7 +3,7 @@ depth = .. NAME = documentation -SUBDIRS= tex metadoc bibliography pictures topdocs ntweb +SUBDIRS= user metadoc bibliography pictures topdocs ntweb STEPMAKE_TEMPLATES=documentation texinfo README_TOP_FILES=NEWS DEDICATION TODO AIMS diff --git a/Documentation/index.texi b/Documentation/index.texi index ae2d2e5754..c4fa876e17 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -37,7 +37,6 @@ @itemize @bullet @item @uref{TODO.txt,The TODO list} @item @uref{CHANGES.txt,The Change log} -@item @uref{hacking.html, About internals and working on lilypond} @item @uref{../topdocs/out-www/AUTHORS.html,The Authors} @item @uref{../topdocs/out-www/PATCHES.html,Sending and applying Patches} @end itemize diff --git a/Documentation/metadoc/GNUmakefile b/Documentation/metadoc/GNUmakefile index 169d6efe15..bd940faee7 100644 --- a/Documentation/metadoc/GNUmakefile +++ b/Documentation/metadoc/GNUmakefile @@ -19,7 +19,7 @@ EXTRA_DIST_FILES= $(BIB_FILES) $(DOC_FILES) $(DATA_FILES) $(EL_FILES) $(TEX_FIL HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html)) PS_FILES = $(DVI_FILES:.dvi=.ps) -STEPMAKE_TEMPLATES=tex documentation +STEPMAKE_TEMPLATES=tex documentation texinfo LOCALSTEPMAKE_TEMPLATES=lilypond mudela export BIBINPUTS:=$(shell pwd)//$(PATHSEP)$(BIBINPUTS) diff --git a/Documentation/metadoc/hacking.texi b/Documentation/metadoc/hacking.texi new file mode 100644 index 0000000000..42bcbee28e --- /dev/null +++ b/Documentation/metadoc/hacking.texi @@ -0,0 +1,829 @@ +\input texinfo @c -*-texinfo-*- +@setfilename internals.info +@settitle LilyPond internals + +@node Top, LilyPond internals, (dir), (dir) +@top + + +@menu +* LilyPond internals:: +* Overview:: +* mudela:: +* Request_engraver:: +* Graphic elements:: +* Score elements:: +* Items:: +* Spanners:: +* Future work:: +* Coding standards:: +* Making patches:: + +@end menu + +@node LilyPond internals, , Top, Top +@menu +* Overview:: Overview +* mudela:: mudela +* Request_engraver:: Request_engraver +@end menu + + +@chapter Help Needed! + +[Call for help] + +[List tasks: + +* Mutopia + +* Doco LilyPond + +* Straightforward extensions + +* GUI editors. + +] + +@chapter LilyPond internals + + +This documents some aspects of the internals of GNU LilyPond. Some of +this stuff comes from e-mail I wrote, some from e-mail others wrote, +some are large comments taken away from the headers. This page may be +a little incoherent. Unfortunately, it is also quite outdated. A +more thorough and understandable document is in the works. + +You should use @code{doc++} to take a peek at the sources. + +@node Overview, mudela, Top, Top +@section Overview + +GNU LilyPond is a "multi-pass" system. The different passes have been +created so that they do not depend on each other. In a later stage +some parts may be moved into libraries, or seperate programs, or they +might be integrated in larger systems. + +@table @samp + +@item Parsing: + +No difficult algorithms. The .ly file is read, and converted to a list +of @code{Scores}, which each contain @code{Music} and paper/midi-definitions. + +@item Interpreting music + +The music is walked through in time-order. The iterators which do the +walking report Music to Translators which use this information to +create elements, either MIDI or "visual" elements. The translators +form a hierarchy; the ones for paper output are Engravers, for MIDI +Performers. + +The translators swallow Music (mostly atomic gobs called Requests), +create elements, broadcast them to other translators on higher or same +level in the hierarchy: + +The stem of a voice A is broadcast to the staff which contains A, but +not to the stems, beams and noteheads of a different voice (say B) or +a different staff. The stem and noteheads of A are coupled, because +the the Note_heads_engraver broadcasts its heads, and the Stem_engraver catches +these. + +The engraver which agrees to handle a request decides whether to to +honor the request, ignore it, or merge it with other requests. Merging +of requests is preferably done with other requests done by members of +the same voicegroups (beams, brackets, stems). In this way you can put +the voices of 2 instruments in a conductor's score so they make chords +(the Beam requests of both instruments will be merged). + +@item Prebreaking + +Breakable stuff (eg. clefs and bars) are copied into pre and +postbreaks. + +@item Preprocessing + +Some dependencies are resolved, such as the direction of stems, beams, +and "horizontal" placement issues (the order of clefs, keys etc, +placement of chords in multi-voice music), + +@item Break calculation: + +The lines and horizontal positions of the columns are determined. + +@item Breaking + +Through some magical interactions with Line_of_score and Super_elem +(check out the source) the "lines" are produced. + +All other spanners can figure across which lines they are spread. If +applicable, they break themselves into pieces. After this, each piece +(or, if there are no pieces, the original spanner itself) throws out +any dependencies which are in the wrong line. + +@item Postprocesing: + +Some items and all spanners need computation after the Paper_column +positions are determined. Examples: slurs, vertical positions of +staffs. + +@item Output paper + +@end table + +@node mudela, Request_engraver, Overview, Top +@section mudela + +Most information is stored in the form of a request. In music +typesetting, the user might want to cram a lot more symbols on the +paper than actually fits. To reflect this idea (the user asks more +than we can do), the container for this data is called Request. + +In a lot of other formats this would be called an 'Event' + +@table @samp +@item @code{Barcheck_req} + Checks during music processing if start of this voice element + coincides with the start of a measure. Handy to check if you left out + some voice elts. +@item @code{Note_req} + LilyPond has to decide if the ball should be hanging left or + right. This influences the horizontal dimensions of a column, and this + is why request processing should be done before horizontal spacing. + Other voices' frivolities may cause the need for accidentals, so this + is also for the to decide. The engraver can decide on positioning based on + ottava commands and the appropriate clef. +@item @code{Rest_req} + Typeset a rest. +@item @code{Span_req} + This type of request typically results in the creation of a @code{Spanner} +@item @code{Beam_req} + Start/stop a beam. + Engraver has to combine this request with the stem_request, since the + number of flags that a stem wants to carry will determine the + number of beams. +@item @code{Dynamic} + Each dynamic is bound to one note (a crescendo spanning multiple + notes is thought to be made of two "dynamics": a start and a stop). + Dynamic changes can occur in a smaller time than the length of its + note, therefore fore each @code{Dynamic} request carries a time, measured + from the start of its note. +@end table + +@node Request_engraver, , mudela, Top +@section Request_engraver + +In the previous section the idea of Request has been explained, but +this only solves one half of the problem. The other half is deciding +which requests should be honored, which should merged with other +requests, and which should be ignored. Consider this input + +@example + + \type Staff < % chord + @{ \meter 2/4; [c8 c8] @} + @{\meter 2/4; [e8 e8] @} + > + +@end example + +Both the cs and es are part of a staff (they are in the same +Voice_group), so they should share meters, but the two [ ] pairs +should be merged. + +The judge in this "allocation" problem a set of brokers: the requests +are transmitted to so-called engravers which respond if they want to +accept a request eg, the @code{Notehead_engraver} will accept +@code{Note_req}s, and turn down @code{Slur_req}s. If the Music_iterator +cannot find a engraver that wants the request, it is junked (with a +warning message). + +After all requests have been either assigned, or junked, the Engraver +will process the requests (which usually means creating an @code{Item} +or @code{Spanner}). If a @code{Request_engraver} creates something, it +tells the enclosing context. If all items/spanners have been created, +then each Engraver is notified of any created Score_element, via a +broadcasting system. + +@unnumberedsubsec example: + +@example + + c4 + +@end example + +produces: + +@example + + Note_request (duration 1/4) + Stem_request (duration 1/4) + +@end example + +Note_request will be taken by a @code{Notehead_engraver}, stem_request +will be taken by a @code{Stem_beam_engraver}. @code{Notehead_engraver} +creates a @code{Notehead}, @code{Stem_beam_engraver} creates a +@code{Stem}. Both announce this to the Staff_engraver. Staff_engraver +will tell @code{Stem_beam_engraver} about the @code{Notehead}, which +will add the @code{Notehead} to the @code{Stem} it just created. + +To decide on merging, several engravers have been grouped. Please +check @file{init/engraver.ly}. + + + +@node Graphic elements, , , Top +@section Graphic elements + + +Music notation is composed of a sets of interrelated glyphs. In +Lilypond every glyph usually is represented by one object, a so-called +Graphic Object. The primary relations between graphic objects involve +positions: + +@itemize +@item consecutive notes are printed left to right, grouped in a staff +@item simultaneous notes are horizontally aligned (internally grouped in +a paper column). +@item the staccato mark is horizontally centered on the note it applies +to. +@end itemize + +The abstract encoding of such relations is done with the concept +@dfn{reference point}. The reference point (in X direction) of the +staccato mark is the note it applies to. The (X) position of the +staccato mark is stored relative to the position of the note head. This +means that the staccato will always maintain a fixed offset wrt to the +note head, whereever the head is moved to. + +In the same vein, all notes on a staff have their Y positions stored +relative to an abstract object called Axis_group_spanner. If the +Axis_group_spanner of one staff is moved, the absolute Y positions of +all objects in that spanner change along, in effect causing the staff +and all its contents to move as a whole. + +Each graphic object stores a pointer and an relative offset for each +direction: one for the X-axis, one for the Y-axis. For example, the X +parent of a Note_head usually is a Note_column. The X parent of a +Note_column usually is either a Collision or a Paper_column. The X +parent of a Collision usually is a Paper_column. If the Collision +moves, all Note_heads that have that Collision as parent also move, but +the absolute position of the Paper_column does not change. + +To build a graphical score with Graphic_elements, conceptually, one +needs to have one Root object (in Lilypond: Line_of_score), and +recursively attach objects to the Root. However, due to the nature +of the context selection mechanisms, it turns out to be more +advantageous to construct the tree the other way around: first small +trees (note heads, barlines etc.) are created, and these are +subsequently composed into larger trees, which are finally hung on a +Paper_column (in X direction) or Line_of_score (in Y direction). + +The structure of the X,Y parent relations are determined by the +engravers and notation contexts: + +The most important X-axis parent relation depends on the timing: notes +that come earlier are attached to Paper_column that will be positioned +more to the left. + +The most important Y-axis relation depends on containment of contexts: +notes (created in a Thread or Voice context) are put in the staff where +the originating context lives in. + +Graphical_axis_groups are special graphic objects, that are designed to +function as a parent. The size of a Graphical_axis_groups group is the +union of its children. + +@node Score elements, , , Top + +Besides relative positions there are lots of other relations between +elements. Lilypond does not contain other specialized relation +management (Like the relative positioning code). In stead, objects can +be connected through dependencies, which sets the order in which objects +are to be processed. + +Example: the direction of a beamed stem should equal the direction of +the beam. When the stem is a added to the beam, a dependency on the +beam is set in the stem: this means that @code{Beam::do_pre_processing +()} (which does various direction related things) will be called before +@code{Stem::do_pre_processing ()}. + +The code that manages dependencies resides in the class +@code{Score_element}, a derived class of @code{Graphical_element}. The +bulk of the code handles line breaking related issues. + +To sketch the problems with line breaking: suppose a slur spans a line +break, +@example + +c4( c'''' c | \break d d )d + +@end example +In this case, the slur will appear as two parts, the first part spanning +the first three notes (the @code{c}s), the second spanning the last +three (the @code{d}s). Within Lilypond this is modeled as breaking the +slur in parts: from the Original slur, two new clones of the old slur +are made. Initially both clones depend on the six notes. After the +hairy code in Score_element, Spanner and Item which does substitutions +in sets of dependencies, the first clone depends on the first three +notes, the second on the last three. + +The major derived classes of Score_element are Item and Spanner. +An item has one horizontal position. A spanner hangs on two items. + +@node Items, , , Top +@section Items + + + +An item is a score element that is associated with only one +Paper_column. Examples are note heads, clefs, sup and superscripts, etc. +Item is a derived class of Score_element. + +The shape of an item is known before the break calculations, and line +spacing depends on the size of items: very wide items need more space +than very small ones. + +An additional complication is the behavior of items at linebreaks. For +example, when you do a time signature change, you get only one symbol. +If it occurs at a linebreak, the new time signature must be printed both +before and after the linebreak. Other `breakable symbols' such as +clefs, and bar lines also exhibit this behavior. + +if a line of music is broken, the next line usually gets a clef. So in +TeX terms, the clef is a postbreak. The same thing happens with meter +signs: Normally the meter follows the bar. If a line is broken at that +bar, the bar along with the meter stays on the "last" line, but the next +line also gets a meter sign after the clef. To support this, +breakable items are generated in the three versions: original +(unbroken), left (before line break) and right (after line break). +During the line spacing, these versions are used to try how the spacing +of a line works out. + +Once the definitive spacing is determined, dependencies (and various +other pointers) are substituted such that all dependencies point at the +active items: either they point at the original, or they point at left +and right. + +@node Spanners, , , Top +@section Spanners + +Spanners are symbols that are of variable shape, eg. Slurs, beams, etc. +Spanners is a derived class of Score_element. + +The final shape can only be determined after the line breaking process. +All spanners are spanned on two items, called the left and right +boundary item. The X reference point is the left boundary item. + + +@node Future work, , , Top +@section Future work + +There are plans to unify Spanner and Item, so there will no longer be +such a clear distinction between the two. Right now, Score_elements are +always either Item or either Spanner. + +Most of the properties of a graphic object are now member variables of +the classes involved. To offer configurability, we want to move these +variables to scheme (GUILE) variables, and no longer use C++ code to +calculate them, but use Scheme functions. + +@node Coding standards, , , Top + +@chapter CodingStyle - standards while programming for GNU +LilyPond + +Functions and methods do not return errorcodes. + + +@unnumberedsubsec Languages + +C++ and Python are preferred. Perl is not. Python code should use an +indent of 8, using TAB characters. + +@unnumberedsubsec Filenames + +Definitions of classes that are only accessed via pointers +(*) or references (&) shall not be included as include files. + +filenames + +@example + ".hh" Include files + ".cc" Implementation files + ".icc" Inline definition files + ".tcc" non inline Template defs +@end example + +in emacs: + +@example + (setq auto-mode-alist + (append '(("\\.make$" . makefile-mode) + ("\\.cc$" . c++-mode) + ("\\.icc$" . c++-mode) + ("\\.tcc$" . c++-mode) + ("\\.hh$" . c++-mode) + ("\\.pod$" . text-mode) + ) + auto-mode-alist)) +@end example + + +The class Class_name_abbreviation is coded in @file{class-name-abbr.*} + +@unnumberedsubsec Indentation + +Standard GNU coding style is used. In emacs: + +@example + (add-hook 'c++-mode-hook + '(lambda() (c-set-style "gnu") + ) + ) +@end example + +If you like using font-lock, you can also add this to your @file{.emacs}: + +@example + (setq font-lock-maximum-decoration t) + (setq c++-font-lock-keywords-3 + (append + c++-font-lock-keywords-3 + '(("\\b\\([a-zA-Z_]+_\\)\\b" 1 font-lock-variable-name-face) + ("\\b\\([A-Z]+[a-z_]+\\)\\b" 1 font-lock-type-face)) + )) +@end example + +@unnumberedsubsec Classes and Types + +@example + This_is_a_class +@end example + +@unnumberedsubsec Members + +@example + Class::member () + Type Class::member_type_ + Type Class::member_type () +@end example + +the @code{type} is a Hungarian notation postfix for @code{Type}. See below + +@unnumberedsubsec Macros + +Macros should be written completely in uppercase + +The code should not be compilable if proper macro declarations are not +included. + +Don't laugh. It took us a whole evening/night to figure out one of +these bugs, because we had a macro that looked like +@code{DECLARE_VIRTUAL_FUNCTIONS ()}. + +@unnumberedsubsec Broken code + +Broken code (hardwired dependencies, hardwired constants, slow +algorithms and obvious limitations) should be marked as such: either +with a verbose TODO, or with a short "ugh" comment. + +@unnumberedsubsec Comments + +The source is commented in the DOC++ style. Check out doc++ at +@uref{http://www.zib.de/Visual/software/doc++/index.html} + +@example + + /* + C style comments for multiline comments. + They come before the thing to document. + [...] + */ + + /** + short description. + Long class documentation. + (Hungarian postfix) + + TODO Fix boring_member () + */ + class Class @{ + /** + short description. + long description + */ + + Data data_member_; + + /** + short memo. long doco of member () + @@param description of arguments + @@return Rettype + */ + Rettype member (Argtype); + + /// memo only + boring_member () @{ + data_member_ = 121; // ugh + @} + @}; + +@end example + + +Unfortunately most of the code isn't really documented that good. + +@unnumberedsubsec Members (2) + +Standard methods: + +@example + + ///check that *this satisfies its invariants, abort if not. + void OK () const + + /// print *this (and substructures) to debugging log + void print () const + + /** + protected member. Usually invoked by non-virtual XXXX () + */ + virtual do_XXXX () + + /**add some data to *this. + Presence of these methods usually imply that it is not feasible to this + via a constructor + */ + add (..) + + /// replace some data of *this + set (..) + +@end example + +@unnumberedsubsec Constructor + +Every class should have a default constructor. + +Don't use non-default constructors if this can be avoided: + +@example + + Foo f(1) + +@end example + +is less readable than + +@example + + Foo f; + f.x = 1 + +@end example + +or + +@example + + Foo f(Foo_convert::int_to_foo (1)) + +@end example + +@unnumberedsec Hungarian notation naming convention + +Proposed is a naming convention derived from the so-called +@emph{Hungarian Notation}. Macros, @code{enum}s and @code{const}s are all +uppercase, with the parts of the names separated by underscores. + +The hungarian notation is to be used when variables are not declared +near usage (mostly in member variables and functions). + +@unnumberedsubsec Types + +@table @samp +@item @code{byte} + unsigned char. (The postfix _by is ambiguous) +@item @code{b} + bool +@item @code{bi} + bit +@item @code{ch} + char +@item @code{f} + float +@item @code{i} + signed integer +@item @code{str} + string class +@item @code{sz} + Zero terminated c string +@item @code{u} + unsigned integer +@end table + +@unnumberedsubsec User defined types + +@example + + /** Slur blah. blah. + (slur) + */ + class Slur @{@}; + Slur* slur_p = new Slur; + +@end example + +@unnumberedsubsec Modifiers + +The following types modify the meaning of the prefix. +These are preceded by the prefixes: + +@table @samp +@item @code{a} + array +@item @code{array} + user built array. +@item @code{c} + const. Note that the proper order is @code{Type const} + i.s.o. @code{const Type} +@item @code{C} + A const pointer. This would be equivalent to @code{_c_l}, but since any + "const" pointer has to be a link (you can't delete a const pointer), + it is superfluous. +@item @code{l} + temporary pointer to object (link) +@item @code{p} + pointer to newed object +@item @code{r} + reference +@end table + +@unnumberedsubsec Adjective + +Adjectives such as global and static should be spelled out in full. +They come before the noun that they refer to, just as in normal english. + +@example + +foo_global_i: a global variable of type int commonly called "foo". + +@end example + +static class members do not need the static_ prefix in the name (the +Class::var notation usually makes it clear that it is static) + +@table @samp +@item @code{loop_i} + Variable loop: an integer +@item @code{u} + Temporary variable: an unsigned integer +@item @code{test_ch} + Variable test: a character +@item @code{first_name_str} + Variable first_name: a String class object +@item @code{last_name_ch_a} + Variable last_name: a @code{char} array +@item @code{foo_i_p} + Variable foo: an @code{Int*} that you must delete +@item @code{bar_i_l} + Variable bar: an @code{Int*} that you must not delete +@end table + +Generally default arguments are taboo, except for nil pointers. + +The naming convention can be quite conveniently memorised, by +expressing the type in english, and abbreviating it + +@example + + static Array foo + +@end example + +@code{foo} can be described as "the static int-pointer user-array", so you get + +@example + + foo_static_l_arr + +@end example + + +@unnumberedsec Miscellaneous + +For some tasks, some scripts are supplied, notably creating patches, a +mirror of the website, generating the header to put over cc and hh +files, doing a release. + +Use them. + +@node Making patches, , , Top + + +@unnumberedsec name + + +PATCHES - track and distribute your code changes + +This page documents how to distribute your changes to GNU lilypond + +We would like to have unified context diffs with full pathnames. A +script automating supplied with Lily. + +Distributing a change normally goes like this: + +@itemize @bullet +@item make your fix/add your code +@item Add changes to CHANGES, and add yourself to Documentation/topdocs/AUTHORS.texi +@item generate a patch, +@item e-mail your patch to one of the mailing lists + gnu-music-discuss@@gnu.org or bug-gnu-music@@gnu.org +@end itemize + +Please do not send entire files, even if the patch is bigger than the +original. A patch makes it clear what is changed, and it won't +overwrite previous (not yet released) changes. + +@unnumberedsec Generating a patch + +Simple version: run + +@example + make -C lilypond-x.y.z/ distclean + make -C lilypond-x.y.z.NEW/ distclean + diff -urN lilypond-x.y.z/ lilypond-x.y.z.NEW/ +@end example + +Complicated (but automated) version: + +In @file{VERSION}, set MY_PATCH_LEVEL: + +@example + + VERSION: + ... + MY_PATCH_LEVEL=jcn1 + +@end example + +In @file{CHANGES}, enter a summary of changes: + +@example + pl 0.1.73.jcn1 + - added PATCHES.texi +@end example + +Then, from the top of Lily's source tree, type + +@example + make release +@end example + +These handy python scripts assume a directory structure which looks +like: + +@example + + lilypond -> lilypond-x.y.z # symlink to development directory + lilypond-x.y.z/ # current development + patches/ # patches between different releases + releases/ # .tar.gz releases + +@end example + +(Some scripts also assume this lives in @file{$HOME/usr/src}). + + +@unnumberedsec Applying patches + + +If you're following LilyPond development regularly, you probably want to +download just the patch for each subsequent release. +After downloading the patch (into the patches directory, of course), simply +apply it: + +@example + + gzip -dc ../patches/lilypond-0.1.74.diff.gz | patch -p1 -E + +@end example + +and don't forget to make automatically generated files: + +@example + + autoconf footnote(patches don't include automatically generated files, + i.e. file(configure) and files generated by file(configure).) + + configure + +@end example + + +@bye + + diff --git a/Documentation/metadoc/lilypond-overview.doc b/Documentation/metadoc/lilypond-overview.doc index ddcd7f99e5..a408a9e8eb 100644 --- a/Documentation/metadoc/lilypond-overview.doc +++ b/Documentation/metadoc/lilypond-overview.doc @@ -12,7 +12,7 @@ \begin{document} \maketitle -[THIS IS WORK IN PROGRESS. THIS PAPER IS NOT FINISHED] +[THIS IS WORK IN PROGRESS. THIS IS NOT FINISHED] % -*-LaTeX-*- \section{Introduction} diff --git a/Documentation/programs.texi b/Documentation/programs.texi index 75fd7aa2f0..171627631e 100644 --- a/Documentation/programs.texi +++ b/Documentation/programs.texi @@ -2,7 +2,7 @@ @setfilename programs.info @settitle Programs -@node Top, , mudela-book Authors, (dir) +@node Top, , midi2ly Authors, (dir) @top @menu * Programs:: Your Softs- @@ -10,7 +10,6 @@ * LilyPond:: the GNU Music Typesetter * Ly2dvi:: Python utility to convert mudela to DVI * midi2ly:: convert MIDI to -mudela- -* mudela-book:: integrate LaTeX and mudela @end menu @@ -652,7 +651,7 @@ the GNU General Public License, from the file @file{COPYING}. The GNU LilyPond music typesetter. @end table -@node midi2ly Authors, mudela-book, midi2ly SEE ALSO, midi2ly +@node midi2ly Authors, Top, midi2ly SEE ALSO, midi2ly @section Authors Please consult the documentation file @file{AUTHORS} for more detailed @@ -664,118 +663,4 @@ information, and small contributions. -@node mudela-book, mudela-book SYNOPSIS, midi2ly Authors, Top -@menu -* mudela-book SYNOPSIS:: mudela-book SYNOPSIS -* mudela-book DESCRIPTION:: mudela-book DESCRIPTION -* mudela-book OPTIONS:: mudela-book OPTIONS -* mudela-book FILES:: mudela-book FILES -* mudela-book BUGS:: mudela-book BUGS -* mudela-book Authors:: mudela-book Authors -@end menu -@chapter mudela-book - -@node mudela-book SYNOPSIS, mudela-book DESCRIPTION, mudela-book, mudela-book -@section SYNOPSIS @strong{mudela-book} [options] inputfile - -@node mudela-book DESCRIPTION, mudela-book OPTIONS, mudela-book SYNOPSIS, mudela-book -@section DESCRIPTION @file{mudela-book} is a script that helps -integrating mudela and LaTeX. mudela-book runs LilyPond on -fragments of mudela in your source file, and includes the results into -document that can be processed with LaTeX. The result is a text -document with formatted music integrated. - -Lilypond will by default create all output files in directory @file{out}. -The file to give to latex has ext @file{.latex}. - -@strong{About the input} - -If the file contains the ``block'' - -@example - - \begin@{mudela@} - CONTENTS - \end@{mudela@} - -@end example - -then LilyPond is run on CONTENTS. mudela-book puts the result back, -surrounded by @code{\preMudelaExample} and @code{\postMudelaExample} -commands. @code{\preMudelaExample} and @code{posMudelaExample} is -defined to nothing by default, and the user can redefine them -to whatever he wants. - -@code{\begin} takes the following options: - -@table @samp -@item eps - the music is created as eps graphics that can be inserted in - the middle of a text line, not only as a separate paragraph -@item verbatim - CONTENTS is copied into the TeX source enclosed in a verbatim block. -@item 11pt, 13pt, 16pt, 20pt, 26pt - set the fontsize to use for the music -@item singleline - linewidth = -1. -@item multiline - linewidth = textwidth -@item fragment -@item nonfragment - Override mudela-book autodetection of what type of code is in the - mudela block, voice contents or complete code. -@end table - -@node mudela-book OPTIONS, mudela-book FILES, mudela-book DESCRIPTION, mudela-book -@section OPTIONS - -@table @samp - -@item --default-mudela-fontsize=??pt - Set the fontsize to use for mudela if no fontsize is given - as option. -@item --force-mudela-fontsize=??pt - Force all mudela to use this fontsize, overriding options - given to \begin@{mudela@} -@item --outname=FILE - The name of LaTeX file to output. If this option is not given, -the output name derived from the input name. -@item --out-www=DIRECTORY - The name of the directory to output lilypond output and input to. - This must be a name; the subdirectory will be created in the cwd. [FIXME] -@item --help - Print a short help message -@item --dependencies - Write dependencies to out-www/filename.dep -@item --force-verbatim - Make all mudela verbatim. -@item --initfile=FILE - read command definitions from @file{FILE} -@end table - -@node mudela-book FILES, mudela-book BUGS, mudela-book OPTIONS, mudela-book -@section FILES - See @file{Documentation/tex/out/mudela-book-doc.dvi} for more info. - You have to install LaTeX. - @file{mudela-book} is written in python 1.5, so you have to install - @uref{http://www.python.org,python}. - -@node mudela-book BUGS, mudela-book Authors, mudela-book FILES, mudela-book -@section BUGS - -The LaTeX \includeonly@{...@} command is ignored. - -You get trouble if you use the --force-verbatim option and have some -music in \footnote@{...@} or \marginpar@{...@}. - -Ignores almost all LaTeX commands that changes margins and linewidths. - -@node mudela-book Authors, Top, mudela-book BUGS, mudela-book -@section Authors - -@email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, @uref{http://www.cs.uu.nl/people/hanwen} - -@email{tomato@@xoommail.com, Tom Cato Amundsen} - - @bye diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile new file mode 100644 index 0000000000..10ddca981f --- /dev/null +++ b/Documentation/user/GNUmakefile @@ -0,0 +1,44 @@ +# Documentation/tex/Makefile + +depth=../.. + +DATA_FILES = $(wildcard *.data) +datafiles = $(addprefix $(outdir)/,$(DATA_FILES:.data=.html)) + +DOC_FILES = $(wildcard *.doc) + +DVI_FILES = $(addprefix $(outdir)/,$(DOC_FILES:.doc=.dvi) $(TELY_FILES:.tely=.dvi)) + +EXTRA_DIST_FILES= $(DOC_FILES) $(DATA_FILES) +HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html)) + +PS_FILES = $(DVI_FILES:.dvi=.ps) $(OUTDOC_FILES:.doc=.ps) $(OUTTEX_FILES:.tex=.ps) +PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES)) + +STEPMAKE_TEMPLATES=tex texinfo documentation +LOCALSTEPMAKE_TEMPLATES=lilypond mudela + +include $(depth)/make/stepmake.make + + +dvi: $(DVI_FILES) + +ps: $(PS_FILES) + +# urg +default: + +GENHTMLS = engraving colorado glossary computer-notation +OUTGENHTMLS = $(addprefix $(outdir)/, $(GENHTMLS:%=%.html)) + +local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) + $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation about LilyPond' \ + $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \ + | sed "s!$(outdir)/!!g" > $(outdir)/index.html + $(footify) $(outdir)/index.html + +$(outdir)/%.bib: %.bib + ln -f $< $@ + +localclean: + rm -f fonts.aux fonts.log feta*.tfm feta*.*pk diff --git a/Documentation/user/mudela-book.tely b/Documentation/user/mudela-book.tely new file mode 100644 index 0000000000..10f115a116 --- /dev/null +++ b/Documentation/user/mudela-book.tely @@ -0,0 +1,358 @@ +\input texinfo @c -*-texinfo-*- +@setfilename reference-manual.info +@settitle Reference Manual + +@node Top, , , (dir) +@top + + +@section Introduction + +[TODO: THIS MANUAL IS OUTDATED. FIXME.] + +Mudela-book is a script that process your \LaTeX file and with great +help from GNU LilyPond it translates blocks of mudela code it finds +inside @code{mudela} environments to tex or eps graphics. It then +creates a new file that can be sent through \LaTeX to create a +@file{.dvi} file with lines of music integrated with text. + +Mudela-book will do its best to try to align the music to the left and +right margins. Currently the most used papersizes and one- and +twocolumn mode is supported, but if you use the geometry-package from +LaTeX or change the margins things will break. + +This document assumes you have basic knowledge of GNU LilyPond and +LaTeX. + +So what does this look like? Well, here is an example: +@mudela[veryverbatim, intertext="produces this music:"] +\score{ + \notes\relative c'{ + \time 5/8; + [e16( g b c a g][e a b d] | )e2 d,8 | + [e16( g b c a g][e a b d] | )b2 [a16( f] | + [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] | + [f( a b d b a][f a b d] | )e2 + } +} +@end mudela +If you are lucky, the above example show a nice feature of LilyPond +and LaTeX. Since LilyPond can output the music as \TeX graphics, +LaTeX can insert pagebreaks between the lines of music. + +Notice that there is no @code{\paper} statement in the example +above. Mudela-book will insert some code for you that defines the +linewidth and the font to use. If you don't want to change the default, +there is no need to put an empty @code{\paper@{@}} inside the @code{\score}. +In the example above, something like +this might be inserted before your code: +@example +\include "paper16.ly" +\paper@{ \paper_sixteen + linewidth = 390.\pt; + castingalgorithm = \Gourlay; +@} +@end example +The actual values for linewidth will differ depending on papersize and +number of columns. Also, if you use a different fontsize for the +music, another file than @code{paper16.ly} will be included. + +If you want to make the music not so wide, you can insert a +@code{\paper} statement that set the linewidth: + +@mudela[veryverbatim, intertext="produces this music:"] +\score{ + \notes\relative c'{ + \time 5/8; + [e16( g b c a g][e a b d] | )e2 d,8 | + [e16( g b c a g][e a b d] | )b2 [a16( f] | + [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] | + [f( a b d b a][f a b d] | )e2 + } + \paper{linewidth = 10.\cm;} +} +@end mudela + +Very often, if you mix music and text, the music is often only a +few notes or at most a few bars. This music should be as short as +possible and not stretched to be aligned to the right margin. + +If you only write voice-contents in the mudela block, mudela-book +will set the @code{linewidth} variable to -1, so Lilypond +will make the music as short as possible but without breaking the +line. Here is a well know harmonic progression: +@mudela[veryverbatim, intertext="produce a well known harmonic progression:"] + +@end mudela + +If you want to place music examples in the text, +@mudela[eps] + +@end mudela +, you can use the @code{eps} option. This will create the music as +eps graphics and include it into the document with the +@code{\includegraphics} command. + +The code used look like this: +@example +@mudela[eps] + +@end mudela +@end example + +You can also use the @code{eps} option if the block is a complete +mudela source. This 5 cm long empty line, +@mudela[eps] +\score{ + \notes{s} + \paper{ linewidth = 5.\cm;} +} +@end mudela +was created with this code: +@example +@mudela[eps] +\score{ + \notes{s} + \paper{ linewidth = 5.\cm;} +} +@end mudela +@end example + +To avoid that LaTeX places the music on a line of its one, there should +be no empty lines between the normal text and the mudela +environment. + +You can also use @code{mudelafile} (on a separate line, FIXME), to +include another file. Files with name ending with @code{.sly} + +@section Fontsize options You can use all lilypond fontsizes in +mudela-book. The default 16pt fontsize is probably to big to be +included in the middle of the text, 11pt or 13pt is probably better. + +The code can look like this: +@example +@mudela[13pt, eps] + +@end mudela +@end example + +The following options set the fontsize: +@itemize +@item @code{11pt} +@mudela[11pt, eps] + \relative c'{ + r16 [c d e][f d e c] [g'8 c][b-\prall c] | + [d16 g, a b][c a b g][d'8 g f-\prall g] + } +@end mudela +@item @code{13pt} +@mudela[13pt, eps] + \relative c'{ + r16 [c d e][f d e c] [g'8 c][b-\prall c] | + [d16 g, a b][c a b g][d'8 g f-\prall g] + } +@end mudela +@item @code{16pt} +@mudela[16pt, eps] + \relative c'{ + r16 [c d e][f d e c] [g'8 c][b-\prall c] | + [d16 g, a b][c a b g][d'8 g f-\prall g] + } +@end mudela +@item @code{20pt} +@mudela[20pt, eps] + \relative c'{ + r16 [c d e][f d e c] [g'8 c][b-\prall c] | + [d16 g, a b][c a b g][d'8 g f-\prall g] + } +@end mudela +@item @code{26pt} +@mudela[26pt, eps] + \relative c'{ + r16 [c d e][f d e c] [g'8 c][b-\prall c] | + [d16 g, a b][c a b g][d'8 g f-\prall g] + } +@end mudela +@end itemize + + +@section More options +@itemize +@item The @code{singleline} option set @code{linewidth} to -1.0. +@item The @code{multiline} option set @code{linewidth} to a value letting +the music be aligned to the right margin. The music can span several +lines. +@end itemize + +@section Just in case... +The options @code{fragment} and @code{nonfragment} will override +mudela-book when it scans the mudela code to see if it is voice +contents or complete code. This might be useful if mudela-book choose +wrong. + +Since there is no finder's fee which doubles every year, there is no +need to wait for the price money to grow. So send a bug report today +if you need this one of these options. + +@section Examples + +This was all options to @code{\begin}. The rest of the mudela +document will show some ways you can use mudela in +LaTeX documents. It will also act as a simple test-suite for +mudela-book. You can place @code{eps} mudela in and marginspars just +as any other included eps graphics. + +@mudela +\score{ + \notes\relative c'{ + \time 12/8; + r4-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--] + [f16-.( )f-. dis8-- gis16-.( )gis-.] cis4.-\fermata | + + r4.-\fermata [cis,16 cis g'8 f16 f b8][g16 g f8 b16 b] dis4.-\fermata + } + \paper{linewidth = 7.\cm;} +} +@end mudela + + +To the right you can see some bars from the trumpet fanfara from the +beginning of the fantastic street opera ``Houdini the Great'', by the +Danish composer Andy Pape. The music is put inside a +@code{floatingfigure} environment, and the music will be aligned by +the right marging if you set floatingfigure width and mudela linewidth +to the same value. The code looks like this: + +@mudela[verbatim] +\score{ + \notes\relative c'{ + \time 12/8; + r4.-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--] + [f16-.( )f-. dis8-- gis16-.( )gis-.] cis8.-\fermata | + + r4.-\fermata [cis,16 cis g'8 f16 f b8] + [g16 g f8 b16 b] dis4.-\fermata + } + \paper{linewidth = 7.\cm;} +} +@end mudela + +If you have a lot of small music examples like this in the middle of +your text, you might get a nicer look by using ``double'' line +spacing. Put the @code{\linespread@{1.6@}} command into the preamble of +your document. Then the line spacing will not be increased between the +lines where you have music printed with the smallest font size. + +Mudela-book does know about @code{\onecolumn} and @code{\twocolumn}. +So the music will be adjusted to the new linewith: + +Verbatim environments will also ignore the page margins. That is +a feature of LaTeX. (But you usually put things inside a verbatim +environment when you don't want LaTeX to do any linebreaking) + + +@section Texinfo behavior + +[TODO] + +@section Invocation + +@file{mudela-book} is a script that helps integrating mudela and +LaTeX. mudela-book runs LilyPond on fragments of mudela in your +source file, and includes the results into document that can be +processed with LaTeX. The result is a text document with formatted +music integrated. + +Lilypond will by default create all output files in directory @file{out}. +The file to give to latex has ext @file{.latex}. + +@strong{About the input} + +If the file contains the ``block'' + +@example + + \begin@{mudela@} + CONTENTS + \end@{mudela@} + +@end example + +then LilyPond is run on CONTENTS. mudela-book puts the result back, +surrounded by @code{\preMudelaExample} and @code{\postMudelaExample} +commands. @code{\preMudelaExample} and @code{posMudelaExample} is +defined to nothing by default, and the user can redefine them +to whatever he wants. + +@code{\begin} takes the following options: + +@table @samp +@item eps + the music is created as eps graphics that can be inserted in + the middle of a text line, not only as a separate paragraph +@item verbatim + CONTENTS is copied into the TeX source enclosed in a verbatim block. +@item 11pt, 13pt, 16pt, 20pt, 26pt + set the fontsize to use for the music +@item singleline + linewidth = -1. +@item multiline + linewidth = textwidth +@item fragment +@item nonfragment + Override mudela-book autodetection of what type of code is in the + mudela block, voice contents or complete code. +@end table + + +@table @samp + +@item --default-mudela-fontsize=??pt + Set the fontsize to use for mudela if no fontsize is given + as option. +@item --force-mudela-fontsize=??pt + Force all mudela to use this fontsize, overriding options + given to \begin@{mudela@} +@item --outname=FILE + The name of LaTeX file to output. If this option is not given, +the output name derived from the input name. +@item --out-www=DIRECTORY + The name of the directory to output lilypond output and input to. + This must be a name; the subdirectory will be created in the cwd. [FIXME] +@item --help + Print a short help message +@item --dependencies + Write dependencies to out-www/filename.dep +@item --force-verbatim + Make all mudela verbatim. +@item --initfile=FILE + read command definitions from @file{FILE} +@end table + + + +@file{mudela-book} is written in python 1.5, so you have to install +@uref{http://www.python.org,python}. + + + +@section Bugs + +The LaTeX \includeonly@{...@} command is ignored. + +Ignores almost all LaTeX commands that changes margins and linewidths. + +@section Authors + +@email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, @uref{http://www.cs.uu.nl/people/hanwen} + +@email{tomato@@xoommail.com, Tom Cato Amundsen} + + +@bye + + + + + + diff --git a/Documentation/user/regression-test.tely b/Documentation/user/regression-test.tely new file mode 100644 index 0000000000..f945a54105 --- /dev/null +++ b/Documentation/user/regression-test.tely @@ -0,0 +1,302 @@ +\input texinfo @c -*-texinfo-*- vim:tw=72 +@setfilename regression-test.info +@settitle LilyPond Regression test + +@c fool ls-latex +@ignore +@author Han-Wen Nienhuys and Jan Nieuwenhuizen +@title LilyPond Regression test +@end ignore + +@node Top, , , + +@section Introduction + +This document tries give an brief overview of LilyPond features. When +the text correspond with the shown notation, we consider LilyPond +Officially BugFree (tm). This document is intended for finding bugs, +and documenting bugfixes. + +@section Notes and rests + +Rests. Note that the dot of 8th, 16th and 32nd rests rest should be +next to the top of the rest. All rests except the whole rest are +centered on the middle staff line. + +@mudelafile{rest.fly} + +Note head shapes are settable. The stem endings should be adjusted +per note head. If you want different note head styles on one stem, +you must create a special context called Thread. + +@mudelafile{noteheadstyle.ly} + +Noteheads can have dots, and ---although this is bad style in duple +meters--- rests can too. Augmentation dots should never be printed on +a staff line, but rather be shifted vertically. They should go up, but +in case of multiple parts, the down stems have down shifted dots. +(Wanske p. 186) In case of chords, all dots should be in a column. +The dots go along as rests are shifted to avoid collisions. + +@mudelafile{dots.fly} + +Multiple measure rests do not collide with barlines and clefs. They +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. + +@mudelafile{multi-measure-rest.ly} + +@section Stems + +Stem tremolos (official naming?) or rolls are tremolo signs that look +like beam segments crossing stems. If the stem is in a beam, the +tremolo must be parallel to the beam. If the stem is invisible +(eg. on a whole note), the tremolo must be centered on the note. + +@mudelafile{stem-tremolo.ly} + +Chord tremolos look like beams, but are a kind of repeat symbol. +To avoid confusion, chord tremolo beams do not reach the stems, but +leave a gap. Chord tremolo beams on half notes are not ambiguous, +as half notes cannot appear in a regular beam, and should reach the +stems. + +@mudelafile{chord-tremolo.sly} + +Beams, stems and noteheads often have communication troubles, since +the two systems for y dimensions (1 unit = staffspace, 1 unit = 1 +point) are mixed. + +Stems, beams, ties and slurs should behave similarly, when placed +on the middle staff line. Of course stem-direction is down for high +notes, and up for low notes. + +@mudelafile{stem-direction.sly} + +Similarly, if @code{stem_default_neutral_direction} is set to @code{-1}. + +@mudelafile{stem-direction-down.ly} + +@section Scripts + +The staccato dot (and all scripts with follow-into-staff set), must +not be on staff lines. + +@mudelafile{staccato-pos.sly} + +@section Grace notes + +Grace notes are typeset as an encapsulated piece of music. You can +have beams, notes, chords, stems etc. within a @code{\grace} section. +Slurs that start within a grace section, but aren't ended are attached +to the next normal note. Grace notes have zero duration. If there +are tuplets, the grace notes won't be under the brace. Grace notes +can have accidentals, but they are (currently) spaced at a fixed +distance. Grace notes (of course) come before the accidentals of the +main note. Grace notes can also be positioned after the main note. + +@mudelafile{grace.ly} + + +@section Beams, slurs and other spanners + +Beaming is generated automatically. Beams may cross bar lines. In that +case, line breaks are forbidden. Yet clef and key signatures are +hidden just as with breakable bar lines. + +@mudelafile{beaming.ly} + +Beams should behave reasonably well, even under extreme circumstances. +Stems may be short, but noteheads should never touch the beam. + +@mudelafile{beam-extreme.ly} + +Beams should always reach the middle staff line, the second beam +counting from the note head side, should never be lower than the +second staff line. This does not hold for grace note beams. + +@mudelafile{beam-position.sly} + +Slurs should look nice and symmetric. The curvature may increase +only to avoid noteheads, and as little as possible. + +@mudelafile{slur-symmetry.ly} +@mudelafile{slur-symmetry-1.ly} + +Ties are strictly horizontal. They are placed in between note heads. +The horizontal middle should not overlap with a staffline. + +@mudelafile{tie.ly} + +Beams can be typeset over fixed distance aligned staffs, beam +beautification doesn't really work, but knees do. Beams should be +behave well, wherever the switching point is. + +@mudelafile{beam-interstaff.ly} + +The same goes for slurs. They behave decently when broken across +linebreak. + +@mudelafile{slur-interstaff.ly} + +Tuplets are indicated by a bracket with a number. There should be no +bracket if there is one beam that matches the length of the tuplet. +The bracket does not interfere with the stafflines, and the number is +centered in the gap in the bracket. + +@mudelafile{tup.ly} + +@section Repeats + +LilyPond has three modes for repeats: folded, unfolded and +semi-unfolded. Unfolded repeats are fully written out. Semi unfolded +repeats have the body written and all alternatives sequentially. +Folded repeats have the body written and all alternatives +simultaneously. If the number of alternatives is larger than the +repeat count, the excess alternatives are ignored. If the number of +alternatives is smaller, the first alternative is multiplied to get to +the number of repeats. + +Unfolded behavior: + +@mudelafile{repeat-unfold.ly} + +Semi (un)folded behavior. Voltas can start on non-barline moments. +If they don't barlines should still be shown. + +@mudelafile{repeat-semifold.ly} + +Folded. This doesn't make sense without alternatives, but it works. + +@mudelafile{repeat-fold.ly} + +@section Lyrics + +Lyrics can be set to a melody automatically. Excess lyrics will be +dumped. Lyrics will not be set over rests. You can have melismata +either by setting a property melismaBusy, or by setting +automaticMelismas (which will set melismas during slurs and ties). If +you want a different order than first Music, then Lyrics, you must +precook a chord of staffs/lyrics and label those. Of course +@code{\rhythm} ignores any other rhythms in the piece. Hyphens and +extenders do not assume anything about lyric lengths, so they continue +to work. + +@mudelafile{lyric-combine.ly} + +@section Multiple notes + +Rests should not collide with beams, stems and noteheads. Rests may +be under beams. Rests should be move by integral number of spaces +inside the staff, and by half spaces outside. Notice that the half +and whole rests just outside the staff get ledger lines in different +cases. + +@mudelafile{rest-collision.ly} + +Normal collisions. We have support for polyphony, where the +middle voices are horizontally shifted. + +@mudelafile{collisions.ly} + +The number of stafflines of a staff can be set with the property +numberOfStaffLines. Ledger lines both on note heads and rests are +adjusted. Barlines also are adjusted. + + +@mudelafile{number-staff-lines.fly} + +@section Spacing + +In a limited number of cases, LilyPond corrects for optical spacing +effects. In this example, space for opposite pointed stems is adjusted + +@mudelafile{stem-spacing.sly} + +If there are accidentals in the music, we add space, but the space +between note and accidentals is less than between the notes with the +same value. Clef changes also get extra space, but not as much as +barlines. + + +Even if a line is very tightly spaced, there will still be room +between prefatory matter and the following notes. The space after the +prefatory is very rigid. In contrast, the space before the barline +must stretch like the space within the measure. + +Tight: + +@mudelafile{spacing-tight.ly} + +Natural: + +@mudelafile{spacing-natural.ly} + +Loose: + +@mudelafile{spacing-loose.ly} + + +@section Global stuff + +Markings that are attached to (invisible) barlines are +delicate: the are attached to the rest of the score without the score +knowing it. Consequently, they fall over often. + +@mudelafile{bar-scripts.ly} + +Staff margins are also markings attached to barlines. They should be +left of the staff, and be centered vertically wrt the staff. They may +be on normal staffs, but also on compound staffs, like the PianoStaff + +@mudelafile{staff-margin.ly} + +Breathing signs, also used for phrasing, do normally not influence +global spacing -- only if space gets tight, notes are shifted to make +room for the breathing sign. Breathing signs break beams running +through their voice. In the following example, the notes in the first +two measures all have the same distance from each other: + +@mudelafile{breathing-sign.ly} + +Fonts are available in a default set of sizes: 11, 13, 16, 20, 23 and +26pt staffheight. Sizes of the text fonts and symbol fonts are made +to match the staff dimensions. + +@mudelafile[nofly]{size11.ly} + +@mudelafile[nofly]{size13.ly} + +@mudelafile[nofly]{size16.ly} + +@mudelafile[nofly]{size20.ly} + +@mudelafile[nofly]{size23.ly} + +@mudelafile[nofly]{size26.ly} + + +@section Clefs and Time Signatures + +The transparent clef should not occupy any space and with style +@code{fullSizeChanges}, the changing clef should be typeset in full +size. For octaviated clefs, the ``8'' should appear closely above or +below the clef respectively. The ``8'' is processed in a convoluted +way, so this is fragile as well. + +@mudelafile{clefs.ly} + +@ignore +@c the input file is too long and does not test for specific bugs +By default, time signatures are written with two numbers. With style +``C'', 4/4 and 2/2 are written with their corresponding symbols and +with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and +9/8 are typeset with symbols, all other signatures retain the default +layout. The style ``1'', gives single number signatures for all +signatures. +% +\mu delafile{time.fly} +@end ignore + +@bye diff --git a/NEWS b/NEWS index 1d595bfa44..66e89bcf1c 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,14 @@ -WHAT'S NEW? + +WHAT'S NEW SINCE 1.2.0 + +* Much faster spacing engine. + +* Features: automatic staff switching + +* Documentation now all is in texinfo. + + +WHAT'S NEW SINCE 1.0.17 * Large cleanups, enhanced design and GUILE integration for smaller memory footprint and more flexible code. diff --git a/TODO b/TODO index 9d0fd5f962..2dfc2ce715 100644 --- a/TODO +++ b/TODO @@ -11,11 +11,18 @@ Grep -i for TODO, FIXME and ugh/ugr/urg. .* TODO . * use Rhythmic_head::position_i () for all Staff_referenced +. * make diff and make release should leave junk in out/, not in ../test/ . * setting indent to 0 with \shape fails . * junk -M ? . * mudela-book doco . * Depracate Wordwrap . * rerun profile +. * fix or replace feta-accordion.mf +. * fix configure with CFLAGS or LDFLAGS, try: ++ CFLAGS=-g LDFLAGS='-Wl,--warn-common' ./configure ++ configure will use them while testing the compiler, but they don't ++ appear in config.make + . * Break_req handling is silly (break_forbid () + \break fucks up.) . * script engraver . * HaraKiriStaffContext removes bar lines and doesn't remove @@ -104,26 +111,7 @@ abc2ly, midi2ly? .* BUGS . * [c8. c16 c16 c16] in 6/8 timesig. . * staffside spanner (crescendo!) along with staffswitch. -. * --- 2, margin notes don't work correctly for the pianostaff (in the -following example, i expect the "piano" string to be centered -vertically between the two staves): - -\score { - \notes \context PianoStaff < - \property PianoStaff.instrument = "Piano" - \context Staff = treble { - a b c - } - \context Staff = bass { - \clef bass; - a, b, c, - } - > - \paper { - \translator { \StaffContext \consists "Staff_margin_engraver"; } - \translator { \PianoStaffContext \consists "Staff_margin_engraver"; } - } -} + . * > \context Staff < > {\voiceone''4. r8} @@ -134,12 +122,6 @@ vertically between the two staves): .* STUFF . * We need feta-din*.mf files for more sizes than 10. -. * -- The syntax for chords looks clumsy with two different meanings of - '-' and different syntax for separating modifiers from the tonic - and from other modifiers. Why not use for example ':' between - tonic and modifier and between the different modifiers? - - Rests and beams don't work too well together. Example: [ r8 g''16 des'] [r8 c16 a] @@ -246,12 +228,9 @@ repeated section with different words for each repeat. . * deps for ly2dvi . * TODO: merge atom & molecule; make tree from molecule. . * Align_element::padding ? -. * typo checks on property names? . * use streambufs and iostream to provide IO handling for TeX stream, mudela stream, data-file. . * seriously buffer TeX output (do profile of writing .5 mb TeX file.) -. * strip EXEs before installing -. * zip target for binary windows dist (JBR) . * fix partial measures in meaningful way. . * uniformise recent feta contributions. . * bigger and fatter 4/4 C @@ -295,12 +274,6 @@ to provide IO handling for TeX stream, mudela stream, data-file. syntax: \repeat "repeatsymbol" 2 {...}, but I'm not sure that I understand the implementation of repeats well enough. . * add full cello suites to web site (kom op, Maarten!) -. * rename 'staff_line_leading' (who is being lead where?) to -staff_space, interline; (or other meaningful name) and use throughout -lily - -[-> leading are the lead strips between the sticks (lines) of -typeface. ie. leading is vertical space --hwn] . * add mudela-book-doc source to webstie. . * Rethink Time_description \cadenza , \meter, should all be \properties @@ -374,7 +347,7 @@ touching it. axeses.push (as); } -. * GNU diff 2.7: diff -rN does not see a new directory with empty file + . * patch: don't touch timestamp if all patches fail. . * MetaPost: should not generate setgray for unfill . * mfplain.ini not in tetex 0.9 diff --git a/buildscripts/mf-to-xpms.sh b/buildscripts/mf-to-xpms.sh index 03729893d9..3e3d84dcd0 100644 --- a/buildscripts/mf-to-xpms.sh +++ b/buildscripts/mf-to-xpms.sh @@ -44,11 +44,11 @@ fi # numbered files if [ "x$named" = "x" ]; then - NUMS=`grep "^C *[0-9]*;" $afm | sed "s!^C *\([^;]*\).*!\\1!"` - PBMS=`grep "^C *[0-9]*;" $afm | sed "s!^C *\([^;]*\).*!out/$font-\\1.pbm!"` + NUMS=`grep "^C *[0-9]* *;" $afm | sed "s!^C *\([^ ;]*\).*!\\1!"` + PBMS=`grep "^C *[0-9]* *;" $afm | sed "s!^C *\([^ ;]*\).*!out/$font-\\1.pbm!"` else - NUMS=`grep "^C *[0-9]*;" $afm | sed "s!^C [^;]*; *N *\([^;]*\).*!\\1!"` - PBMS=`grep "^C *[0-9]*;" $afm | sed "s!^C [^;]*; *N *\([^;]*\).*!out/$font-\\1.pbm!"` + NUMS=`grep "^C *[0-9]* *;" $afm | sed "s!^C *.*; *N *\([^ ;]*\).*!\\1!"` + PBMS=`grep "^C *[0-9]* *;" $afm | sed "s!^C *.*; *N *\([^ ;]*\).*!out/$font-\\1.pbm!"` fi # $PKTOPBM out/$font.${RESOLUTION}pk -x 100 -y 100 $PBMS diff --git a/configure.in b/configure.in index bb3fa611c1..d1fff38d70 100644 --- a/configure.in +++ b/configure.in @@ -19,12 +19,18 @@ printing_b=no AC_ARG_ENABLE(printing, [ enable-printing turn on debug printing. Default: off], [printing_b=$enableval]) - + if test "$optimise_b" = yes; then DEFINES="$DEFINES -DSTRING_UTILS_INLINED" AC_DEFINE(STRINGS_UTILS_INLINED) fi +if test "$printing_b" = no; then + # ugh + AC_DEFINE(NPRINT) + DEFINES="$DEFINES -DNPRINT" +fi + AC_STEPMAKE_CXX AC_STEPMAKE_GXX AC_STEPMAKE_CXXTEMPLATE diff --git a/input/bugs/c.ly b/input/bugs/c.ly new file mode 100644 index 0000000000..0f605aa829 --- /dev/null +++ b/input/bugs/c.ly @@ -0,0 +1,24 @@ +% core dumps + +global = \notes { + \key a \minor; + \time 6/4; +} + +\score{ + \notes \context PianoStaff < + \global + \context Staff=up { c } + %\context Staff=down { \autochange Staff c } +% \context Staff=down { c } + > + \paper { + \translator{ + \StaffContext + + % other core dump when this is removed? +% \remove "Time_signature_engraver"; + } + } +} + diff --git a/input/bugs/core.ly b/input/bugs/core.ly new file mode 100644 index 0000000000..5564617f77 --- /dev/null +++ b/input/bugs/core.ly @@ -0,0 +1,24 @@ +% core dumps + +global = \notes { + \key a \minor; + \time 6/4; +} + +\score{ + \notes \context PianoStaff < + \global + \context Staff=up { c } + %\context Staff=down { \autochange Staff c } + \context Staff=down { c } + > + \paper { + \translator{ + \StaffContext + + % other core dump when this is removed? + \remove "Time_signature_engraver"; + } + } +} + diff --git a/input/test/ac-extra-voice.ly b/input/test/ac-extra-voice.ly new file mode 100644 index 0000000000..e6d3f9603f --- /dev/null +++ b/input/test/ac-extra-voice.ly @@ -0,0 +1,69 @@ +global = \notes { + \key a \minor; + \time 6/4; +% \skip 1.*34; +% \bar ".|"; +} + +melody = \notes\relative c''{ + r2 r r + r2 r r + r4 a'8-- \< a-- a-- a-- c-- \!b-- a--\> gis f \!e + es8 \grace b c r4 r2 r +} + +basloopje = \notes\relative c{ + d,8( a' d f a d f d a f d )a +} + +accompany = \notes \relative c{ + \notes\relative c \basloopje + \notes\relative c \basloopje + \notes\relative c \basloopje + \notes\relative c \basloopje +} + +\score{ + \notes \context PianoStaff < +% \global + \context Staff=up < + \global + \context Voice=foo { + \property Voice.verticalDirection = 1 + \property Voice.scriptVerticalDirection = 1 + \melody + } + > + \context Staff=down < + \global + \clef bass; + \autochange Staff \accompany + > + > + + \paper { + gourlay_maxmeasures = 4.; + indent = 8.\mm; + textheight = 295.\mm; + + % no slur damping + slur_slope_damping = 100.0; + + \translator{ + \StaffContext + % don't auto-generate bars: not a good idea: -> no breakpoints + % barAuto = "0"; + % urg defaultBarType = ""; + defaultBarType = "empty"; + \remove "Time_signature_engraver"; + + slurVerticalDirection = 1; + verticalDirection = -1; + beamAutoEnd = "1/2"; + } + } + \midi { + \tempo 4 = 54; + } +} + diff --git a/lily/include/staff-symbol-referencer.hh b/lily/include/staff-symbol-referencer.hh index f768269c5b..255c57abcc 100644 --- a/lily/include/staff-symbol-referencer.hh +++ b/lily/include/staff-symbol-referencer.hh @@ -25,6 +25,11 @@ protected: public: Staff_symbol_referencer (); void set_staff_symbol (Staff_symbol*); + /** + Leading are the lead strips between the sticks (lines) of + typeface. ie. leading is vertical space. + + */ Real staff_line_leading_f () const; Staff_symbol * staff_symbol_l () const; int lines_i () const; diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 5c3cfec42b..d2db7b13e4 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -81,11 +81,11 @@ protected: virtual void do_add_processing (); virtual bool do_try_music (Music *req_l); virtual void do_print () const; - virtual void do_pre_move_processing(){} - virtual void do_post_move_processing(){} - virtual void do_process_requests () {} - virtual void do_creation_processing() {} - virtual void do_removal_processing() {} + virtual void do_pre_move_processing(); + virtual void do_post_move_processing(); + virtual void do_process_requests () ; + virtual void do_creation_processing() ; + virtual void do_removal_processing(); }; diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 7cca61759c..3d3173dd03 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -18,7 +18,7 @@ README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCE-1.0 ANNOUNCE-1.2 \ COPYING NEWS-0.1 NEWS-1.0 NEWS-0.0 NEWS-1.1 NEWS TODO AIMS CHANGES README_TXT_FILES = README.txt AUTHORS.txt INSTALL.txt IN_FILES := $(wildcard *.in) -EXTRA_DIST_FILES = dstreamrc mudela-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) TASKS +EXTRA_DIST_FILES = dstreamrc mudela-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES) # bootstrap stepmake: diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 30b86751ed..7816b08880 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -4,10 +4,11 @@ depth = .. STEPMAKE_TEMPLATES=metafont metapost install install-out -EXTRA_DIST_FILES += README +EXTRA_DIST_FILES += README feta.tex FET_FILES = $(wildcard feta[0-9]*.mf) FONT_FILES = $(wildcard feta*[0-9].mf) +XPM_FONTS = feta20 LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log)) TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex)) diff --git a/mf/README b/mf/README index 8f78c89183..7dad4c4a22 100644 --- a/mf/README +++ b/mf/README @@ -3,3 +3,16 @@ This is a font of music symbols. All MF sources are original. Most of the doco is in comments in the MF code, and in Documentation/tex/fonts.doc +To make xpms of feta20 font: + + make xpms + + +Accordion symbols are broken: comment-out + + input feta-accordion; + +from feta-schrift, and remake mf dir: + + make clean + make all xpms diff --git a/mf/feta.tex b/mf/feta.tex new file mode 100644 index 0000000000..a8815e7f64 --- /dev/null +++ b/mf/feta.tex @@ -0,0 +1,70 @@ +% display all feta chars in a pretty picture +% GNU LilyPond +% (c) 1998 Jan Nieuwenhuizen +% +% urg: fool ls-latex +\def\urg{ +\title{The Feta font} +\author{JCN} +\begin{document} +} + + +\parindent0pt +\nopagenumbers +\newcount\n +\newcount\i + +\font\fetatwenty = feta20 +\font\fetanumber = feta-nummer12 +\font\fetafinger = feta-nummer5 +\font\fetadyn = feta-din10 scaled \magstep 2 +\font\titlefont = cmbx12 scaled \magstep 4 +\font\subtitle = cmr9 + +\def\lilyfooter{Lily was here} +\def\setchar#1#2{\hbox to\charwidth{\hss{#1\char#2}\hss}} + +\def\charsperline{6} +\def\charheight{55pt} +\def\charwidth{60pt} + +\def\listfont#1#2#3{ + \n=#2 + \advance\n by-1 + \advance\n by-\charsperline + \loop\ifnum\n<#3 + \advance\n by\charsperline + \i=0 + {\vbox to\charheight{\vss\centerline{ + {\loop\ifnum\i<\charsperline + \advance\i by1 + \advance\n by1 + {\setchar{#1}{\number\n}} + \repeat}}}}\repeat} + +\def\title#1{\centerline{\titlefont #1}} +\def\author#1{\centerline{#1}} + +\title{FETA} + +\centerline{\subtitle (definitely not an abbreviation for Font-En-Tja)} + +\author{Han-Wen Nienhuys and Jan Nieuwenhuizen} + + +\vskip5mm + +\listfont{\fetatwenty}{0}{105} +% urg +\vskip-\charheight +\listfont{\fetanumber}{48}{58} +\vskip-\charheight +\listfont{\fetafinger}{48}{58} +\vskip-\charheight +\listfont{\fetadyn}{0}{6} +\vskip-\charheight + +\lilyfooter + +\bye diff --git a/mutopia/E.Satie/gnossienne-4-autochange.ly b/mutopia/E.Satie/gnossienne-4-autochange.ly new file mode 100644 index 0000000000..2780a7016e --- /dev/null +++ b/mutopia/E.Satie/gnossienne-4-autochange.ly @@ -0,0 +1,150 @@ +\header { + filename = "gnossienne-4.ly"; + title = "Gnossienne"; + subtitle = "4"; + source = ""; + composer = "Erik Satie (1866-1925)"; + enteredby = "jcn"; + copyright = "Public Domain"; +} + +%{ + Tested Features: cross staff auto beams and slurs, grace notes, no bars +%} + +\version "1.2.0"; + +\include "nederlands.ly" + +global = \notes { + \key a \minor; + \time 6/4; + \skip 1.*34; + \bar ".|"; +} + +melody = \notes\relative c''{ + \clef violin; + \property Voice.verticalDirection = 1 + \property Voice.graceFraction = "1/4" + r2 r r + r2 r r + r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e + es8 \grace b( ))c r4 r2 r + r2 r r + r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e + es8 \grace b( ))c r4 r2 r + r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis + )d4 \grace fis8()gis4 ~ gis8 r r4 r2 + r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis + )d4 \grace fis8()gis4 ~ gis8 r r4 r2 + \grace a8()f4 ~ f8 r r2 r + r2 r4 a8( b c d c b \grace b8()e \grace a,())g r4 r2 r + r2 r4 a8( b c d c b a b c d c b a b c d c b + \grace b8()e \grace a,())g r4 r2 r + a2( \grace e'8()f4 ~ )f8 r r2 + r2 r r + fis,4( \grace dis8<)cis4 ais> r2 r + \grace b'8()a \grace b()a r4 r2 r + r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e + es8 \grace b())c r4 r2 r + d,4( \grace fis8()gis4 ~ )gis8 r r4 r2 + f4 ~ f8 r r2 r + f'8( g a b a g f g a b a g + \grace f8()g \grace d)e r4 r2 r + f8( g a b a g f g a b a g + \grace f8()g8 \grace d())e r4 r2 r + a,2( \grace e'8() f4 ~ )f8 r r2 + r2 r r + fis,4( \grace dis8<)cis4 ais> r2 r + ~ +} + +basloopje = \notes\relative c{ +% d,8( a' d f a \translator Staff=treble d f d \translator Staff=bass a f d )a + d,8( a' d f a d f d a f d )a +} + +accompany = \notes \relative c{ + % snapnie, hoevaak relative c heeft ze nodig? + \notes\relative c \basloopje + \notes\relative c \basloopje + \notes\relative c \basloopje + \transpose bes \notes\relative c{ \basloopje } + \transpose bes \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \transpose bes \notes\relative c{ \basloopje } + \transpose bes \notes\relative c{ \basloopje } + \transpose a \notes\relative c{ \basloopje } + \transpose bes \notes\relative c{ \basloopje } + \transpose a \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \notes\relative c \basloopje + % huh? d' + \transpose d' \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \notes\relative c \basloopje + \transpose d' \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \notes\relative c \basloopje + \transpose e' \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \notes\relative c \basloopje + \transpose bes \notes\relative c{ \basloopje } + \transpose a \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \notes\relative c \basloopje + \transpose d' \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \transpose d' \notes\relative c{ \basloopje } + \notes\relative c \basloopje + \notes\relative c \basloopje + \transpose e' \notes\relative c{ \basloopje } + < e1 b' e> ~ < e b' e> +} + + +\score{ + \notes{ + \context PianoStaff \relative c < + %\context Staff=upper < + \context Staff=up < + \global + \context Voice=foo { + \property Voice.verticalDirection = 1 + \property Voice.scriptVerticalDirection = 1 + \melody + } + > + \context Staff=down < + \global + \clef bass; + \accompany + > + > + } + \paper { + gourlay_maxmeasures = 4.; + indent = 8.\mm; + textheight = 295.\mm; + + slur_interstaff_slope_damping = 100.0; + slur_interstaff_height_damping = 100.0; + + \translator{ + \StaffContext + % don't auto-generate bars: not a good idea: -> no breakpoints + % barAuto = "0"; + % urg defaultBarType = ""; + defaultBarType = "empty"; + \remove "Time_signature_engraver"; + + slurVerticalDirection = 1; + verticalDirection = -1; + beamAutoEnd = "1/2"; + } + } + \midi { + \tempo 4 = 54; + } +} diff --git a/mutopia/E.Satie/gnossienne-4.ly b/mutopia/E.Satie/gnossienne-4.ly index 41296e26e4..6094281c8b 100644 --- a/mutopia/E.Satie/gnossienne-4.ly +++ b/mutopia/E.Satie/gnossienne-4.ly @@ -20,7 +20,7 @@ global = \notes { \key a \minor; \time 6/4; \skip 1.*34; - \bar ".|"; +% \bar ".|"; } melody = \notes\relative c''{ @@ -107,14 +107,18 @@ accompany = \notes \relative c{ \score{ \notes{ \context AutoSwitchGrandStaff \relative c < - \global - \context Staff=upper { - \context Voice=foo - \property Voice.verticalDirection = 1 - \property Voice.scriptVerticalDirection = 1 - \melody - } - \context AutoSwitchContext \accompany + \context Staff=upper < + \global + \context Voice=foo{ + \property Voice.verticalDirection = 1 + \property Voice.scriptVerticalDirection = 1 + \melody + } + > + \context AutoSwitchContext < + \global + \accompany + > > } \paper { diff --git a/stepmake/bin/package-diff.py b/stepmake/bin/package-diff.py index bc80eaf909..3fc89f375f 100644 --- a/stepmake/bin/package-diff.py +++ b/stepmake/bin/package-diff.py @@ -119,7 +119,6 @@ i.e., you should rerun autoconf, configure """ def makediff (fromdir, todir, patch_name): - # urg, again? from packagepython import * @@ -238,7 +237,8 @@ if to_diff == from_diff: if not patch_name: pn = to_diff + '.diff' - patch_name = os.path.join (os.getcwd (), pn) + patch_name = os.path.join (os.getcwd (), 'out') + patch_name = os.path.join (patch_name, pn) from_diff = '/tmp/package-diff/' + from_diff to_diff = '/tmp/package-diff/' + to_diff @@ -277,3 +277,4 @@ os.system ('rm -fr %s %s' % (from_diff, to_diff)) sys.stderr.write ('\n') os.chdir (prev_cwd) + diff --git a/stepmake/bin/release.py b/stepmake/bin/release.py index d8ca76751c..9cad793748 100755 --- a/stepmake/bin/release.py +++ b/stepmake/bin/release.py @@ -1,75 +1,72 @@ #!@PYTHON@ # release.py -name = 'release' -version = '0.1' - import os import sys import getopt -(options, files) = getopt.getopt(sys.argv[1:], 'hp:', ['help', 'package=']) +topdir = '' +outdir = '.' + +(options, files) = getopt.getopt(sys.argv[1:], 'ho:p:', ['help', 'outdir=', 'package=']) def help (): - sys.stdout.write ("Usage: release [OPTION]...\n" - "Make a tarball and patch and combined ../test/updeet\n\n" - + "Options:\n" - + " -h, --help print this help\n" - + " -p, --package=DIR specify package\n" - ) - sys.exit (0) + sys.stdout.write (r"""Usage: release [OPTION]... +Make a tarball and patch + +Options: + -o, --outdir=DIR where to leave patches. + -h, --help print this help + -p, --package=DIR specify package""" +) + sys.exit (0) for opt in options: - o = opt[0] - a = opt[1] - if o == '-h' or o == '--help': - help () - elif o == '-p' or o == '--package': - topdir = a + o = opt[0] + a = opt[1] + if o == '-h' or o == '--help': + help () + elif o == '-p' or o == '--package': + topdir = a + elif o == '--outdir' or o == '-o': + outdir = a + sys.path.append (topdir + '/stepmake/bin') from packagepython import * package = Package (topdir) -packager = Packager () +os.chdir(package.topdir) +try: + os.system ('set -x; rm ' + os.path.join (outdir, package.name + '*gz')) +except: + pass -os.chdir(package.topdir) -status =os.system('make dist') + + +status = os.system('make dist') if status: - raise 'make dist failed' + raise 'make dist failed' cur_ver = package.version -# urg? -# print tarball(cur_ver) -barbaal=package.name + '-' + version_tuple_to_str (cur_ver) + '.tar.gz' -print barbaal -# os.rename('out/' + tarball(cur_ver), released_tarball(cur_ver)) -# hmmm -os.remove(package.release_dir + barbaal) -os.link('out/' + barbaal, package.release_dir + barbaal) -os.chdir(package.test_dir) + + +pn = '%s-%s' %(package.name, version_tuple_to_str(cur_ver)) +tarball = pn + '.tar.gz' +orig = os.path.join (outdir, tarball) try: - os.system('set -x; rm ' + package.test_dir + package.name + '*gz') + os.remove(os.path.join (package.release_dir, tarball)) except: pass -# os.link(released_tarball(cur_ver), tarball(cur_ver)) -os.link(package.release_dir + barbaal, barbaal) +os.link(orig, os.path.join (package.release_dir, tarball)) -# not a module, but a script (JCN) -# makepatch.main() - -# Module wherefore aren't thou Script -# A Rose by any other name would be as blonde. --HWN - -# urg -# os.system('@PYTHON@ ' + package.topdir + '/stepmake/bin/package-diff.py --package=' + topdir) os.system(sys.executable + ' ' + package.topdir + '/stepmake/bin/package-diff.py --package=' + topdir) -pn = package.name + '-%s' % version_tuple_to_str(cur_ver) -pn = pn + '.diff' -pn = pn + '.gz' -rel_pn = package.patch_dir + pn +diffname = pn + '.diff.gz' +rel_pn = package.patch_dir + diffname + +diffname = os.path.join (outdir, diffname) -os.rename(pn, rel_pn) -os.link(rel_pn, pn) +os.rename(diffname, rel_pn) +os.link(rel_pn, diffname) diff --git a/stepmake/stepmake/package.make b/stepmake/stepmake/package.make index 0b0fb1d8b8..0d525494c3 100644 --- a/stepmake/stepmake/package.make +++ b/stepmake/stepmake/package.make @@ -23,7 +23,7 @@ diff: $(PYTHON) $(step-bindir)/package-diff.py --package=$(topdir) $(makeflags) release: - $(PYTHON) $(step-bindir)/release.py --package=$(topdir) + $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir) rpm: $(depth)/$(package-icon) dist su -c 'rpm -tb $(depth)/$(outdir)/$(distname).tar.gz' diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index 045a8da175..f85d601f80 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -15,7 +15,7 @@ $(outdir)/%.dvi: $(outdir)/%.texi cd $(outdir); texi2dvi ../$< $(outdir)/%.txt: $(outdir)/%.texi - $(MAKEINFO) --no-split --no-headers --output $@ $< + $(MAKEINFO) -I../ --no-split --no-headers --output $@ $< $(outdir)/%.texi: %.texi cp $< $@