--- /dev/null
+;;; Directory Local Variables
+;;; See Info node `(emacs) Directory Variables' for more information.
+
+((c++-mode
+ (c-default-style . "gnu")
+ (indent-tabs-mode))
+ (scheme-mode
+ (indent-tabs-mode))
+ (texinfo-mode
+ (fill-column . 66)
+ (indent-tabs-mode)))
\#*
\#.*
a.out
-aclocal.m4
autom4te.cache
config-*.hh
config-*.make
semantic.cache
.lock-wscript
build/
+.gitfilelist
NAME = documentation
LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
-MANUALS_SUBDIRS = usage contributor essay \
- web learning notation extending
-SUBDIRS = $(MANUALS_SUBDIRS) snippets logo pictures misc po css topdocs \
- included ly-examples $(LANGS)
+SUBDIRS = logo pictures misc po css topdocs \
+ ly-examples $(LANGS)
STEPMAKE_TEMPLATES = documentation texinfo tex omf
LOCALSTEPMAKE_TEMPLATES = lilypond ly
### Extra source files
-README_TOP_FILES= DEDICATION THANKS
+README_TOP_FILES= DEDICATION
IN_ITELY_FILES = $(call src-wildcard,snippets/*-intro.itely)
SNIPPET_LY_FILES = $(call src-wildcard,snippets/*.ly)
OUT_SNIPPET_LY_FILES = $(SNIPPET_LY_FILES:%.ly=out/%.ly)
-EXTRA_DIST_FILES = $(call src-wildcard,*.init) $(call src-wildcard,*.bst)
-
### Out files
# Dependencies
### AJAX scripts
JS_FILES = $(call src-wildcard,*.js)
PHP_FILES = $(call src-wildcard,*.php)
-EXTRA_DIST_FILES += $(JS_FILES) $(PHP_FILES)
OUT_JS_FILES = $(JS_FILES:%.js=$(outdir)/%.js)
OUT_PHP_FILES = $(PHP_FILES:%.php=$(outdir)/%.php)
BSTINPUTS=$(src-dir)/essay $(buildscript-dir)/bib2texi \
-s $(top-src-dir)/Documentation/lily-bib \
-o $(outdir)/colorado.itexi \
+ -q \
$(src-dir)/essay/colorado.bib
$(outdir)/computer-notation.itexi:
BSTINPUTS=$(src-dir)/essay $(buildscript-dir)/bib2texi \
-s $(top-src-dir)/Documentation/lily-bib \
-o $(outdir)/computer-notation.itexi \
+ -q \
$(src-dir)/essay/computer-notation.bib
$(outdir)/engravingbib.itexi:
BSTINPUTS=$(src-dir)/essay $(buildscript-dir)/bib2texi \
-s $(top-src-dir)/Documentation/lily-bib \
-o $(outdir)/engravingbib.itexi \
+ -q \
$(src-dir)/essay/engravingbib.bib
$(outdir)/essay.texi: \
@echo
info: $(INFO_FILES)
- @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
- @echo export PYTHONPATH=$(PYTHONPATH)
xml: $(outdir)/notation/notation.xml $(outdir)/internals/internals.xml
cp -f $< $@
$(OUT_TXT_FILES:%.txt=%.html): $(outdir)/%.html: $(outdir)/%.txt
- $(PYTHON) $(step-bindir)/text2html.py $<
+ $(buildscript-dir)/text2html $<
# Explicitly list the dependencies on generated content
$(outdir)/web.texi: $(outdir)/we-wrote.itexi $(outdir)/others-did.itexi $(outdir)/weblinks.itexi
ifneq ($(ISOLANG),)
new-lang-dir:
mkdir -p $(ISOLANG)/$(DIR)
- cp fr/GNUmakefile $(ISOLANG)
- cp fr/$(DIR)/GNUmakefile $(ISOLANG)/$(DIR)
- sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/$(DIR)/GNUmakefile
rm -f $(outdir)/*.*tely $(outdir)/*.*texi
$(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext $$(cd $(ISOLANG) && ls -1 ../$(DIR).tely ../$(DIR).texi)
for i in $$(cd $(outdir) && ls -1 $(DIR).tely $(DIR).texi); do\
new-lang:
# Also for updating/adding missing files
- mkdir -p $(ISOLANG)
+ mkdir -p $(ISOLANG)/included
+ if test -z "`ls $(ISOLANG)/included`"; then touch $(ISOLANG)/included/.gitignore; fi
+ cp fr/GNUmakefile $(ISOLANG)
+ sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile
$(foreach i,$(TRANSLATION_DIRS),$(MAKE) new-lang-dir DIR=$(i) &&) :
msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
test -e po/$(ISOLANG).po || cp po/lilypond-doc.pot po/$(ISOLANG).po
@finalout
@node Top
-@top New features in 2.16 since 2.14
+@top New features in 2.18 since 2.16
@allowcodebreaks false
* only show user-visible changes.
@end ignore
-@item
-Support for cross-staff stems on chords, using @code{crossStaff}
-and the @code{Span_stem_engraver}. This calculates the length of
-cross-staff stems automatically.
-@lilypondfile[quote]
-{cross-staff-stems.ly}
-
-@item
-The syntax of words (character sequences recognized without enclosing
-quotes) and commands (now always a backslash @samp{\} followed by a
-word) has been unified across all modes: it now consists of alphabetic
-characters, possibly enclosing isolated dashes @samp{-} and underlines
-@samp{_}.
-
-As one consequence, using unquoted text scripts like (literally!)
-@example
-@{ c-script c\f_script @}
-@end example
-will now tend to result in invalid music. Omitting quote marks
-for arbitrary text rather than keywords has never been good practice or
-even documented, and it is unlikely to have seen significant use.
-
-Staying with established conventions (like not using dashes or
-underlines for command names intended to be used inside of music)
-remains advisable. The reason for this change is more robust
-recognition of LilyPond's lexical units for LilyPond itself as well as
-external tools interpreting its syntax.
-
-@item
-Support for Kievan square notation:
-@lilypond[quote,relative=1,verbatim]
-\new KievanVoice {
- \cadenzaOn
- c d e f g a bes
- \bar "kievan"
-}
-@end lilypond
-
-@item
-Augmentation dots now avoid the other voice in two-voice polyphony
-so that users can move the @code{Dot_column_engraver} to set dots
-independently for each @code{Voice}.
-@lilypond[quote]
-\layout {
- \context {
- \Staff
- \remove Dot_column_engraver
- } \context {
- \Voice
- \consists Dot_column_engraver
- }
-}
-\relative c'' <<
- { \time 6/8
- <d f g>4. <d f g> <f, g> b
- } \\ {
- <f g b>4. <g b d> <b d> <e, g>
- } >>
-@end lilypond
-
-@item
-A Scheme function to adjust the control points of curves such as slurs
-and ties, developed by several users, is now included in LilyPond.
-@lilypond[quote,verbatim,relative=2]
-g8->( bes,-.) d4
-\shape Slur #'((-0.5 . 1.5) (-3 . 0) (0 . 0) (0 . 0))
-g8->( bes,!-.) d4
-@end lilypond
-
-@item
-Use of @code{\tempo} specifications in @code{\midi} blocks (removed in
-2.9.16 in favor of explicit @code{tempoWholesPerMinute} settings) has
-seen a revival: now any kind of property-setting music is turned into
-context definitions within output specifications, allowing for
-declarations like
-@example
-\layout @{ \accidentalStyle modern @}
-\midi @{ \tempo 4. = 66 @}
-@end example
-
-@item
-The LilyPond G clef has been redesigned - upper loop is now more balanced,
-bottom crook sticks out less and the "spine" (main vertical line) is more
-evenly curved. The old and new versions can be compared by looking at the
-documentation:
-@uref{http://lilypond.org/doc/v2.14/Documentation/notation/the-feta-font.html#clef-glyphs, old version},
-@uref{http://lilypond.org/doc/v2.15/Documentation/notation/the-feta-font.html#clef-glyphs, new version}.
-
-@item
-Lilypond's stencil commands have been simplified to allow for less code
-duplication and better height approximations of graphical objects. The
-following stencil commands have been eliminated:
-@itemize
-@item @code{beam}
-@item @code{bezier-sandwich}
-@item @code{bracket}
-@item @code{dashed-slur}
-@item @code{dot}
-@item @code{oval}
-@item @code{repeat-slash}
-@item @code{zigzag-line}
-@end itemize
-
-@item
-Flags are now treated as separate objects rather than as stem parts.
-@lilypond[fragment,quote,relative=2]
-\override Flag #'color = #red
-g8
-@end lilypond
-
-@item
-Two alternative methods for bar numbering can be set, especially for
-when using repeated music;
-
-@lilypond[fragment,quote,relative=1,noragged-right]
-\relative c'{
- \set Score.alternativeNumberingStyle = #'numbers
- \repeat volta 3 { c4 d e f | }
- \alternative {
- { c4 d e f | c2 d \break }
- { f4 g a b | f4 g a b | f2 a | \break }
- { c4 d e f | c2 d }
- }
- c1 \break
- \set Score.alternativeNumberingStyle = #'numbers-with-letters
- \repeat volta 3 { c,4 d e f | }
- \alternative {
- { c4 d e f | c2 d \break }
- { f4 g a b | f4 g a b | f2 a | \break }
- { c4 d e f | c2 d }
- }
- c1
-}
-@end lilypond
@item
-The following is a fundamental change in LilyPond's music
-representation: Rhythmic events like @code{LyricEvent} and
-@code{NoteEvent} are no longer wrapped in @code{EventChord} unless they
-have been actually entered as part of a chord in the input. If you
-manipulate music expressions in Scheme, the new behavior may require
-changes in your code. Calling the music function @code{\eventChords} or
-the Scheme function @code{event-chord-wrap!} converts to the old
-representation; using one of those might be easiest for keeping legacy
-code operative.
-
-The following three items are consequences of this change.
-
-@item
-The repetitive chord entry aid @code{q} has been reimplemented.
-Repeated chords are now replaced right before interpreting a music
-expression. In case the user wants to retain some events of the
-original chord, he can run the repeat chord replacement function
-@code{\chordRepeats} manually.
+The bar line user interface has changed. Bar glyphs now resemble the
+appearance of the bar line, so a left repeat sign has to be coded
+as @code{.|:}. The command @code{\defineBarLine} provides an easy way
+to define additional bar line styles.
@item
-String numbers and right hand fingerings on single notes now appear
-without having to be written inside of chord brackets.
-
-@item
-Music functions now work the same when used inside or outside of chords,
-including all the possibilities of argument parsing. Music variables
-can be used inside of chords: a construct like
-@lilypond[verbatim,quote,ragged-right]
-tonic=fis'
-{ <\tonic \transpose c g \tonic> }
+Accidentals in the key signature may be printed in octaves other
+than their traditional positions, or in multiple octaves.
+@lilypond[quote,relative=0]
+\override Staff.KeySignature #'flat-positions = #'((-5 . 5))
+\override Staff.KeyCancellation #'flat-positions = #'((-5 . 5))
+\clef bass \key es\major es g bes d
+\clef treble \bar "||" \key es\major es g bes d
+\override Staff.KeySignature #'sharp-positions = #'(2)
+\bar "||" \key d\major b fis b2
@end lilypond
-@noindent
-now works as expected. One can use @code{#@{@dots{}#@}} for
-constructing chord constituents. @code{\tweak} now works on single
-notes without needing to wrap them in a chord. Using it on command
-events and lyrics is now possible, but not likely to give results yet.
-
-@item
-@code{\tweak} now takes an optional layout object specification. It can
-be used for tweaking layout objects that are only indirectly caused by
-the tweaked event, like accidentals, stems, and flags:
-
-@lilypond[verbatim,quote,ragged-right,relative=2]
-<\tweak Accidental #'color #red cis4
- \tweak Accidental #'color #green es
- g>
-@end lilypond
-
-@item
-Scheme expressions inside of embedded Lilypond (@code{#@{@dots{}#@}})
-are now executed in lexical closure of the surrounding Scheme code.
-@code{$} is no longer special in embedded Lilypond. It can be used
-unconditionally in Lilypond code for immediate evaluation of Scheme
-expressions, similar to how @code{ly:export} could previously be used.
-@code{ly:export} has been removed. As a consequence, @code{#} is now
-free to delay evaluation of its argument until the parser actually
-reduces the containing expression, greatly reducing the potential for
-premature evaluation. There are also @q{splicing} operators @code{$@@}
-and @code{#@@} for interpreting the members of a list individually.
-
-@item
-To reduce the necessity for using @code{$}, Scheme expressions written
-with @code{#} are interpreted as music inside of music lists, and as
-markups or markup lists inside of markups.
-
-@item
-Support for jazz-like chords has been improved: Lydian and altered
-chords are recognised; separators between chord modifiers are now
-treated independently of separators between ``slash'' chords and their
-bass notes (and by default, slashes are now only used for the latter
-type of separator); additional pitches are no longer prefixed with
-``add'' by default; and the ``m'' in minor chords can be customized.
-@ruser{Customizing chord names} for more information.
-
-@item
-The @code{\markuplines} command has been renamed to @code{\markuplist}
-for a better match with its semantics and general Lilypond
-nomenclature.
-
-@item
-The interface for specifying string tunings in tablature has been
-simplified considerably and employs the scheme function
-@code{\stringTuning} for most purposes.
-
-@item
-Beams can now have their slopes preserved over line breaks.
-@lilypond[fragment,quote,relative=2]
-\override Beam #'breakable = ##t
-a8[ b c d e f g \bar "" \break f e d c b a]
-\once \override Beam #'positions = #beam::align-with-broken-parts
-a8[ b c d e f g \bar "" \break f e d c b a]
-\once \override Beam #'positions = #beam::slope-like-broken-parts
-a8[ b c d e f g \bar "" \break f e d c b a]
-@end lilypond
-To do this, several callback functions are now deprecated.
-@itemize
-@item @code{ly:beam::calc-least-squares-positions}
-@item @code{ly:beam::slope-damping}
-@item @code{ly:beam::shift-region-to-valid}
-@end itemize
-Furthermore, @code{ly:beam::quanting} now takes an additional argument
-to help calculations over line breaks. All of these functions are now
-automatically called when setting the @code{positions} parameter.
-
-@item
-In function arguments music, markups and Scheme expressions (as well as
-several other syntactic entities) have become mostly interchangeable and
-are told apart only by evaluating the respective predicate. In several
-cases, the predicate is consulted by the parser, like when deciding
-whether to interpret @code{-3} as a number or a fingering event.
-
-@item
-Music functions (and their close relatives) can now be defined with
-optional arguments.
-
-@item
-For defining commands executed only for their side-effects,
-@code{define-void-function} is now available.
-
-@item
-There is a new @code{define-event-function} command in analogy to
-@code{define-music-function} that can be used for defining music
-functions acting as post events without requiring a direction specifier
-(@code{-}, @code{^}, or @code{_}) placed before them.
-@lilypond[quote,verbatim,ragged-right]
-dyn=#(define-event-function (parser location arg) (markup?)
- (make-dynamic-script arg))
-\relative c' { c\dyn pfsss }
-@end lilypond
-
-@item
-A list of ASCII aliases for special characters can be included.
-@lilypond[quote,verbatim]
-\paper {
- #(include-special-characters)
-}
-\markup "• † ©right; &OE; &ss; ¶"
-@end lilypond
-
-@item
-There is a new @code{define-scheme-function} command in analogy to
-@code{define-music-function} that can be used to define functions
-evaluating to Scheme expressions while accepting arguments in Lilypond
-syntax.
-
-@item
-The construct @code{#@{ @dots{} #@}} can now be used not just for
-constructing sequential music lists, but also for pitches (distinguished
-from single note events by the absence of a duration or other
-information that can't be part of a pitch), single music events, void
-music expressions, post events, markups (mostly freeing users from
-having to use the @code{markup} macro), markup lists, number
-expressions, context definitions and modifications, and a few other
-things. If it encloses nothing or only a single music event, it no
-longer returns a sequential music list but rather a void music
-expression or just the music event itself, respectively.
-
-@item
-Pitches can be used on the right side of assignments. They are
-distinguished from single note events by the absence of a duration or
-other information that can't be part of a pitch.
-
-@item
-New command-line option @option{--loglevel=@var{level}} to control how much output
-LilyPond creates. Possible values are ERROR, WARN, BASIC_PROGRESS, PROGRESS, DEBUG.
-
-@item
-@code{\once \set} now correctly resets the property value to the previous value.
-@lilypond[fragment,quote,relative=2]
- \set fingeringOrientations = #'(left)
- <e-1>4
- \once \set fingeringOrientations = #'(right)
- <e-1>
- <e-1>-"left"
-@end lilypond
-
-@item
-The alignment of dynamic spanners (hairpins, text crescendo, etc.) is now
-automatically broken if a different direction is explicitly given.
-@lilypond[fragment,quote,relative=2]
-c4_\< c c^\> c c1_\p
-@end lilypond
-
-
-@item
-Appoggiaturas and acciaccaturas now also work inside a slur, not only inside
-a phrasing slur. Also, a function @code{\slashedGrace} was added that does
-not use a slur from the acciaccatura note.
-@lilypond[fragment,quote,relative=2]
-c4( \appoggiatura e8 d4 \acciaccatura e8 d4 \slashedGrace e8 c4)
-@end lilypond
-
-
-@item
-To suppress the line on a crescendo text spanner (and other similar spanners),
-LilyPond now fully supports the @code{#'style = #'none} property.
-@lilypond[fragment,quote,relative=2]
-\override DynamicTextSpanner #'style = #'none
-c4\cresc c c g, c'\p
-@end lilypond
-
-@item
-LilyPond.app now supports MacOS X 10.7, thanks Christian Hitz!
-
-@item
-Glissandi can now span multiple lines.
@end itemize
@ifhtml
For older news, go to
+@uref{http://lilypond.org/doc/v2.16/Documentation/changes/},
@uref{http://lilypond.org/doc/v2.14/Documentation/changes/},
-@uref{http://lilypond.org/doc/v2.12/Documentation/topdocs/NEWS.html},
or @uref{../,go back} to the Documentation index.
\fi
@end tex
+@include cyrillic.itexi
@c ***** Displaying text *****
+++ /dev/null
-depth = ../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
(ps), grobs (pgrob), and parsed music expressions (pmusic).
@example
-file ~/lilypond-git/build/out/bin/lilypond
+file $LILYPOND_GIT/build/out/bin/lilypond
b programming_error
b Grob::programming_error
can write relevant material for inclusion in the Notation
Reference. If the developer does not feel qualified to write
the documentation, a documentation editor will be able to
-write it from the regression tests. The text that is added to
-or removed from the documentation should be changed only in
-the English version.
+write it from the regression tests. In this case the developer
+should raise a new issue with the Type=Documentation tag containing
+a reference to the original issue number and/or the committish of
+the pushed patch so that the need for new documention is not
+overlooked.
+
+Any text that is added to or removed from the documentation should
+be changed only in the English version.
@node Edit changes.tely
@item
Finally, lily-git is always part of the LilyPond source code and is
-located in @file{~/lilypond-git/scripts/auxillar/lily-git.tcl}.
+located in @file{$LILYPOND_GIT/scripts/auxillar/lily-git.tcl}.
@end itemize
@item
Click on the @qq{Get source} button.
-A directory called @file{lilypond-git/} is now created within
+A directory called @file{$LILYPOND_GIT} is now created within
your home directory and the complete source code will start to be
downloaded into it.
problem persists, please ask for help.}
@item
-Close the lily-git GUI and navigate to the @file{lilypond-git/}
+Close the lily-git GUI and navigate to the @file{$LILYPOND_GIT}
directory to view and edit the source files.
@end enumerate
hopelessly confused!}
The button labeled @qq{Abort changes -- Reset to origin} will copy
-all changed files to a subdirectory of @file{lilypond-git/} named
+all changed files to a subdirectory of @file{$LILYPOND_GIT} named
@file{aborted_edits/}, and will reset the repository to the
current state of the remote repository (at @code{git.sv.gnu.org}).
@c we heavily recommend the out-of-tree build; do not change this!
@example
-cd ~/lilypond-git/
+cd $LILYPOND_GIT
sh autogen.sh --noconfigure
mkdir -p build/
cd build/
speed.
@example
-cd ~/lilypond-git/build/
+cd $LILYPOND_GIT/build/
make
@end example
You may run the compiled @code{lilypond} with:
@example
-cd ~/lilypond-git/build/
+cd $LILYPOND_GIT/build/
out/bin/lilypond my-file.ly
@end example
will likely take 2 to 10 hours.
@example
-cd ~/lilypond-git/build/
+cd $LILYPOND_GIT/build/
make
make doc
@end example
you bookmark the resulting page:
@example
-firefox ~/lilypond-git/build/out-www/offline-root/index.html
+firefox $LILYPOND_GIT/build/out-www/offline-root/index.html
@end example
@subsubheading Installing
Don't. There is no reason to install lilypond within LilyDev.
All development work can (and should) stay within the
-@file{$HOME/lilypond-git/} directory, and any personal composition
+@file{$LILYPOND_GIT} directory, and any personal composition
or typesetting work should be done with an official GUB release.
@item
Before making changes to the code, establish a baseline for the comparison by
-going to the @file{lilypond-git/build/} directory and running:
+going to the @file{$LILYPOND_GIT/build/} directory and running:
@example
make test-baseline
@end enumerate
@warning{Throughout the rest of this manual, most command-line
-input should be entered from @file{~/lilypond-git/}. This is
+input should be entered from @file{$LILYPOND_GIT}. This is
referred to as the @emph{top source directory}.}
Further instructions are in @ref{How to use lily-git}.
@subsubheading Technical details
-This creates (within the @file{~/lilypond-git/} directory) a
+This creates (within the @file{$LILYPOND_GIT} directory) a
subdirectory called @file{.git/}, which Git uses to keep track of
changes to the repository, among other things. Normally you don't
need to access it, but it's good to know it's there.
@warning{Throughout the rest of this manual, all command-line
input should be entered from the top directory of the Git
-repository being discussed (eg. @file{~/lilypond-git/}). This is
+repository being discussed (eg. @file{$LILYPOND_GIT}). This is
referred to as the @emph{top source directory}.}
Before working with the copy of the main LilyPond repository, you
@end example
By now the source files should be accessible---you should be able
-to edit any files in the @file{lilypond-git/} directory using a
+to edit any files in the @file{$LILYPOND_GIT} directory using a
text editor of your choice. But don't start just yet! Before
editing any source files, learn how to keep your changes organized
and prevent problems later---read @ref{Basic Git procedures}.
question, just answer with a newline (CR).
@example
-cd $HOME/lilypond-git/
+cd $LILYPOND_GIT
git cl config
@end example
ISOLANG = cs
depth = ../..
-# SUBDIRS = web learning notation texidocs usage included essay extending
-SUBDIRS = web learning texidocs essay usage included
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
NO_PDF_FILES = 1
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
CSS_FILES = $(call src-wildcard,*.css)
-EXTRA_DIST_FILES = $(CSS_FILES)
-
OUT_CSS_FILES = $(CSS_FILES:%=$(outdir)/%)
STEPMAKE_TEMPLATES = documentation
-moz-border-radius-bottomright: 7px;
-webkit-border-bottom-left-radius: 7px;
-webkit-border-bottom-right-radius: 7px;
+ border-bottom-left-radius: 7px;
+ border-bottom-right-radius: 7px;
margin: 0;
}
text-indent: -999em;
background: #6aec7c url(../pictures/lily-home-nav-bg.png) no-repeat 50% 50%;
width: 9%;
- /* css3 no go yet? */
- border-bottom-left-radius: 30px;
-moz-border-radius-bottomleft: 7px;
-webkit-border-bottom-left-radius: 7px;
+ border-bottom-left-radius: 7px;
}
#tocframe > ul:first-child > li:first-child a:hover {
width: 9%;
-moz-border-radius-bottomright: 7px;
-webkit-border-bottom-right-radius: 7px;
+ border-bottom-right-radius: 7px;
}
#tocframe li {
-moz-border-radius-bottomright: 20px;
-webkit-border-top-right-radius: 20px;
-webkit-border-bottom-right-radius: 20px;
+ border-top-right-radius: 20px;
+ border-bottom-right-radius: 20px;
}
#tocframe li form input[type="hidden"] {
-moz-border-radius-bottomleft: 7px;
-webkit-border-top-left-radius: 7px;
-webkit-border-bottom-left-radius: 7px;
+ border-top-left-radius: 7px;
+ border-bottom-left-radius: 7px;
}
#tocframe .toc .toc li:last-child a {
-moz-border-radius-bottomright: 7px;
-webkit-border-top-right-radius: 7px;
-webkit-border-bottom-right-radius: 7px;
+ border-top-right-radius: 7px;
+ border-bottom-right-radius: 7px;
}
#tocframe .toc .toc li a {
/* Experimental rounded corners */
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
+ border-radius: 10px;
margin: 1em;
}
--- /dev/null
+@c -*- coding: utf-8; mode: texinfo; -*-
+@c
+@c cyrillic.itexi
+@c
+@c
+@c Cyrillic support for texinfo, using UTF-8 input encoding and LH fonts,
+@c with all the restrictions for non-CM fonts (this is, no kerning and no
+@c hyphenation).
+@c
+@c For outline fonts, we also use the cm-super family; the setup is the same
+@c as with the EC fonts except that the prefix is not `ec' but `la'.
+
+@tex
+\gdef\cyrfont{%
+ % Use the EC size information.
+ \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
+ \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
+ \ifmonospace
+ \font\thiscyrfont = latt\ecsize \space at \nominalsize
+ \else
+ \ifx\curfontstyle\bfstylename
+ \font\thiscyrfont = lab\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ \font\thiscyrfont = la\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi
+ \fi
+ \thiscyrfont
+}
+
+
+% Glyph names, taken from LaTeX's `t2aenc.def' font encoding definition file
+% for T2A encoding.
+
+\gdef\textnumero{{\cyrfont \char 157}}
+\gdef\CYRpalochka{{\cyrfont \char 13}}
+
+\gdef\CYRA{{\cyrfont \char 192}}
+\gdef\cyra{{\cyrfont \char 224}}
+\gdef\CYRB{{\cyrfont \char 193}}
+\gdef\cyrb{{\cyrfont \char 225}}
+\gdef\CYRV{{\cyrfont \char 194}}
+\gdef\cyrv{{\cyrfont \char 226}}
+\gdef\CYRG{{\cyrfont \char 195}}
+\gdef\cyrg{{\cyrfont \char 227}}
+\gdef\CYRD{{\cyrfont \char 196}}
+\gdef\cyrd{{\cyrfont \char 228}}
+\gdef\CYRE{{\cyrfont \char 197}}
+\gdef\cyre{{\cyrfont \char 229}}
+\gdef\CYRZH{{\cyrfont \char 198}}
+\gdef\cyrzh{{\cyrfont \char 230}}
+\gdef\CYRZ{{\cyrfont \char 199}}
+\gdef\cyrz{{\cyrfont \char 231}}
+\gdef\CYRI{{\cyrfont \char 200}}
+\gdef\cyri{{\cyrfont \char 232}}
+\gdef\CYRISHRT{{\cyrfont \char 201}}
+\gdef\cyrishrt{{\cyrfont \char 233}}
+\gdef\CYRK{{\cyrfont \char 202}}
+\gdef\cyrk{{\cyrfont \char 234}}
+\gdef\CYRL{{\cyrfont \char 203}}
+\gdef\cyrl{{\cyrfont \char 235}}
+\gdef\CYRM{{\cyrfont \char 204}}
+\gdef\cyrm{{\cyrfont \char 236}}
+\gdef\CYRN{{\cyrfont \char 205}}
+\gdef\cyrn{{\cyrfont \char 237}}
+\gdef\CYRO{{\cyrfont \char 206}}
+\gdef\cyro{{\cyrfont \char 238}}
+\gdef\CYRP{{\cyrfont \char 207}}
+\gdef\cyrp{{\cyrfont \char 239}}
+\gdef\CYRR{{\cyrfont \char 208}}
+\gdef\cyrr{{\cyrfont \char 240}}
+\gdef\CYRS{{\cyrfont \char 209}}
+\gdef\cyrs{{\cyrfont \char 241}}
+\gdef\CYRT{{\cyrfont \char 210}}
+\gdef\cyrt{{\cyrfont \char 242}}
+\gdef\CYRU{{\cyrfont \char 211}}
+\gdef\cyru{{\cyrfont \char 243}}
+\gdef\CYRF{{\cyrfont \char 212}}
+\gdef\cyrf{{\cyrfont \char 244}}
+\gdef\CYRH{{\cyrfont \char 213}}
+\gdef\cyrh{{\cyrfont \char 245}}
+\gdef\CYRC{{\cyrfont \char 214}}
+\gdef\cyrc{{\cyrfont \char 246}}
+\gdef\CYRCH{{\cyrfont \char 215}}
+\gdef\cyrch{{\cyrfont \char 247}}
+\gdef\CYRSH{{\cyrfont \char 216}}
+\gdef\cyrsh{{\cyrfont \char 248}}
+\gdef\CYRSHCH{{\cyrfont \char 217}}
+\gdef\cyrshch{{\cyrfont \char 249}}
+\gdef\CYRHRDSN{{\cyrfont \char 218}}
+\gdef\cyrhrdsn{{\cyrfont \char 250}}
+\gdef\CYRERY{{\cyrfont \char 219}}
+\gdef\cyrery{{\cyrfont \char 251}}
+\gdef\CYRSFTSN{{\cyrfont \char 220}}
+\gdef\cyrsftsn{{\cyrfont \char 252}}
+\gdef\CYREREV{{\cyrfont \char 221}}
+\gdef\cyrerev{{\cyrfont \char 253}}
+\gdef\CYRYU{{\cyrfont \char 222}}
+\gdef\cyryu{{\cyrfont \char 254}}
+\gdef\CYRYA{{\cyrfont \char 223}}
+\gdef\cyrya{{\cyrfont \char 255}}
+\gdef\CYRGUP{{\cyrfont \char 128}}
+\gdef\cyrgup{{\cyrfont \char 160}}
+\gdef\CYRGHCRS{{\cyrfont \char 129}}
+\gdef\cyrghcrs{{\cyrfont \char 161}}
+\gdef\CYRDJE{{\cyrfont \char 130}}
+\gdef\cyrdje{{\cyrfont \char 162}}
+\gdef\CYRTSHE{{\cyrfont \char 131}}
+\gdef\cyrtshe{{\cyrfont \char 163}}
+\gdef\CYRSHHA{{\cyrfont \char 132}}
+\gdef\cyrshha{{\cyrfont \char 164}}
+\gdef\CYRZHDSC{{\cyrfont \char 133}}
+\gdef\cyrzhdsc{{\cyrfont \char 165}}
+\gdef\CYRZDSC{{\cyrfont \char 134}}
+\gdef\cyrzdsc{{\cyrfont \char 166}}
+\gdef\CYRLJE{{\cyrfont \char 135}}
+\gdef\cyrlje{{\cyrfont \char 167}}
+\gdef\CYRYI{{\cyrfont \char 136}}
+\gdef\cyryi{{\cyrfont \char 168}}
+\gdef\CYRKDSC{{\cyrfont \char 137}}
+\gdef\cyrkdsc{{\cyrfont \char 169}}
+\gdef\CYRKBEAK{{\cyrfont \char 138}}
+\gdef\cyrkbeak{{\cyrfont \char 170}}
+\gdef\CYRKVCRS{{\cyrfont \char 139}}
+\gdef\cyrkvcrs{{\cyrfont \char 171}}
+\gdef\CYRAE{{\cyrfont \char 140}}
+\gdef\cyrae{{\cyrfont \char 172}}
+\gdef\CYRNDSC{{\cyrfont \char 141}}
+\gdef\cyrndsc{{\cyrfont \char 173}}
+\gdef\CYRNG{{\cyrfont \char 142}}
+\gdef\cyrng{{\cyrfont \char 174}}
+\gdef\CYRDZE{{\cyrfont \char 143}}
+\gdef\cyrdze{{\cyrfont \char 175}}
+\gdef\CYROTLD{{\cyrfont \char 144}}
+\gdef\cyrotld{{\cyrfont \char 176}}
+\gdef\CYRSDSC{{\cyrfont \char 145}}
+\gdef\cyrsdsc{{\cyrfont \char 177}}
+\gdef\CYRUSHRT{{\cyrfont \char 146}}
+\gdef\cyrushrt{{\cyrfont \char 178}}
+\gdef\CYRY{{\cyrfont \char 147}}
+\gdef\cyry{{\cyrfont \char 179}}
+\gdef\CYRYHCRS{{\cyrfont \char 148}}
+\gdef\cyryhcrs{{\cyrfont \char 180}}
+\gdef\CYRHDSC{{\cyrfont \char 149}}
+\gdef\cyrhdsc{{\cyrfont \char 181}}
+\gdef\CYRDZHE{{\cyrfont \char 150}}
+\gdef\cyrdzhe{{\cyrfont \char 182}}
+\gdef\CYRCHVCRS{{\cyrfont \char 151}}
+\gdef\cyrchvcrs{{\cyrfont \char 183}}
+\gdef\CYRCHRDSC{{\cyrfont \char 152}}
+\gdef\cyrchrdsc{{\cyrfont \char 184}}
+\gdef\CYRIE{{\cyrfont \char 153}}
+\gdef\cyrie{{\cyrfont \char 185}}
+\gdef\CYRSCHWA{{\cyrfont \char 154}}
+\gdef\cyrschwa{{\cyrfont \char 186}}
+\gdef\CYRNJE{{\cyrfont \char 155}}
+\gdef\cyrnje{{\cyrfont \char 187}}
+\gdef\CYRYO{{\cyrfont \char 156}}
+\gdef\cyryo{{\cyrfont \char 188}}
+\gdef\CYRII{{\cyrfont \char 73}}
+\gdef\cyrii{{\cyrfont \char 105}}
+\gdef\CYRJE{{\cyrfont \char 74}}
+\gdef\cyrje{{\cyrfont \char 106}}
+\gdef\CYRQ{{\cyrfont \char 81}}
+\gdef\cyrq{{\cyrfont \char 113}}
+\gdef\CYRW{{\cyrfont \char 87}}
+\gdef\cyrw{{\cyrfont \char 119}}
+
+% Composite glyphs.
+
+\gdef\CYREGRAVE{{\cyrfont \accent 0 \char 197}}
+\gdef\cyregrave{{\cyrfont \accent 0 \char 229}}
+\gdef\CYRGGRAVE{{\cyrfont \accent 0 \char 195}}
+\gdef\cyrggrave{{\cyrfont \accent 0 \char 227}}
+\gdef\CYRKGRAVE{{\cyrfont \accent 0 \char 202}}
+\gdef\cyrkgrave{{\cyrfont \accent 0 \char 234}}
+\gdef\CYRIGRAVE{{\cyrfont \accent 0 \char 200}}
+\gdef\cyrigrave{{\cyrfont \accent 0 \char 232}}
+
+\gdef\CYRZHBREVE{{\cyrfont \accent 20 \char 198}}
+\gdef\cyrzhbreve{{\cyrfont \accent 20 \char 230}}
+\gdef\CYRABREVE{{\cyrfont \accent 20 \char 192}}
+\gdef\cyrabreve{{\cyrfont \accent 20 \char 224}}
+\gdef\CYREBREVE{{\cyrfont \accent 20 \char 197}}
+\gdef\cyrebreve{{\cyrfont \accent 20 \char 229}}
+
+\gdef\CYRADIAERESIS{{\cyrfont \accent 4 \char 192}}
+\gdef\cyradiaeresis{{\cyrfont \accent 4 \char 224}}
+\gdef\CYRSCHWADIAERESIS{{\cyrfont \accent 4 \char 154}}
+\gdef\cyrschwadiaeresis{{\cyrfont \accent 4 \char 186}}
+\gdef\CYRZHDIAERESIS{{\cyrfont \accent 4 \char 198}}
+\gdef\cyrzhdiaeresis{{\cyrfont \accent 4 \char 230}}
+\gdef\CYRZDIAERESIS{{\cyrfont \accent 4 \char 199}}
+\gdef\cyrzdiaeresis{{\cyrfont \accent 4 \char 231}}
+\gdef\CYRIDIAERESIS{{\cyrfont \accent 4 \char 200}}
+\gdef\cyridiaeresis{{\cyrfont \accent 4 \char 232}}
+\gdef\CYRODIAERESIS{{\cyrfont \accent 4 \char 206}}
+\gdef\cyrodiaeresis{{\cyrfont \accent 4 \char 238}}
+\gdef\CYREREVDIAERESIS{{\cyrfont \accent 4 \char 221}}
+\gdef\cyrerevdiaeresis{{\cyrfont \accent 4 \char 253}}
+\gdef\CYRUDIAERESIS{{\cyrfont \accent 4 \char 211}}
+\gdef\cyrudiaeresis{{\cyrfont \accent 4 \char 243}}
+\gdef\CYRCHDIAERESIS{{\cyrfont \accent 4 \char 215}}
+\gdef\cyrchdiaeresis{{\cyrfont \accent 4 \char 247}}
+\gdef\CYRERYDIAERESIS{{\cyrfont \accent 4 \char 219}}
+\gdef\cyrerydiaeresis{{\cyrfont \accent 4 \char 251}}
+
+\gdef\CYRIMACRON{{\cyrfont \accent 9 \char 200}}
+\gdef\cyrimacron{{\cyrfont \accent 9 \char 232}}
+\gdef\CYRUMACRON{{\cyrfont \accent 9 \char 211}}
+\gdef\cyrumacron{{\cyrfont \accent 9 \char 243}}
+
+\gdef\CYRUDOUBLEACUTE{{\cyrfont \accent 5 \char 211}}
+\gdef\cyrudoubleacute{{\cyrfont \accent 5 \char 243}}
+
+
+% UTF-8 mappings, taken from LaTeX's t2aenc.dfu input encoding definition
+% file for T2A encoding (adapted to use the above composite glyph names).
+
+\DeclareUnicodeCharacter{0400}{\CYREGRAVE}
+\DeclareUnicodeCharacter{0401}{\CYRYO}
+\DeclareUnicodeCharacter{0402}{\CYRDJE}
+\DeclareUnicodeCharacter{0403}{\CYRGGRAVE}
+\DeclareUnicodeCharacter{0404}{\CYRIE}
+\DeclareUnicodeCharacter{0405}{\CYRDZE}
+\DeclareUnicodeCharacter{0406}{\CYRII}
+\DeclareUnicodeCharacter{0407}{\CYRYI}
+\DeclareUnicodeCharacter{0408}{\CYRJE}
+\DeclareUnicodeCharacter{0409}{\CYRLJE}
+\DeclareUnicodeCharacter{040A}{\CYRNJE}
+\DeclareUnicodeCharacter{040B}{\CYRTSHE}
+\DeclareUnicodeCharacter{040C}{\CYRKGRAVE}
+\DeclareUnicodeCharacter{040D}{\CYRIGRAVE}
+\DeclareUnicodeCharacter{040E}{\CYRUSHRT}
+\DeclareUnicodeCharacter{040F}{\CYRDZHE}
+\DeclareUnicodeCharacter{0410}{\CYRA}
+\DeclareUnicodeCharacter{0411}{\CYRB}
+\DeclareUnicodeCharacter{0412}{\CYRV}
+\DeclareUnicodeCharacter{0413}{\CYRG}
+\DeclareUnicodeCharacter{0414}{\CYRD}
+\DeclareUnicodeCharacter{0415}{\CYRE}
+\DeclareUnicodeCharacter{0416}{\CYRZH}
+\DeclareUnicodeCharacter{0417}{\CYRZ}
+\DeclareUnicodeCharacter{0418}{\CYRI}
+\DeclareUnicodeCharacter{0419}{\CYRISHRT}
+\DeclareUnicodeCharacter{041A}{\CYRK}
+\DeclareUnicodeCharacter{041B}{\CYRL}
+\DeclareUnicodeCharacter{041C}{\CYRM}
+\DeclareUnicodeCharacter{041D}{\CYRN}
+\DeclareUnicodeCharacter{041E}{\CYRO}
+\DeclareUnicodeCharacter{041F}{\CYRP}
+\DeclareUnicodeCharacter{0420}{\CYRR}
+\DeclareUnicodeCharacter{0421}{\CYRS}
+\DeclareUnicodeCharacter{0422}{\CYRT}
+\DeclareUnicodeCharacter{0423}{\CYRU}
+\DeclareUnicodeCharacter{0424}{\CYRF}
+\DeclareUnicodeCharacter{0425}{\CYRH}
+\DeclareUnicodeCharacter{0426}{\CYRC}
+\DeclareUnicodeCharacter{0427}{\CYRCH}
+\DeclareUnicodeCharacter{0428}{\CYRSH}
+\DeclareUnicodeCharacter{0429}{\CYRSHCH}
+\DeclareUnicodeCharacter{042A}{\CYRHRDSN}
+\DeclareUnicodeCharacter{042B}{\CYRERY}
+\DeclareUnicodeCharacter{042C}{\CYRSFTSN}
+\DeclareUnicodeCharacter{042D}{\CYREREV}
+\DeclareUnicodeCharacter{042E}{\CYRYU}
+\DeclareUnicodeCharacter{042F}{\CYRYA}
+\DeclareUnicodeCharacter{0430}{\cyra}
+\DeclareUnicodeCharacter{0431}{\cyrb}
+\DeclareUnicodeCharacter{0432}{\cyrv}
+\DeclareUnicodeCharacter{0433}{\cyrg}
+\DeclareUnicodeCharacter{0434}{\cyrd}
+\DeclareUnicodeCharacter{0435}{\cyre}
+\DeclareUnicodeCharacter{0436}{\cyrzh}
+\DeclareUnicodeCharacter{0437}{\cyrz}
+\DeclareUnicodeCharacter{0438}{\cyri}
+\DeclareUnicodeCharacter{0439}{\cyrishrt}
+\DeclareUnicodeCharacter{043A}{\cyrk}
+\DeclareUnicodeCharacter{043B}{\cyrl}
+\DeclareUnicodeCharacter{043C}{\cyrm}
+\DeclareUnicodeCharacter{043D}{\cyrn}
+\DeclareUnicodeCharacter{043E}{\cyro}
+\DeclareUnicodeCharacter{043F}{\cyrp}
+\DeclareUnicodeCharacter{0440}{\cyrr}
+\DeclareUnicodeCharacter{0441}{\cyrs}
+\DeclareUnicodeCharacter{0442}{\cyrt}
+\DeclareUnicodeCharacter{0443}{\cyru}
+\DeclareUnicodeCharacter{0444}{\cyrf}
+\DeclareUnicodeCharacter{0445}{\cyrh}
+\DeclareUnicodeCharacter{0446}{\cyrc}
+\DeclareUnicodeCharacter{0447}{\cyrch}
+\DeclareUnicodeCharacter{0448}{\cyrsh}
+\DeclareUnicodeCharacter{0449}{\cyrshch}
+\DeclareUnicodeCharacter{044A}{\cyrhrdsn}
+\DeclareUnicodeCharacter{044B}{\cyrery}
+\DeclareUnicodeCharacter{044C}{\cyrsftsn}
+\DeclareUnicodeCharacter{044D}{\cyrerev}
+\DeclareUnicodeCharacter{044E}{\cyryu}
+\DeclareUnicodeCharacter{044F}{\cyrya}
+\DeclareUnicodeCharacter{0450}{\cyregrave}
+\DeclareUnicodeCharacter{0451}{\cyryo}
+\DeclareUnicodeCharacter{0452}{\cyrdje}
+\DeclareUnicodeCharacter{0453}{\cyrggrave}
+\DeclareUnicodeCharacter{0454}{\cyrie}
+\DeclareUnicodeCharacter{0455}{\cyrdze}
+\DeclareUnicodeCharacter{0456}{\cyrii}
+\DeclareUnicodeCharacter{0457}{\cyryi}
+\DeclareUnicodeCharacter{0458}{\cyrje}
+\DeclareUnicodeCharacter{0459}{\cyrlje}
+\DeclareUnicodeCharacter{045A}{\cyrnje}
+\DeclareUnicodeCharacter{045B}{\cyrtshe}
+\DeclareUnicodeCharacter{045C}{\cyrkgrave}
+\DeclareUnicodeCharacter{045D}{\cyrigrave}
+\DeclareUnicodeCharacter{045E}{\cyrushrt}
+\DeclareUnicodeCharacter{045F}{\cyrdzhe}
+\DeclareUnicodeCharacter{0490}{\CYRGUP}
+\DeclareUnicodeCharacter{0491}{\cyrgup}
+\DeclareUnicodeCharacter{0492}{\CYRGHCRS}
+\DeclareUnicodeCharacter{0493}{\cyrghcrs}
+\DeclareUnicodeCharacter{0496}{\CYRZHDSC}
+\DeclareUnicodeCharacter{0497}{\cyrzhdsc}
+\DeclareUnicodeCharacter{0498}{\CYRZDSC}
+\DeclareUnicodeCharacter{0499}{\cyrzdsc}
+\DeclareUnicodeCharacter{049A}{\CYRKDSC}
+\DeclareUnicodeCharacter{049B}{\cyrkdsc}
+\DeclareUnicodeCharacter{049C}{\CYRKVCRS}
+\DeclareUnicodeCharacter{049D}{\cyrkvcrs}
+\DeclareUnicodeCharacter{04A0}{\CYRKBEAK}
+\DeclareUnicodeCharacter{04A1}{\cyrkbeak}
+\DeclareUnicodeCharacter{04A2}{\CYRNDSC}
+\DeclareUnicodeCharacter{04A3}{\cyrndsc}
+\DeclareUnicodeCharacter{04A4}{\CYRNG}
+\DeclareUnicodeCharacter{04A5}{\cyrng}
+\DeclareUnicodeCharacter{04AA}{\CYRSDSC}
+\DeclareUnicodeCharacter{04AB}{\cyrsdsc}
+\DeclareUnicodeCharacter{04AE}{\CYRY}
+\DeclareUnicodeCharacter{04AF}{\cyry}
+\DeclareUnicodeCharacter{04B0}{\CYRYHCRS}
+\DeclareUnicodeCharacter{04B1}{\cyryhcrs}
+\DeclareUnicodeCharacter{04B2}{\CYRHDSC}
+\DeclareUnicodeCharacter{04B3}{\cyrhdsc}
+\DeclareUnicodeCharacter{04B6}{\CYRCHRDSC}
+\DeclareUnicodeCharacter{04B7}{\cyrchrdsc}
+\DeclareUnicodeCharacter{04B8}{\CYRCHVCRS}
+\DeclareUnicodeCharacter{04B9}{\cyrchvcrs}
+\DeclareUnicodeCharacter{04BA}{\CYRSHHA}
+\DeclareUnicodeCharacter{04BB}{\cyrshha}
+\DeclareUnicodeCharacter{04C0}{\CYRpalochka}
+\DeclareUnicodeCharacter{04C1}{\CYRZHBREVE}
+\DeclareUnicodeCharacter{04C2}{\cyrzhbreve}
+\DeclareUnicodeCharacter{04D0}{\CYRABREVE}
+\DeclareUnicodeCharacter{04D1}{\cyrabreve}
+\DeclareUnicodeCharacter{04D2}{\CYRADIAERESIS}
+\DeclareUnicodeCharacter{04D3}{\cyradiaeresis}
+\DeclareUnicodeCharacter{04D4}{\CYRAE}
+\DeclareUnicodeCharacter{04D5}{\cyrae}
+\DeclareUnicodeCharacter{04D6}{\CYREBREVE}
+\DeclareUnicodeCharacter{04D7}{\cyrebreve}
+\DeclareUnicodeCharacter{04D8}{\CYRSCHWA}
+\DeclareUnicodeCharacter{04D9}{\cyrschwa}
+\DeclareUnicodeCharacter{04DA}{\CYRSCHWADIAERESIS}
+\DeclareUnicodeCharacter{04DB}{\cyrschwadiaeresis}
+\DeclareUnicodeCharacter{04DC}{\CYRZHDIAERESIS}
+\DeclareUnicodeCharacter{04DD}{\cyrzhdiaeresis}
+\DeclareUnicodeCharacter{04DE}{\CYRZDIAERESIS}
+\DeclareUnicodeCharacter{04DF}{\cyrzdiaeresis}
+\DeclareUnicodeCharacter{04E2}{\CYRIMACRON}
+\DeclareUnicodeCharacter{04E3}{\cyrimacron}
+\DeclareUnicodeCharacter{04E4}{\CYRIDIAERESIS}
+\DeclareUnicodeCharacter{04E5}{\cyridiaeresis}
+\DeclareUnicodeCharacter{04E6}{\CYRODIAERESIS}
+\DeclareUnicodeCharacter{04E7}{\cyrodiaeresis}
+\DeclareUnicodeCharacter{04E8}{\CYROTLD}
+\DeclareUnicodeCharacter{04E9}{\cyrotld}
+\DeclareUnicodeCharacter{04EC}{\CYREREVDIAERESIS}
+\DeclareUnicodeCharacter{04ED}{\cyrerevdiaeresis}
+\DeclareUnicodeCharacter{04EE}{\CYRUMACRON}
+\DeclareUnicodeCharacter{04EF}{\cyrumacron}
+\DeclareUnicodeCharacter{04F0}{\CYRUDIAERESIS}
+\DeclareUnicodeCharacter{04F1}{\cyrudiaeresis}
+\DeclareUnicodeCharacter{04F2}{\CYRUDOUBLEACUTE}
+\DeclareUnicodeCharacter{04F3}{\cyrudoubleacute}
+\DeclareUnicodeCharacter{04F4}{\CYRCHDIAERESIS}
+\DeclareUnicodeCharacter{04F5}{\cyrchdiaeresis}
+\DeclareUnicodeCharacter{04F8}{\CYRERYDIAERESIS}
+\DeclareUnicodeCharacter{04F9}{\cyrerydiaeresis}
+
+\DeclareUnicodeCharacter{2116}{\textnumero}
+
+
+% Add all Cyrillic character names to \commondummies.
+
+\gdef\cyrdummies{%
+ \definedummyword\textnumero
+ \definedummyword\CYRpalochka
+%
+ \definedummyword\CYRA
+ \definedummyword\cyra
+ \definedummyword\CYRB
+ \definedummyword\cyrb
+ \definedummyword\CYRV
+ \definedummyword\cyrv
+ \definedummyword\CYRG
+ \definedummyword\cyrg
+ \definedummyword\CYRD
+ \definedummyword\cyrd
+ \definedummyword\CYRE
+ \definedummyword\cyre
+ \definedummyword\CYRZH
+ \definedummyword\cyrzh
+ \definedummyword\CYRZ
+ \definedummyword\cyrz
+ \definedummyword\CYRI
+ \definedummyword\cyri
+ \definedummyword\CYRISHRT
+ \definedummyword\cyrishrt
+ \definedummyword\CYRK
+ \definedummyword\cyrk
+ \definedummyword\CYRL
+ \definedummyword\cyrl
+ \definedummyword\CYRM
+ \definedummyword\cyrm
+ \definedummyword\CYRN
+ \definedummyword\cyrn
+ \definedummyword\CYRO
+ \definedummyword\cyro
+ \definedummyword\CYRP
+ \definedummyword\cyrp
+ \definedummyword\CYRR
+ \definedummyword\cyrr
+ \definedummyword\CYRS
+ \definedummyword\cyrs
+ \definedummyword\CYRT
+ \definedummyword\cyrt
+ \definedummyword\CYRU
+ \definedummyword\cyru
+ \definedummyword\CYRF
+ \definedummyword\cyrf
+ \definedummyword\CYRH
+ \definedummyword\cyrh
+ \definedummyword\CYRC
+ \definedummyword\cyrc
+ \definedummyword\CYRCH
+ \definedummyword\cyrch
+ \definedummyword\CYRSH
+ \definedummyword\cyrsh
+ \definedummyword\CYRSHCH
+ \definedummyword\cyrshch
+ \definedummyword\CYRHRDSN
+ \definedummyword\cyrhrdsn
+ \definedummyword\CYRERY
+ \definedummyword\cyrery
+ \definedummyword\CYRSFTSN
+ \definedummyword\cyrsftsn
+ \definedummyword\CYREREV
+ \definedummyword\cyrerev
+ \definedummyword\CYRYU
+ \definedummyword\cyryu
+ \definedummyword\CYRYA
+ \definedummyword\cyrya
+ \definedummyword\CYRGUP
+ \definedummyword\cyrgup
+ \definedummyword\CYRGHCRS
+ \definedummyword\cyrghcrs
+ \definedummyword\CYRDJE
+ \definedummyword\cyrdje
+ \definedummyword\CYRTSHE
+ \definedummyword\cyrtshe
+ \definedummyword\CYRSHHA
+ \definedummyword\cyrshha
+ \definedummyword\CYRZHDSC
+ \definedummyword\cyrzhdsc
+ \definedummyword\CYRZDSC
+ \definedummyword\cyrzdsc
+ \definedummyword\CYRLJE
+ \definedummyword\cyrlje
+ \definedummyword\CYRYI
+ \definedummyword\cyryi
+ \definedummyword\CYRKDSC
+ \definedummyword\cyrkdsc
+ \definedummyword\CYRKBEAK
+ \definedummyword\cyrkbeak
+ \definedummyword\CYRKVCRS
+ \definedummyword\cyrkvcrs
+ \definedummyword\CYRAE
+ \definedummyword\cyrae
+ \definedummyword\CYRNDSC
+ \definedummyword\cyrndsc
+ \definedummyword\CYRNG
+ \definedummyword\cyrng
+ \definedummyword\CYRDZE
+ \definedummyword\cyrdze
+ \definedummyword\CYROTLD
+ \definedummyword\cyrotld
+ \definedummyword\CYRSDSC
+ \definedummyword\cyrsdsc
+ \definedummyword\CYRUSHRT
+ \definedummyword\cyrushrt
+ \definedummyword\CYRY
+ \definedummyword\cyry
+ \definedummyword\CYRYHCRS
+ \definedummyword\cyryhcrs
+ \definedummyword\CYRHDSC
+ \definedummyword\cyrhdsc
+ \definedummyword\CYRDZHE
+ \definedummyword\cyrdzhe
+ \definedummyword\CYRCHVCRS
+ \definedummyword\cyrchvcrs
+ \definedummyword\CYRCHRDSC
+ \definedummyword\cyrchrdsc
+ \definedummyword\CYRIE
+ \definedummyword\cyrie
+ \definedummyword\CYRSCHWA
+ \definedummyword\cyrschwa
+ \definedummyword\CYRNJE
+ \definedummyword\cyrnje
+ \definedummyword\CYRYO
+ \definedummyword\cyryo
+ \definedummyword\CYRII
+ \definedummyword\cyrii
+ \definedummyword\CYRJE
+ \definedummyword\cyrje
+ \definedummyword\CYRQ
+ \definedummyword\cyrq
+ \definedummyword\CYRW
+ \definedummyword\cyrw
+%
+ \definedummyword\CYREGRAVE
+ \definedummyword\cyregrave
+ \definedummyword\CYRGGRAVE
+ \definedummyword\cyrggrave
+ \definedummyword\CYRKGRAVE
+ \definedummyword\cyrkgrave
+ \definedummyword\CYRIGRAVE
+ \definedummyword\cyrigrave
+%
+ \definedummyword\CYRZHBREVE
+ \definedummyword\cyrzhbreve
+ \definedummyword\CYRABREVE
+ \definedummyword\cyrabreve
+ \definedummyword\CYREBREVE
+ \definedummyword\cyrebreve
+%
+ \definedummyword\CYRADIAERESIS
+ \definedummyword\cyradiaeresis
+ \definedummyword\CYRSCHWADIAERESIS
+ \definedummyword\cyrschwadiaeresis
+ \definedummyword\CYRZHDIAERESIS
+ \definedummyword\cyrzhdiaeresis
+ \definedummyword\CYRZDIAERESIS
+ \definedummyword\cyrzdiaeresis
+ \definedummyword\CYRIDIAERESIS
+ \definedummyword\cyridiaeresis
+ \definedummyword\CYRODIAERESIS
+ \definedummyword\cyrodiaeresis
+ \definedummyword\CYREREVDIAERESIS
+ \definedummyword\cyrerevdiaeresis
+ \definedummyword\CYRUDIAERESIS
+ \definedummyword\cyrudiaeresis
+ \definedummyword\CYRCHDIAERESIS
+ \definedummyword\cyrchdiaeresis
+ \definedummyword\CYRERYDIAERESIS
+ \definedummyword\cyrerydiaeresis
+%
+ \definedummyword\CYRIMACRON
+ \definedummyword\cyrimacron
+ \definedummyword\CYRUMACRON
+ \definedummyword\cyrumacron
+%
+ \definedummyword\CYRUDOUBLEACUTE
+ \definedummyword\cyrudoubleacute
+}
+
+\toks0 = \expandafter{\commondummies\cyrdummies}
+\xdef\commondummies{\the\toks0}
+
+
+% Add all Cyrillic character names to \indexnofonts.
+%
+% TODO: Fix the index entries. Right now, entries \CYRAAA and \cyrbbb get
+% simply mapped to ZZZZAAA and zzzzbbb, respectively.
+
+\gdef\cyrindexnofonts{%
+ \def\textnumero{ZZZZNo}%
+ \def\CYRpalochka{ZZZZpalochka}%
+%
+ \def\CYRA{ZZZZA}%
+ \def\cyra{zzzza}%
+ \def\CYRB{ZZZZB}%
+ \def\cyrb{zzzzb}%
+ \def\CYRV{ZZZZV}%
+ \def\cyrv{zzzzv}%
+ \def\CYRG{ZZZZG}%
+ \def\cyrg{zzzzg}%
+ \def\CYRD{ZZZZD}%
+ \def\cyrd{zzzzd}%
+ \def\CYRE{ZZZZE}%
+ \def\cyre{zzzze}%
+ \def\CYRZH{ZZZZZH}%
+ \def\cyrzh{zzzzzh}%
+ \def\CYRZ{ZZZZZ}%
+ \def\cyrz{zzzzz}%
+ \def\CYRI{ZZZZI}%
+ \def\cyri{zzzzi}%
+ \def\CYRISHRT{ZZZZI}%
+ \def\cyrishrt{zzzzi}%
+ \def\CYRK{ZZZZK}%
+ \def\cyrk{zzzzk}%
+ \def\CYRL{ZZZZL}%
+ \def\cyrl{zzzzl}%
+ \def\CYRM{ZZZZM}%
+ \def\cyrm{zzzzm}%
+ \def\CYRN{ZZZZN}%
+ \def\cyrn{zzzzn}%
+ \def\CYRO{ZZZZO}%
+ \def\cyro{zzzzo}%
+ \def\CYRP{ZZZZP}%
+ \def\cyrp{zzzzp}%
+ \def\CYRR{ZZZZR}%
+ \def\cyrr{zzzzr}%
+ \def\CYRS{ZZZZS}%
+ \def\cyrs{zzzzs}%
+ \def\CYRT{ZZZZT}%
+ \def\cyrt{zzzzt}%
+ \def\CYRU{ZZZZU}%
+ \def\cyru{zzzzu}%
+ \def\CYRF{ZZZZF}%
+ \def\cyrf{zzzzf}%
+ \def\CYRH{ZZZZH}%
+ \def\cyrh{zzzzh}%
+ \def\CYRC{ZZZZC}%
+ \def\cyrc{zzzzc}%
+ \def\CYRCH{ZZZZCH}%
+ \def\cyrch{zzzzch}%
+ \def\CYRSH{ZZZZSH}%
+ \def\cyrsh{zzzzsh}%
+ \def\CYRSHCH{ZZZZSHCH}%
+ \def\cyrshch{zzzzshch}%
+ \def\CYRHRDSN{ZZZZHRDSN}%
+ \def\cyrhrdsn{zzzzhrdsn}%
+ \def\CYRERY{ZZZZERY}%
+ \def\cyrery{zzzzery}%
+ \def\CYRSFTSN{ZZZZSFTSN}%
+ \def\cyrsftsn{zzzzsftsn}%
+ \def\CYREREV{ZZZZEREV}%
+ \def\cyrerev{zzzzerev}%
+ \def\CYRYU{ZZZZYU}%
+ \def\cyryu{zzzzyu}%
+ \def\CYRYA{ZZZZYA}%
+ \def\cyrya{zzzzya}%
+ \def\CYRGUP{ZZZZGUP}%
+ \def\cyrgup{zzzzgup}%
+ \def\CYRGHCRS{ZZZZGHCRS}%
+ \def\cyrghcrs{zzzzghcrs}%
+ \def\CYRDJE{ZZZZDJE}%
+ \def\cyrdje{zzzzdje}%
+ \def\CYRTSHE{ZZZZTSHE}%
+ \def\cyrtshe{zzzztshe}%
+ \def\CYRSHHA{ZZZZSHHA}%
+ \def\cyrshha{zzzzshha}%
+ \def\CYRZHDSC{ZZZZZHDSC}%
+ \def\cyrzhdsc{zzzzzhdsc}%
+ \def\CYRZDSC{ZZZZZDSC}%
+ \def\cyrzdsc{zzzzzdsc}%
+ \def\CYRLJE{ZZZZLJE}%
+ \def\cyrlje{zzzzlje}%
+ \def\CYRYI{ZZZZYI}%
+ \def\cyryi{zzzzyi}%
+ \def\CYRKDSC{ZZZZKDSC}%
+ \def\cyrkdsc{zzzzkdsc}%
+ \def\CYRKBEAK{ZZZZKBEAK}%
+ \def\cyrkbeak{zzzzkbeak}%
+ \def\CYRKVCRS{ZZZZKVCRS}%
+ \def\cyrkvcrs{zzzzkvcrs}%
+ \def\CYRAE{ZZZZAE}%
+ \def\cyrae{zzzzae}%
+ \def\CYRNDSC{ZZZZNDSC}%
+ \def\cyrndsc{zzzzndsc}%
+ \def\CYRNG{ZZZZNG}%
+ \def\cyrng{zzzzng}%
+ \def\CYRDZE{ZZZZDZE}%
+ \def\cyrdze{zzzzdze}%
+ \def\CYROTLD{ZZZZOTLD}%
+ \def\cyrotld{zzzzotld}%
+ \def\CYRSDSC{ZZZZSDSC}%
+ \def\cyrsdsc{zzzzsdsc}%
+ \def\CYRUSHRT{ZZZZUSHRT}%
+ \def\cyrushrt{zzzzushrt}%
+ \def\CYRY{ZZZZY}%
+ \def\cyry{zzzzy}%
+ \def\CYRYHCRS{ZZZZYHCRS}%
+ \def\cyryhcrs{zzzzyhcrs}%
+ \def\CYRHDSC{ZZZZHDSC}%
+ \def\cyrhdsc{zzzzhdsc}%
+ \def\CYRDZHE{ZZZZDZHE}%
+ \def\cyrdzhe{zzzzdzhe}%
+ \def\CYRCHVCRS{ZZZZCHVCRS}%
+ \def\cyrchvcrs{zzzzchvcrs}%
+ \def\CYRCHRDSC{ZZZZCHRDSC}%
+ \def\cyrchrdsc{zzzzchrdsc}%
+ \def\CYRIE{ZZZZIE}%
+ \def\cyrie{zzzzie}%
+ \def\CYRSCHWA{ZZZZSCHWA}%
+ \def\cyrschwa{zzzzschwa}%
+ \def\CYRNJE{ZZZZNJE}%
+ \def\cyrnje{zzzznje}%
+ \def\CYRYO{ZZZZYO}%
+ \def\cyryo{zzzzyo}%
+ \def\CYRII{ZZZZII}%
+ \def\cyrii{zzzzii}%
+ \def\CYRJE{ZZZZJE}%
+ \def\cyrje{zzzzje}%
+ \def\CYRQ{ZZZZQ}%
+ \def\cyrq{zzzzq}%
+ \def\CYRW{ZZZZW}%
+ \def\cyrw{zzzzw}%
+%
+ \def\CYREGRAVE{ZZZZE}%
+ \def\cyregrave{zzzze}%
+ \def\CYRGGRAVE{ZZZZG}%
+ \def\cyrggrave{zzzzg}%
+ \def\CYRKGRAVE{ZZZZK}%
+ \def\cyrkgrave{zzzzk}%
+ \def\CYRIGRAVE{ZZZZI}%
+ \def\cyrigrave{zzzzi}%
+%
+ \def\CYRZHBREVE{ZZZZZH}%
+ \def\cyrzhbreve{zzzzzh}%
+ \def\CYRABREVE{ZZZZA}%
+ \def\cyrabreve{zzzza}%
+ \def\CYREBREVE{ZZZZE}%
+ \def\cyrebreve{zzzze}%
+%
+ \def\CYRADIAERESIS{ZZZZA}%
+ \def\cyradiaeresis{zzzza}%
+ \def\CYRSCHWADIAERESIS{ZZZZSCHWA}%
+ \def\cyrschwadiaeresis{zzzzschwa}%
+ \def\CYRZHDIAERESIS{ZZZZZH}%
+ \def\cyrzhdiaeresis{zzzzzh}%
+ \def\CYRZDIAERESIS{ZZZZZ}%
+ \def\cyrzdiaeresis{zzzzz}%
+ \def\CYRIDIAERESIS{ZZZZI}%
+ \def\cyridiaeresis{zzzzi}%
+ \def\CYRODIAERESIS{ZZZZO}%
+ \def\cyrodiaeresis{zzzzo}%
+ \def\CYREREVDIAERESIS{ZZZZEREV}%
+ \def\cyrerevdiaeresis{zzzzerev}%
+ \def\CYRUDIAERESIS{ZZZZU}%
+ \def\cyrudiaeresis{zzzzu}%
+ \def\CYRCHDIAERESIS{ZZZZCH}%
+ \def\cyrchdiaeresis{zzzzch}%
+ \def\CYRERYDIAERESIS{ZZZZERY}%
+ \def\cyrerydiaeresis{zzzzery}%
+%
+ \def\CYRIMACRON{ZZZZI}%
+ \def\cyrimacron{zzzzi}%
+ \def\CYRUMACRON{ZZZZU}%
+ \def\cyrumacron{zzzzu}%
+%
+ \def\CYRUDOUBLEACUTE{ZZZZU}%
+ \def\cyrudoubleacute{zzzzu}%
+}
+
+\toks0 = \expandafter{\indexnofonts\cyrindexnofonts}
+\xdef\indexnofonts{\the\toks0}
+
+@end tex
+
+@c end of cyrillic.itexi
ISOLANG = de
depth = ../..
-SUBDIRS = web learning notation texidocs essay usage extending included
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@c Translators: Till Paala
@c @example
@c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
@c \override NoteHead #'style = #'neomensural
@c \override Staff.TimeSignature #'style = #'neomensural
@c \clef "petrucci-g"
\score {
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'petrucci
\override Staff.TimeSignature #'style = #'mensural
\clef "petrucci-g"
@lilypond[quote,ragged-right]
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'neomensural
\override Staff.TimeSignature #'style = #'neomensural
\clef "petrucci-g"
\new Voice \with { \remove "Stem_engraver" }
\relative c'' {
\squareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
\smartSquareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
}
@end lilypond
@item mode
@item output-count
@item output-suffix
-@item parseStringResult
@item partCombineListener
@item pitchnames
@item toplevel-bookparts
Guide, node Updating translation committishes.
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@c Translators: Till Paala
f1 \bar "."
g1 \bar "||"
a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
c1 \bar "|.|"
d1 \bar "|."
e1
Zusätzlich gibt es noch punktierte und gestrichelte Taktstriche:
@lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
a1
@end lilypond
und fünf unterschiedliche Wiederholungstaktstriche:
@lilypond[quote,relative=1,verbatim]
-f1 \bar "|:" g \bar ":|:" a \bar ":|.|:" b \bar ":|.:" c \bar ":|" d
+f1 \bar ".|:" g \bar ":..:" a \bar ":|.|:" b \bar ":|.:" c \bar ":|." d
@end lilypond
Zusätzlich kann eine Taktlinie mit einem einfachen Apostroph gesetzt werden:
@lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
a1 \bar ":|.|:"
b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
e1
@end lilypond
c4 c c c \break
\bar "S"
c4 c c c
-\bar "|S"
+\bar "S-|"
c4 c c c \break
-\bar "|S"
+\bar "S-|"
c4 c c c
-\bar "S|"
+\bar "S-S"
c4 c c c \break
-\bar "S|"
+\bar "S-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar "||:"
+\bar ".|:-||"
c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
c4 c c c
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar ":|S"
+\bar ":|.S"
c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c
-\bar ".S|:"
+\bar "S.|:"
c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" d2. }
>>
@end lilypond
@lilypond[quote,ragged-right,relative=2,verbatim,fragment]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" \grace s16 d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" \grace s16 d2. }
>>
@end lilypond
Guide, node Updating translation committishes.
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.0"
@c Translators: Till Paala
@table @code
-@item blank-after-score-page-force
-@funindex blank-after-score-page-force
+@item blank-after-score-page-penalty
+@funindex blank-after-score-page-penalty
Die Strafpunke, die erteilt werden, wenn eine leere Seite nach einer
Partitur und vor der nächsten vorkommt. Der Standardwert hiervon ist
-kleiner als @code{blank-page-force}, sodass leere Seiten nach einer Partitur
+kleiner als @code{blank-page-penalty}, sodass leere Seiten nach einer Partitur
leeren Seiten innerhalb einer Partitur vorgezogen werden.
-@item blank-last-page-force
-@funindex blank-last-page-force
+@item blank-last-page-penalty
+@funindex blank-last-page-penalty
Die Strafpunkte, wenn eine Partitur auf einer ungeraden Seite
beendet wird. Standard: @code{0}.
-@item blank-page-force
-@funindex blank-page-force
+@item blank-page-penalty
+@funindex blank-page-penalty
Die Strafpunkte, wenn eine leere Seite mitten in einer Partitur
auftritt. Das wird nicht benutzt von @code{ly:optimal-breaking},
Guide, node Updating translation committishes.
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@c Translators: Till Paala
\bar "'"
a4 b c2
a4 b c2
-\bar ":"
+\bar ";"
a4 b c2
-\bar "dashed"
+\bar "!"
a4 b c2
\bar "||"
@end lilypond
<!--
- Translation of GIT committish: e5a609e373eae846857f9a6d70a402a3d42b7d94
+ Translation of GIT committish: ebe492ca408fb0d9abf80b94c56197eef8dc2f09
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
<!--
we depend on an external entity here, which we cannot control. Suppose
-we go from 2.16.x to 2.17.x and put the documentation under "v2.17".
+we go from 2.15.x to 2.17.x and put the documentation under "v2.17".
For some time, Google won't have the new location in its index, so the
-search would get nothing. It would be better to keep "v2.16" in the
-search for a while and have a redirection from "v2.16" to "v2.17".
+search would get nothing. It would be better to keep "v2.15" in the
+search for a while and have a redirection from "v2.15" to "v2.17".
-->
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org/doc/v2.16 '
+ onSubmit="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org/doc/v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org/doc/v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Mit Google suchen">
<input type="text" name="brute_query" onfocus="this.value=''" value="Suche">
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
ISOLANG = es
depth = ../..
-SUBDIRS = essay learning notation texidocs usage web extending included
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
@lilypond[quote,verbatim,relative=2]
g8->( bes,-.) d4
-\shape Slur #'((-0.5 . 1.5) (-3 . 0) (0 . 0) (0 . 0))
+\shape #'((-0.5 . 1.5) (-3 . 0) (0 . 0) (0 . 0)) Slur
g8->( bes,!-.) d4
@end lilypond
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@node Notación antigua
@section Notación antigua
@c @example
@c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
@c \override NoteHead #'style = #'neomensural
@c \override Staff.TimeSignature #'style = #'neomensural
@c \clef "petrucci-g"
\score {
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'petrucci
\override Staff.TimeSignature #'style = #'mensural
\clef "petrucci-g"
@lilypond[quote,ragged-right]
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'petrucci
\override Staff.TimeSignature #'style = #'mensural
\clef "petrucci-g"
\new KievanVoice = "melody" \transpose c c' {
\cadenzaOn
c4 c c c c2 b,\longa
- \bar "kievan"
+ \bar "k"
}
\new Lyrics \lyricsto "melody" {
Го -- спо -- ди по -- ми -- луй.
Normalmente se coloca una figura decorativa al final de una pieza de
notación kievana, que puede denominarse como «doble barra final del
-canto kievano». Se puede invocar como @code{\bar "kievan"}.
+canto kievano». Se puede invocar como @code{\bar "k"}.
@lilypond[quote,relative=1,notime,verbatim]
\clef "kievan-do"
\override NoteHead #'style = #'kievan
- c \bar "kievan"
+ c \bar "k"
@end lilypond
@seealso
\new Voice \with { \remove "Stem_engraver" }
\relative c'' {
\squareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
\smartSquareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
}
@end lilypond
@cindex modo
@cindex output-count
@cindex output-suffix
-@cindex parseStringResult
@cindex partCombineListener
@cindex pitchnames
@cindex toplevel-bookparts
@item mode
@item output-count
@item output-suffix
-@item parseStringResult
@item partCombineListener
@item pitchnames
@item toplevel-bookparts
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@node Duraciones
@section Duraciones
f1 \bar "."
g1 \bar "||"
a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
c1 \bar "|.|"
d1 \bar "|."
e1
así como la barra de puntos y la discontinua:
@lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
a1
@end lilypond
y cinco tipos de barra de repetición:
@lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
a1 \bar ":|.|:"
b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
e1
@end lilypond
c4 c c c \break
\bar "S"
c4 c c c
-\bar "|S"
+\bar "S-|"
c4 c c c \break
-\bar "|S"
+\bar "S-|"
c4 c c c
-\bar "S|"
+\bar "S-S"
c4 c c c \break
-\bar "S|"
+\bar "S-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar "||:"
+\bar ".|:-||"
c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
c4 c c c
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar ":|S"
+\bar ":|.S"
c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c
-\bar ".S|:"
+\bar "S.|:"
c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" d2. }
>>
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" \grace s16 d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" \grace s16 d2. }
>>
@end lilypond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.0"
@ignore
GDP TODO list
@table @code
-@item blank-after-score-page-force
-@funindex blank-after-score-page-force
+@item blank-after-score-page-penalty
+@funindex blank-after-score-page-penalty
Penalización por tener una página vacía después del final de una
partitura y antes de la siguiente. De forma predeterminada, es menor
-que @code{blank-page-force}, de manera que preferimos páginas vacías
+que @code{blank-page-penalty}, de manera que preferimos páginas vacías
después de las partituras que páginas vacías dentro de una partitura.
-@item blank-last-page-force
-@funindex blank-last-page-force
+@item blank-last-page-penalty
+@funindex blank-last-page-penalty
Penalización por terminar la partitura sobre una página impar.
-@item blank-page-force
-@funindex blank-page-force
+@item blank-page-penalty
+@funindex blank-page-penalty
Penalización por tener una página vacía en medio de una partitura. No
se utiliza por parte de @code{ly:optimal-breaking} porque nunca
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@node Música vocal
@section Música vocal
\bar "'"
a4 b c2
a4 b c2
-\bar ":"
+\bar ";"
a4 b c2
-\bar "dashed"
+\bar "!"
a4 b c2
\bar "||"
@end lilypond
<!--
- Translation of GIT committish: 55cabbf80554d813284d7f1dc0e08965e2b3644d
+ Translation of GIT committish: 427bb2b004227f3afc7de10dfd896fc375cbc320
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
we depend on an external entity here, which we cannot control. Suppose
-we go from 2.16.x to 2.17.x and put the documentation under "v2.17".
+we go from 2.15.x to 2.17.x and put the documentation under "v2.17".
For some time, Google won't have the new location in its index, so the
-search would get nothing. It would be better to keep "v2.16" in the
-search for a while and have a redirection from "v2.16" to "v2.17".
+search would get nothing. It would be better to keep "v2.15" in the
+search for a while and have a redirection from "v2.15" to "v2.17".
-->
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org/doc/v2.16 '
+ onSubmit="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org/doc/v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org/doc/v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Búsqueda en Google">
<input type="text" name="brute_query" onfocus="this.value=''" value="Buscar">
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
@c -*- coding: utf-8; mode: texinfo; documentlanguage: es -*-
@ignore
- Translation of GIT committish: 2b55f813985dd14f8e61011d1c76ecf00e45691e
+ Translation of GIT committish: 6ed88961376f5b129a41114a198342e2e5c2fb82
When revising a translation, copy the HEAD committish of the
version that you are working on. For details, see the Contributors'
@c used for news about the upcoming release; see CG 10.2
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.17.3! @emph{23 de septiembre de 2012}
+
+Nos complace anunciar el lanzamiento de LilyPond 2.17.3. Esta
+versión contiene el conjunto habitual de correcciones de fallos.
+Se recomienda enérgicamente a los usuarios normales que
+@strong{no} utilicen esta versión, sino la 2.16 estable en su
+lugar.
+
+
+@newsEnd
+
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.17.2! @emph{10 de septiembre de 2012}
+
+Nos complace anunciar el lanzamiento de LilyPond 2.17.2. Esta
+versión contiene el conjunto habitual de correcciones de fallos.
+Se recomienda enérgicamente a los usuarios normales que
+@strong{no} utilicen esta versión, sino la 2.16 estable en su
+lugar.
+
+@newsEnd
+
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.17.1! @emph{28 de agosto de 2012}
+
+Nos complace anunciar el lanzamiento de LilyPond 2.17.1. Esta
+versión contiene el conjunto habitual de correcciones de fallos.
+Se recomienda enérgicamente a los usuarios normales que
+@strong{no} utilicen esta versión, sino la 2.16 estable en su
+lugar.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.17.0! @emph{26 de agosto de 2012}
+
+Nos complace anunciar el lanzamiento de LilyPond 2.17.0. Esta
+versión contiene el conjunto habitual de correcciones de fallos.
+Se recomienda enérgicamente a los usuarios normales que
+@strong{no} utilicen esta versión, sino la 2.16 estable en su
+lugar.
+
+@newsEnd
+
+
@newsItem
@subsubheading ¡Lanzado Lilypond 2.16.0! @emph{24 de agosto de 2012}
Jean-Charles Malahieude, Till Paala, Yoshiki Sawada
@newsEnd
-
-
-@newsItem
-@subsubheading ¡Lanzado LilyPond 2.15.95! @emph{11 de agosto de 2012}
-
-Estamos encantados de anunciar el lanzamiento de LilyPond 2.15.95.
-Con esta edición, se congela el desarrollo sobre la versión 2.15 para
-la inminente versión estable 2.16 y queda abierta solamente a
-correcciones de fallos.
-
-Urgimos a todos los usuarios a que prueben esta versión para asegurar
-la máxima calidad de la próxima versión estable. Si descubre
-cualquier problema, le rogamos nos envíe @ref{Informes de fallos}.
-
-Las funcionaliades nuevas desde la versión 2.14.2 están relacionadas
-en el manual de @qq{Cambios} en la sección de la página web sobre
-@ref{Desarrollo}.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading ¡Lanzado LilyPond 2.15.42! @emph{2 de agosto de 2012}
-
-Nos complace anunciar el lanzamiento de LilyPond 2.15.42. Esta versión
-contiene el conjunto habitual de correcciones de fallos.
-
-Se recomienda enérgicamente a los usuarios normales que @strong{no}
-utilicen esta versión, sino la 2.14 estable en su lugar. Tenga en
-cuenta que a causa de algunos bugs críticos, esta versión no es
-candidata al lanzamiento de la próxima versión estable.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading El Informe LilyPond, número 27. @emph{2 de agosto 2012}
-
-Vuelve @emph{El informe LilyPond}, con una interesante incursión en
-las funcionalidades relacionadas con Scheme añadidas recientemente por
-el único desarrollador remunerado de nuestra comunidad, David Kastrup
-(gracias a sus @uref{http://lilypond.org/sponsoring.html, donaciones
-continuas}). En esta edición también se encuentra una panorámica
-sobre ciertos proyectos poco conocidos colaterales a LilyPond, y
-algunas otras noticias más ligeras.
-
-Acérquese y @uref{http://news.lilynet.net/?The-LilyPond-Report-27,
-lea ya el Informe LilyPond número 27}; ¡todos los comentarios y
-aportaciones serán calurosamente bien recibidos!
-
-@newsEnd
@c -*- coding: utf-8; mode: texinfo; documentlanguage: es -*-
@ignore
- Translation of GIT committish: 488508ff926c03b14d030ffc255ae19fc3ce1f50
+ Translation of GIT committish: 7612daa5e327fe019d441b9d458f88407dca3936
When revising a translation, copy the HEAD committish of the
version that you are working on. For details, see the Contributors'
* don't duplicate entries from news-front.itexi
@end ignore
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.15.95! @emph{11 de agosto de 2012}
+
+Estamos encantados de anunciar el lanzamiento de LilyPond 2.15.95.
+Con esta edición, se congela el desarrollo sobre la versión 2.15 para
+la inminente versión estable 2.16 y queda abierta solamente a
+correcciones de fallos.
+
+Urgimos a todos los usuarios a que prueben esta versión para asegurar
+la máxima calidad de la próxima versión estable. Si descubre
+cualquier problema, le rogamos nos envíe @ref{Informes de fallos}.
+
+Las funcionaliades nuevas desde la versión 2.14.2 están relacionadas
+en el manual de @qq{Cambios} en la sección de la página web sobre
+@ref{Desarrollo}.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.15.42! @emph{2 de agosto de 2012}
+
+Nos complace anunciar el lanzamiento de LilyPond 2.15.42. Esta versión
+contiene el conjunto habitual de correcciones de fallos.
+
+Se recomienda enérgicamente a los usuarios normales que @strong{no}
+utilicen esta versión, sino la 2.14 estable en su lugar. Tenga en
+cuenta que a causa de algunos bugs críticos, esta versión no es
+candidata al lanzamiento de la próxima versión estable.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading El Informe LilyPond, número 27. @emph{2 de agosto 2012}
+
+Vuelve @emph{El informe LilyPond}, con una interesante incursión en
+las funcionalidades relacionadas con Scheme añadidas recientemente por
+el único desarrollador remunerado de nuestra comunidad, David Kastrup
+(gracias a sus @uref{http://lilypond.org/sponsoring.html, donaciones
+continuas}). En esta edición también se encuentra una panorámica
+sobre ciertos proyectos poco conocidos colaterales a LilyPond, y
+algunas otras noticias más ligeras.
+
+Acérquese y @uref{http://news.lilynet.net/?The-LilyPond-Report-27,
+lea ya el Informe LilyPond número 27}; ¡todos los comentarios y
+aportaciones serán calurosamente bien recibidos!
+
+@newsEnd
+
@newsItem
@subsubheading Retirada de la versión candidata al lanzamiento @emph{11 de julio de 2012}
+++ /dev/null
-depth = ../..
-
-STEPMAKE_TEMPLATES=tex documentation
-LOCALSTEPMAKE_TEMPLATES = lilypond ly
-
-OUT_BIB_FILES = $(addprefix $(outdir)/, $(BIB_FILES))
-EXTRA_DIST_FILES= $(BIB_FILES) $(call src-wildcard,*.bst)
-BIB_FILES= $(call src-wildcard,*.bib)
-
-include $(depth)/make/stepmake.make
-
-# we no longer create bibliography files in this subdir,
-# since it needs to be done in the main Documentation/ dir.
-# all the below can _probably_ be removed, but I haven't
-# examined it in detail.
-# I think this is just going to wait until we switch to waf. -gp
-dvi: $(DVI_FILES) $(OUT_BIB_FILES)
-
-ps: $(PS_FILES)
-
-default:
-
-GENHTMLS = engraving colorado computer-notation
-OUTGENHTMLS = $(addprefix $(outdir)/, $(GENHTMLS:%=%.html))
-
-ifeq ($(out),www)
-# temporary build fix; we don't know yet what's happening
-# to the literature index. -gp
-# local-WWW-2: $(addprefix $(outdir)/, $(BIB_FILES:.bib=.html) lit-index.html)
-endif
-
-$(outdir)/%.bib: %.bib
- ln -f $< $@
-
-$(outdir)/%.html: %.bib
- BSTINPUTS=$(src-dir) $(buildscript-dir)/bib2html -o $@ $<
-
-local-clean:
- rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
-
+++ /dev/null
-depth = ../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
-
-
ISOLANG = fr
depth = ../..
-SUBDIRS = web learning notation texidocs usage included essay extending
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+
+@c \version "2.17.5"
@c Translators: Jean-Charles Malahieude
@c @example
@c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
@c \override NoteHead #'style = #'neomensural
@c \override Staff.TimeSignature #'style = #'neomensural
@c \clef "petrucci-g"
\score {
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'petrucci
\override Staff.TimeSignature #'style = #'mensural
\clef "petrucci-g"
@lilypond[quote,ragged-right]
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'petrucci
\override Staff.TimeSignature #'style = #'mensural
\clef "petrucci-g"
\new KievanVoice = "melody" \transpose c c' {
\cadenzaOn
c4 c c c c2 b,\longa
- \bar "kievan"
+ \bar "k"
}
\new Lyrics \lyricsto "melody" {
Го -- спо -- ди по -- ми -- луй.
Les pièces en notation kiévienne sont habituellement terminées par une
décoration qui fait office de barre finale. Elle s'obtient à l'aide
-d'un @code{\bar "kievan"}.
+d'un @code{\bar "k"}.
@lilypond[quote,relative=1,notime,verbatim]
\clef "kievan-do"
\override NoteHead #'style = #'kievan
- c \bar "kievan"
+ c \bar "k"
@end lilypond
@seealso
\new Voice \with { \remove "Stem_engraver" }
\relative c'' {
\squareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
\smartSquareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
}
@end lilypond
@cindex mode
@cindex output-count
@cindex output-suffix
-@cindex parseStringResult
@cindex partCombineListener
@cindex pitchnames
@cindex toplevel-bookparts
@item mode
@item output-count
@item output-suffix
-@item parseStringResult
@item partCombineListener
@item pitchnames
@item toplevel-bookparts
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@c Translators: Frédéric Chiasson, Jean-Charles Malahieude
@c Translation checkers: Valentin Villenave, François Martin, Xavier Scheuer
f1 \bar "."
g1 \bar "||"
a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
c1 \bar "|.|"
d1 \bar "|."
e1
ainsi que d'une barre en pointillé et d'une discontinue :
@lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
a1
@end lilypond
et de cinq types de barre de reprise :
@lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
a1 \bar ":|.|:"
b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
e1
@end lilypond
c4 c c c \break
\bar "S"
c4 c c c
-\bar "|S"
+\bar "S-|"
c4 c c c \break
-\bar "|S"
+\bar "S-|"
c4 c c c
-\bar "S|"
+\bar "S-S"
c4 c c c \break
-\bar "S|"
+\bar "S-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar "||:"
+\bar ".|:-||"
c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
c4 c c c
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar ":|S"
+\bar ":|.S"
c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c
-\bar ".S|:"
+\bar "S.|:"
c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" d2. }
>>
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" \grace s16 d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" \grace s16 d2. }
>>
@end lilypond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.0"
@c Translators: Frédéric Chiasson, Jean-Charles Malahieude
@table @code
-@item blank-after-score-page-force
-@funindex blank-after-score-page-force
+@item blank-after-score-page-penalty
+@funindex blank-after-score-page-penalty
Pénalité pour apparition d'une page blanche entre deux partitions. Sa
valeur est par défaut inférieure à celle de
-@code{blank-page-force} ; nous préférons qu'une page blanche
+@code{blank-page-penalty} ; nous préférons qu'une page blanche
s'insère après la fin de la partition plutôt qu'au milieu.
-@item blank-last-page-force
-@funindex blank-last-page-force
+@item blank-last-page-penalty
+@funindex blank-last-page-penalty
Pénalité pour fin de partition intervenant sur une page impaire. La
valeur par défaut est de @code{0}.
-@item blank-page-force
-@funindex blank-page-force
+@item blank-page-penalty
+@funindex blank-page-penalty
Pénalité pour apparition d'une page blanche en cours de partition.
L'algorithme @code{ly:optimal-breaking} n'en tiendra pas compte
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@c Translators: Valentin Villenave, Jean-Charles Malahieude
@c Translation checkers: Jean-Jacques Gerbaud
\bar "'"
a4 b c2
a4 b c2
-\bar ":"
+\bar ";"
a4 b c2
-\bar "dashed"
+\bar "!"
a4 b c2
\bar "||"
@end lilypond
<!--
- Translation of GIT committish: 5198521ee5e91631a2cbf236d79489b12624797b
+ Translation of GIT committish: a278b3a9015f156998816868f09929a4c07d698c
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
<!--
we depend on an external entity here, which we cannot control. Suppose
-we go from 2.16.x to 2.17.x and put the documentation under "v2.17".
+we go from 2.15.x to 2.17.x and put the documentation under "v2.17".
For some time, Google won't have the new location in its index, so the
-search would get nothing. It would be better to keep "v2.16" in the
-search for a while and have a redirection from "v2.16" to "v2.17".
+search would get nothing. It would be better to keep "v2.15" in the
+search for a while and have a redirection from "v2.15" to "v2.17".
-->
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org/doc/v2.16 '
+ onSubmit="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org/doc/v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org/doc/v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Recherche sur Google">
<input type="text" name="brute_query" onfocus="this.value=''" value="Rechercher">
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
ISOLANG = hu
depth = ../..
-SUBDIRS = web learning texidocs usage included
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org +v2.16 '
+ onSubmit="search.q.value='site:lilypond.org +v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org +v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org +v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org +v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org +v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Google keresés">
<input type="text" name="brute_query" onfocus="this.value=''" value="Keresés">
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
@c -*- coding: utf-8; mode: texinfo; -*-
-@c This file is part of community.itexi and ../topdocs/AUTHORS.itexi
+@c This file is part of community.itexi
@ignore
list is sorted alphabetically by surname. This file lists people
that have contributed more than a few hours of work.
- Developers are people who are (or have been) listed under the
- "Development Team" in the THANKS, and can choose their own
- titles. Contributors are everybody else, and simply list their
+ Developers are people who have been listed under the "Development
+ Team" in Documentation/misc/THANKS*, or who are added when they
+ reach a significant amount of contributions with respect to the
+ existing Developers list, and can choose their own titles.
+ Contributors are everybody else, and simply list their
contributions. All lists are sorted alphabetically.
Anybody who has finished doing a "main devel team" task should
+++ /dev/null
-depth = ../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES= README
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
list is sorted alphabetically by surname. This file lists people
that have contributed more than a few hours of work.
- Developers are people who are (or have been) listed under the
- "Development Team" in the THANKS, and can choose their own
- titles. Contributors are everybody else, and simply list their
+ Developers are people who have been listed under the "Development
+ Team" in Documentation/misc/THANKS*, or who are added when they
+ reach a significant amount of contributions with respect to the
+ existing Developers list, and can choose their own titles.
+ Contributors are everybody else, and simply list their
contributions. All lists are sorted alphabetically.
Anybody who has finished doing a "main devel team" task should
Core developer
@item Mike Solomon:
-@email{mike@@apollinemike.com},
+@email{mike@@mikesolomon.org},
Core developer, Frog meister
@item Carl Sorensen:
@item Valentin Villenave:
LSR editor and Bug squad member
-@item Jan Warchoł:
+@item Janek Warchoł:
happy nitpicker
@end itemize
@c use commas not colons
-Aleksandr Andreev,
-Sven Axelsson,
-Peter Chubb,
-Karin Hoethker,
-Marc Hohl,
-David Nalesnik,
-Justin Ohmie,
-Benkő Pál,
-Julien Rioux,
-Patrick Schmidt,
-Adam Spiers,
-Heikki Taurainen,
-Piers Titus van der Torren,
-Jan-Peter Voigt,
-Janek Warchol
-
@c no comma for last entry
@end macro
@c use commas not colons
-James Lowe,
-Pavel Roskin,
-Alberto Simoes,
-Stefan Weil
-
@c no comma for last entry
@end macro
@macro bugsquadCurrent
-Colin Campbell,
-Eluze,
-Phil Holmes,
-Marek Klein,
-Ralph Palmer,
-James Lowe
-
@c no comma for last entry
@end macro
@c use commas not colons
-Colin Campbell,
-Christian Hitz,
-Phil Holmes
-
@c no comma for last entry
@end macro
@c use commas not colons
-Jean-Charles Malahieude,
-Till Paala,
-Yoshiki Sawada
-
@c no comma for last entry
@end macro
Erlend Aasland,
Maximilian Albert,
+Aleksandr Andreev,
Guido Amoruso,
Sven Axelsson,
Kristof Bastiaensen,
Yuval Harel,
Andrew Hawryluk,
Christian Hitz,
+Karin Hoethker,
Marc Hohl,
Ian Hulin,
Bernard Hurley,
Kieren MacMillan,
Hendrik Maryns,
Thomas Morgan,
+David Nalesnik,
Joe Neeman,
Matthias Neeracher,
Keith OHara,
+Justin Ohmie,
Tatsuya Ono,
+Benkő Pál,
Benjamin Peterson,
Guy Gascoigne-Piggford,
Henning Hraban Ramm,
Boris Shingarov,
Kim Shrier,
Edward Sanford Sutton,
+Adam Spiers,
David Svoboda,
+Heikki Taurainen,
+Piers Titus van der Torren,
Owen Tuz,
Sebastiano Vigna,
-Jan Warchoł,
+Jan-Peter Voigt,
+Janek Warchoł,
Arno Waschk,
John Williams,
Andrew Wilson,
David Pounder,
Michael Rasmussen,
Till Rettig,
+Pavel Roskin,
Patrick Schmidt,
+Alberto Simoes,
Carl D. Sorensen,
Anh Hai Trinh,
Eduardo Vieira,
+Stefan Weil,
Rune Zedeler
@c no comma for last entry
@macro bugsquadPrevious
@c use commas not colons
+
+Colin Campbell,
James E. Bailey,
+Eluze,
+Phil Holmes,
Derek Klinge,
+Marek Klein,
Urs Liska,
+James Lowe,
Kieren MacMillan,
Ralph Palmer,
Dmytro O. Redchuk
@c use commas not colons
+Colin Campbell,
Anthony Fok,
Christian Hitz,
+Phil Holmes
Chris Jackson,
Heikki Junes,
David Svoboda
ISOLANG = it
depth = ../..
-SUBDIRS = learning texidocs web usage included notation
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
<!--
we depend on an external entity here, which we cannot control. Suppose
-we go from 2.16.x to 2.17.x and put the documentation under "v2.17".
+we go from 2.15.x to 2.17.x and put the documentation under "v2.17".
For some time, Google won't have the new location in its index, so the
-search would get nothing. It would be better to keep "v2.16" in the
-search for a while and have a redirection from "v2.16" to "v2.17".
+search would get nothing. It would be better to keep "v2.15" in the
+search for a while and have a redirection from "v2.15" to "v2.17".
-->
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org/doc/v2.16 '
+ onSubmit="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org/doc/v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org/doc/v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Cerca con Google">
<input type="text" name="brute_query" onfocus="this.value=''" value="Cerca">
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
ISOLANG = ja
depth = ../..
-SUBDIRS = web learning texidocs usage included notation
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
NO_PDF_FILES = 1
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
\new Voice \with { \remove "Stem_engraver" }
\relative c'' {
\squareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
\smartSquareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
}
@end lilypond
version that you are working on. See TRANSLATION for details.
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@c Translators: Yoshiki Sawada
@c Translation status: post-GDP
f1 \bar "."
g1 \bar "||"
a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
c1 \bar "|.|"
d1 \bar "|."
e1
さらに、点線と破線の小節線があります:
@lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
a1
@end lilypond
さらに、繰り返しの小節線が 5 種類あります:
@lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
a1 \bar ":|.|:"
b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
e1
@end lilypond
c4 c c c \break
\bar "S"
c4 c c c
-\bar "|S"
+\bar "S-|"
c4 c c c \break
-\bar "|S"
+\bar "S-|"
c4 c c c
-\bar "S|"
+\bar "S-S"
c4 c c c \break
-\bar "S|"
+\bar "S-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar "||:"
+\bar ".|:-||"
c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
c4 c c c
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar ":|S"
+\bar ":|.S"
c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c
-\bar ".S|:"
+\bar "S.|:"
c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" d2. }
>>
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" \grace s16 d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" \grace s16 d2. }
>>
@end lilypond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.0"
@c Translators: Yoshiki Sawada
@table @code
-@item blank-after-score-page-force
-@funindex blank-after-score-page-force
+@item blank-after-score-page-penalty
+@funindex blank-after-score-page-penalty
楽譜の後ろ (と次の楽譜の前) に強制的に白紙を挿入します。@c
-デフォルトでは、この値は @code{blank-page-force} よりも小さいため、@c
+デフォルトでは、この値は @code{blank-page-penalty} よりも小さいため、@c
楽譜の途中ではなく後ろに白紙が挿入されます。
-@item blank-last-page-force
-@funindex blank-last-page-force
+@item blank-last-page-penalty
+@funindex blank-last-page-penalty
楽譜の最後が奇数ページの場合、楽譜の後ろに白紙を挿入します。
-@item blank-page-force
-@funindex blank-page-force
+@item blank-page-penalty
+@funindex blank-page-penalty
楽譜の途中に強制的に白紙を挿入します。@c
この値は @code{ly:optimal-breaking} では用いられません。@c
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@c Translators: Yoshiki Sawada
@c Translation status: post-GDP
\bar "'"
a4 b c2
a4 b c2
-\bar ":"
+\bar ";"
a4 b c2
-\bar "dashed"
+\bar "!"
a4 b c2
\bar "||"
@end lilypond
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
STEPMAKE_TEMPLATES=documentation
XPM_FILES=$(call src-wildcard,*.xpm)
-EXTRA_DIST_FILES= $(XPM_FILES)
lilypond-icon = $(outdir)/lilypond.ico
ly-icon = $(outdir)/ly.ico
STEPMAKE_TEMPLATES = documentation texinfo
-TEXTS = $(call src-wildcard,ANNOUNCE-*[0-9]) $(call src-wildcard,CHANGES-*[0-9]) $(call src-wildcard,ChangeLog*[0-9]) $(call src-wildcard,NEWS-*[0-9])
-EXTRA_DIST_FILES = $(TEXTS)
-EXTRA_DIST_FILES += $(call src-wildcard,*.html)
+TEXTS = $(call src-wildcard,ANNOUNCE-*[0-9]) \
+ $(call src-wildcard,CHANGES-*[0-9]) \
+ $(call src-wildcard,ChangeLog*[0-9]) \
+ $(call src-wildcard,NEWS-*[0-9]) \
+ $(call src-wildcard,THANKS-*[0-9])
include $(depth)/make/stepmake.make
cp $< $@
txt-to-html:
- $(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
+ $(buildscript-dir)/text2html $(OUT_TXT_FILES)
$(footify) $(addprefix $(outdir)/, $(addsuffix .html, $(TEXTS)))
ISOLANG = nl
depth = ../..
-SUBDIRS = included web learning texidocs
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
# NO_PDF_FILES = 1
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org +v2.16 '
+ onSubmit="search.q.value='site:lilypond.org +v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org +v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org +v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org +v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org +v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Zoek met Google">
<input type="text" name="brute_query" onfocus="this.value=''" value="Zoek">
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@node Ancient notation
@c @example
@c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
@c \override NoteHead #'style = #'neomensural
@c \override Staff.TimeSignature #'style = #'neomensural
@c \clef "petrucci-g"
\score {
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'petrucci
\override Staff.TimeSignature #'style = #'mensural
\clef "petrucci-g"
@lilypond[quote,ragged-right]
\transpose c c' {
\set Score.timing = ##f
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
\override NoteHead #'style = #'petrucci
\override Staff.TimeSignature #'style = #'mensural
\clef "petrucci-g"
\new KievanVoice = "melody" \transpose c c' {
\cadenzaOn
c4 c c c c2 b,\longa
- \bar "kievan"
+ \bar "k"
}
\new Lyrics \lyricsto "melody" {
Го -- спо -- ди по -- ми -- луй.
A decorative figure is commonly placed at the end of a piece of
Kievan notation, which may be called the Kievan final bar line.
-It can be invoked as @code{\bar "kievan"}.
+It can be invoked as @code{\bar "k"}.
@lilypond[quote,relative=1,notime,verbatim]
\clef "kievan-do"
\override NoteHead #'style = #'kievan
- c \bar "kievan"
+ c \bar "k"
@end lilypond
@seealso
@cindex Bézier curves, control points
@cindex control points, Bézier curves
-Ties, slurs and phrasing slurs are drawn as third-order Bézier
-curves. If the shape of the tie or slur which is calculated
-automatically is not optimum, the shape may be modified manually by
-explicitly specifying the four control points required to define
-a third-order Bézier curve.
+@code{Tie}s, @code{Slur}s, @code{PhrasingSlur}s,
+@code{LaissezVibrerTie}s and @code{RepeatTie}s are all drawn as
+third-order Bézier curves. If the shape of the tie or slur which
+is calculated automatically is not optimum, the shape may be
+modified manually in two ways:
+
+@enumerate a
+@item
+by specifying the displacements to be made to the control points
+of the automatically calculated Bézier curve, or
+
+@item
+by explicitly specifying the positions of the four control points
+required to define the wanted curve.
+@end enumerate
+
+Both methods are explained below. The first method is more suitable
+if only slight adjustments to the curve are required; the second may
+be better for creating curves which are related to just a single
+note.
+
+@subsubsubheading Cubic Bézier curves
Third-order or cubic Bézier curves are defined by four control
points. The first and fourth control points are precisely the
head towards the third and continuing to bend over to head towards
the fourth, arriving there travelling directly from the third
control point. The curve is entirely contained in the
-quadrilateral defined by the four control points.
+quadrilateral defined by the four control points. Translations,
+rotations and scaling of the control points all result in exactly
+the same operations on the curve.
+
+@subsubsubheading Specifying displacements from current control points
-Here is an example of a case where the tie is not optimum, and
-where @code{\tieDown} would not help.
+@cindex shaping slurs and ties
+@funindex \shape
+
+In this example the automatic placement of the tie is not optimum,
+and @code{\tieDown} would not help.
@lilypond[verbatim,quote,relative=1]
<<
>>
@end lilypond
-One way of improving this tie is to manually modify its control
-points, as follows.
+Adjusting the control points of the tie with @code{\shape} allows
+the collisions to be avoided.
-The coordinates of the Bézier control points are specified in units
-of staff-spaces. The X@tie{}coordinate is relative to the reference
-point of the note to which the tie or slur is attached, and the
-Y@tie{}coordinate is relative to the staff center line. The
-coordinates are entered as a list of four pairs of decimal numbers
-(reals). One approach is to estimate the coordinates of the two
-end points, and then guess the two intermediate points. The optimum
-values are then found by trial and error.
+The syntax of @code{\shape} is
-It is useful to remember that a symmetric curve requires symmetric
-control points, and that Bézier curves have the useful property that
-transformations of the curve such as translation, rotation and
-scaling can be achieved by applying the same transformation to the
-curve's control points.
+@example
+[-]@code{\shape} @var{displacements} @var{item}
+@end example
-For the example above the following override gives a satisfactory
-tie. Note the placement -- it has to be immediately before the note
-to which the start of the tie (or slur) is attached.
+This will reposition the control-points of @var{item} by the amounts
+given by @var{displacements}. The @var{displacements} argument is a
+list of number pairs or a list of such lists. Each element of a pair
+represents the displacement of one of the coordinates of a
+control-point. If @var{item} is a string, the result is
+@code{\once\override} for the specified grob type. If @var{item} is
+a music expression, the result is the same music expression with an
+appropriate tweak applied.
+
+In other words, the @code{\shape} function can act as either a
+@code{\once\override} command or a @code{\tweak} command depending
+on whether the @var{item} argument is a grob name, like @qq{Slur},
+or a music expression, like @qq{(}. The @var{displacements} argument
+specifies the displacements of the four control points as a list of
+four pairs of (dx . dy) values in units of staff-spaces (or a list
+of such lists if the curve has more than one segment).
+
+The leading hyphen is required if and only if the @code{\tweak} form
+is being used.
+
+So, using the same example as above and the @code{\once\override}
+form of @code{\shape}, this will raise the tie by half a staff-space:
@lilypond[verbatim,quote,relative=1]
<<
{
- \once \override Tie
- #'control-points = #'((1 . -1) (3 . 0.6) (12.5 . 0.6) (14.5 . -1))
- e1 ~ e
+ \shape #'((0 . 0.5) (0 . 0.5) (0 . 0.5) (0 . 0.5)) Tie
+ e1~ e
}
\\
{ r4 <g c,> <g c,> <g c,> }
>>
@end lilypond
+This positioning of the tie is better, but maybe it should be raised
+more in the center. The following example does this, this time using
+the alternative @code{\tweak} form:
+
+@lilypond[verbatim,quote,relative=1]
+<<
+ {
+ e1-\shape #'((0 . 0.5) (0 . 1) (0 . 1) (0 . 0.5)) ~ e
+ }
+\\
+ { r4 <g c,> <g c,> <g c,> }
+>>
+@end lilypond
+
+Changes to the horizontal positions of the control points may be made
+in the same way, and two different curves starting at the same
+musical moment may also be shaped:
+
+@lilypond[verbatim,quote,ragged-right,relative=2]
+c8(\( a) a'4 e c\)
+\shape #'((0.7 . -0.4) (0.5 . -0.4) (0.3 . -0.3) (0 . -0.2)) Slur
+\shape #'((0 . 0) (0 . 0.5) (0 . 0.5) (0 . 0)) PhrasingSlur
+c8(\( a) a'4 e c\)
+@end lilypond
+
+The @code{\shape} function can also displace the control points of
+curves which stretch across line breaks. Each piece of the broken
+curve can be given its own list of offsets. If changes to a
+particular segment are not needed, the empty list can serve as a
+placeholder. In this example the line break makes the single slur
+look like two:
+
+@lilypond[verbatim,quote,ragged-right,relative=1]
+c4( f g c
+\break
+d,4 c' f, c)
+@end lilypond
+
+Changing the shapes of the two halves of the slur makes it clearer
+that the slur continues over the line break:
+
+@lilypond[verbatim,quote,ragged-right,relative=1]
+% () may be used as a shorthand for ((0 . 0) (0 . 0) (0 . 0) (0 . 0))
+% if any of the segments does not need to be changed
+\shape #'(
+ (( 0 . 0) (0 . 0) (0 . 0) (0 . 1))
+ ((0.5 . 1.5) (1 . 0) (0 . 0) (0 . -1.5))
+ ) Slur
+c4( f g c
+\break
+d,4 c' f, c)
+@end lilypond
+
+If an S-shaped curve is required the control points must always be
+adjusted manually --- LilyPond will never select such shapes
+automatically.
+
+@lilypond[verbatim,quote,relative=2]
+c8( e b-> f d' a e-> g)
+\shape #'((0 . -1) (5.5 . -0.5) (-5.5 . -10.5) (0 . -5.5)) PhrasingSlur
+c8\( e b-> f d' a e-> g\)
+@end lilypond
+
+@subsubsubheading Specifying control points explicitly
+
+The coordinates of the Bézier control points are specified in units
+of staff-spaces. The X@tie{}coordinate is relative to the reference
+point of the note to which the tie or slur is attached, and the
+Y@tie{}coordinate is relative to the staff center line. The
+coordinates are specified as a list of four pairs of decimal numbers
+(reals). One approach is to estimate the coordinates of the two
+end points, and then guess the two intermediate points. The optimum
+values are then found by trial and error. Be aware that these values
+may need to be manually adjusted if any further changes are made to
+the music or the layout.
+
+One situation where specifying the control points explicitly is
+preferable to specifying displacements is when they need to be
+specified relative to a single note. Here is an example of this.
+It shows one way of indicating a slur extending into alternative
+sections of a volta repeat.
+
+@lilypond[verbatim,quote,relative=2]
+c1
+\repeat volta 3 { c4 d( e f }
+\alternative {
+ { g2) d }
+ {
+ g2
+ % create a slur and move it to a new position
+ % the <> is just an empty chord to carry the slur termination
+ -\tweak #'control-points #'((-2 . 3.8) (-1 . 3.9) (0 . 4) (1 . 3.4)) ( <> )
+ f,
+ }
+ {
+ e'2
+ % create a slur and move it to a new position
+ -\tweak #'control-points #'((-2 . 3) (-1 . 3.1) (0 . 3.2) (1 . 2.4)) ( <> )
+ f,
+ }
+}
+@end lilypond
+
@knownissues
It is not possible to modify shapes of ties or slurs by changing
the @code{control-points} property if there are multiple ties or slurs
\new Voice \with { \remove "Stem_engraver" }
\relative c'' {
\squareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
\smartSquareLineCircleSpace
- cis4 ces cisis c
+ cis4 ces disis d
}
@end lilypond
In addition to the different naming systems, different note names
are used for the root in different languages. The predefined
-variables @code{\germanChords}, @code{\semiGermanChords},
+commands @code{\germanChords}, @code{\semiGermanChords},
@code{\italianChords} and @code{\frenchChords} set these variables.
The effect is demonstrated here:
@lilypondfile[verbatim,quote,texidoc,doctitle]
{changing-the-breath-mark-symbol.ly}
+@cindex tick mark
+
+@lilypondfile[verbatim,quote,texidoc,doctitle]
+{using-a-tick-as-the-breath-mark-symbol.ly}
+
@cindex caesura
@cindex railroad tracks
@headitem Procedure name @tab Condition tested
@item print-page-number-check-first @tab should this page number be printed?
-@item create-page-number-stencil @tab 'print-page-numbers true?
-@item print-all-headers @tab 'print-all-headers true?
+@item create-page-number-stencil @tab print-page-numbers true?
+@item print-all-headers @tab print-all-headers true?
@item first-page @tab first page in the book?
@item (on-page nmbr) @tab page number = nmbr?
@item last-page @tab last page in the book?
@cindex mode
@cindex output-count
@cindex output-suffix
-@cindex parseStringResult
@cindex partCombineListener
@cindex pitchnames
@cindex toplevel-bookparts
@item mode
@item output-count
@item output-suffix
-@item parseStringResult
@item partCombineListener
@item pitchnames
@item toplevel-bookparts
fis
@end lilypond
+Additional modes can be defined, by listing the alterations
+for each scale step when the mode starts on C.
+
+@lilypond[verbatim,quote]
+freygish = #`((0 . ,NATURAL) (1 . ,FLAT) (2 . ,NATURAL)
+ (3 . ,NATURAL) (4 . ,NATURAL) (5 . ,FLAT) (6 . ,FLAT))
+
+\relative c' {
+ \key c\freygish c4 des e f
+ \bar "||" \key d\freygish d es fis g
+}
+@end lilypond
+
+Accidentals in the key signature may be printed in octaves other
+than their traditional positions, or in multiple octaves, by
+using the @code{flat-positions} and @code{sharp-positions}
+properties of @code{KeySignature}. Entries in these properties
+specify the range of staff-positions where accidentals will be
+printed. If a single position is specified in an entry, the
+accidentals are placed within the octave ending at that staff
+position.
+
+@lilypond[verbatim, quote,relative=0]
+\override Staff.KeySignature #'flat-positions = #'((-5 . 5))
+\override Staff.KeyCancellation #'flat-positions = #'((-5 . 5))
+\clef bass \key es\major es g bes d
+\clef treble \bar "||" \key es\major es g bes d
+
+\override Staff.KeySignature #'sharp-positions = #'(2)
+\bar "||" \key b\major b fis b2
+@end lilypond
@snippets
@rinternals{Key_performer},
@rinternals{KeyCancellation},
@rinternals{KeySignature},
-@rinternals{key-cancellation-interface},
@rinternals{key-signature-interface}.
Notation Reference:
@ref{Bar lines},
@ref{Modifying context plug-ins},
+@ref{Modifying ties and slurs},
@ref{Time administration}.
Snippets:
@cindex slur and repeat
Slurs that span from a @code{\repeat} block into an
-@code{\alternative} block will only work for the first alternate
-ending. Also, slurs cannot wrap around from the end of one
+@code{\alternative} block will only work for the first alternative
+ending. The visual appearance of a continuing slur in other
+alternative blocks may be simulated with @code{\repeatTie} if the
+slur extends into only one note in the alternative block, although
+this method does not work in @code{TabStaff}. Other methods which
+may be tailored to indicate continuing slurs over several notes in
+alternative blocks, and which also work in @code{TabStaff} contexts,
+are shown in @ref{Modifying ties and slurs}.
+
+Also, slurs cannot wrap around from the end of one
alternative back to the beginning of the repeat.
If a repeat that begins with an incomplete measure has an
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@node Rhythms
@section Rhythms
f1 \bar "."
g1 \bar "||"
a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
c1 \bar "|.|"
d1 \bar "|."
e1
together with dotted and dashed bar lines:
@lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
a1
@end lilypond
and five types of repeat bar line:
@lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
a1 \bar ":|.|:"
b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
e1
@end lilypond
c4 c c c \break
\bar "S"
c4 c c c
-\bar "|S"
+\bar "S-|"
c4 c c c \break
-\bar "|S"
+\bar "S-|"
c4 c c c
-\bar "S|"
+\bar "S-S"
c4 c c c \break
-\bar "S|"
+\bar "S-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar "||:"
+\bar ".|:-||"
c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
c4 c c c
@end lilypond
@lilypond[quote,relative=2,verbatim]
c4 c c c
-\bar ":|S"
+\bar ":|.S"
c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
c4 c c c
-\bar ".S|:"
+\bar "S.|:"
c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
c1
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" d2. }
>>
@end lilypond
@lilypond[quote,relative=2,verbatim]
<<
- \new Staff { e4 \bar "|:" \grace c16 d2. }
- \new Staff { c4 \bar "|:" \grace s16 d2. }
+ \new Staff { e4 \bar ".|:" \grace c16 d2. }
+ \new Staff { c4 \bar ".|:" \grace s16 d2. }
>>
@end lilypond
@node \paper variables for line breaking
@unnumberedsubsubsec @code{\paper} variables for line breaking
-@c TODO: Mention that ly:optimal-breaking is on by default? -mp
-
@table @code
@item max-systems-per-page
@table @code
-@item blank-after-score-page-force
-@funindex blank-after-score-page-force
-
-The penalty for having a blank page after the end of one score and
-before the next. By default, this is smaller than
-@code{blank-page-force}, so that we prefer blank pages after
-scores to blank pages within a score.
-
-@item blank-last-page-force
-@funindex blank-last-page-force
-
-The penalty for ending the score on an odd-numbered page.
-
-@item blank-page-force
-@funindex blank-page-force
-
-The penalty for having a blank page in the middle of a
-score. This is not used by @code{ly:optimal-breaking} since it will
-never consider blank pages in the middle of a score.
-
@item page-breaking
@funindex page-breaking
The page-breaking algorithm to use. Choices are
-@code{ly:minimal-breaking}, @code{ly:page-turn-breaking}, and
-@code{ly:optimal-breaking}.
+@code{ly:minimal-breaking}, @code{ly:page-turn-breaking},
+@code{ly:one-line-breaking} and @code{ly:optimal-breaking}
+(the default).
@item page-breaking-system-system-spacing
@funindex page-breaking-system-system-spacing
@end table
+The following variables are effective only when @code{page-breaking}
+is set to @code{ly:page-turn-breaking}. Page breaks are then chosen
+to minimize the number of page turns. Since page turns are required
+on moving from an odd-numbered page to an even-numbered one, a
+layout in which the last page is odd-numbered will usually be
+favoured. Places where page turns are preferred can be indicated
+manually by inserting @code{\allowPageTurn} or automatically by
+including the @code{Page_turn_engraver} (see @ref{Optimal page turning}).
+
+If there are insufficient choices available for making suitable page
+turns, LilyPond may insert a blank page either within a score, between
+scores (if there are two or more scores), or by ending a score on an
+even-numbered page. The values of the following three variables may
+be increased to make these actions less likely.
+
+The values are penalties, i.e. the higher the value the less likely
+will be the associated action relative to other choices.
+
+@table @code
+
+@item blank-page-penalty
+@funindex blank-page-penalty
+
+The penalty for having a blank page in the middle of a score. If
+@code{blank-page-penalty} is large and @code{ly:page-turn-breaking} is
+selected, then LilyPond will be less likely to insert a page in the
+middle of a score. Instead, it will space out the music further to
+fill the blank page and the following one. Default: 5.
+
+@item blank-last-page-penalty
+@funindex blank-last-page-penalty
+
+The penalty for ending the score on an even-numbered page. If
+@code{blank-last-page-penalty} is large and
+@code{ly:page-turn-breaking} is selected, then LilyPond will be less
+likely to produce a score in which the last page is even-numbered.
+Instead, it will adjust the spacing in order to use one page more or
+one page less. Default: 0.
+
+@item blank-after-score-page-penalty
+@funindex blank-after-score-page-penalty
+
+The penalty for having a blank page after the end of one score and
+before the next. By default, this is smaller than
+@code{blank-page-penalty}, so that blank pages after scores are
+inserted in preference to blank pages within a score. Default: 2.
+
+@end table
+
+
@seealso
Notation Reference:
@ref{Page breaking},
@endpredefined
@seealso
+Notation Reference:
+@ref{\paper variables for line breaking}.
+
Snippets:
@rlsr{Spacing}.
{ f2 g4 f }
\new Staff \with {
instrumentName = \markup {
- \center-column { "Clarinet" }
- \line { "in B" \smaller \flat }
+ \center-column { "Clarinet"
+ \line { "in B" \smaller \flat }
+ }
}
}
{ c4 b c2 }
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.17.5"
@node Vocal music
@section Vocal music
\bar "'"
a4 b c2
a4 b c2
-\bar ":"
+\bar ";"
a4 b c2
-\bar "dashed"
+\bar "!"
a4 b c2
\bar "||"
@end lilypond
depth = ../..
-SUBDIRS = pdf
-
BITMAP_IMAGES = $(call src-wildcard,*.png) $(call src-wildcard,*.jpg)
EPS_ILLUSTRATIONS = $(call src-wildcard,*.eps)
SVG_FILES = $(call src-wildcard,*.svg)
PDF_DIR = $(call src-wildcard,pdf/*.pdf)
-EXTRA_DIST_FILES = $(BITMAP_IMAGES) $(EPS_ILLUSTRATIONS) $(SVG_FILES)
-
OUT_PDF_IMAGES = $(EPS_ILLUSTRATIONS:%.eps=$(outdir)/%.pdf)
OUT_BITMAP_IMAGES = $(BITMAP_IMAGES:%=$(outdir)/%)
OUT_BITMAP_IMAGES += $(EPS_ILLUSTRATIONS:%.eps=$(outdir)/%.png)
gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
$(outdir)/%.pdf: %.eps
- gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
+ gs -dAutoRotatePages=/None -q -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
+++ /dev/null
-depth = ../../..
-
-PDF_FILES = $(call src-wildcard,*.pdf)
-
-EXTRA_DIST_FILES = $(PDF_FILES)
-
-STEPMAKE_TEMPLATES = documentation
-
-include $(depth)/make/stepmake.make
-
-default:
-
<!--
we depend on an external entity here, which we cannot control. Suppose
-we go from 2.16.x to 2.17.x and put the documentation under "v2.17".
+we go from 2.15.x to 2.17.x and put the documentation under "v2.17".
For some time, Google won't have the new location in its index, so the
-search would get nothing. It would be better to keep "v2.16" in the
-search for a while and have a redirection from "v2.16" to "v2.17".
+search would get nothing. It would be better to keep "v2.15" in the
+search for a while and have a redirection from "v2.15" to "v2.17".
-->
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org/doc/v2.16 '
+ onSubmit="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org/doc/v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org/doc/v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Google Search">
<input type="text" name="brute_query" onfocus="this.value=''" value="Search">
+++ /dev/null
-depth = ../..
-
-.PHONY: snippets
-
-SUBDIRS = new
-EXTRA_DIST_FILES = $(call src-wildcard,*.snippet-list) \
- $(call src-wildcard,*.ly) $(call src-wildcard,*.itely) \
- README
-SNIPPET_LY_FILES = $(call src-wildcard,*.ly)
-OUT_SNIPPET_LY_FILES = $(SNIPPET_LY_FILES:%.ly=out/%.ly)
-
-include $(depth)/make/stepmake.make
-
-default:
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "percussion, preparing-parts, really-simple, rhythms, specific-notation"
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.20
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%
% This file is in the public domain.
%% Note: this file works from version 2.15.15
-\version "2.15.15"
+\version "2.16.0"
\header {
lsrtags = "expressive-marks, staff-notation, tweaks-and-overrides"
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.24
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.9
+%% Note: this file works from version 2.16.0
%% This file is in the public domain.
\version "2.16.0"
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "world-music"
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.30
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "expressive-marks, really-cool, scheme-language, text"
texidoc = "
This example provides a function to typeset a hairpin (de)crescendo
with some additional text below it, such as @qq{molto} or @qq{poco}.
-The example also illustrates how to modify the way an object is
-normally printed, using some Scheme code.
+The added text will change the direction according to the direction of
+the hairpin. The Hairpin is aligned to DynamicText. The example also
+illustrates how to modify the way an object is normally printed, using
+some Scheme code.
"
doctitle = "Center text below hairpin dynamics"
} % begin verbatim
-
hairpinWithCenteredText =
#(define-music-function (parser location text) (markup?)
#{
- \override Voice.Hairpin #'stencil = #(lambda (grob)
- (ly:stencil-aligned-to
- (ly:stencil-combine-at-edge
- (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
- Y DOWN
- (ly:stencil-aligned-to (grob-interpret-markup grob text) X CENTER))
- X LEFT))
+ \once \override Voice.Hairpin #'after-line-breaking =
+ #(lambda (grob)
+ (let* ((stencil (ly:hairpin::print grob))
+ (par-y (ly:grob-parent grob Y))
+ (dir (ly:grob-property par-y 'direction))
+ (new-stencil (ly:stencil-aligned-to
+ (ly:stencil-combine-at-edge
+ (ly:stencil-aligned-to stencil X CENTER)
+ Y dir
+ (ly:stencil-aligned-to (grob-interpret-markup grob text) X CENTER))
+ X LEFT))
+ (staff-space (ly:output-def-lookup (ly:grob-layout grob) 'staff-space))
+ (staff-line-thickness (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness))
+ (grob-name (lambda (x) (assq-ref (ly:grob-property x 'meta) 'name)))
+ (par-x (ly:grob-parent grob X))
+ (dyn-text (eq? (grob-name par-x) 'DynamicText ))
+ (dyn-text-stencil-x-length (if dyn-text
+ (interval-length (ly:stencil-extent (ly:grob-property par-x 'stencil) X))
+ 0))
+ (x-shift (if dyn-text (- (+ staff-space dyn-text-stencil-x-length) (* 0.5 staff-line-thickness)) 0)))
+
+ (ly:grob-set-property! grob 'Y-offset 0)
+ (ly:grob-set-property! grob 'stencil
+ (ly:stencil-translate-axis
+ new-stencil
+ x-shift X))))
#})
-hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
-hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo }
+hairpinMolto =
+\hairpinWithCenteredText \markup { \italic molto }
+
+hairpinMore =
+\hairpinWithCenteredText \markup { \larger moltissimo }
\layout { ragged-right = ##f }
\hairpinMolto
c2\< c\f
\hairpinMore
- c2\< c\f
+ c2\ppppp\< c\f
+ \break
+ \hairpinMolto
+ c2^\< c\f
+ \hairpinMore
+ c2\ppppp\< c\f
}
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.31
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "contexts-and-engravers, midi, real-music"
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.17
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.20
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.19
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.27
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.42
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.31
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "fretted-strings"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "chords, simultaneous-notes, workaround"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "editorial-annotations, scheme-language, tweaks-and-overrides"
adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rhythms.ly
adding-parentheses-around-an-expressive-mark-or-chordal-note.ly
+adding-timing-marks-to-long-glissandi.ly
adjusting-the-shape-of-falls-and-doits.ly
alternative-breve-note.ly
asymmetric-slurs.ly
setting-the-minimum-length-of-hairpins.ly
showing-the-same-articulation-above-and-below-a-note-or-chord.ly
snap-pizzicato-or-bartok-pizzicato.ly
+using-a-tick-as-the-breath-mark-symbol.ly
using-arpeggiobracket-to-make-divisi-more-visible.ly
using-double-slurs-for-legato-chords.ly
using-the-whiteout-property.ly
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.18
+%% Note: this file works from version 2.16.0
% INSPIRATIONAL HEADER FOR LILYPOND DOCUMENTATION fretted-strings %
% Passage from Johann Kaspar Mertz "Opern Revue, Op. 8, no. 17" %
% on melodies from Bellini's "Norma" %
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "pitches, really-cool, scheme-language"
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.12
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.10
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.5"
\header {
lsrtags = "contemporary-notation, percussion, real-music, rhythms"
}
drum = \new DrumStaff \drummode {
- \bar "|:" bd4.^\markup { Drums } sn4 bd \bar ":" sn4.
- bd4 sn \bar ":" bd sn bd4. sn4 bd \bar ":|"
+ \bar ".|:" bd4.^\markup { Drums } sn4 bd \bar ";" sn4.
+ bd4 sn \bar ";" bd sn bd4. sn4 bd \bar ":|."
}
{
\new Staff {
<<
\new Voice \with {
- \consists "Mark_engraver"
+ \consists Mark_engraver
\consists "Staff_collecting_engraver"
}
{ c4 d e f
c4 d e f
}
\new Voice \with {
- \consists "Mark_engraver"
+ \consists Mark_engraver
\consists "Staff_collecting_engraver"
\override RehearsalMark #'direction = #DOWN
}
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.42
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%
% This file is in the public domain.
%% Note: this file works from version 2.15.15
-\version "2.15.15"
+\version "2.16.0"
\header {
lsrtags = "staff-notation, tweaks-and-overrides"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "contemporary-notation, editorial-annotations, vocal-music, workaround"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "text"
+++ /dev/null
-depth = ../../..
-
-EXTRA_DIST_FILES = README
-EXTRA_DIST_FILES += $(call src-wildcard,*.ly)
-
-include $(depth)/make/stepmake.make
-\version "2.15.15"
+\version "2.16.0"
\header {
lsrtags = "expressive-marks, staff-notation, tweaks-and-overrides"
-\version "2.15.15"
+\version "2.16.0"
\header {
lsrtags = "staff-notation, tweaks-and-overrides"
--- /dev/null
+\version "2.17.5"
+
+\header {
+ lsrtags = "repeats, tweaks-and-overrides"
+
+ texidoc = "
+A @code{.|:} bar line can be printed at the beginning of a piece, by
+overriding the relevant property:
+
+"
+ doctitle = "Printing a repeat sign at the beginning of a piece"
+}
+
+
+\relative c'' {
+ \once \override Score.BreakAlignment #'break-align-orders =
+ #(make-vector 3 '(instrument-name
+ left-edge
+ ambitus
+ breathing-sign
+ clef
+ key-signature
+ time-signature
+ staff-bar
+ custos))
+ \once \override Staff.TimeSignature #'space-alist =
+ #'((first-note . (fixed-space . 2.0))
+ (right-edge . (extra-space . 0.5))
+ ;; free up some space between time signature
+ ;; and repeat bar line
+ (staff-bar . (extra-space . 1)))
+ \bar ".|:"
+ c1
+ d1
+ d4 e f g
+}
--- /dev/null
+\version "2.17.4"
+
+\header {
+ lsrtags = "expressive-marks"
+
+ texidoc = "
+Vocal and wind music frequently uses a tick mark as a breathing sign. This
+indicates a breath that subtracts a little time from the previous note rather
+than causing a short pause, which is indicated by the comma breath mark. The
+mark can be moved up a little to take it away from the stave.
+"
+ doctitle = "Using a tick as the breath mark symbol"
+}
+
+\relative c'' {
+ c2
+ \breathe
+ d2
+ \override BreathingSign #'Y-offset = #2.6
+ \override BreathingSign #'text =
+ \markup { \musicglyph #"scripts.tickmark" }
+ c2
+ \breathe
+ d2
+}
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.31
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.14
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.16.0"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.17.5
+\version "2.17.5"
\header {
lsrtags = "repeats, tweaks-and-overrides"
texidoc = "
-A @code{|:} bar line can be printed at the beginning of a piece, by
+A @code{.|:} bar line can be printed at the beginning of a piece, by
overriding the relevant property:
"
;; free up some space between time signature
;; and repeat bar line
(staff-bar . (extra-space . 1)))
- \bar "|:"
+ \bar ".|:"
c1
d1
d4 e f g
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "winds"
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.5"
\header {
lsrtags = "headword"
\key df \major
\time 2/4
\set Score.currentBarNumber = #9
- \bar "|:"
+ \bar ".|:"
<af ef c>4 (
<af gf c>8..
<af ef c>32
\oneVoice
r8
\clef bass
- \bar ":|"
+ \bar ":|."
}
\new Staff = LH {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.20
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "headword"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.5"
\header {
lsrtags = "repeats"
\relative c'' {
\repeat volta 1 { c1 }
- \set Score.doubleRepeatType = #":|:"
+ \set Score.doubleRepeatType = #":..:"
\repeat volta 1 { c1 }
\set Score.doubleRepeatType = #":|.|:"
\repeat volta 1 { c1 }
c'8\3(\glissando d'8\3)
c'8\3\glissando d'8\3
\hideNotes
- \grace { g16\3\glissando }
+ \grace { g16\glissando }
\unHideNotes
c'4\3
\afterGrace d'4\3\glissando {
\stemDown \hideNotes
- g16\3 }
+ g16 }
\unHideNotes
}
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.32
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\include "catalan.ly"
adding-an-extra-staff.ly
adding-indicators-to-staves-which-get-split-after-a-break.ly
adding-orchestral-cues-to-a-vocal-score.ly
+adding-timing-marks-to-long-glissandi.ly
alternative-bar-numbering.ly
changing-the-number-of-lines-in-a-staff.ly
changing-the-staff-size.ly
incipit.ly
inserting-score-fragments-above-a-staff,-as-markups.ly
letter-tablature-formatting.ly
+making-glissandi-breakable.ly
making-some-staff-lines-thicker-than-the-others.ly
measure-counter.ly
mensurstriche-layout-bar-lines-between-the-staves.ly
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.28
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.20
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "paper-and-layout"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.0"
\header {
lsrtags = "rhythms, tweaks-and-overrides"
+adding-timing-marks-to-long-glissandi.ly
adjusting-grace-note-spacing.ly
altering-the-length-of-beamed-stems.ly
alternative-bar-numbering.ly
keep-change-clefs-full-sized.ly
line-arrows.ly
making-an-object-invisible-with-the-transparent-property.ly
+making-glissandi-breakable.ly
manually-controlling-beam-positions.ly
mensurstriche-layout-bar-lines-between-the-staves.ly
moving-dotted-notes-in-polyphony.ly
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.5"
\header {
lsrtags = "headword"
>>
\override Score.Rest #'transparent = ##t
- \set Score.defaultBarType = "empty"
+ \set Score.defaultBarType = "-"
>>
\layout {
--- /dev/null
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.17.4
+\version "2.17.4"
+
+\header {
+ lsrtags = "expressive-marks"
+
+ texidoc = "
+Vocal and wind music frequently uses a tick mark as a breathing sign. This
+indicates a breath that subtracts a little time from the previous note rather
+than causing a short pause, which is indicated by the comma breath mark. The
+mark can be moved up a little to take it away from the stave.
+"
+ doctitle = "Using a tick as the breath mark symbol"
+} % begin verbatim
+
+
+\relative c'' {
+ c2
+ \breathe
+ d2
+ \override BreathingSign #'Y-offset = #2.6
+ \override BreathingSign
+ #'text = \markup { \musicglyph #"scripts.tickmark" }
+ c2
+ \breathe
+ d2
+}
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.15.15
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
-%% Note: this file works from version 2.14.0
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
+++ /dev/null
-depth = ../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-LATEX_FILES =$(call src-wildcard,*.latex)
-EXTRA_DIST_FILES = $(LATEX_FILES)
-
-include $(depth)/make/stepmake.make
-
-
+++ /dev/null
-depth = ../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-SUBDIRS = server
-include $(depth)/make/stepmake.make
-
-#OUT_BIB_FILES = $(addprefix $(outdir)/, $(BIB_FILES))
-BIB_FILES = $(call src-wildcard,*.bib)
-EXTRA_DIST_FILES += $(BIB_FILES) $(call src-wildcard,*.bst)
-
@miscLink{ANNOUNCE-0.1,v0.1}
Descriptive list of changes by version:
+@uref{http://lilypond.org/doc/v2.16/Documentation/changes/index.html,v2.16},
@uref{http://lilypond.org/doc/v2.14/Documentation/changes/index.html,v2.14},
@uref{http://lilypond.org/doc/v2.12/Documentation/topdocs/NEWS,v2.12},
@uref{http://lilypond.org/doc/v2.10/Documentation/topdocs/NEWS,v2.10},
@divEnd
+@divClass{column-center-bottom}
+@subheading Thanks
+
+Thanks to developers, contributors, bug hunters and suggestions for
+@miscLink{THANKS-2.14,releases up to 2.14}.
+
+@divEnd
+
@divClass{column-center-bottom}
@subheading Changelogs
@c used for news about the upcoming release; see CG 10.2
+@newsItem
+@subsubheading LilyPond 2.17.5 released! @emph{October 20, 2012}
+
+We are happy to announce the release of LilyPond 2.17.5. This
+release contains the usual number of bugfixes and enhancements, and contains
+some work in progress. You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes. If you require
+a stable version of Lilypond, we recommend using the 2.16 version.
+
+@newsEnd
+
+@newsItem
+@subsubheading LilyPond 2.17.4 released! @emph{October 6, 2012}
+
+We are happy to announce the release of LilyPond 2.17.4. This
+release contains the usual number of bugfixes. It is strongly
+recommended that normal users do @strong{not} use this release,
+and instead use the stable 2.16 version.
+
+@newsEnd
+
@newsItem
@subsubheading Lilypond 2.16.0 released! @emph{August 24, 2012}
@newsEnd
-@newsItem
-@subsubheading Lilypond 2.15.95 released! @emph{August 11, 2012}
-
-We are excited to announce the release of LilyPond 2.15.95.
-With this release, development on version 2.15 is frozen for the
-upcoming 2.16 stable release and only open to bug fixes.
-All users are urged to try this version to ensure the best
-quality of the upcoming stable release. If you discover any
-problems, please send us @ref{Bug reports}.
-
-New features since 2.14.2 are listed in the @qq{Changes} manual
-on the website section about @ref{Development}.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading LilyPond 2.15.42 released! @emph{August 02, 2012}
-
-We are happy to announce the release of LilyPond 2.15.42. This
-release contains the usual number of bugfixes.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version. Please
-note that due to a few Critical bugs, this is not the next release
-candidate.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading The LilyPond Report #27. @emph{August 2, 2012}
-
-The @emph{LilyPond Report} is back, with some interesting insights on
-new Scheme-related features recently added by our community’s only paid
-developer David Kastrup (thanks to your
-@uref{http://lilypond.org/sponsoring.html, continuing donations}). Also
-to be found in this issue are an overview of some lesser-known LilyPond
-companion projects, and a handful of more shallow factoids.
-
-Come
-@uref{http://news.lilynet.net/?The-LilyPond-Report-27, read
-LilyPond Report 27} now; comments and contributions are
-warmly encouraged!
-
-@newsEnd
* don't duplicate entries from news-front.itexi
@end ignore
+@newsItem
+@subsubheading LilyPond 2.17.3 released! @emph{September 23, 2012}
+
+We are happy to announce the release of LilyPond 2.17.3. This
+release contains the usual number of bugfixes. It is strongly
+recommended that normal users do @strong{not} use this release,
+and instead use the stable 2.16 version.
+
+@newsEnd
+
+@newsItem
+@subsubheading LilyPond 2.17.2 released! @emph{September 10, 2012}
+
+We are happy to announce the release of LilyPond 2.17.2. This
+release contains the usual number of bugfixes. It is strongly
+recommended that normal users do @strong{not} use this release,
+and instead use the stable 2.16 version.
+
+@newsEnd
+
+@newsItem
+@subsubheading LilyPond 2.17.1 released! @emph{August 28, 2012}
+
+We are happy to announce the release of LilyPond 2.17.1. This
+release contains the usual number of bugfixes. It is strongly
+recommended that normal users do @strong{not} use this release,
+and instead use the stable 2.16 version.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.17.0 released! @emph{August 26, 2012}
+
+We are happy to announce the release of LilyPond 2.17.0. This
+release contains the usual number of bugfixes. It is strongly
+recommended that normal users do @strong{not} use this release,
+and instead use the stable 2.16 version.
+
+@newsEnd
+
+@newsItem
+@subsubheading Lilypond 2.15.95 released! @emph{August 11, 2012}
+
+We are excited to announce the release of LilyPond 2.15.95.
+With this release, development on version 2.15 is frozen for the
+upcoming 2.16 stable release and only open to bug fixes.
+
+All users are urged to try this version to ensure the best
+quality of the upcoming stable release. If you discover any
+problems, please send us @ref{Bug reports}.
+
+New features since 2.14.2 are listed in the @qq{Changes} manual
+on the website section about @ref{Development}.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.15.42 released! @emph{August 02, 2012}
+
+We are happy to announce the release of LilyPond 2.15.42. This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version. Please
+note that due to a few Critical bugs, this is not the next release
+candidate.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading The LilyPond Report #27. @emph{August 2, 2012}
+
+The @emph{LilyPond Report} is back, with some interesting insights on
+new Scheme-related features recently added by our community’s only paid
+developer David Kastrup (thanks to your
+@uref{http://lilypond.org/sponsoring.html, continuing donations}). Also
+to be found in this issue are an overview of some lesser-known LilyPond
+companion projects, and a handful of more shallow factoids.
+
+Come
+@uref{http://news.lilynet.net/?The-LilyPond-Report-27, read
+LilyPond Report 27} now; comments and contributions are
+warmly encouraged!
+@newsEnd
@newsItem
@subsubheading Release candidate withdrawn @emph{July 11, 2012}
+++ /dev/null
-depth=../../..
-LOCALSTEPMAKE_TEMPLATES = ly
-include $(depth)/make/stepmake.make
-
-EXTRA_DIST_FILES = favicon.ico robots.txt tweets.xml
-EXTRA_DIST_FILES += lilypond.org.htaccess website-dir.htaccess
-
#RedirectMatch ^/development /doc/development
#old# default doc dir
-RedirectMatch ^/doc/*$ /doc/v2.14
+RedirectMatch ^/doc/*$ /doc/v2.16
# make attempt at `latest' symlink avoid ^v catch-all doc fix rule below
-RedirectMatch ^/doc//*latest/*(.*)$ /doc/v2.15/$1
-RedirectMatch ^/doc//*development/*(.*)$ /doc/v2.15/$1
-RedirectMatch ^/doc//*stable/*(.*)$ /doc/v2.14/$1
-RedirectMatch ^/doc//*([^v].*)$ /doc/v2.14/$1
-RedirectMatch ^(/Documentation.*)$ /doc/v2.14$1
+RedirectMatch ^/doc//*latest/*(.*)$ /doc/v2.17/$1
+RedirectMatch ^/doc//*development/*(.*)$ /doc/v2.17/$1
+RedirectMatch ^/doc//*stable/*(.*)$ /doc/v2.16/$1
+RedirectMatch ^/doc//*([^v].*)$ /doc/v2.16/$1
+RedirectMatch ^(/Documentation.*)$ /doc/v2.16$1
RedirectMatch ^/index$ /
# fix root calculation: no double slashes
Disallow: /doc/v2.9/
Disallow: /doc/v2.10/
Disallow: /doc/v2.11/
+Disallow: /doc/v2.12/
Disallow: /doc/v2.13/
+Disallow: /doc/v2.14/
+Disallow: /doc/v2.15/
ISOLANG = zh
depth = ../..
-# SUBDIRS = web learning notation texidocs usage included essay extending
-SUBDIRS = web texidocs included
STEPMAKE_TEMPLATES = documentation texinfo
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
NO_PDF_FILES = 1
+++ /dev/null
-depth = ../../..
-
-STEPMAKE_TEMPLATES=documentation
-
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ly)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.ily)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itexi)
-EXTRA_DIST_FILES+=$(call src-wildcard,*.itely)
-
-include $(depth)/make/stepmake.make
version that you are working on. See TRANSLATION for details.
we depend on an external entity here, which we cannot control. Suppose
-we go from 2.16.x to 2.17.x and put the documentation under "v2.17".
+we go from 2.15.x to 2.17.x and put the documentation under "v2.17".
For some time, Google won't have the new location in its index, so the
-search would get nothing. It would be better to keep "v2.16" in the
-search for a while and have a redirection from "v2.16" to "v2.17".
+search would get nothing. It would be better to keep "v2.15" in the
+search for a while and have a redirection from "v2.15" to "v2.17".
-->
<form action="http://google.com/search"
method="get"
name="search"
- onSubmit="search.q.value='site:lilypond.org/doc/v2.16 '
+ onSubmit="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onMouseMove="search.q.value='site:lilypond.org/doc/v2.16 '
+ onMouseMove="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value"
- onKeyUp="search.q.value='site:lilypond.org/doc/v2.16 '
+ onKeyUp="search.q.value='site:lilypond.org/doc/v2.17 '
+ search.brute_query.value">
<input type="hidden" name="btnG" value="Google 搜索">
<input type="text" name="brute_query" onfocus="this.value=''" value="搜索">
+++ /dev/null
-depth=../../..
-
-EXTRA_DIST_FILES=$(call src-wildcard,*.texidoc)
-
-include $(depth)/make/stepmake.make
+++ /dev/null
-depth = ../../..
-
-LOCALSTEPMAKE_TEMPLATES = ly
-
-include $(depth)/make/stepmake.make
flower lily \
mf ly \
tex ps scm \
- po make \
+ po \
elisp vim \
input \
- stepmake $(documentation-dir)
+ $(documentation-dir)
## this convoluted construction is necessary, since we don't know the
documentation-dir=$(if $(findstring no,$(DOCUMENTATION)),,Documentation)
SCRIPTS = configure autogen.sh smart-autogen.sh smart-configure.sh
-README_FILES = COPYING COPYING.FDL DEDICATION ROADMAP THANKS HACKING \
+README_FILES = COPYING COPYING.FDL DEDICATION ROADMAP HACKING \
LICENSE LICENSE.DOCUMENTATION
TOPDOC_FILES = AUTHORS INSTALL README NEWS
TOPDOC_TXT_FILES = $(addprefix $(top-build-dir)/Documentation/topdocs/$(outdir)/,$(addsuffix .txt,$(TOPDOC_FILES)))
RELEASE_FILES = ChangeLog RELEASE-COMMIT
RELEASE_OUT_FILES = $(RELEASE_FILES:%=$(outdir)/%)
OUT_DIST_FILES += $(RELEASE_OUT_FILES)
-EXTRA_DIST_FILES = VERSION .gitignore .mailmap \
- $(README_FILES) $(SCRIPTS) $(IN_FILES)
INSTALLATION_DIR=$(local_lilypond_datadir)
INSTALLATION_FILES=$(config_make) VERSION
-
+GENERATED_BUILD_FILES=configure aclocal.m4 autogen.sh
# bootstrap stepmake:
#
STEPMAKE_TEMPLATES=toplevel po install
.PHONY: test info website
-local-dist: refresh-release-files dist-toplevel-txt-files
+dist: local-dist $(GENERATED_BUILD_FILES) top-doc refresh-release-files .gitfilelist
+ @cd $(top-src-dir) && \
+ if test -n "`find . -name .git`" -a '(' -n "`git diff HEAD | head -1`" \
+ -o -n "`git status | grep -i untracked`" ')'; \
+ then echo "*** dist must been rolled on a clean git tree;"; \
+ echo "uncommitted changes or untracked files detected, aborting."; \
+ exit 1; fi
+ rm -rf $(distdir)
+ $(MAKE) local-dist $(distdir)
+ chmod -R a+r $(distdir)
+ chmod a+x `find $(distdir) -type d -print`
+ $(LN) $(TOPDOC_TXT_FILES) $(distdir)
+ $(LN) $(GENERATED_BUILD_FILES:%=$(src-dir)/%) .gitfilelist $(distdir)
+ cd $(top-src-dir) && xargs $(buildscript-dir)/mass-link hard . $(distdir) <$(top-build-dir)/.gitfilelist
+ if test -n "`find $(top-src-dir) -name .git`"; then \
+ COMMIT_DATE=`git --git-dir=$(top-src-dir)/.git log -1 --format=%cD`; \
+ find $(distdir) | xargs touch -d "$$COMMIT_DATE"; fi
+ (cd ./$(depth)/$(outdir); $(TAR) -cf - --owner=0 --group=0 $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
+ rm -rf $(distdir)
+
+ifneq ($(shell find $(top-src-dir) -name .git),)
+.gitfilelist: $(top-src-dir)/.git/index
+ cd $(top-src-dir) && git ls-files >$(top-build-dir)/$@
+local-clean-filelist:
+ rm -f .gitfilelist
+else
+.gitfilelist: $(src-dir)/.gitfilelist
+ cp $< $@
+local-clean-filelist:
+endif
all: $(outdir)/VERSION
top-doc: python-modules
-local-clean: local-clean-ChangeLog
+local-clean: local-clean-ChangeLog local-clean-filelist
local-clean-ChangeLog:
rm -f ChangeLog
-dist-toplevel-txt-files: top-doc
- -mkdir -p $(distdir)
- ln $(TOPDOC_TXT_FILES) $(distdir)
- ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)
-
info:
$(foreach d, $(INFO_DIRECTORIES),$(MAKE) -C $(d) out=www info && ) true
|
| SCRIPTS:
|
+|-- config/ Autoconf helpers for configure script
|-- python/ Python modules, MIDI module
| `-- auxiliar/ Python modules for build/maintenance
|-- scripts/ End-user scripts (--> lilypond/usr/bin/)
+++ /dev/null
-Release 2.16
-************
-
-For information about the various official or semi-official positions,
-check out <URL:http://lilypond.org/authors.html>
-
-The following are registered as having authored changes to the
-repository of LilyPond since 2.14.2:
-
-Adam Spiers
-Alberto Simoes
-Aleksandr Andreev
-Anthony Fok
-Arnold Theresius
-Benkő Pál
-Bertrand Bordage
-Carl D. Sorensen
-Choan Gálvez
-Colin Campbell
-Daisuke Yamashita
-David Kastrup
-David Nalesnik
-Dénes Harmath
-Federico Bruni
-Francisco Vila
-Frédéric Bron
-Graham Breed
-Graham Percival
-Han-Wen Nienhuys
-Heikki Tauriainen
-Ian Hulin
-James Lowe
-Jan Nieuwenhuizen
-Jan-Peter Voigt
-Janek Warchoł
-Jean-Charles Malahieude
-Joe Neeman
-John Mandereau
-Joseph Wakeling
-Julien Rioux
-Karin Hoethker
-Keith OHara
-Marc Hohl
-Markus Oehme
-Matthias Kilian
-Michael Welsh Duggan
-Mike Solomon
-Neil Puttock
-Nicolas Sceaux
-Patrick McCarty
-Patrick Schmidt
-Pavel Roskin
-Peter Chubb
-Phil Holmes
-Piers Titus van der Torren
-Reinhold Kainhofer
-Rodolfo Zitellini
-Seafire
-Stefan Weil
-Sven Axelsson
-Thomas Morley
-Till Rettig
-Trevor Daniels
-Valentin Villenave
-Werner Lemberg
-Wol
-Yoshiki Sawada
-Łukasz Czerwiński
-
-
-Release 2.13
-************
-
-DEVELOPMENT TEAM
-
-Han-Wen Nienhuys - Core development
-Jan Nieuwenhuizen - Core development
-Graham Percival - Release Meister
-Valentin Villenave - LSR Editor and Bug Meister
-Mats Bengtsson - Support Guru
-John Mandereau - Translation Meister
-Trevor Daniels - Documentation Editor
-
-CONTRIBUTORS
-
-Carl Sorensen - Fret diagrams
-Jonathan Kulp - Documentation Patches
-Ralph Palmer - Documentation Indexing
-
-TRANSLATORS
-
-Francisco Vila
-Jean-Charles Malahieude
-Till Rettig
-Yoshiki Sawada
-
-FROGS
-
-Carl Sorensen - Frog meister
-Andrew Hawryluk
-Andrew Wilson
-Marek Klein
-Ian Hulin
-Frédéric Bron
-Hajo Dezelski
-Kieren MacMillan
-
-
-BUG HUNTERS/SUGGESTIONS
-
-Chris Liddell
-Chris Snyder
-David Kastrup
-Karim Haddad
-Mark Polesky
-Martin Tarenskeen
-Michael Käppler
-Nick Payne
-
-
-Release 2.12
-************
-
-
-DEVELOPMENT TEAM
-
-Han-Wen Nienhuys - Core development
-Jan Nieuwenhuizen - Core development
-Joe Neeman - Core development
-Graham Percival - Documentation Editor and Bug Meister
-Valentin Villenave - LSR Editor and Bug Meister
-Mats Bengtsson - Support Guru
-John Mandereau - Translation Meister
-
-
-CONTRIBUTORS
-
-Rune Zedeler
-Maximilian Albert
-Milan Zamazal
-Reinhold Kainhofer - musicxml2ly development
-Erlend Aasland
-Stan Sanderson - Regression Checker
-Neil Puttock
-
-
-GRAND DOCUMENTATION PROJECT
-
-Trevor Daniels - Assistant Documentation Editor
-Andrew Hawryluk - NR work
-Carl Sorensen - NR work
-Eyolf Østrem - NR work
-Francisco Vila - NR work
-Jay Hamilton - NR work
-Jonathan Kulp - NR work
-Joseph Harfouch - NR work
-Patrick McCarty - NR work
-Ralph Palmer - NR work
-Till Rettig - NR work
-Kurt Kroon - Glossary Updates, NR work
-Alard de Boer - Formatting
-Michael Rasmussen - Formatting
-Trevor Bača - Inspirational Headwords
-Reinhold Kainhofer - Technical Aid
-Neil Puttock - Snippet Editor, Technical Aid
-
-
-TRANSLATORS
-
-Clytie Siddall
-Damien Heurtebise
-Francisco Vila
-Heikki Junes
-Jean-Charles Malahieude
-John Mandereau
-Matthieu Jacquot
-Nicolas Klutchnikoff
-Till Rettig
-Valentin Villenave
-
-
-SPONSORS
-
-Mike Amundsen
-Trevor Bača
-
-
-BUG HUNTERS/SUGGESTIONS
-
-Adam James Wilson
-Alard de Boer
-Alex Rolex
-Andy Haupt
-Arvid Grøtting
-Bertalan Fodor
-Benjamin Drung
-Cameron Horsburgh
-Carl Sorensen
-Christian Hitz
-Christian Herzberg
-David Bobroff
-David Griffel
-Daniel Hulme
-Daniel Johnson
-Dominic Neumann
-Eduardo Vieira
-Frédéric Chiasson
-Georg Dummer
-Georg Romstorfer
-Gilles Thibault
-Hernán J. González
-Hu Haipeng
-Jay Anderson
-James Kilfinger
-Jean-Marie Mouchel
-Jean-Yves Baudais
-Jesús Guillermo Andrade
-Jonathan Henkelman
-Kazuhiro Suzuki
-Kevin Dalley
-Laura Conrad
-Luc Wehli
-Maarten Hijzelendoorn
-Marc Lanoiselée
-Mark Polesky
-Matthieu Jacquot
-Matthijs Frankeno
-Martijn Vromans
-Marnen Laibow-Koser
-Maximilian Albert
-Mirosław Doroszewski
-Mike Coleman
-Neil Puttock
-Nicolas Mayencourt
-Nicolas Sceaux
-Orm Finnendahl
-Peter Budny
-Phillip Kirlin
-Pierre-Emmanuel Brame
-Ralph Palmer
-Renaud Flavigny
-Rick Hansen
-Risto Vääräniemi
-Robin Bannister
-Roland Goretzki
-Rune Zedeler
-Ruud van Silfhout
-Sean Reed
-Steven Weber
-Tomas Sauer
-Thomas Scharkowski
-Trevor Bača
-Vivian Barty-Taylor
-Werner Lemberg
-Wilbert Berendsen
-William Oram
-Yota Moteuchi
-Zack Charter
-Zoltan Selyem
-
-
-
-Release 2.10
-************
-
-
-DEVELOPMENT TEAM
-
-Han-Wen Nienhuys - Core development
-Jan Nieuwenhuizen - Core development
-Graham Percival - Documentation Editor and Bug Meister
-John Mandereau - Translation Meister
-Mats Bengtsson - Support Guru
-
-
-CONTRIBUTORS
-
-Angelo Contardi
-David Feuer
-Erik Sandberg
-Erlend Aasland
-Guido Amoruso
-Heikki Junes
-Joe Neeman
-John Mandereau
-
-
-TRANSLATORS
-
-Frédéric Chiasson
-Gauvain Pocentek
-Jean-Charles Malahieude
-John Mandereau
-Ludovic Sardain
-Nicolas Grandclaude
-Valentin Villenave
-
-
-SPONSORS
-
-Andrew Sidwell
-Anthony Youngman
-Chris Sawer
-David Griffel
-Jamie Bullock
-Kieren MacMillan
-Michael Meixner
-Paul Scott
-Rick Hansen
-Steve Doonan
-Trent Johnston
-Trevor Bača
-Vivian Barty-Taylor
-William Wilson
-
-DOCUMENTATION HELPERS
-
-Cameron Horsburgh
-Dave Luttinen
-Eduardo Vieira
-Erlend Aasland
-Geoff Horton
-Juergen Reuter
-
-
-BUG HUNTERS/SUGGESTIONS
-
-Albert Frantz
-Arvid Grøtting
-Anthony Youngman
-Aurèle Duda
-Ben Hoefer
-Bernie Arai
-Cameron Horsburgh
-Charles Cave
-Christian Hitz
-Christopher Ellis
-Claude Routhier
-Colin Wilding
-Daniel Tonda Castillo
-David Rogers
-Francisco Vila
-Harald Wellmann
-Henrik Frisk
-Hernán J. González
-Johannes Schindelin
-John Williams
-J. Leung
-Karim Haddad
-Karl Hammar
-Keith Packard
-Kieren MacMillan
-Lee T. Wilkirson
-Lieke van der Meer
-Luc Wehli
-Manuzhai
-Mark Dewey
-Marcus Macauley
-Markus Schneider
-Matti Aaltonen
-Michael Meixner
-Michael Welsh Duggan
-Milan Zamazal
-Orm Finnendahl
-Paul Scott
-Phillip Kirlin
-Quentin Spencer
-Rainer Typke
-Rick Hansen
-Rutger Helmers
-Ruud van Silfhout
-Sietse Brouwer
-Stephen Carter
-Stephen Kress
-Thies Albrecht
-Toine Schreurs
-Trent Johnston
-Trevor Bača
-Trevor Daniels
-Vaclav Smilauer
-Vicente Solsona Dellá
-Victor Eijkhout
-Villum Sejersen
-Werner Lemberg
-Will Oram
-Zoltan V. Laszlo
-
-Release 2.8
-***********
-
-DEVELOPMENT TEAM
-
-Han-Wen Nienhuys - Core development
-Jan Nieuwenhuizen - Core development
-Erik Sandberg - Bug Meister
-Pedro Kroger - Build Meister
-Graham Percival - Documentation Editor
-Mats Bengtsson - Support Guru
-
-CONTRIBUTORS
-
-Erlend Aasland
-Heikki Junes
-Joe Neeman
-Johannes Schindelin
-Nicolas Sceaux
-Werner Lemberg
-Yoshinobu Ishizaki
-
-
-SPONSORS
-
-Aaron Mehl
-Basil Crow
-Bertalan Fodor
-Christian Ebert
-Henrik Frisk
-Jay Hamilton
-Jamie Bullock
-John Mandereau
-D. Josiah Boothby
-Kieren MacMillan
-Kris Shaffer
-Mark van den Borre
-Mike Rolish
-Muziekacademie Lede
-Nancho Alvarez
-Nicolas Sceaux
-Sean Reed
-Steve Doonan
-Sven Axelsson
-Trent Johnston
-Trevor Bača
-Vicente Solsona Dellá
-Yoshinobu Ishizaki
-
-
-BUG HUNTERS/SUGGESTIONS
-
-Alan Stern
-Andrea Valle
-Bertalan Fodor
-Bob Broadus
-Bruce Fairchild
-Cameron Horsburgh
-Chris Sawer
-Christian Ebert
-Christian Hitz
-Darius Blasband
-David Bobroff
-David Raleigh Arnold
-Donald Axel
-Don Blaheta
-Dunstan Vavasour
-Edward Neeman
-Eduardo Vieira
-Ernesto Gancedo
-François Vion
-Frédéric Bron
-Geoff Horton
-Gianluca D.
-Hans Forbrich
-Hoang Nguyen
-Joe Neeman
-Jordi Nadal
-Jukka Akkanen
-Kieren Richard MacMillan
-Lambros Lambrou
-Laura Conrad
-Libero Mureddu
-Marcus Macauley
-Mark Steinheuser
-Matevž Jekovec
-Michael Kiermaier
-Michael Welsh Duggan
-Milan Zamazal
-Nicolas Mayencourt
-Orm Finnendahl
-Patrick K Welton
-Paul Scott
-Ralph Little
-Richard Schoeller
-Robert Vlasaty
-Roman Kurakin
-Russell Lang
-Scott Russell
-Sean Reed
-Seng Liang
-Steve Doonan
-Steven Weber
-Sven Axelsson
-Thomas Scharkowski
-Thomas Bushnell BSG
-Toine Schreurs
-Trent Johnston
-Trevor Bača
-Vicente Solsona Dellá
-Vincenzo Colonnella
-Werner Lemberg
-Will Oram
-Wolfgang Hoffmann
-
-Release 2.6
-***********
-
-DEVELOPMENT TEAM
-
-Han-Wen Nienhuys - Core development
-Jan Nieuwenhuizen - Core development
-Erik Sandberg - Bug Meister
-Pedro Kroger - Build Meister
-Graham Percival - Documentation Editor
-
-CONTRIBUTORS
-
-Andreas Scherer
-Arno Waschk
-Bertalan Fodor
-Carl Sorensen
-Christian Hitz
-David Jedlinsky
-Erlend Aasland
-Heikki Junes
-John Williams
-Jonatan Liljedahl
-Jürgen Reuter
-Mats Bengtsson
-Matthias Neeracher
-Mathieu Giraud
-Nicolas Sceaux
-Pal Benko
-Sebastiano Vigna
-Tatsuya Ono
-Vicente Solsona Della
-Werner Lemberg
-Yuval Harel
-
-TRANSLATORS
-
-Abel Cheung
-John Mandereau
-Olcay Yıldırım
-Roland Stigge
-Steven Michael Murphy
-
-
-WEBSITE TRANSLATORS
-
-Gauvain Pocentek
-Jean-Charles Malahieude
-John Mandereau
-Tineke de Munnik
-
-
-SPONSORS
-
-Bertalan Fodor
-Chris Sawer
-Gunther Strube
-Hans Forbrich
-Jonathan Walther
-Marcus Macauley
-Steve Doonan
-
-BUG HUNTERS/SUGGESTIONS
-
-Alexandre Beneteau
-Andreas Scherer
-Anthony W. Youngman
-Antti Kaihola
-Arjan Bos
-David Bobroff
-Bernard Hurley
-Bruce Fairchild
-Bruce McIntyre
-Daniel Johnson
-David Rogers
-Dylan Nicholson
-Ed Jackson
-Erik Ronström
-Fernando Pablo Lopez-Lezcano
-Gilles Sadowski
-Pothárn Imre
-Jack O'Quin
-Jeff Smith
-Johannes Schindelin
-John Mandereau
-Jose Miguel Pasini
-Josiah Boothby
-Juergen Reuter
-Karl Hammar
-Laura Conrad
-Olivier Guéry
-Paul Scott
-Richard Schoeller
-Rob Platt
-Roman Stöckl-Schmidt
-Russ Jorgensen
-Simon Bailey
-Stephen McCarthy
-Sven Axelsson
-Tapio Tuovila
-Tom Cato Amundsen
-Tyler Eaves
-Will Oram
-Wolfgang Hoffmann
-
-
-Release 2.4
-***********
-
-DEVELOPMENT TEAM
-
-Han-Wen Nienhuys - Core development
-Jan Nieuwenhuizen - Core development
-Erik Sandberg - Bug Meister
-Pedro Kroger - Build Meister
-Graham Percival - Documentation Editor
-
-
-CONTRIBUTORS
-
-Carl Sorensen
-David Svoboda
-Guy Gascoigne-Piggford
-Heikki Junes
-Hendrik Maryns
-Kristof Bastiaensen
-Lisa Opus Goldstein
-Mats Bengtsson
-Michael Welsh Duggan
-Peter Lutek
-Werner Lemberg
-
-BUG HUNTERS/SUGGESTIONS
-
-
-Antti Kaihola
-Bertalan Fodor
-Brian Clements
-Christian Hitz
-Christoph Ludwig
-Christophe Papazian
-Daniel Berjón Díez
-Dave Phillips
-David Bobroff
-David Brandon
-Doug Asherman
-Ed Jackson
-Fernando Pablo Lopez-Lezcano
-Heinz Stolba
-Jack O'Quin
-Jefferson dos Santos Felix
-Karl Hammar
-Marco Gusy
-Martin Norbäck
-Matthias Neeracher
-Maurizio Tomasi
-Michael Kiermaier
-Pascal Legris
-Peter Rosenbeck
-Russ Ross
-Stephen Pollei
-Thomas Scharlowski
-Will Oram
-Yuval Harel
-
-
-Release 2.2
-***********
-
-HEAD HACKERS
-
-Han-Wen Nienhuys
-Jan Nieuwenhuizen
-
-CONTRIBUTORS
-
-David Bobroff
-Edward Sanford Sutton
-Heikki Junes
-Nicolas Sceaux
-
-BUG HUNTERS/SUGGESTIONS
-
-Alexandre Beneteau
-Andrew McNabb
-Atte Andre Jensen
-Bertalan Fodor
-Bruce McIntyre
-Dave Symonds
-David Bobroff
-Darius
-Delma Avers
-Doug Linhardt
-Eric Wurbel
-Erik Sandberg
-Ferenc Wagner
-Hans Forbrich
-John Williams
-José Luis Cruz
-Jürgen Reuter
-Kieren Richard MacMillan
-Laurent Martelli
-Mats Bengtsson
-Matthias Kilian
-Nancho Alvarez
-Nick Busigin
-Nicolas Sceaux
-Olivier Guéry
-Patrick Atamaniuk
-Paul Scott
-Pawel D
-Pedro Kroger
-Ray McKinney
-Reuben Thomas
-Robert Vlasaty
-Stef Epardaud
-Thomas Willhalm
-Thomas Scharkowski
-Tom Bäckström
-Werner Lemberg
-Will Oram
-
-
-Release 2.0
-***********
-
-HEAD HACKERS
-
-Han-Wen Nienhuys
-Jan Nieuwenhuizen
-
-CONTRIBUTORS
-
-Mats Bengtsson
-Heikki Junes
-Jürgen Reuter
-
-BUG HUNTERS/SUGGESTIONS
-
-Antonio Palama
-Benjamin Milde
-Daniel Berjon Diez
-David Bobroff
-David Rayleigh Arnold
-Erik Ronstroem
-Fabio dos Santos
-Fodor Bertalan
-Frederic Bron
-Graham Percival
-Ian Bailey-Mortimer
-John Williams
-Josza Marton
-Marco Caliari
-Matthieu Amiguet
-Michael Welsh Duggan
-Patrick Atamaniuk
-Paul Scott
-Pedro Kroeger
-Peter Lutek
-Richard Schoeller
-Thorkil Wolvendans
-Werner Trobin
-
-
-Release 1.8
-***********
-
-HEAD HACKERS
-
-Han-Wen Nienhuys
-Jan Nieuwenhuizen
-
-CONTRIBUTORS
-
-Graham Percival
-Heikki Junes
-Jügen Reuter
-Kim Shrier
-Rune Zedeler
-Werner Lemberg
-
-
-BUG HUNTERS
-
-Amelie Zapf
-Andrew Schaaf
-Atte Andre Jensen
-Bob Harrington
-Chris Jackson
-Chris Sawer
-David Bobroff
-Erik Sandberg
-Fernando Pablo Lopez-Lezcano
-Hans Kieserman
-Jeremie Lumbroso
-John Potelle
-John Williams
-Karl Berry
-Karl-Johan Karlsson
-Klaus Zimmermann
-Koblinger Egmont
-Paul Scott
-Pedro Kroger
-Richard Shann
-Roland Stigge
-Ryan O'Neil
-Simon Bailey
-Simon Weatherill
-Stanislav Brabec
-Thomas Rijniers
-Werner Lemberg
-Yotam Medini
-
-
-#Local variables:
-#coding: utf-8
-#End:
-
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
-MINOR_VERSION=16
-PATCH_LEVEL=1
+MINOR_VERSION=17
+PATCH_LEVEL=6
MY_PATCH_LEVEL=
VERSION_STABLE=2.16.0
-VERSION_DEVEL=2.17.4
+VERSION_DEVEL=2.17.5
--- /dev/null
+dnl aclocal.m4 -*-shell-script-*-
+dnl StepMake subroutines for configure.in
+
+
+### mostly interal macros
+
+# Get full path of executable ($1)
+AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [
+ ## which doesn't work in ash, if /usr/bin/which isn't installed
+ ## type -p doesn't work in ash
+ ## command -v doesn't work in zsh
+ ## command -v "$1" 2>&1
+ ## this test should work in ash, bash, pdksh (ksh), zsh
+ type -p $1 2>/dev/null | tail -n 1 | awk '{print $NF}'
+])
+
+
+# Get version string from executable ($1)
+AC_DEFUN(STEPMAKE_GET_VERSION, [
+ ## "$1" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
+ ##
+ ## ARG.
+ ## Workaround for broken Debian gcc version string:
+ ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
+ ##
+ ## -V: Workaround for python
+
+ changequote(<<, >>)#dnl
+
+ ## Assume and hunt for dotted version multiplet.
+ ## use eval trickery, because we cannot use multi-level $() instead of ``
+ ## for compatibility reasons.
+
+ ## grab the first version number in --version output.
+ eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 |
+ grep -E '(^| )[0-9][0-9]*\.[0-9]' |
+ head -n 1 |
+ tr ' ' '\n' |
+ sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' |
+ grep -E '(^| )[0-9][0-9]*\.[0-9]' |
+ head -n 1\`\"
+
+ if test -z "$_ver"; then
+ ## If empty, try date [fontforge]
+ eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\{6,8\}' \
+ | head -n 1 \
+ | sed -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
+ fi
+ echo "$_ver"
+ changequote([, ])#dnl
+])
+
+# Calculate simplistic numeric version from version string ($1)
+# As yet, we have no need for something more elaborate.
+AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
+ echo "$1" | awk -F. '
+ {
+ if ([$]3) {three = [$]3}
+ else {three = 0}
+ }
+ {printf "%.0f\n", [$]1*1000000 + [$]2*1000 + three}'
+])
+
+
+# Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED')
+AC_DEFUN(STEPMAKE_ADD_ENTRY, [
+ eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\"
+])
+
+# Check if tested program ($2) was found ($1).
+# If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
+# We could abort here if a 'REQUIRED' program is not found
+AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
+ STEPMAKE_CHECK_SEARCH_RESULT($1)
+ if test $? -ne 0; then
+ STEPMAKE_ADD_ENTRY($3, $2)
+ if test "$3" = "REQUIRED"; then
+ command="echo ERROR: $2 not found"
+ # abort configure process here?
+ else
+ command="- echo $2 not found"
+ fi
+ eval "$1"='$command'
+ false
+ else
+ true
+ fi
+])
+
+
+# Return if tested proram ($1) was found (true) or not (false).
+AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
+ r="`eval echo '$'"$1"`"
+ if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
+ true
+ else
+ ##STEPMAKE_WARN(cannot find $2. $3)
+ false
+ fi
+])
+
+
+# Check version of program ($1)
+# If version ($4: optional argument, supply if version cannot be
+# parsed using --version or -V ) is smaller than requested ($3), add
+# entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
+AC_DEFUN(STEPMAKE_CHECK_VERSION, [
+ r="`eval echo '$'"$1"`"
+ AC_MSG_CHECKING([$r version])
+ exe=`STEPMAKE_GET_EXECUTABLE($r)`
+ if test -n "$4"; then
+ ver="$4"
+ else
+ ver=`STEPMAKE_GET_VERSION($exe)`
+ fi
+ num=`STEPMAKE_NUMERIC_VERSION($ver)`
+ req=`STEPMAKE_NUMERIC_VERSION($3)`
+ AC_MSG_RESULT([$ver])
+ if test "$num" -lt "$req"; then
+ STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+ fi
+ vervar="`echo $1 | tr '[a-z]' '[A-Z]'`_VERSION"
+ eval `echo $vervar=$num`
+## AC_SUBST(`eval echo $vervar`)
+])
+
+# Check version of program ($1)
+# If version is greater than or equals unsupported ($3),
+# add entry to unsupported list ($2, 'UNSUPPORTED')
+AC_DEFUN(STEPMAKE_CHECK_VERSION_UNSUPPORTED, [
+ r="`eval echo '$'"$1"`"
+ AC_MSG_CHECKING([$r version])
+ exe=`STEPMAKE_GET_EXECUTABLE($r)`
+ ver=`STEPMAKE_GET_VERSION($exe)`
+ num=`STEPMAKE_NUMERIC_VERSION($ver)`
+ sup=`STEPMAKE_NUMERIC_VERSION($3)`
+ AC_MSG_RESULT([$ver])
+ if test "$num" -ge "$sup"; then
+ STEPMAKE_ADD_ENTRY($2, ["$r < $3 (installed: $ver)"])
+ fi
+])
+
+### Macros to build configure.in
+
+
+AC_DEFUN(STEPMAKE_BIBTEX2HTML, [
+ STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1)
+ if test "$BIBTEX2HTML" = "bib2html"; then
+ BIBTEX2HTML_FLAGS='$< $(@)'
+ else
+ BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
+ fi
+ AC_SUBST(BIBTEX2HTML)
+ AC_SUBST(BIBTEX2HTML_FLAGS)
+])
+
+
+AC_DEFUN(STEPMAKE_BISON, [
+ # ugh, automake: we want (and check for) bison
+ AC_PROG_YACC
+
+ STEPMAKE_PROGS(BISON, bison, $1)
+
+ # urg. should test functionality rather than version.
+ if test "$BISON" = "bison" -a -n "$2"; then
+ STEPMAKE_CHECK_VERSION(BISON, $1, $2)
+ fi
+])
+
+AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [
+ # -O is necessary to get inlining
+ CFLAGS=${CFLAGS-""}
+ CXXFLAGS=${CXXFLAGS-$CFLAGS}
+ LDFLAGS=${LDFLAGS-""}
+ optimise_b=yes
+ profile_b=no
+ debug_b=yes
+ pipe_b=yes
+
+ AC_ARG_ENABLE(debugging,
+ [AS_HELP_STRING([--enable-debugging],
+ [compile with debugging info. Default: on])],
+ [debug_b=$enableval])
+
+ AC_ARG_ENABLE(optimising,
+ [AS_HELP_STRING([--enable-optimising],
+ [compile with optimising. Default: on])],
+ [optimise_b=$enableval])
+
+ AC_ARG_ENABLE(profiling,
+ [AS_HELP_STRING([--enable-profiling],
+ [compile with gprof support. Default: off])],
+ [profile_b=$enableval])
+
+ AC_ARG_ENABLE(pipe,
+ [AS_HELP_STRING([--enable-pipe],
+ [compile with -pipe. Default: on])],
+ [pipe_b=$enableval])
+
+ if test "$optimise_b" = yes; then
+ AC_DEFINE(NDEBUG)
+ DEFINES="$DEFINES -DNDEBUG"
+ OPTIMIZE=" -O2 -finline-functions"
+ fi
+
+ if test $profile_b = yes; then
+ EXTRA_LIBS="-pg"
+ OPTIMIZE="$OPTIMIZE -pg"
+ fi
+
+ if test $debug_b = yes; then
+ OPTIMIZE="$OPTIMIZE -g"
+ fi
+])
+
+AC_DEFUN(STEPMAKE_COMPILE, [
+
+ AC_REQUIRE([STEPMAKE_COMPILE_BEFORE])
+ AC_REQUIRE([AC_PROG_CC])
+
+ STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
+ LD='$(CC)'
+ AC_SUBST(LD)
+
+ # If -pipe requested, test if it works and add to CFLAGS.
+ if test "$pipe_b" = yes; then
+ save_cflags="$CFLAGS"
+ CFLAGS=" -pipe $CFLAGS";
+ AC_CACHE_CHECK([whether compiler understands -pipe],
+ [stepmake_cv_cflags_pipe],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[/* -pipe test */]])],
+ [stepmake_cv_cflags_pipe=yes],
+ [stepmake_cv_cflags_pipe=no]))
+ CFLAGS=$save_cflags
+ if test $stepmake_cv_cflags_pipe = yes; then
+ OPTIMIZE="$OPTIMIZE -pipe"
+ fi
+ fi
+
+ CFLAGS="$CFLAGS $OPTIMIZE"
+ CPPFLAGS=${CPPFLAGS-""}
+
+ AC_MSG_CHECKING([for IEEE-conformance compiler flags])
+ save_cflags="$CFLAGS"
+ case "$host" in
+ alpha*-*-*)
+ dnl should do compile test?
+ AC_MSG_RESULT(-mieee)
+ CFLAGS=" -mieee $CFLAGS"
+ ;;
+ *)
+ AC_MSG_RESULT([none])
+ ;;
+ esac
+
+ AC_SUBST(cross_compiling)
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CPPFLAGS)
+ AC_SUBST(LDFLAGS)
+ AC_SUBST(DEFINES)
+ AC_SUBST(EXTRA_LIBS)
+])
+
+AC_DEFUN(STEPMAKE_CXX, [
+ AC_PROG_CXX
+ STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
+
+ CXXFLAGS="$CXXFLAGS $OPTIMIZE"
+ LD='$(CXX)'
+
+ AC_SUBST(CXX)
+ AC_SUBST(CXXFLAGS)
+ AC_SUBST(LD)
+])
+
+
+AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
+ AC_CACHE_CHECK([whether explicit instantiation is needed],
+ stepmake_cv_need_explicit_instantiation,
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ template <class T> struct foo { static int baz; };
+ template <class T> int foo<T>::baz = 1;
+ ]], [[ return foo<int>::baz; ]])],[stepmake_cv_need_explicit_instantiation=no],[stepmake_cv_need_explicit_instantiation=yes]))
+ if test x"$stepmake_cv_need_explicit_instantiation"x = x"yes"x; then
+ AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
+ fi
+])
+
+AC_DEFUN(STEPMAKE_GXXCODEGENBUG, [
+ AC_MSG_CHECKING([options for known g++ bugs])
+ case "$GXX:$CXX_VERSION" in
+ yes:400600[[0-2]])
+ AC_MSG_RESULT([-fno-optimize-sibling-calls (tail call bug)])
+ CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls"
+ ;;
+ yes:400700?)
+ AC_MSG_RESULT([-fno-tree-vrp (comparison bug)])
+ CXXFLAGS="$CXXFLAGS -fno-tree-vrp"
+ ;;
+ *) AC_MSG_RESULT([none])
+ esac
+ AC_SUBST(CXXFLAGS)
+])
+
+
+AC_DEFUN(STEPMAKE_DATADIR, [
+ if test "$datadir" = "\${prefix}/share"; then
+ datadir='${prefix}/share'
+ fi
+ presome=${prefix}
+ if test "$prefix" = "NONE"; then
+ presome=${ac_default_prefix}
+ fi
+
+ build_package_datadir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/share/$package
+
+ DATADIR=`echo ${datadir} | sed "s!\\\${datarootdir}!${prefix}/share!"`
+ DATADIR=`echo ${DATADIR} | sed "s!\\\${prefix}!$presome!"`
+ BUILD_PACKAGE_DATADIR=`echo ${build_package_datadir} | sed "s!\\\${prefix}!$presome!"`
+
+ AC_SUBST(datadir)
+ AC_SUBST(datarootdir)
+ AC_SUBST(build_package_datadir)
+ AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"])
+ AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"])
+])
+
+## ugh: cut & paste programming from datadir.
+AC_DEFUN(STEPMAKE_LIBDIR, [
+
+ if test "$libdir" = "\${exec_prefix}/lib"; then
+ libdir='${exec_prefix}/lib'
+ fi
+ presome=$exec_prefix
+ build_package_libdir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/lib/$package
+
+ LIBDIR=`echo ${libdir} | sed "s!\\\${exec_prefix}!$presome!"`
+ BUILD_PACKAGE_LIBDIR=`echo ${build_package_libdir} | sed "s!\\\${exec_prefix}!$presome!"`
+
+ AC_SUBST(libdir)
+ AC_SUBST(build_package_libdir)
+ AC_DEFINE_UNQUOTED(LIBDIR, ["${LIBDIR}"])
+ AC_DEFINE_UNQUOTED(BUILD_PACKAGE_LIBDIR, ["${BUILD_PACKAGE_LIBDIR}"])
+])
+
+
+AC_DEFUN(STEPMAKE_PREFIX_EXPAND_FIXUP, [
+ # undo expanding of explicit --infodir=/usr/share
+ # to ease install-time override with prefix=...
+ strip=`echo $includedir | eval sed s@^$prefix@@`
+ if test "$includedir" = "`eval echo $prefix$strip`"; then
+ includedir='${prefix}'$strip''
+ fi
+ strip=`echo $libdir | eval sed s@^$exec_prefix@@`
+ if test "$libdir" = "`eval echo $exec_prefix$strip`"; then
+ libdir='${exec_prefix}'$strip''
+ fi
+ strip=`echo $infodir | eval sed s@^$datarootdir@@`
+ if test "$infodir" = "`eval echo $datarootdir$strip`"; then
+ infodir='${datarootdir}'$strip''
+ fi
+ strip=`echo $mandir | eval sed s@^$datarootdir@@`
+ if test "$mandir" = "`eval echo $datarootdir$strip`"; then
+ mandir='${datarootdir}'$strip''
+ fi
+])
+
+
+AC_DEFUN(STEPMAKE_END, [
+ STEPMAKE_PREFIX_EXPAND_FIXUP
+
+ AC_SUBST(OPTIONAL)
+ AC_SUBST(REQUIRED)
+
+ AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
+ AC_OUTPUT
+
+ if test -n "$OPTIONAL"; then
+ echo
+ echo "WARNING: Please consider installing optional programs or files: $OPTIONAL"
+ fi
+
+ if test -n "$REQUIRED"; then
+ echo
+ echo "ERROR: Please install required programs: $REQUIRED"
+ fi
+
+ if test -n "$UNSUPPORTED"; then
+ echo
+ echo "ERROR: Please use older version of programs: $UNSUPPORTED"
+ fi
+
+ if test -n "$OPTIONAL$REQUIRED$UNSUPPORTED"; then
+ echo
+ echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
+ if test -f config.cache ; then
+ echo "Remove config.cache before rerunning ./configure"
+ fi
+ fi
+
+ if test -n "$REQUIRED$UNSUPPORTED"; then
+ rm -f $srcdir/GNUmakefile
+ exit 1
+ fi
+
+ # regular in-place build
+ # test for srcdir_build = yes ?
+ if test "$srcdir_build" = "yes"; then
+ rm -f $srcdir/GNUmakefile
+ cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
+ chmod 444 $srcdir/GNUmakefile
+ else
+ if test -f $srcdir/GNUmakefile; then
+ cat <<EOF
+Source directory already configured. Please clean the source directory
+
+ make -C $srcdir distclean
+
+and rerun configure.
+EOF
+ exit 2
+ fi
+
+ abssrcdir="`cd $srcdir; pwd`"
+ absbuilddir="`pwd`"
+ for d in 2 3 4 5 ; do
+ for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name GNUmakefile`; do
+ case "$abssrcdir" in
+ "$absbuilddir"/*)
+# source is below build directory, always copy
+ ;;
+ *)
+ case "$abssrcdir/${mf#./}" in
+ "$absbuilddir"/*)
+# find descended into build directory, don't copy
+ continue
+ esac
+ esac
+ mkdir -p ${mf%/*}
+ cat <<EOF | $PYTHON - > $mf
+print 'depth=' + ('../' * ( $d-1 ) )
+print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
+print 'include \$(configure-srcdir)/$mf'
+print 'MODULE_INCLUDES += \$(src-dir)/\$(outbase)'
+EOF
+ done
+ for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name '*.make' | grep -v config.make `; do
+ case "$abssrcdir" in
+ "$absbuilddir"/*)
+# source is below build directory, always copy
+ ;;
+ *)
+ case "$abssrcdir/${mf#./}" in
+ "$absbuilddir"/*)
+# find descended into build directory, don't copy
+ continue
+ esac
+ esac
+ mkdir -p ${mf%/*}
+ cat <<EOF | $PYTHON - > $mf
+print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
+print 'include \$(configure-srcdir)/$mf'
+EOF
+ done
+ done
+
+ rm -f GNUmakefile
+ cat <<EOF > GNUmakefile
+depth = .
+include config\$(if \$(conf),-\$(conf),).make
+include \$(configure-srcdir)/GNUmakefile.in
+EOF
+ chmod 444 GNUmakefile
+ AC_SUBST(VPATH)
+ fi
+])
+
+
+AC_DEFUN(STEPMAKE_FLEX, [
+ # ugh, automake: we want (and check for) flex
+ # AC_PROG_LEX
+ # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
+
+ # AC_PROG_LEX()
+ # ugh, ugh
+ ac_cv_prog_lex_root=lex.yy
+ STEPMAKE_PROGS(FLEX, flex, $1)
+])
+
+
+AC_DEFUN(STEPMAKE_FLEXLEXER, [
+ AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
+ if test $? -ne 0; then
+ warn='FlexLexer.h (flex package)'
+ STEPMAKE_ADD_ENTRY($1, $warn)
+ fi
+ # check for yyFlexLexer.yy_current_buffer,
+ # in 2.5.4 <= flex < 2.5.29
+ AC_CACHE_CHECK([for yyFlexLexer.yy_current_buffer],
+ [stepmake_cv_flexlexer_yy_current_buffer],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+using namespace std;
+#include <FlexLexer.h>
+class yy_flex_lexer: public yyFlexLexer
+{
+ public:
+ yy_flex_lexer ()
+ {
+ yy_current_buffer = 0;
+ }
+};
+]])],
+ [stepmake_cv_flexlexer_yy_current_buffer=yes],
+ [stepmake_cv_flexlexer_yy_current_buffer=no]))
+ if test $stepmake_cv_flexlexer_yy_current_buffer = yes; then
+ AC_DEFINE(HAVE_FLEXLEXER_YY_CURRENT_BUFFER, 1, [Define to 1 if yyFlexLexer has yy_current_buffer.])
+ fi
+])
+
+
+
+AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [
+ AC_MSG_CHECKING([FlexLexer.h location])
+
+ # ugh.
+ cat <<EOF > conftest.cc
+using namespace std;
+#include <FlexLexer.h>
+EOF
+ FLEXLEXER_FILE=`eval $ac_cpp conftest.cc | \
+ sed 's!# 1 "\(.*FlexLexer.h\)"!@FLEXLEXER@\1@@!g' | grep '@@' | \
+ sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` 1> /dev/null 2> /dev/null
+ rm conftest.cc
+ AC_SUBST(FLEXLEXER_FILE)
+ AC_MSG_RESULT($FLEXLEXER_FILE)
+])
+
+AC_DEFUN(STEPMAKE_GCC_OR_CLANG, [
+ STEPMAKE_HAS_CLANG()
+ if test "$HAS_CLANG" = "no"; then
+ if test "$GCC" = "yes"; then
+ STEPMAKE_CHECK_VERSION(CC, $1, $2)
+ else
+ warn="$CC (Please install *GNU* cc)"
+ STEPMAKE_ADD_ENTRY($1, $warn)
+ fi
+ fi
+ # no else, we're fine with any clang
+])
+
+AC_DEFUN(STEPMAKE_GETTEXT, [
+ presome=${prefix}
+ if test "$prefix" = "NONE"; then
+ presome=${ac_default_prefix}
+ fi
+ LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"`
+
+ AC_SUBST(localedir)
+ AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"])
+ AC_CHECK_LIB(intl, gettext)
+ AC_CHECK_FUNCS(gettext)
+])
+
+
+AC_DEFUN(STEPMAKE_GUILE, [
+ STEPMAKE_PATH_PROG(GUILE, guile guile1, $1)
+])
+
+
+# STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
+#
+# This macro runs the guile-config script, installed with Guile,
+# to find out where Guile's header files and libraries are
+# installed. It sets two variables, marked for substitution, as
+# by AC_SUBST.
+#
+# GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
+# code that uses Guile header files. This is almost
+# always just a -I flag.
+#
+# GUILE_LDFLAGS --- flags to pass to the linker to link a
+# program against Guile. This includes -lguile for
+# the Guile library itself, any libraries that Guile
+# itself requires (like -lqthreads), and so on. It may
+# also include a -L flag to tell the compiler where to
+# find the libraries.
+
+AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
+ exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
+ if test -x $exe; then
+ AC_MSG_CHECKING([guile compile flags])
+ GUILE_CFLAGS="`$guile_config compile`"
+ AC_MSG_RESULT($GUILE_CFLAGS)
+ AC_MSG_CHECKING([guile link flags])
+ GUILE_LDFLAGS="`$guile_config link`"
+ AC_MSG_RESULT($GUILE_LDFLAGS)
+ fi
+ AC_SUBST(GUILE_CFLAGS)
+ AC_SUBST(GUILE_LDFLAGS)
+])
+
+
+AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
+ ## First, let's just see if we can find Guile at all.
+ test -n "$target_alias" && target_guile_config=$target_alias-guile-config
+ test -n "$host_alias" && host_guile_config=$host_alias-guile-config
+ AC_MSG_CHECKING([for guile-config])
+ for guile_config in $GUILE_CONFIG $target_guile_config $host_guile_config $build_guile_config guile-config guile1-config; do
+ AC_MSG_RESULT([$guile_config])
+ if ! $guile_config --version > /dev/null 2>&1 ; then
+ AC_MSG_WARN([cannot execute $guile_config])
+ AC_MSG_CHECKING([if we are cross compiling])
+ GUILE_CONFIG='echo no guile-config'
+ else
+ GUILE_CONFIG=$guile_config
+ break
+ fi
+ done
+ STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1)
+ if test $? -ne 0; then
+ STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package) or guile1-config (guile1-devel package)')
+ fi
+
+ STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
+ # urg. should test functionality rather than version.
+ if test $? -eq 0 -a -n "$2"; then
+ STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2)
+ fi
+
+ AC_SUBST(GUILE_CONFIG)
+
+ guile_version="$ver"
+ changequote(<<, >>)#dnl
+ GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
+ GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
+ GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ changequote([, ])#dnl
+ STEPMAKE_GUILE_FLAGS
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
+ LIBS="$GUILE_LDFLAGS $LIBS"
+ AC_CHECK_HEADERS([libguile.h])
+ AC_CHECK_LIB(guile, scm_boot_guile)
+ AC_CHECK_FUNCS(scm_boot_guile,,libguile_b=no)
+ if test "$libguile_b" = "no"; then
+ warn='libguile (libguile-dev, guile-devel or guile-dev
+ package).'
+ STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
+ AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
+ AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
+])
+
+
+AC_DEFUN(STEPMAKE_DLOPEN, [
+ AC_CHECK_LIB(dl, dlopen)
+ AC_CHECK_FUNCS(dlopen)
+])
+
+AC_DEFUN(STEPMAKE_HAS_CLANG, [
+ AC_EGREP_CPP(yes,
+ [#ifdef __clang__
+ yes
+ #endif
+ ], HAS_CLANG=yes, HAS_CLANG=no)
+])
+
+AC_DEFUN(STEPMAKE_GXX_OR_CLANG, [
+ STEPMAKE_HAS_CLANG()
+ if test "$HAS_CLANG" = "no"; then
+ if test "$GXX" = "yes"; then
+ STEPMAKE_CHECK_VERSION(CXX, $1, $2)
+ else
+ warn="$CXX (Please install *GNU* c++)"
+ STEPMAKE_ADD_ENTRY($1, $warn)
+ fi
+ fi
+ # no else, we're fine with any clang
+])
+
+
+AC_DEFUN(STEPMAKE_INIT, [
+
+ . $srcdir/VERSION
+ FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
+ MICRO_VERSION=$PATCH_LEVEL
+ TOPLEVEL_VERSION=$FULL_VERSION
+ if test x$MY_PATCH_LEVEL != x; then
+ FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
+ fi
+ VERSION=$FULL_VERSION
+ export MAJOR_VERSION MINOR_VERSION PATCH_LEVEL
+ # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
+ changequote(<<, >>)#dnl
+ PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
+ package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
+ changequote([, ])#dnl
+
+ # No versioning on directory names of sub-packages
+ # urg, urg
+ stepmake=${datadir}/stepmake
+ presome=${prefix}
+ if test "$prefix" = "NONE"; then
+ presome=${ac_default_prefix}
+ fi
+ stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
+
+ # urg, how is this supposed to work?
+ if test "$program_prefix" = "NONE"; then
+ program_prefix=
+ fi
+ if test "$program_suffix" = "NONE"; then
+ program_suffix=
+ fi
+
+ AC_MSG_CHECKING(Package)
+ if test "$PACKAGE" = "STEPMAKE"; then
+ AC_MSG_RESULT(Stepmake package!)
+
+ AC_MSG_CHECKING(builddir)
+
+ ugh_ugh_autoconf250_builddir="`pwd`"
+
+ if test "$srcdir" = "."; then
+ srcdir_build=yes
+ else
+ srcdir_build=no
+ package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
+ package_srcdir="`dirname $srcdir`"
+ fi
+ AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
+
+ (cd stepmake 2>/dev/null || mkdir stepmake)
+ (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
+ stepmake=stepmake
+ else
+ AC_MSG_RESULT($PACKAGE)
+
+ AC_MSG_CHECKING(builddir)
+ ugh_ugh_autoconf250_builddir="`pwd`"
+
+ here_dir=$(cd . && pwd)
+ full_src_dir=$(cd $srcdir && pwd)
+
+ if test "$full_src_dir" = "$here_dir"; then
+ srcdir_build=yes
+ else
+ srcdir_build=no
+ fi
+ AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
+
+ AC_MSG_CHECKING(for stepmake)
+ # Check for installed stepmake
+ if test -d $stepmake; then
+ AC_MSG_RESULT($stepmake)
+ else
+ stepmake="`cd $srcdir/stepmake; pwd`"
+ AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
+ fi
+ fi
+
+ AC_SUBST(ugh_ugh_autoconf250_builddir)
+
+ # Use absolute directory for non-srcdir builds, so that build
+ # dir can be moved.
+ if test "$srcdir_build" = "no" ; then
+ srcdir="`cd $srcdir; pwd`"
+ fi
+
+ AC_SUBST(srcdir)
+ AC_SUBST(stepmake)
+ AC_SUBST(package)
+ AC_SUBST(PACKAGE)
+ AC_SUBST(PACKAGE_NAME)
+ AC_SUBST(VERSION)
+ AC_SUBST(MAJOR_VERSION)
+ AC_SUBST(MINOR_VERSION)
+ AC_SUBST(MICRO_VERSION)
+
+ # stepmake nonstandard names
+ AC_SUBST(PATCH_LEVEL)
+ AC_SUBST(TOPLEVEL_VERSION)
+
+ # We don't need the upper case variant,
+ # so stick to macros are uppercase convention.
+ # AC_DEFINE_UNQUOTED(package, ["${package}"])
+ # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
+ AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
+ AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
+ AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
+
+ if test -z "$package_depth"; then
+ package_depth="."
+ else
+ package_depth="../$package_depth"
+ fi
+ export package_depth
+ AC_SUBST(package_depth)
+
+ AUTOGENERATE="This file was automatically generated by configure"
+ AC_SUBST(AUTOGENERATE)
+
+ CONFIGSUFFIX=
+ AC_ARG_ENABLE(config,
+ [AS_HELP_STRING([--enable-config=CONF],
+ [put settings in config-CONF.make and config-CONF.h;
+ do `make conf=CONF' to get output in ./out-CONF])],
+ [CONFIGURATION=$enableval])
+
+ ##'`#
+
+ test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
+ CONFIGFILE=config$CONFIGSUFFIX
+ AC_SUBST(CONFIGSUFFIX)
+
+ AC_CANONICAL_HOST
+ STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
+ STEPMAKE_PROGS(FIND, find, REQUIRED)
+
+ STEPMAKE_PROGS(TAR, tar, REQUIRED)
+
+ if test "$(echo 2)" != "2" ||
+ test "x`uname`" = "xHP-UX"; then
+ AC_PATH_PROG(KSH, ksh, /bin/ksh)
+ AC_PATH_PROG(BASH, bash, $KSH)
+ STEPMAKE_WARN(avoiding buggy /bin/sh)
+ AC_PATH_PROG(SHELL, bash, $KSH)
+ else
+ SHELL=/bin/sh
+ AC_PATH_PROG(BASH, bash, $SHELL)
+ fi
+ AC_SUBST(SHELL)
+
+ STEPMAKE_PYTHON(REQUIRED, 1.5)
+
+ if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
+ $MAKE -v 2> /dev/null | grep GNU > /dev/null
+ if test "$?" = 1; then
+ warn='make (Please install *GNU* make)'
+ # STEPMAKE_WARN($warn)
+ STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
+ fi
+ fi
+
+ ROOTSEP=':'
+ DIRSEP='/'
+ PATHSEP=':'
+ LN=ln
+ LN_S='ln -s'
+ ZIP="zip -r -9"
+
+ AC_SUBST(program_prefix)
+ AC_SUBST(program_suffix)
+ AC_SUBST(ZIP)
+ AC_SUBST(LN)
+ AC_SUBST(LN_S)
+ AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
+ AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
+ AC_SUBST(DIRSEP)
+ AC_SUBST(PATHSEP)
+ AC_SUBST(ROOTSEP)
+
+ STEPMAKE_DATADIR
+ STEPMAKE_LIBDIR
+])
+
+
+AC_DEFUN(STEPMAKE_LIB, [
+ STEPMAKE_PROGS(AR, ar, $1)
+ AC_PROG_RANLIB
+ STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
+])
+
+
+AC_DEFUN(STEPMAKE_LIBTOOL, [
+ # libtool.info ...
+ # **Never** try to set library version numbers so that they correspond
+ # to the release number of your package. This is an abuse that only
+ # fosters misunderstanding of the purpose of library versions.
+
+ REVISION=$PATCH_LEVEL
+ # CURRENT=$MINOR_VERSION
+ CURRENT=`expr $MINOR_VERSION + 1`
+ # AGE=`expr $MAJOR_VERSION + 1`
+ AGE=$MAJOR_VERSION
+ AC_SUBST(CURRENT)
+ AC_SUBST(REVISION)
+ AC_SUBST(AGE)
+])
+
+
+AC_DEFUN(STEPMAKE_LOCALE, [
+ lang=English
+ ALL_LINGUAS="en nl"
+
+ # with/enable ??
+ AC_ARG_WITH(localedir,
+ [AS_HELP_STRING([--with-localedir=DIR],
+ [location of locales. Default: PREFIX/share/locale])],
+ localedir=$with_localedir,
+ localedir='${prefix}/share/locale')
+
+ AC_ARG_WITH(lang,
+ [AS_HELP_STRING([--with-lang=LANG],
+ [use LANG as language to emit messages])],
+ language=$with_lang,
+ language=English)
+
+ AC_MSG_CHECKING(language)
+ case "$language" in
+ En* | en* | Am* | am* | US* | us*)
+ lang=English;;
+ NL | nl | Du* | du* | Ned* | ned*)
+ lang=Dutch;;
+ "")
+ lang=English;;
+ *)
+ lang=unknown;;
+ esac
+ AC_MSG_RESULT($lang)
+
+ if test "$lang" = "unknown" ; then
+ STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
+ fi
+
+])
+
+
+AC_DEFUN(STEPMAKE_MAKEINFO, [
+ STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
+])
+
+
+AC_DEFUN(STEPMAKE_MAN, [
+ STEPMAKE_PROGS(GROFF, groff ditroff, $1)
+ AC_SUBST(GROFF)
+ STEPMAKE_PROGS(TROFF, troff, $1)
+ AC_SUBST(TROFF)
+ STEPMAKE_PROGS(TBL, tbl, $1)
+ AC_SUBST(TBL)
+])
+
+
+AC_DEFUN(STEPMAKE_MSGFMT, [
+ STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
+])
+
+
+# Check for program ($2), set full path result to ($1).
+# If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
+AC_DEFUN(STEPMAKE_PATH_PROG, [
+ AC_CHECK_PROGS($1, $2, no)
+ STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
+ if test $? -eq 0; then
+ AC_PATH_PROGS($1, $2)
+ if test -n "$4"; then
+ STEPMAKE_CHECK_VERSION($1, $3, $4)
+ fi
+ fi
+])
+
+
+# Check for program in set of names ($2), set result to ($1) .
+# If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
+# If exists, and a minimal version ($4) is required
+AC_DEFUN(STEPMAKE_PROGS, [
+ AC_CHECK_PROGS($1, $2, no)
+ STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
+ if test $? -eq 0 -a -n "$4"; then
+ STEPMAKE_CHECK_VERSION($1, $3, $4)
+ fi
+])
+
+
+AC_DEFUN(STEPMAKE_PERL, [
+ STEPMAKE_PATH_PROG(PERL, perl, $1)
+])
+
+
+AC_DEFUN(STEPMAKE_PYTHON, [
+ unset pv
+ AC_MSG_CHECKING([for python])
+ for python in $PYTHON python python2 python2.4 python2.3 python2.2 python2.1 python2.0; do
+ AC_MSG_RESULT([$python])
+ if ! $python -V > /dev/null 2>&1 ; then
+ #AC_MSG_WARN([cannot execute $python])
+ PYTHON='echo no python'
+ else
+ unset pv
+ STEPMAKE_CHECK_VERSION(python, pv, $2)
+ if test -z "$pv"; then
+ PYTHON=$python
+ break
+ fi
+ fi
+ done
+ if test -n "$pv"; then
+ STEPMAKE_ADD_ENTRY($1, $pv)
+ fi
+ # clear cached value since arg 2 might point us to a new binary
+ unset ac_cv_path_PYTHON
+
+ AC_PATH_PROG(PYTHON, $PYTHON)
+ AC_SUBST(PYTHON)
+])
+
+AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
+ AC_ARG_WITH(python-include,
+ [AS_HELP_STRING([--with-python-include=DIR],
+ [location of the python include dir])],[
+ if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_WARN(Usage: --with-python-include=includedir)
+ else
+ PYTHON_CFLAGS="-I${withval}"
+ fi
+ ])
+
+ AC_ARG_WITH(python-lib,
+ [AS_HELP_STRING([--with-python-lib=NAME],
+ [name of the python lib])],[
+ if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_WARN(Usage: --with-python-lib=name)
+ else
+ LDFLAGS="$LDFLAGS -l${withval}"
+ fi
+ ])
+
+ AC_CHECK_PROGS(PYTHON_CONFIG, python-config, no)
+
+ if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
+ # Clean out junk: http://bugs.python.org/issue3290
+ # Python headers may need some -f* flags, leave them in.
+ # We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
+ #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
+ # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
+ # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
+ # Tentative fix to require a non alphanumeric character before the initial hyphen of the BRE or the hyphen being the first character in the string.
+ PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
+ PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
+ fi
+
+ if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then
+ changequote(<<, >>)#dnl
+ # alternatively, for python >= 2.0
+ # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
+ PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
+ PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
+ changequote([, ])#dnl
+ fi
+
+ if test -z "$PYTHON_HEADER"; then
+ CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
+ fi
+
+ if test -z "$PYTHON_HEADER"; then
+ warn="Python.h (python-devel, python-dev or libpython-dev package)"
+ STEPMAKE_ADD_ENTRY($1, $warn)
+ fi
+])
+
+
+
+AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [
+ AC_CACHE_CHECK([for stl.data () method],
+ [stepmake_cv_stl_data_method],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <vector>
+using namespace std;
+vector <int> v;
+void *p = v.data ();
+]])],
+ [stepmake_cv_stl_data_method=yes],
+ [stepmake_cv_stl_data_method=no]))
+ if test $stepmake_cv_stl_data_method = yes; then
+ AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method])
+ fi
+])
+
+
+AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
+ # ugh
+ STEPMAKE_PROGS(KPSEWHICH, kpsewhich, OPTIONAL)
+])
+
+AC_DEFUN(STEPMAKE_TEXMF, [
+ STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1)
+ STEPMAKE_PROGS(METAPOST, mpost, $1)
+
+ AC_MSG_CHECKING(for working metafont mode)
+ modelist='ljfour lj4 lj3 lj2 ljet laserjet'
+ for MFMODE in $modelist; do
+ $METAFONT -progname=mf "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
+ if test -f mfput.tfm; then
+ break;
+ fi
+ done
+ AC_MSG_RESULT($MFMODE)
+
+ rm -f mfput.*
+
+ AC_SUBST(MFMODE)
+])
+
+
+AC_DEFUN(STEPMAKE_WARN, [
+ AC_MSG_WARN($1)
+ warn_b=yes
+])
+
+
+dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
+dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+dnl also defines GSTUFF_PKG_ERRORS on error
+AC_DEFUN(PKG_CHECK_MODULES, [
+ succeeded=no
+
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ else
+ PKG_CONFIG_MIN_VERSION=0.9.0
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+ AC_MSG_CHECKING(for $2)
+
+ if $PKG_CONFIG --exists "$2" ; then
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+
+ AC_MSG_CHECKING($1_CFLAGS)
+ $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+ AC_MSG_RESULT($$1_CFLAGS)
+
+ AC_MSG_CHECKING($1_LIBS)
+ $1_LIBS=`$PKG_CONFIG --libs "$2"`
+ AC_MSG_RESULT($$1_LIBS)
+ else
+ $1_CFLAGS=""
+ $1_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ ifelse([$4], ,echo $$1_PKG_ERRORS,)
+ fi
+
+ AC_SUBST($1_CFLAGS)
+ AC_SUBST($1_LIBS)
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ ifelse([$3], , :, [$3])
+ else
+ ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
+ fi
+])
+
+AC_DEFUN(STEPMAKE_FREETYPE2, [
+ PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
+ if test "$have_freetype2" = yes; then
+ AC_DEFINE(HAVE_FREETYPE2)
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$FREETYPE2_CFLAGS $CPPFLAGS"
+ LIBS="$FREETYPE2_LIBS $LIBS"
+ AC_SUBST(FREETYPE2_CFLAGS)
+ AC_SUBST(FREETYPE2_LIBS)
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ # UGR
+ #r="lib$1-dev or $1-devel"
+ r="libfreetype6-dev or freetype?-devel"
+ ver="`pkg-config --modversion $1`"
+ STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+ fi
+])
+
+AC_DEFUN(STEPMAKE_PANGO, [
+ PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
+ if test "$have_pango16" = yes ; then
+ AC_DEFINE(HAVE_PANGO16)
+ # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
+ LIBS="$PANGO_LIBS $LIBS"
+ AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
+ AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
+ AC_SUBST(PANGO_CFLAGS)
+ AC_SUBST(PANGO_LIBS)
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ # UGR
+ #r="lib$1-dev or $1-devel"
+ r="libpango1.0-dev or pango1.0-devel"
+ ver="`pkg-config --modversion $1`"
+ STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+ fi
+])
+
+AC_DEFUN(STEPMAKE_PANGO_FT2, [
+ PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3, have_pangoft2=yes, true)
+ if test "$have_pangoft2" = yes ; then
+ AC_DEFINE(HAVE_PANGO16)
+ AC_DEFINE(HAVE_PANGO_FT2)
+ # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS $PANGO_FT2_CFLAGS"
+ LIBS="$PANGO_FT2_LIBS $LIBS"
+ AC_CHECK_HEADERS([pango/pangoft2.h])
+ AC_CHECK_FUNCS([pango_ft2_font_map_create_context])
+ AC_SUBST(PANGO_FT2_CFLAGS)
+ AC_SUBST(PANGO_FT2_LIBS)
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ # UGR
+ #r="lib$1-dev or $1-devel"e
+ r="libpango1.0-dev or pango?-devel"
+ ver="`pkg-config --modversion $1`"
+ STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+ fi
+])
+
+AC_DEFUN(STEPMAKE_FONTCONFIG, [
+ PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
+ if test "$have_fontconfig" = yes ; then
+ AC_DEFINE(HAVE_FONTCONFIG)
+ # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
+ LIBS="$FONTCONFIG_LIBS $LIBS"
+ AC_SUBST(FONTCONFIG_CFLAGS)
+ AC_SUBST(FONTCONFIG_LIBS)
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ r="lib$1-dev or $1-devel"
+ ver="`pkg-config --modversion $1`"
+ STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+ fi
+])
+
+AC_DEFUN(STEPMAKE_WINDOWS, [
+ AC_CYGWIN
+ AC_MINGW32
+
+ if test "$CYGWIN" = "yes"; then
+ LN_S='cp -r' # Cygwin symbolic links do not work for native apps.
+ program_suffix=.exe
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
+ elif test "$MINGW32" = "yes"; then
+ LN='cp -r'
+ LN_S='cp -r'
+ program_suffix=.exe
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
+ PATHSEP=';'
+ fi
+
+ AC_SUBST(LN)
+ AC_SUBST(LN_S)
+ AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
+ AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
+ AC_SUBST(DIRSEP)
+ AC_SUBST(PATHSEP)
+ AC_SUBST(program_suffix)
+
+ AC_MSG_CHECKING([for some flavor of Windows])
+ if test "$CYGWIN$MINGW32" = "nono"; then
+ PLATFORM_WINDOWS=no
+ else
+ PLATFORM_WINDOWS=yes
+ fi
+ AC_MSG_RESULT([$PLATFORM_WINDOWS])
+ AC_SUBST(PLATFORM_WINDOWS)
+ STEPMAKE_PROGS(WINDRES, $target-windres windres, x)
+ AC_SUBST(WINDRES)
+])
--noconf*) NOCONFIGURE=true;;
esac
-if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then
- echo "stepmake/aclocal.m4 is newer. Copying file."
- cp -f stepmake/aclocal.m4 aclocal.m4
-fi
-
-if [ ! -f autogen.sh -o stepmake/autogen.sh -nt autogen.sh ]; then
- echo "stepmake/autogen.sh is newer. Copying file."
- cp -f stepmake/autogen.sh autogen.sh
- exec ./autogen.sh "$@"
-fi
-
for i in $srcdir/configure.in #`find $srcdir -name configure.in -print`
do
dir=`dirname $i`
PDFLATEX = @PDFLATEX@
PERL = @PERL@
PLATFORM_WINDOWS = @PLATFORM_WINDOWS@
-PYTHON = @PYTHON@
-TARGET_PYTHON = @PYTHON@
+PYTHON = @PYTHON@ -tt
+TARGET_PYTHON = @PYTHON@ -tt
RANLIB = @RANLIB@
ROOTSEP = @ROOTSEP@
SHELL = @SHELL@
--- /dev/null
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+timestamp='2010-04-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' HUP INT TERM
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- /dev/null
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+timestamp='2010-05-21'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile-* | tilegx-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ # This must be matched before tile*.
+ tilegx*)
+ basic_machine=tilegx-unknown
+ os=-linux-gnu
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
AC_INIT
# Bootstrap StepMake configure
-# For user package:
-AC_CONFIG_AUX_DIR([stepmake/bin])
-
-# For stepmake package:
-# AC_CONFIG_AUX_DIR(bin)
-
+AC_CONFIG_AUX_DIR([config])
STEPMAKE_INIT
AC_MSG_RESULT(not found)
echo "Can't find Century Schoolbook files. Install FontConfig's fc-list,"
echo "or use --with-ncsb-dir"
+ STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
fi
fi
NCSB_SOURCE_FILES=""
for f in $UNCHECKED_NCSB_SOURCE_FILES; do
if test "`grep Cyrillic "$f"`" = ""; then
STEPMAKE_WARN($f does not have Cyrillic characters.)
+ STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
else
NCSB_SOURCE_FILES="$f $NCSB_SOURCE_FILES"
fi
STEPMAKE_PYTHON_DEVEL(REQUIRED)
-STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.60)
-
STEPMAKE_PATH_PROG(FONTFORGE, fontforge, REQUIRED, 20110222)
STEPMAKE_PATH_PROG(T1ASM, t1asm, REQUIRED)
STEPMAKE_WINDOWS
-## Optional tools for building documentation, website, extra fonts.
-
# guile executable for some scripts
STEPMAKE_GUILE(OPTIONAL)
# perl for help2man.
STEPMAKE_PERL(OPTIONAL)
+## Optional tools for building documentation, website, extra fonts.
+if test "$DOCUMENTATION" = "yes"; then
+ DOCUMENTATION_REQUIRED=REQUIRED
+else
+ DOCUMENTATION_REQUIRED=OPTIONAL
+fi
+
+STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, $DOCUMENTATION_REQUIRED, 8.60)
+
STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.11)
-STEPMAKE_PROGS(TEXI2HTML, texi2html, OPTIONAL, 1.82)
-STEPMAKE_PROGS(DBLATEX, dblatex, OPTIONAL, 0.1.4)
-STEPMAKE_PROGS(PDFLATEX, pdflatex, OPTIONAL)
-STEPMAKE_PROGS(NETPBM, pngtopnm, OPTIONAL)
-STEPMAKE_PROGS(IMAGEMAGICK, convert, OPTIONAL)
+STEPMAKE_PROGS(TEXI2HTML, texi2html, $DOCUMENTATION_REQUIRED, 1.82)
+STEPMAKE_PROGS(DBLATEX, dblatex, $DOCUMENTATION_REQUIRED, 0.1.4)
+STEPMAKE_PROGS(BIBTEX, bibtex, $DOCUMENTATION_REQUIRED)
+STEPMAKE_PROGS(PDFLATEX, pdflatex, $DOCUMENTATION_REQUIRED)
+STEPMAKE_PROGS(PDFTEX, pdfetex pdftex etex, $DOCUMENTATION_REQUIRED)
+STEPMAKE_PROGS(TEXI2PDF, texi2pdf, $DOCUMENTATION_REQUIRED)
+STEPMAKE_PROGS(TEXINDEX, texindex, $DOCUMENTATION_REQUIRED)
+AC_MSG_CHECKING(for epsf.tex)
+TEX_EPSF=`kpsewhich tex epsf`
+if test "$TEX_EPSF" = ""; then
+ AC_MSG_RESULT(not found)
+ STEPMAKE_ADD_ENTRY($DOCUMENTATION_REQUIRED,epsf.tex)
+else
+ AC_MSG_RESULT($TEX_EPSF)
+fi
+AC_MSG_CHECKING(for Cyrillic characters support in TeX)
+TEX_FIKPARM=`kpsewhich -format=mf fikparm`
+if test "$TEX_FIKPARM" = ""; then
+ AC_MSG_RESULT(not found)
+ STEPMAKE_ADD_ENTRY($DOCUMENTATION_REQUIRED,
+['lh CTAN package (texlive-lang-cyrillic or texlive-texmf-fonts)'])
+else
+ AC_MSG_RESULT(yes)
+fi
+STEPMAKE_PROGS(NETPBM, pngtopnm, $DOCUMENTATION_REQUIRED)
+STEPMAKE_PROGS(IMAGEMAGICK, convert, $DOCUMENTATION_REQUIRED)
# this name avoids a conflict with ZIP in stepmake/aclocal.m4
-STEPMAKE_PROGS(ZIPDOC, zip, OPTIONAL)
-STEPMAKE_PROGS(RSYNC, rsync, OPTIONAL)
-
+STEPMAKE_PROGS(ZIPDOC, zip, $DOCUMENTATION_REQUIRED)
+STEPMAKE_PROGS(RSYNC, rsync, $DOCUMENTATION_REQUIRED)
AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
NAME = flower
MODULE_NAME = flower
-SUBDIRS = include
-SCRIPTS =
README_FILES = NEWS-1.0 NEWS-1.1.46 README TODO
-EXTRA_DIST_FILES= VERSION $(README_FILES) $(SCRIPTS)
STEPMAKE_TEMPLATES=library c++ po test
# test uses LILYPOND_DATADIR
+++ /dev/null
-# flower/lib/include/Makefile
-
-
-depth = ../..
-
-STEPMAKE_TEMPLATES=c++
-
-include $(depth)/make/stepmake.make
-
-
#include "std-vector.hh"
#include "std-string.hh"
-std::string dir_name (std::string const file_name);
+std::string dir_name (std::string file_name);
std::string get_working_directory ();
class File_name
Add any compatibility definitions here for Guile V2.n
*/
#endif // SCM_MAJOR_VERSION == 1
+#if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION > 1)
+#define GUILEV2 1
+#endif
+// TODO - remove GUILE1 definition when support for Guile 1 is dropped.
+#if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION < 2)
+#define GUILEV1 1
+#define GUILEV2 0
+#endif
#endif /* GUILE_COMPATIBILITY_HH */
#include "std-vector.hh"
#include "interval.hh"
-/*
- A union of intervals in the real line.
-
- Abysmal performance (quadratic) for large N, hopefully we don't have
- that large N. In any case, this should probably be rewritten to use
- a balanced tree.
-*/
-struct Interval_set
+class Interval_set
{
- vector<Interval> allowed_regions_;
-
+public:
Interval_set ();
- void set_full ();
- void remove_interval (Interval rm);
+
+ static Interval_set interval_union (vector<Interval>);
+
+ vector<Interval> const &intervals () const { return intervals_; }
+ vector<Interval>::const_iterator upper_bound (Real x) const;
+ Real nearest_point (Real x, Direction dir = CENTER) const;
+ Interval_set complement () const;
+
+private:
+ vector<Interval> intervals_;
};
#endif /* INTERVAL_SET_HH */
#include <memory>
#include <sstream>
#include <stdexcept>
+#include <unistd.h>
#define YAFFUT_STRINGIZE(x) YAFFUT_STRINGIZE_(x)
#define YAFFUT_STRINGIZE_(x) #x
static Registrator<Suite, Case> s_Registrator;
Test (): Suite ()
{
- Registrator<Suite, Case>* r = &s_Registrator;
+ Registrator<Suite, Case> *r = &s_Registrator;
(void)r;
}
template <typename E, typename T>
static Registrator<Case, void> s_Registrator;
Test ()
{
- Registrator<Case, void>* r = &s_Registrator;
+ Registrator<Case, void> *r = &s_Registrator;
(void)r;
}
template <typename E, typename T>
/*
A union of intervals in the real line.
- Abysmal performance (quadratic) for large N, hopefully we don't have
- that large N. In any case, this should probably be rewritten to use
- a balanced tree.
+ This class gives good performance for finding the union of
+ a collection of intervals (n log n) and for testing if a point
+ belongs to the union (log n). It does not give an efficient way to
+ update the set (ie. by adding more intervals); to do this
+ efficiently would require a self-balancing tree, and it would not
+ be currently useful in lilypond anyway.
*/
Interval_set::Interval_set ()
{
- set_full ();
}
-void
-Interval_set::set_full ()
+Interval_set
+Interval_set::interval_union (vector<Interval> ivs)
{
- allowed_regions_.clear ();
- Interval s;
- s.set_full ();
- allowed_regions_.push_back (s);
+ vector_sort (ivs, Interval::left_less);
+
+ Interval_set ret;
+
+ if (ivs.empty ())
+ return ret;
+
+ ret.intervals_.push_back (ivs.front ());
+
+ // Go over the intervals from left to right. If the current interval
+ // overlaps with the last one, merge them. Otherwise, append the
+ // current interval to the list.
+ for (vsize i = 1; i < ivs.size (); ++i)
+ {
+ Interval iv = ivs[i];
+ Interval &last = ret.intervals_.back ();
+
+ if (last[RIGHT] >= iv[LEFT])
+ // overlapping intervals: merge them
+ last[RIGHT] = max (last[RIGHT], iv[RIGHT]);
+ else if (!iv.is_empty ())
+ ret.intervals_.push_back (iv);
+ }
+
+ return ret;
+}
+
+// Returns an iterator pointing to the first interval whose left
+// endpoint is at least x. That interval may or may not contain x.
+vector<Interval>::const_iterator
+Interval_set::upper_bound (Real x) const
+{
+ Interval xx (x, x);
+ return std::upper_bound (intervals_.begin (), intervals_.end (), xx, Interval::left_less);
}
-void
-Interval_set::remove_interval (Interval rm)
+Real
+Interval_set::nearest_point (Real x, Direction d) const
{
- for (vsize i = 0; i < allowed_regions_.size ();)
+ Real left = -infinity_f; // The closest point to the left of x.
+ Real right = infinity_f; // The closest point to the right of x.
+
+ vector<Interval>::const_iterator i = upper_bound (x);
+ if (i != intervals_.end ())
+ right = (*i)[LEFT];
+
+ if (i != intervals_.begin ())
{
- Interval s = rm;
-
- s.intersect (allowed_regions_[i]);
-
- if (!s.is_empty ())
- {
- Interval before = allowed_regions_[i];
- Interval after = allowed_regions_[i];
-
- before[RIGHT] = s[LEFT];
- after[LEFT] = s[RIGHT];
-
- if (!before.is_empty () && before.length () > 0.0)
- {
- allowed_regions_.insert (allowed_regions_.begin () + (long)i, before);
- i++;
- }
- allowed_regions_.erase (allowed_regions_.begin () + (long)i);
- if (!after.is_empty () && after.length () > 0.0)
- {
- allowed_regions_.insert (allowed_regions_.begin () + (long)i, after);
- i++;
- }
- }
- else
- i++;
+ Interval left_iv = *(i - 1);
+ // left_iv[LEFT] is guaranteed to be less than x. So if
+ // left_iv[RIGHT] >= x then left_iv contains x, which must then
+ // be the nearest point to x.
+ if (left_iv[RIGHT] >= x)
+ return x;
+
+ left = left_iv[RIGHT];
+ }
+
+ if (d == RIGHT)
+ return right;
+ if (d == LEFT)
+ return left;
+ else
+ return (right - x) < (x - left) ? right : left;
+}
+
+Interval_set
+Interval_set::complement () const
+{
+ Interval_set ret;
+
+ if (intervals_.empty ())
+ {
+ ret.intervals_.push_back (Interval (-infinity_f, infinity_f));
+ return ret;
}
+
+ if (intervals_[0][LEFT] > -infinity_f)
+ ret.intervals_.push_back (Interval (-infinity_f, intervals_[0][LEFT]));
+
+ for (vsize i = 1; i < intervals_.size (); ++i)
+ ret.intervals_.push_back (Interval (intervals_[i - 1][RIGHT], intervals_[i][LEFT]));
+
+ if (intervals_.back ()[RIGHT] < infinity_f)
+ ret.intervals_.push_back (Interval (intervals_.back ()[RIGHT], infinity_f));
+
+ return ret;
}
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2012 Joe Neeman <joeneeman@gmail.com>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "interval-set.hh"
+
+#include "yaffut.hh"
+
+using namespace std;
+
+FUNC (interval_set_union)
+{
+ vector<Interval> ivs;
+
+ // Overlapping intervals.
+ ivs.push_back (Interval (-1, 1));
+ ivs.push_back (Interval (0, 3));
+ ivs.push_back (Interval (1, 2));
+ Interval_set result = Interval_set::interval_union (ivs);
+ EQUAL (result.intervals ().size (), 1);
+ // Compare intervals using to_string, since yaffut doesn't know how to compare intervals.
+ EQUAL (result.intervals ()[0].to_string (), Interval (-1, 3).to_string ());
+
+ // Non-overlapping intervals.
+ ivs.push_back (Interval (-5, -4));
+ result = Interval_set::interval_union (ivs);
+ EQUAL (result.intervals ().size (), 2);
+ EQUAL (result.intervals ()[0].to_string (), Interval (-5, -4).to_string ());
+ EQUAL (result.intervals ()[1].to_string (), Interval (-1, 3).to_string ());
+
+ // Infinite intervals.
+ ivs.push_back (Interval (-infinity_f, -4));
+ result = Interval_set::interval_union (ivs);
+ EQUAL (result.intervals ().size (), 2);
+ EQUAL (result.intervals ()[0].to_string (), Interval (-infinity_f, -4).to_string ());
+ EQUAL (result.intervals ()[1].to_string (), Interval (-1, 3).to_string ());
+
+ // Empty intervals.
+ ivs.push_back (Interval (infinity_f, -infinity_f));
+ result = Interval_set::interval_union (ivs);
+ EQUAL (result.intervals ().size (), 2);
+}
+
+FUNC (interval_set_nearest_point)
+{
+ vector<Interval> ivs;
+
+ ivs.push_back (Interval (-3, -1));
+ ivs.push_back (Interval (1, 3));
+ Interval_set set = Interval_set::interval_union (ivs);
+
+ // If the point is in the set, direction does not matter.
+ EQUAL (set.nearest_point (-2, UP), -2);
+ EQUAL (set.nearest_point (-2, DOWN), -2);
+ EQUAL (set.nearest_point (-2, CENTER), -2);
+
+ // If the point is not in the set, direction does matter.
+ EQUAL (set.nearest_point (-0.5, UP), 1);
+ EQUAL (set.nearest_point (-0.5, DOWN), -1);
+ EQUAL (set.nearest_point (-0.5, CENTER), -1);
+ EQUAL (set.nearest_point (0.5, CENTER), 1);
+
+ // The return value can be +- infinity.
+ EQUAL (set.nearest_point (5, UP), infinity_f);
+ EQUAL (set.nearest_point (5, DOWN), 3);
+ EQUAL (set.nearest_point (-5, DOWN), -infinity_f);
+ EQUAL (set.nearest_point (-5, UP), -3);
+}
+
+FUNC (interval_set_complement)
+{
+ vector<Interval> ivs;
+
+ ivs.push_back (Interval (-3, -1));
+ ivs.push_back (Interval (1, 3));
+ Interval_set set = Interval_set::interval_union (ivs).complement ();
+ EQUAL (set.intervals ().size (), 3);
+ EQUAL (set.intervals ()[0].to_string (), Interval (-infinity_f, -3).to_string ());
+ EQUAL (set.intervals ()[1].to_string (), Interval (-1, 1).to_string ());
+ EQUAL (set.intervals ()[2].to_string (), Interval (3, infinity_f).to_string ());
+
+ // Half-infinite sets are handled correctly.
+ ivs.push_back (Interval (-infinity_f, -2));
+ set = Interval_set::interval_union (ivs).complement ();
+ EQUAL (set.intervals ().size (), 2);
+ EQUAL (set.intervals ()[0].to_string (), Interval (-1, 1).to_string ());
+ EQUAL (set.intervals ()[1].to_string (), Interval (3, infinity_f).to_string ());
+
+ // Full and empty sets are handled correctly.
+ set = Interval_set ().complement ();
+ EQUAL (set.intervals ().size (), 1);
+ EQUAL (set.intervals ()[0].to_string (), Interval (-infinity_f, infinity_f).to_string ());
+ set = set.complement ();
+ EQUAL (set.intervals ().size (), 0);
+}
--- /dev/null
+\version "2.17.0"
+
+\header {
+ texidoc = "Horizontal @code{Fingering} grobs should not collide with
+accidentals.
+"
+}
+
+\relative c' {
+ \time 2/4
+ \set fingeringOrientations = #'(left)
+ <a-3 cis-4> <a-3 cis!-4> |
+}
\ No newline at end of file
-\version "2.16.0"
+\version "2.17.5"
\header{
texidoc="No auto beams will be put over (manual) repeat bars."
{
\time 3/4
- a'4 b' c''8 \bar ":|:" d''8
+ a'4 b' c''8 \bar ":..:" d''8
}
--- /dev/null
+\version "2.17.5"
+
+\header { texidoc = "New bar line glyphs can be defined in Scheme."
+ }
+
+\paper { ragged-right = ##t }
+
+
+#(define (make-coda-sign-bar-line grob extent)
+ (let ((stencil (ly:font-get-glyph (ly:grob-default-font grob)
+ "scripts.coda")))
+ stencil))
+
+#(add-bar-glyph-print-procedure "0" make-coda-sign-bar-line)
+
+\defineBarLine "0" #'("0" "" "")
+
+
+\relative \new StaffGroup <<
+ \new Staff {
+ c4 c \bar "0" c c \bar "0" \break
+ c1
+ }
+ \new Staff {
+ c4 c c c
+ c1
+ }
+>>
--- /dev/null
+\version "2.17.5"
+
+\header { texidoc = "New bar line styles can be defined by @code{\defineBarLine}."
+ }
+
+\paper { ragged-right = ##t }
+
+\defineBarLine "[|;" #'("|" "[|;" " |")
+\defineBarLine ";|]" #'(";|]" "" " |")
+
+\relative \new StaffGroup <<
+ \new Staff {
+ c4 c \bar "[|;" c c \bar ";|]" \break
+ c4 c \bar ";|]" c c \bar "[|;" \break
+ c1 }
+ \new Staff {
+ c4 c c c
+ c4 c c c
+ c1
+ }
+>>
-\version "2.16.0"
+\version "2.17.5"
\header { texidoc = "Segno bar lines can be used to mark
the begin and the end of a segno part."
\relative \new StaffGroup <<
\new Staff {
- c4 \bar "S" c \bar "|S" c \bar "S|" c \bar ":|S" \break
- c4 c \bar ":|S|:" c c \bar ":|S.|:" \break
- c4 c c2 \bar ".S|:" \break
- c1 \bar ":|S." \break
+ c4 \bar "S" c \bar "S-|" c \bar "S-S" c \bar ":|.S" \break
+ c4 c \bar ":|.S.|:" c c \bar ":|.S.|:-S" \break
+ c4 c c2 \bar "S.|:" \break
+ c1 \bar ":|.S-S" \break
c1 \bar "S" \break
c1 }
\new Staff {
-\version "2.16.0"
+\version "2.17.5"
\header { texidoc = "Various types of bar lines can be drawn.
\relative \new StaffGroup <<
\new Staff = "1" {
- c2 \bar "dashed" c
+ c2 \bar "!" c
s1
- c2 \bar ":" c
+ c2 \bar ";" c
s1
c2 \bar "." c
s1
--- /dev/null
+\version "2.17.2"
+
+\header {
+ texidoc = "Users can override the @code{text} property of
+@code{ChordName}.
+"
+}
+
+\new ChordNames \chordmode {
+ a b c:7
+ \once \override ChordName #'text = #"foo"
+ d
+}
\ No newline at end of file
--- /dev/null
+\version "2.17.2"
+
+\header {
+ texidoc = "Chord tremolos adapt to the presence of accidentals.
+"
+}
+
+{
+ \repeat tremolo 16 { c''32 d'' }
+ \repeat tremolo 16 { c''32 <dis''> }
+ \repeat tremolo 16 { c''32 <dis'' fis''> }
+ \repeat tremolo 8 { c''32 d'' }
+ \repeat tremolo 8 { c''32 <dis''> }
+ \repeat tremolo 8 { c''32 <dis'' fis''> }
+ \repeat tremolo 4 { c''32 d'' }
+ \repeat tremolo 4 { c''32 <dis''> }
+ \repeat tremolo 16 { b''32 <cis'''> }
+}
\ No newline at end of file
\relative c' {
+ \override Staff.TimeSignature #'break-visibility = #'#(#f #t #t)
\compoundMeter #'(1 2 3 4 8)
\repeat unfold 10 c8 \repeat unfold 20 c16 \break
\override StaffSymbol #'line-count = 4
}
+\layout {
+ \context {
+ \Score
+ \remove "Mark_engraver"
+ \remove "Staff_collecting_engraver"
+ }
+ \context {
+ \Staff
+ \consists "Mark_engraver"
+ \consists "Staff_collecting_engraver"
+ }
+}
+
+
music = \relative c'' { \key fis \minor c1 d e }
\score { <<
+ \override Score.RehearsalMark #'self-alignment-X = #LEFT
+ \override Score.RehearsalMark #'font-size = #-2
% No modifications:
- \new Staff { \music }
- % Some context modifications manually written in a \with block
+ \new Staff { \mark \markup { No modifications } \music }
\new Staff \with {
\remove "Time_signature_engraver"
\consists "Ambitus_engraver"
\override StaffSymbol #'line-count = 4
- } { \music }
+ } {
+ \mark
+ \markup { "Remove time sig, add ambitus, set staff to 4 lines" }
+ \music }
+ % Some context modifications manually written in a \with block
+ \new Staff \with \ctxmod {
+ \mark \markup { "The same mods using a variable" } \music
+ }
% The same mods as direct value of \with
- \new Staff \with \ctxmod { \music }
- % Mods as part of a \with block
- \new Staff \with { \ctxmod } { \music }
+ \new Staff \with { \ctxmod } {
+ \mark \markup { "The same mods using a variable and \with" }
+ \music
+ }
% Mods before a context mod in a with block are working:
\new Staff \with {
\remove "Clef_engraver"
\ctxmod
- } { \music }
+ } {
+ \mark
+ \markup { "Remove clef and use variable to add other changes as above" }
+ \music
+ }
% Mods before and after a context mod in a with block are working:
\new Staff \with {
\remove "Clef_engraver"
\ctxmod
\remove "Key_engraver"
- } { \music }
+ } { \mark \markup { "Also remove clef and key engravers" } \music }
% Mods can be inserted instead of a \with block (i.e. \with is not required)
- \new Staff \ctxmod { \music }
- \new Staff { \music }
+ \new Staff \ctxmod { \mark \markup { "The same mods as staff 2" } \music }
+ \new Staff { \mark \markup { "Back to default" } \music }
>>
}
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "Three types of double repeat bar line are supported."
\new Staff \relative c' {
c1
\mark "\":|:\""
- \bar ":|:"
+ \bar ":..:"
c1
\mark "\":|.|:\""
\bar ":|.|:"
--- /dev/null
+\version "2.17.2"
+
+\header {
+ texidoc = "Dynamics do not horizontally shift when attached to
+an axis-group extremal cross staff grob that's extremal side
+(UP or DOWN) is the same as its direction.
+"
+}
+
+\new PianoStaff <<
+ \new Staff = "up" {
+ s1 |
+ }
+ \new Staff = "down" {
+ \clef bass
+ \stemDown
+ % keep staff alive
+ <c,, c,>8 [ <c,, c,>8_\f
+ \change Staff = "up"
+ g' g' ]
+ r2 |
+ }
+>>
--- /dev/null
+\version "2.17.1"
+
+\header {
+ texidoc = "Horizontal @code{Fingering} grobs that collide do not intersect.
+Non-intersecting @code{Fingering} grobs are left alone.
+"
+}
+
+\relative c'' {
+ \set fingeringOrientations = #'(left)
+ \override Fingering #'staff-padding = #'()
+ \override Fingering #'add-stem-support = ##f
+ <d-0 c-3 f,-0>4 <d-0 f,-3 e-0>
+ <d^0 c^3 f,-0> <d^0 f,-0> <c^3 f,-0>
+ <d-0 c-0 b-0 a-0 g-0 f-0>
+}
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "A volta repeat may begin with a grace. Consecutive
- ending and starting repeat bars are merged into one @code{:||:}."
+ ending and starting repeat bars are merged into one @code{:..:}."
}
\relative c' {
\repeat volta 2 {
- c1
+ c1
}
\repeat volta 2 {
\grace {c8 } c4
\header {
- texidoc = "If a hairpin ends on the first note of a new stave, we
+ texidoc = "If a hairpin ends on the first note of a new staff, we
do not print that ending. But on the previous line, this hairpin
should not be left open, and should end at the bar line. "
}
\version "2.16.0"
+\layout {
+ line-width = 4.\cm
+}
+
\relative c' {
c1\>
\break
c1\!
+ \override Hairpin #'to-barline = ##f
+ c1\>
+ \break
+ c1\!
}
--- /dev/null
+\version "2.16.0"
+
+\header {
+ texidoc = "Broken hairpins are not printed too high after treble clefs.
+"
+}
+
+\relative c'' {
+ c4^\< c c c \break c c c c\! |
+}
--- /dev/null
+\version "2.16.0"
+
+\header {
+ texidoc = "Broken hairpins are not printed too high after key signatures.
+"
+}
+
+\relative c'' {
+ \key e \major
+ c4^\< c c c \break c c c c\! |
+}
\version "2.16.0"
\header { texidoc = "Each clef has its own accidental placing
-rules. "}
+rules, which can be adjusted using @code{sharp-positions}
+and @code{flat-positions}." }
#(set-global-staff-size 16)
\key cis \major cis \key ces \major ces
\clef bass
\key cis \major cis \key ces \major ces
+ \break R1
+ \tempo "B-sharp on top"
+ \override Staff.KeySignature #'sharp-positions = #'(6 0 1 2 3 4 5)
+ \override Staff.KeyCancellation #'sharp-positions = #'(6 0 1 2 3 4 5)
+ \key cis \major R
+ \tempo "Flats throughout the staff"
+ \override Staff.KeySignature #'flat-positions = #'((-5 . 5))
+ \override Staff.KeyCancellation #'flat-positions = #'((-5 . 5))
+ \key ces \major R
+ \clef tenor
+ \key cis \major cis \break \key ces \major ces
+ \clef treble
+ \key cis \major cis \key ces \major ces
}
-
-
--- /dev/null
+\version "2.17.2"
+
+\header {
+ texidoc = "Dynamics and other outside staff objects avoid ledger lines.
+"
+}
+
+\relative c' {
+ f16\pp[ c d e ] r2. |
+}
TITLE=lilypond-book Test Suite
-SUBDIRS=include
-
COLLATED_FILES = $(OUT_FILES)
-EXTRA_DIST_FILES = include.mxl
-EXTRA_DIST_FILES += include.xml
-EXTRA_DIST_FILES += $(call src-wildcard,*.ly)
-EXTRA_DIST_FILES += $(call src-wildcard,*.ily)
-EXTRA_DIST_FILES += $(call src-wildcard,*.tely)
-EXTRA_DIST_FILES += $(call src-wildcard,*.itely)
-
OUT_TEXI_FILES += ${TEXI_FILES:%.texi=$(outdir)/%.info}
OUT_TEXI_FILES += ${TEXI_FILES:%.texi=$(outdir)/%.pdf}
OUT_TEXINFO_FILES += ${TEXINFO_FILES:%.texinfo=$(outdir)/%.info}
+++ /dev/null
-depth = ../../../..
-
-STEPMAKE_TEMPLATES=
-LOCALSTEPMAKE_TEMPLATES=
-
-include $(depth)/make/stepmake.make
-
-EXTRA_DIST_FILES += $(call src-wildcard,*.ly)
-EXTRA_DIST_FILES += $(call src-wildcard,*.ily)
-EXTRA_DIST_FILES += $(call src-wildcard,*.tely)
-EXTRA_DIST_FILES += $(call src-wildcard,*.itely)
+\version "2.16.0"
myVar = { a b c a }
-\version "2.16.0"
+\version "2.17.5"
\header{
texidoc="
\relative c'' <<
\new Voice = "a"{
- b1 \bar "|:" b1 \bar ":|" b1 \bar "|."
+ b1 \bar ".|:" b1 \bar ":|." b1 \bar "|."
}
\new Lyrics \with {
\consists "Bar_engraver"
-
\header {
texidoc = "Users may define non-standard markup commands using
the @code{define-markup-command} scheme macro."
}
-
\layout { ragged-right = ##t }
-
-
\version "2.16.0"
\score{
{
- c''-\markup \upcase #"hello world"
- % produces a "HELLO WORLD" markup
+ c''-\markup \upcase #"hello world in upper case"
}
\layout {
\override PaperColumn #'keep-inside-line = ##f
}
}
-
}
\header
{
-
+
texidoc = "Music functions are generic music transformation functions,
which can be used to extend music syntax seamlessly. Here we
demonstrate a @code{\\myBar} function, which works similar to
@code{\\bar}, but is implemented completely in Scheme."
}
-\version "2.16.0"
+\version "2.17.5"
myBar = #(define-music-function (parser location bar-type) (string?)
(context-spec-music
\layout { ragged-right = ##t }
{
- d4 \myBar "|:" d4
+ d4 \myBar ".|:" d4
}
STEPMAKE_TEMPLATES=documentation texinfo tex
LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc musicxml
-EXTRA_DIST_FILES = LICENSE book-musicxml-testsuite.py
-
TEXI2HTML_FLAGS += --nomenu
COLLATED_FILES = $(sort $(MUSICXML_FILES) $(MUSICMXL_FILES) $(TEXINFO_SOURCES) )
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "Bar lines are positioned correctly when using custom
staves which are not centered around position@tie{}0.
\new Staff {
\override Staff.StaffSymbol #'line-positions = #'(1 3 5 7 9)
c''1 \bar "||"
- c''1 \bar ":"
+ c''1 \bar ";"
c''1 \bar "|."
}
-\version "2.16.0"
+\version "2.17.5"
\header{
texidoc=" The number of stafflines of a staff can be set. Ledger
\override StaffSymbol #'line-count = #3
}
\relative c {
- c' c c c | g' g g g \bar ":|"
+ c' c c c | g' g g g \bar ":|."
}
--- /dev/null
+\version "2.17.0"
+
+\header {
+ texidoc = "@code{VerticalAxisGroup} grobs can place outside staff objects
+using one of the four directives shown below.
+"
+}
+
+
+\layout {
+ ragged-right = ##t
+ indent = 0.0
+ \context {
+ \Voice
+ \remove "Ligature_bracket_engraver"
+ \consists "Mensural_ligature_engraver"
+ }
+ \context {
+ \Score
+ \override SpacingSpanner #'packed-spacing = ##t
+ \override PaperColumn #'keep-inside-line = ##f
+ }
+}
+
+music = \context Voice {
+ \clef "petrucci-c4"
+ \set Staff.printKeyCancellation = ##f
+ \cadenzaOn % turn off bar lines
+ \accidentalStyle "forget"
+ \textLengthOn
+
+% ligaturae binaria
+
+ \[
+ b\breve^\markup { \column { { \bold "ligaturae binaria" } "BL" } }
+ g\longa
+ \]
+
+ \[
+ g\breve^\markup { "BL" }
+ b\longa
+ \]
+
+ \[
+ b\longa^\markup { "LL" }
+ g
+ \]
+
+ \[
+ g\longa^\markup { "LL" }
+ b
+ \]
+
+ \[
+ b\breve^\markup { "BB" }
+ g
+ \]
+
+ \[
+ g\breve^\markup { "BB" }
+ b
+ \]
+
+ \[
+ b\longa^\markup { "LB" }
+ g\breve
+ \]
+
+ \[
+ g\longa^\markup { "LB" }
+ b\breve
+ \]
+
+ \[
+ b1^\markup { "SS" }
+ g
+ \]
+
+ \[
+ g1^\markup { "SS" }
+ b
+ \]
+
+ \bar "|"
+}
+
+{
+ \override Staff.VerticalAxisGroup #'outside-staff-placement-directive =
+ #'left-to-right-polite
+ \music
+}
+{
+ \override Staff.VerticalAxisGroup #'outside-staff-placement-directive =
+ #'left-to-right-greedy
+ \music
+}
+{
+ \override Staff.VerticalAxisGroup #'outside-staff-placement-directive =
+ #'right-to-left-polite
+ \music
+}
+{
+ \override Staff.VerticalAxisGroup #'outside-staff-placement-directive =
+ #'right-to-left-greedy
+ \music
+}
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "Distances between prefatory items (e.g. clef, bar,
\relative c'' {
\set Staff.instrumentName = "fobar"
- \bar "||:"
+ \bar ".|:-||"
\key cis \major
cis4 cis4 cis4 cis4 \clef bass cis,1
\clef treble
- \bar ":|"
+ \bar ":|."
\key g \minor
c1
}
\header {
- texidoc = "Relative mode for repeats uses order of entry."
+ texidoc = "Using repeat unfold within a relative block gives a
+different result from writing the notes out in full. The first
+system has all the notes within the stave. In the second, the
+notes get progressively higher."
}
\version "2.16.0"
\relative c' {
- \repeat "unfold" 3
- { f2 bes2 }
- \alternative { a1 e b }
+ c'1^"Using unfold"
+ \repeat unfold 3 { f,2^"Repeated" bes2 }
+ \alternative { { a2_"Alt1" c } { e_"Alt2" c } { b_"Alt3" d } }
+}
+
+\relative c' {
+ c'1^"The same notes, written out"
+ f,2 bes2 a2 c f2 bes2 e c f2 bes2 b d
}
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.6
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
\override StaffSymbol #'staff-space = #0.7
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
\score {
<<
\context Staff = "s1" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #1.7
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" \with {
\override StaffSymbol #'staff-space = #3
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.5
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.6
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
\score {
<<
\context Staff = "s1" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.33
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" \with {
\override StaffSymbol #'staff-space = #0.33
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.7
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
\score {
<<
\context Staff = "s1" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #3
\override StaffSymbol #'line-positions = #'(-4 -2 0 2)
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" \with {
\override StaffSymbol #'staff-space = #6
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves.
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.3
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.5
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
\context Staff = "s1" \with {
\override StaffSymbol #'staff-space = #0.5
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s2" \with {
\override StaffSymbol #'staff-space = #0.6
} {
- s1 \bar ":|"
+ s1 \bar ":|."
}
\context Staff = "s3" {
- s1 \bar ":|"
+ s1 \bar ":|."
}
>>
}
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc = "The two dots of a repeat sign should be symmetric
to the staff centre and avoid staff lines even for exotic staves."
}
-mus = \context Voice { \relative f' { d e f g \bar ":|" } }
+mus = \context Voice { \relative f' { d e f g \bar ":|." } }
\new Staff {
<<
--- /dev/null
+\version "2.17.2"
+
+\header {
+ texidoc = "Scripts avoid ties.
+"
+}
+
+% Managing what note heads' scripts have been accounted for in
+% the Tie_engraver is tricky.
+% This regtest tries to confuse it with various configurations
+% Of notes with and without ties, with multiple scripts, etc..
+
+\relative c''' {
+ r2. c4~-> | c-> r2. |
+ r2. c4-> | c-> r2. |
+ r2. c4~-> | c r2. |
+ r2. c4~ | c-> r2. | \break
+ r2. <g-- c-> >4--~ | <g-- c>-> ~ <g c---_>-> r2 |
+ r2. c4~ | c-> ~ c-> r2 |
+ r2. c4~-> | c ~ c-> r2 |
+ r2. c4~-> | c-> ~ c r2 |
+ r2. c4-> |
+}
-\version "2.16.0"
+\version "2.17.4"
\header {
texidoc = "In addition to @code{Slur}, the music function @code{\\shape} works
% PhrasingSlur
d4\( d' b g g,8 f' e d c2\)
\override PhrasingSlur #'color = #blue
- \shape PhrasingSlur #'((0 . -2) (-1 . 3.5) (0.5 . 0.5) (0 . -2.5))
+ \shape #'((0 . -2) (-1 . 3.5) (0.5 . 0.5) (0 . -2.5)) PhrasingSlur
d4\( d' b g g,8 f' e d c2\)
\break
\break
cis
\override Tie #'color = #blue
- \shape Tie #'(() ((0 . -0.9) (0 . -0.5) (0 . -0.5) (0 . -0.9)))
+ \shape #'(() ((0 . -0.9) (0 . -0.5) (0 . -0.5) (0 . -0.9))) Tie
cis~
\break
cis
% LaissezVibrerTie
c\laissezVibrer
\override LaissezVibrerTie #'color = #blue
- \shape LaissezVibrerTie #'((0 . 0) (0.5 . 0.2) (1.5 . 0.2) (2 . 0))
+ \shape #'((0 . 0) (0.5 . 0.2) (1.5 . 0.2) (2 . 0)) LaissezVibrerTie
c\laissezVibrer
\break
% RepeatTie
c\repeatTie
\override RepeatTie #'color = #blue
- \shape RepeatTie #'((-1 . 0) (-0.7 . 0) (-0.3 . 0) (0 . 0))
+ \shape #'((-1 . 0) (-0.7 . 0) (-0.3 . 0) (0 . 0)) RepeatTie
c\repeatTie
}
-\version "2.16.0"
+\version "2.17.4"
\header {
texidoc = "The control points of a broken or unbroken slur may be offset by
% modified
\relative c'' {
\override Slur #'color = #blue
- \shape Slur #'((0 . -2) (-1 . 3.5) (0.5 . 0.5) (0 . -2.5))
+ \shape #'((0 . -2) (-1 . 3.5) (0.5 . 0.5) (0 . -2.5)) Slur
d4( d' b g g,8 f' e d c2)
- \shape Slur #'(
+ \shape #'(
((0 . -2.5) (0 . 1.5) (0 . 1) (0 . -0.5))
((1 . 2.5) (0 . 1.5) (0 . 1) (0 . 0))
- )
+ ) Slur
d4( d' b g
\break
g,8 f' e d c2)
\version "2.16.0"
-#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
-#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
-#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
-#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
-#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
-#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
#(ly:expect-warning (_ "system with empty extent"))
#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
ragged-right = ##t
\context {
\Score
- \override System #'skyline-horizontal-padding = #1.5
+ \override System #'skyline-horizontal-padding = #3.0
}
}
}
}
\relative
{
- b(^"dyn outside" b f'\p b,)
+ b( b f'\p b,)
g( d'\< d \! g,)
}
--- /dev/null
+\version "2.17.3"
+\header {
+ texidoc = "The spacing engine avoids collisions between non-adjacent columns."
+}
+
+\paper{ragged-right = ##t }
+<<
+ \new ChordNames \chordmode {
+ \set additionalPitchPrefix = #"add"
+ f2:13.15 f2
+ }
+ \new Staff {
+ f'4 f'8 f' f'2 \break
+ \set fingeringOrientations = #'(left)
+ \grace { <d-1-2-3>8[ f a] }
+ <fis''-1-2-3-4-5>4 r4
+ \set fingeringOrientations = #'(right)
+ <g'-1-2-3-4-5>4 \grace { d''8[ e'' d'']}
+ g'4
+ }
+>>
-\version "2.16.0"
+\version "2.17.5"
\header {
- texidoc = "At the beginning of a system, the @code{|:} repeat
-barline is drawn between the staves, but the @code{:|} is not."
+ texidoc = "At the beginning of a system, the @code{.|:} repeat
+barline is drawn between the staves, but the @code{:|.} is not."
}
\new PianoStaff <<
\new Staff = "up" {
- \bar "|:" r1
- \bar ":|" \break r1
+ \bar ".|:" r1
+ \bar ":|." \break r1
}
\new Staff = "down" { r r }
>>
--- /dev/null
+\version "2.17.2"
+
+\header {
+ texidoc = "Tremolos should avoid other notes in the staff as
+best as possible and issue a warning otherwise.
+"
+}
+
+#(ly:expect-warning (_ "ignoring too many clashing note columns"))
+
+{
+<<
+ { b'4 f'2. }
+ \\
+ {
+ \grace a8
+ \repeat tremolo 32 <b g'>32
+ }
+>>
+}
\ No newline at end of file
\bar "|."
}
+#(set-global-staff-size 18)
+
\score {
<<
\new Staff { \clef "G_8" \tabstuff }
texidoc = "How a repeat sign looks in tablature."
}
-\version "2.16.0"
+\version "2.17.2"
\paper
{
ragged-right = ##t
--- /dev/null
+\version "2.16.0"
+
+\header {
+ texidoc = "By default, @code{TextScript} vertical skylines allow
+for stack @code{TextScript} grobs to fit snugly over each other instead
+of moving the entire distance of the bounding box.
+"
+}
+
+\relative c' {
+ a^\markup { \filled-box #'(0 . 2) #'(0 . 20) #0 hello}
+ a^\markup { world }
+}
\ No newline at end of file
--- /dev/null
+\version "2.16.0"
+
+\header {
+ texidoc = "Tuplet brackets do not push objects with outside-staff-priority
+too high.
+"
+}
+
+\relative c' {
+ \override TupletBracket #'direction = #UP
+ \times 1/1 { a^"foo" a' a' a' }
+}
}
-\version "2.16.0"
+\version "2.17.5"
\paper {
ragged-right = ##t
(markup #:arrow-head X RIGHT #f))
\times 11/19 {
c4 c4 c4 c4
- \bar "empty" \break
+ \bar "-" \break
c4 c4 c4 c4
c4 c4 c4 c4
- \bar "empty" \break
+ \bar "-" \break
c4 c4 c4 c4
c4 c4 c4
}
start of the next non-tuplet note. "
}
-\version "2.16.0"
+\version "2.17.5"
\paper { ragged-right = ##t
indent = 0.0 }
\set tupletFullLength = ##t
c4
\times 2/3 { c8[ c c] }
- \times 2/3 { c8[ c \bar "empty" \break c] }
+ \times 2/3 { c8[ c \bar "-" \break c] }
<< \times 2/3 { c8[ c c] }
- { s4*5/6 \bar "empty" \break } >>
+ { s4*5/6 \bar "-" \break } >>
c4
\times 2/3 { c8[ c c] }
--- /dev/null
+\version "2.17.0"
+
+\header {
+
+ texidoc = "Grobs whose parents have @code{outside-staff-priority} set
+should figure into the vertical skyline of the @code{VerticalAxisGroup}
+such that grobs with a higher @code{outside-staff-priority} are correctly
+positioned above them.
+"
+
+}
+
+\relative c'' {
+ \override TupletBracket #'outside-staff-priority = #1
+ \override TupletNumber #'font-size = #5
+ \times 2/3 { a4\trill a\trill^"foo" a\trill }
+}
\ No newline at end of file
--- /dev/null
+\version "2.16.0"
+
+\header {
+ texidoc = "Volta brackets are vertically fit to objects below them.
+"
+}
+
+\new Staff {
+ \repeat volta 3 { r2 a''''4 r4 }
+ \alternative { { r2 d''''4 r4 } { r2 d''''4 r4 } { r2 d''''4 r4 } }
+ \repeat volta 3 { r2 a''''4 r4 }
+ \alternative { { r2 a''''4 r4 } { r2 a''''4 r4 } { r2 a''''4 r4 } }
+}
\ No newline at end of file
-\version "2.16.0"
+\version "2.17.5"
\header {
texidoc="
\override StaffSymbol #'staff-space = #0
} {
\relative c' {
- c1 \bar ":|"
+ c1 \bar ":|."
}
}
depth = ..
NAME = lilypond
-SUBDIRS = include
MODULE_LIBS=$(depth)/flower
MODULE_INCLUDES= $(depth)/flower/include
$(outdir)/lexer.cc: $(config_h)
$(outdir)/parser.cc: $(config_h)
+ifneq ($(LILYPOND_EXTERNAL_BINARY),)
+$(outdir)/lilypond.1: $(LILYPOND_EXTERNAL_BINARY) $(buildscript-dir)/help2man
+ $(buildscript-dir)/help2man $(LILYPOND_EXTERNAL_BINARY) > $@
+endif
+
$(outdir)/general-scheme.o: $(outdir)/version.hh
$(outdir)/lily-guile.o: $(outdir)/version.hh
$(outdir)/lily-version.o: $(outdir)/version.hh
TRANSLATOR_DECLARATIONS (Accidental_engraver);
void process_music ();
- void acknowledge_tie (Grob_info);
+ void acknowledge_end_tie (Grob_info);
void acknowledge_arpeggio (Grob_info);
void acknowledge_rhythmic_head (Grob_info);
void acknowledge_finger (Grob_info);
}
void
-Accidental_engraver::acknowledge_tie (Grob_info info)
+Accidental_engraver::acknowledge_end_tie (Grob_info info)
{
ties_.push_back (dynamic_cast<Spanner *> (info.grob ()));
}
ADD_ACKNOWLEDGER (Accidental_engraver, arpeggio);
ADD_ACKNOWLEDGER (Accidental_engraver, finger);
ADD_ACKNOWLEDGER (Accidental_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Accidental_engraver, tie);
+ADD_END_ACKNOWLEDGER (Accidental_engraver, tie);
ADD_ACKNOWLEDGER (Accidental_engraver, note_column);
ADD_TRANSLATOR (Accidental_engraver,
#include "pointer-group-interface.hh"
#include "rhythmic-head.hh"
#include "skyline.hh"
+#include "skyline-pair.hh"
#include "stream-event.hh"
#include "warn.hh"
struct Accidental_placement_entry
{
- Skyline left_skyline_;
- Skyline right_skyline_;
- Interval vertical_extent_;
- vector<Box> extents_;
+ Skyline_pair horizontal_skylines_;
vector<Grob *> grobs_;
};
Real ape_priority (Accidental_placement_entry const *a)
{
- return a->vertical_extent_[UP];
+ // right is up because we're horizontal
+ return a->horizontal_skylines_.right ();
}
bool ape_less (Accidental_placement_entry *const &a,
offset -= a->extent (a, X_AXIS).length () + padding;
}
- vector<Box> boxes = Accidental_interface::accurate_boxes (a, common);
- ape->extents_.insert (ape->extents_.end (), boxes.begin (), boxes.end ());
-
- for (vsize j = boxes.size (); j--;)
- ape->vertical_extent_.unite (boxes[j][Y_AXIS]);
+ if (Skyline_pair *sky = Skyline_pair::unsmob (a->get_property ("horizontal-skylines")))
+ {
+ Skyline_pair copy (*sky);
+ copy.raise (a->relative_coordinate (common[X_AXIS], X_AXIS));
+ copy.shift (a->relative_coordinate (common[Y_AXIS], Y_AXIS));
+ ape->horizontal_skylines_.merge (copy);
+ }
last_octave = p->get_octave ();
last_alteration = p->get_alteration ();
}
- ape->left_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, LEFT);
- ape->right_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, RIGHT);
}
static vector<Grob *>
head_extents.push_back (Box (heads_and_stems[i]->extent (common[X_AXIS], X_AXIS),
heads_and_stems[i]->pure_height (common[Y_AXIS], 0, INT_MAX)));
- return Skyline (head_extents, 0, Y_AXIS, LEFT);
+ return Skyline (head_extents, Y_AXIS, LEFT);
}
/*
{
Accidental_placement_entry *ape = apes[i];
- Real offset = -ape->right_skyline_.distance (left_skyline);
+ Real offset = -ape->horizontal_skylines_[RIGHT].distance (left_skyline);
if (isinf (offset))
offset = last_offset;
else
offset -= padding;
- Skyline new_left_skyline = ape->left_skyline_;
+ Skyline new_left_skyline = ape->horizontal_skylines_[LEFT];
new_left_skyline.raise (offset);
new_left_skyline.merge (left_skyline);
left_skyline = new_left_skyline;
for (vsize j = ape->grobs_.size (); j--;)
ape->grobs_[j]->translate_axis (offset, X_AXIS);
- for (vsize j = ape->extents_.size (); j--;)
- width.unite (offset + ape->extents_[j][X_AXIS]);
+ for (LEFT_and_RIGHT (d))
+ {
+ Real mh = ape->horizontal_skylines_[d].max_height ();
+ if (!isinf (mh))
+ width.add_point (mh);
+ }
last_offset = offset;
}
#include "paper-column.hh"
#include "pitch.hh"
#include "stencil.hh"
+#include "skyline-pair.hh"
Stencil
parenthesize (Grob *me, Stencil m)
return get_extent (unsmob_grob (smob), X_AXIS);
}
+MAKE_SCHEME_CALLBACK (Accidental_interface, horizontal_skylines, 1);
+SCM
+Accidental_interface::horizontal_skylines (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ if (!me->is_live ())
+ return Skyline_pair ().smobbed_copy ();
+
+ /*
+ * Using the print function may trigger a suicide
+ * before line breaking. It is therefore `unpure' (c).
+ * We use the more basic get_stencil.
+ */
+ Stencil *my_stencil = unsmob_stencil (get_stencil (me));
+ Skyline_pair *sky =
+ Skyline_pair::unsmob
+ (Stencil::skylines_from_stencil
+ (my_stencil->smobbed_copy (), 0.0, Y_AXIS));
+
+ if (!sky)
+ return Skyline_pair ().smobbed_copy ();
+
+ SCM alist = me->get_property ("glyph-name-alist");
+ SCM alt = me->get_property ("alteration");
+ string glyph_name = robust_scm2string (ly_assoc_get (alt, alist, SCM_BOOL_F),
+ "");
+ if (glyph_name == "accidentals.flat"
+ || glyph_name == "accidentals.flatflat")
+ {
+ // a bit more padding for the right of the stem
+ // we raise the stem horizontally to a bit less than the average
+ // horizontal "height" of the entire glyph. This will bring flats
+ // closer to doubleflats, which looks better (MS opinion).
+ // this should work for all fonts where the flat is not
+ // completely bizarre
+ Real left = my_stencil->extent (X_AXIS)[LEFT];
+ Real right = my_stencil->extent (X_AXIS)[RIGHT] * 0.375;
+ Real down = my_stencil->extent (Y_AXIS)[DOWN];
+ Real up = my_stencil->extent (Y_AXIS)[UP];
+ vector<Box> boxes;
+ boxes.push_back (Box (Interval (left, right), Interval (down, up)));
+ Skyline merge_with_me (boxes, Y_AXIS, RIGHT);
+ (*sky)[RIGHT].merge (merge_with_me);
+ }
+ return sky->smobbed_copy ();
+}
+
MAKE_SCHEME_CALLBACK (Accidental_interface, pure_height, 3);
SCM
Accidental_interface::pure_height (SCM smob, SCM start_scm, SCM)
return ly_interval2scm (Interval ());
}
-vector<Box>
-Accidental_interface::accurate_boxes (Grob *me, Grob **common)
-{
- Box b;
- b[X_AXIS] = me->extent (me, X_AXIS);
- b[Y_AXIS] = me->extent (me, Y_AXIS);
-
- vector<Box> boxes;
-
- bool parens = to_boolean (me->get_property ("parenthesized"));
- if (!me->is_live ())
- return boxes;
-
- if (!to_boolean (me->get_property ("restore-first"))
- && !parens)
- {
- SCM alist = me->get_property ("glyph-name-alist");
- SCM alt = me->get_property ("alteration");
- string glyph_name = robust_scm2string (ly_assoc_get (alt, alist, SCM_BOOL_F),
- "");
-
- if (glyph_name == "accidentals.flat"
- || glyph_name == "accidentals.mirroredflat")
- {
- Box stem = b;
- Box bulb = b;
-
- /*
- we could make the stem thinner, but that places the flats
- really close.
- */
- Direction bulb_dir
- = glyph_name == "accidentals.mirroredflat" ? LEFT : RIGHT;
- stem[X_AXIS][bulb_dir] = stem[X_AXIS].center ();
-
- /*
- To prevent vertical alignment for 6ths
- */
- stem[Y_AXIS] *= 1.1;
- bulb[Y_AXIS][UP] *= .35;
-
- boxes.push_back (bulb);
- boxes.push_back (stem);
- }
- else if (glyph_name == "accidentals.natural")
- {
- Box lstem = b;
- Box rstem = b;
- Box belly = b;
-
- lstem[Y_AXIS] *= 1.1;
- rstem[Y_AXIS] *= 1.1;
-
- belly[Y_AXIS] *= 0.75;
- lstem[X_AXIS][RIGHT] *= .33;
- rstem[X_AXIS][LEFT] = rstem[X_AXIS].linear_combination (1.0 / 3.0);
- lstem[Y_AXIS][DOWN] = belly[Y_AXIS][DOWN];
- rstem[Y_AXIS][UP] = belly[Y_AXIS][UP];
- boxes.push_back (belly);
- boxes.push_back (lstem);
- boxes.push_back (rstem);
- }
- /*
- TODO: add support for, double flat.
- */
- }
-
- if (!boxes.size ())
- boxes.push_back (b);
-
- Offset o (me->relative_coordinate (common[X_AXIS], X_AXIS),
- me->relative_coordinate (common[Y_AXIS], Y_AXIS));
-
- for (vsize i = boxes.size (); i--;)
- boxes[i].translate (o);
-
- return boxes;
-}
-
MAKE_SCHEME_CALLBACK (Accidental_interface, print, 1);
SCM
Accidental_interface::print (SCM smob)
"avoid-slur "
"forced "
"glyph-name-alist "
+ "glyph-name "
"hide-tied-accidental-after-break "
"parenthesized "
"restore-first "
Box b;
b[a] = begin_of_line_extent;
b[other_axis (a)] = Interval (-infinity_f, -1);
- skylines.insert (b, 0, other_axis (a));
+ skylines.insert (b, other_axis (a));
}
}
Box b;
b[a] = extent;
b[other_axis (a)] = Interval (0, infinity_f);
- skylines.insert (b, 0, other_axis (a));
+ skylines.insert (b, other_axis (a));
}
}
if (!pure && a == Y_AXIS && dynamic_cast<Spanner *> (me) && !me->get_system ())
me->programming_error ("vertical alignment called before line-breaking");
+ // check the cache
+ if (pure)
+ {
+ SCM fv = ly_assoc_get (scm_cons (scm_from_int (start), scm_from_int (end)),
+ me->get_property ("minimum-translations-alist"),
+ SCM_EOL);
+ if (fv != SCM_EOL)
+ return ly_scm2floatvector (fv);
+ }
+
// If include_fixed_spacing is true, we look at things like system-system-spacing
// and alignment-distances, which only make sense for the toplevel VerticalAlignment.
// If we aren't toplevel, we're working on something like BassFigureAlignment
all_translates.push_back (w);
}
}
+
+ if (pure)
+ {
+ SCM mta = me->get_property ("minimum-translations-alist");
+ mta = scm_cons (scm_cons (scm_cons (scm_from_int (start), scm_from_int (end)),
+ ly_floatvector2scm (all_translates)),
+ mta);
+ me->set_property ("minimum-translations-alist", mta);
+ }
return all_translates;
}
all_grobs[j]->translate_axis (translates[j], a);
}
-MAKE_SCHEME_CALLBACK (Align_interface, full_score_pure_minimum_translations, 1);
-SCM
-Align_interface::full_score_pure_minimum_translations (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
- extract_grob_set (me, "elements", all_grobs);
-
- vector<Real> pure_minimum_translations = Align_interface::get_pure_minimum_translations (me, all_grobs, Y_AXIS, 0, INT_MAX);
- return ly_floatvector2scm (pure_minimum_translations);
-}
-
Real
Align_interface::get_pure_child_y_translation (Grob *me, Grob *ch, int start, int end)
{
extract_grob_set (me, "elements", all_grobs);
- vector<Real> translates = start == 0 && end == INT_MAX
- ? ly_scm2floatvector (me->get_object ("full-score-pure-minimum-translations"))
- : get_pure_minimum_translations (me, all_grobs, Y_AXIS, start, end);
+ vector<Real> translates = get_pure_minimum_translations (me, all_grobs, Y_AXIS, start, end);
if (translates.size ())
{
/* properties */
"align-dir "
"axes "
- "full-score-pure-minimum-translations "
"elements "
+ "minimum-translations-alist "
"padding "
"positioning-done "
"stacking-dir "
vector<Stream_event *> articulation_events,
char const *articulation_name)
{
- vector<Stream_event *> string_events;
SCM articulations = SCM_EOL;
vsize j = 0;
#include "axis-group-interface.hh"
+#include <map>
+
#include "align-interface.hh"
#include "directional-element-interface.hh"
#include "grob-array.hh"
#include "hara-kiri-group-spanner.hh"
#include "international.hh"
+#include "interval-set.hh"
#include "lookup.hh"
#include "paper-column.hh"
#include "paper-score.hh"
static bool
pure_staff_priority_less (Grob *const &g1, Grob *const &g2);
+Real Axis_group_interface::default_outside_staff_padding_ = 0.46;
+
+Real
+Axis_group_interface::get_default_outside_staff_padding ()
+{
+ return default_outside_staff_padding_;
+}
+
void
Axis_group_interface::add_element (Grob *me, Grob *e)
{
continue;
bool outside_staff = scm_is_number (g->get_property ("outside-staff-priority"));
- Real padding = robust_scm2double (g->get_property ("outside-staff-padding"), 0.5);
+ Real padding = robust_scm2double (g->get_property ("outside-staff-padding"), get_default_outside_staff_padding ());
// When we encounter the first outside-staff grob, make a copy
// of the current heights to use as an estimate for the staff heights.
Axis_group_interface::calc_skylines (SCM smob)
{
Grob *me = unsmob_grob (smob);
- extract_grob_set (me, "elements", elts);
+ extract_grob_set (me, Grob_array::unsmob (me->get_object ("vertical-skyline-elements")) ? "vertical-skyline-elements" : "elements", elts);
Skyline_pair skylines = skyline_spacing (me, elts);
return skylines.smobbed_copy ();
}
static void
-add_boxes (Grob *me, Grob *x_common, Grob *y_common, vector<Box> *const boxes, Skyline_pair *skylines)
+add_interior_skylines (Grob *me, Grob *x_common, Grob *y_common, vector<Skyline_pair> *skylines)
{
- /* if a child has skylines, use them instead of the extent box */
- if (Skyline_pair *pair = Skyline_pair::unsmob (me->get_property ("vertical-skylines")))
- {
- Skyline_pair s = *pair;
- s.shift (me->relative_coordinate (x_common, X_AXIS));
- s.raise (me->relative_coordinate (y_common, Y_AXIS));
- skylines->merge (s);
- }
- else if (Grob_array *elements = unsmob_grob_array (me->get_object ("elements")))
+ if (Grob_array *elements = unsmob_grob_array (me->get_object ("elements")))
{
for (vsize i = 0; i < elements->size (); i++)
- add_boxes (elements->grob (i), x_common, y_common, boxes, skylines);
+ add_interior_skylines (elements->grob (i), x_common, y_common, skylines);
}
else if (!scm_is_number (me->get_property ("outside-staff-priority"))
&& !to_boolean (me->get_property ("cross-staff")))
{
- boxes->push_back (Box (me->extent (x_common, X_AXIS),
- me->extent (y_common, Y_AXIS)));
+ Skyline_pair *maybe_pair = Skyline_pair::unsmob (me->get_property ("vertical-skylines"));
+ if (!maybe_pair)
+ return;
+ if (maybe_pair->is_empty ())
+ return;
+ skylines->push_back (Skyline_pair (*maybe_pair));
+ skylines->back ().shift (me->relative_coordinate (x_common, X_AXIS));
+ skylines->back ().raise (me->relative_coordinate (y_common, Y_AXIS));
}
}
-/* We want to avoid situations like this:
- still more text
- more text
- text
- -------------------
- staff
- -------------------
-
- The point is that "still more text" should be positioned under
- "more text". In order to achieve this, we place the grobs in several
- passes. We keep track of the right-most horizontal position that has been
- affected by the current pass so far (actually we keep track of 2
- positions, one for above the staff, one for below).
-
- In each pass, we loop through the unplaced grobs from left to right.
- If the grob doesn't overlap the right-most affected position, we place it
- (and then update the right-most affected position to point to the right
- edge of the just-placed grob). Otherwise, we skip it until the next pass.
-*/
+// Raises the grob elt (whose skylines are given by h_skyline
+// and v_skyline) so that it doesn't intersect with staff_skyline,
+// or with anything in other_h_skylines and other_v_skylines.
+void
+avoid_outside_staff_collisions (Grob *elt,
+ Skyline_pair *v_skyline,
+ Real padding,
+ Real horizon_padding,
+ vector<Skyline_pair> const &other_v_skylines,
+ vector<Real> const &other_padding,
+ vector<Real> const &other_horizon_padding,
+ Direction const dir)
+{
+ assert (other_v_skylines.size () == other_padding.size ());
+ assert (other_v_skylines.size () == other_horizon_padding.size ());
+ vector<Interval> forbidden_intervals;
+ for (vsize j = 0; j < other_v_skylines.size (); j++)
+ {
+ Skyline_pair const &v_other = other_v_skylines[j];
+ Real pad = (padding + other_padding[j]);
+ Real horizon_pad = (horizon_padding + other_horizon_padding[j]);
+
+ // We need to push elt up by at least this much to be above v_other.
+ Real up = (*v_skyline)[DOWN].distance (v_other[UP], horizon_pad) + pad;
+ // We need to push elt down by at least this much to be below v_other.
+ Real down = (*v_skyline)[UP].distance (v_other[DOWN], horizon_pad) + pad;
+
+ forbidden_intervals.push_back (Interval (-down, up));
+ }
+
+ Interval_set allowed_shifts
+ = Interval_set::interval_union (forbidden_intervals).complement ();
+ Real move = allowed_shifts.nearest_point (0, dir);
+ v_skyline->raise (move);
+ elt->translate_axis (move, Y_AXIS);
+}
+
+SCM
+valid_outside_staff_placement_directive (Grob *me)
+{
+ SCM directive = me->get_property ("outside-staff-placement-directive");
+
+ if ((directive == ly_symbol2scm ("left-to-right-greedy"))
+ || (directive == ly_symbol2scm ("left-to-right-polite"))
+ || (directive == ly_symbol2scm ("right-to-left-greedy"))
+ || (directive == ly_symbol2scm ("right-to-left-polite")))
+ return directive;
+
+ me->warning (_f ("\"%s\" is not a valid outside-staff-placement-directive",
+ robust_symbol2string (directive, "").c_str ()));
+
+ return ly_symbol2scm ("left-to-right-polite");
+}
+
+// Shifts the grobs in elements to ensure that they (and any
+// connected riders) don't collide with the staff skylines
+// or anything in all_X_skylines. Afterwards, the skylines
+// of the grobs in elements will be added to all_v_skylines.
static void
-add_grobs_of_one_priority (Skyline_pair *const skylines,
+add_grobs_of_one_priority (Grob *me,
+ Drul_array<vector<Skyline_pair> > *all_v_skylines,
+ Drul_array<vector<Real> > *all_paddings,
+ Drul_array<vector<Real> > *all_horizon_paddings,
vector<Grob *> elements,
Grob *x_common,
- Grob *y_common)
+ Grob *y_common,
+ multimap<Grob *, Grob *> const &riders)
{
- vector<Box> boxes;
- Drul_array<Real> last_affected_position;
- reverse (elements);
+ SCM directive
+ = valid_outside_staff_placement_directive (me);
+
+ bool l2r = ((directive == ly_symbol2scm ("left-to-right-greedy"))
+ || (directive == ly_symbol2scm ("left-to-right-polite")));
+
+ bool polite = ((directive == ly_symbol2scm ("left-to-right-polite"))
+ || (directive == ly_symbol2scm ("right-to-left-polite")));
+
+ vector<Box> boxes;
+ vector<Skyline_pair> skylines_to_merge;
+
+ // We want to avoid situations like this:
+ // still more text
+ // more text
+ // text
+ // -------------------
+ // staff
+ // -------------------
+
+ // The point is that "still more text" should be positioned under
+ // "more text". In order to achieve this, we place the grobs in several
+ // passes. We keep track of the right-most horizontal position that has been
+ // affected by the current pass so far (actually we keep track of 2
+ // positions, one for above the staff, one for below).
+
+ // In each pass, we loop through the unplaced grobs from left to right.
+ // If the grob doesn't overlap the right-most affected position, we place it
+ // (and then update the right-most affected position to point to the right
+ // edge of the just-placed grob). Otherwise, we skip it until the next pass.
while (!elements.empty ())
{
- last_affected_position[UP] = -infinity_f;
- last_affected_position[DOWN] = -infinity_f;
- /* do one pass */
- for (vsize i = elements.size (); i--;)
+ Drul_array<Real> last_end (-infinity_f, -infinity_f);
+ vector<Grob *> skipped_elements;
+ for (vsize i = l2r ? 0 : elements.size ();
+ l2r ? i < elements.size () : i--;
+ l2r ? i++ : 0)
{
- Direction dir = get_grob_direction (elements[i]);
+ Grob *elt = elements[i];
+ Real padding
+ = robust_scm2double (elt->get_property ("outside-staff-padding"), 0.25);
+ Real horizon_padding
+ = robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0);
+ Interval x_extent = elt->extent (x_common, X_AXIS);
+ x_extent.widen (horizon_padding);
+
+ Direction dir = get_grob_direction (elt);
if (dir == CENTER)
{
warning (_ ("an outside-staff object should have a direction, defaulting to up"));
dir = UP;
}
- Box b (elements[i]->extent (x_common, X_AXIS),
- elements[i]->extent (y_common, Y_AXIS));
- SCM horizon_padding_scm = elements[i]->get_property ("outside-staff-horizontal-padding");
- Real horizon_padding = robust_scm2double (horizon_padding_scm, 0.0);
+ if (x_extent[LEFT] <= last_end[dir] && polite)
+ {
+ skipped_elements.push_back (elt);
+ continue;
+ }
+ last_end[dir] = x_extent[RIGHT];
- if (b[X_AXIS][LEFT] - 2 * horizon_padding < last_affected_position[dir])
+ Skyline_pair *v_orig = Skyline_pair::unsmob (elt->get_property ("vertical-skylines"));
+ if (v_orig->is_empty ())
continue;
- if (!b[X_AXIS].is_empty () && !b[Y_AXIS].is_empty ())
+ // Find the riders associated with this grob, and merge their
+ // skylines with elt's skyline.
+ typedef multimap<Grob *, Grob *>::const_iterator GrobMapIterator;
+ pair<GrobMapIterator, GrobMapIterator> range = riders.equal_range (elt);
+ vector<Skyline_pair> rider_v_skylines;
+ for (GrobMapIterator j = range.first; j != range.second; j++)
{
- boxes.clear ();
- boxes.push_back (b);
- Skyline other = Skyline (boxes, horizon_padding, X_AXIS, -dir);
- Real padding = robust_scm2double (elements[i]->get_property ("outside-staff-padding"), 0.5);
- Real dist = (*skylines)[dir].distance (other) + padding;
-
- if (dist > 0)
+ Grob *rider = j->second;
+ Skyline_pair *v_rider = Skyline_pair::unsmob (rider->get_property ("vertical-skylines"));
+ if (v_rider)
{
- b.translate (Offset (0, dir * dist));
- elements[i]->translate_axis (dir * dist, Y_AXIS);
+ Skyline_pair copy (*v_rider);
+ copy.shift (rider->relative_coordinate (x_common, X_AXIS));
+ copy.raise (rider->relative_coordinate (y_common, Y_AXIS));
+ rider_v_skylines.push_back (copy);
}
- skylines->insert (b, 0, X_AXIS);
- elements[i]->set_property ("outside-staff-priority", SCM_BOOL_F);
- last_affected_position[dir] = b[X_AXIS][RIGHT];
}
-
- /*
- Ugh: quadratic. --hwn
- */
- elements.erase (elements.begin () + i);
+ Skyline_pair v_skylines (*v_orig);
+ v_skylines.shift (elt->relative_coordinate (x_common, X_AXIS));
+ v_skylines.raise (elt->relative_coordinate (y_common, Y_AXIS));
+ v_skylines.merge (Skyline_pair (rider_v_skylines));
+
+ avoid_outside_staff_collisions (elt,
+ &v_skylines,
+ padding,
+ horizon_padding,
+ (*all_v_skylines)[dir],
+ (*all_paddings)[dir],
+ (*all_horizon_paddings)[dir],
+ dir);
+
+ elt->set_property ("outside-staff-priority", SCM_BOOL_F);
+ (*all_v_skylines)[dir].push_back (v_skylines);
+ (*all_paddings)[dir].push_back (padding);
+ (*all_horizon_paddings)[dir].push_back (horizon_padding);
}
+ swap (elements, skipped_elements);
+ skipped_elements.clear ();
}
}
-bool
-Axis_group_interface::has_outside_staff_parent (Grob *me)
+// If the Grob has a Y-ancestor with outside-staff-priority, return it.
+// Otherwise, return 0.
+Grob *
+Axis_group_interface::outside_staff_ancestor (Grob *me)
{
- return (me
- ? (scm_is_number (me->get_property ("outside-staff-priority"))
- || has_outside_staff_parent (me->get_parent (Y_AXIS)))
- : false);
+ Grob *parent = me->get_parent (Y_AXIS);
+ if (!parent)
+ return 0;
+
+ if (scm_is_number (parent->get_property ("outside-staff-priority")))
+ return parent;
+
+ return outside_staff_ancestor (parent);
}
-// TODO: it is tricky to correctly handle skyline placement of cross-staff grobs.
+// It is tricky to correctly handle skyline placement of cross-staff grobs.
// For example, cross-staff beams cannot be formatted until the distance between
// staves is known and therefore any grobs that depend on the beam cannot be placed
// until the skylines are known. On the other hand, the distance between staves should
Skyline_pair
Axis_group_interface::skyline_spacing (Grob *me, vector<Grob *> elements)
{
+ for (vsize i = 0; i < elements.size (); i++)
+ /*
+ As a sanity check, we make sure that no grob with an outside staff priority
+ has a Y-parent that also has an outside staff priority, which would result
+ in two movings.
+ */
+ if (scm_is_number (elements[i]->get_property ("outside-staff-priority"))
+ && outside_staff_ancestor (elements[i]))
+ {
+ elements[i]->warning ("Cannot set outside-staff-priority for element and elements' Y parent.");
+ elements[i]->set_property ("outside-staff-priority", SCM_BOOL_F);
+ }
+
/* For grobs with an outside-staff-priority, the sorting function might
call extent and cause suicide. This breaks the contract that is required
for the STL sort function. To avoid this, we make sure that any suicides
assert (y_common == me);
- vsize i = 0;
- vector<Box> boxes;
+ // A rider is a grob that is not outside-staff, but has an outside-staff
+ // ancestor. In that case, the rider gets moved along with its ancestor.
+ multimap<Grob *, Grob *> riders;
- Skyline_pair skylines;
+ vsize i = 0;
+ vector<Skyline_pair> inside_staff_skylines;
for (i = 0; i < elements.size ()
&& !scm_is_number (elements[i]->get_property ("outside-staff-priority")); i++)
- if (!(to_boolean (elements[i]->get_property ("cross-staff")) || has_outside_staff_parent (elements[i])))
- add_boxes (elements[i], x_common, y_common, &boxes, &skylines);
+ {
+ Grob *elt = elements[i];
+ Grob *ancestor = outside_staff_ancestor (elt);
+ if (!(to_boolean (elt->get_property ("cross-staff")) || ancestor))
+ add_interior_skylines (elt, x_common, y_common, &inside_staff_skylines);
+ if (ancestor)
+ riders.insert (pair<Grob *, Grob *> (ancestor, elt));
+ }
+
+ Skyline_pair skylines (inside_staff_skylines);
+
+ // These are the skylines of all outside-staff grobs
+ // that have already been processed. We keep them around in order to
+ // check them for collisions with the currently active outside-staff grob.
+ Drul_array<vector<Skyline_pair> > all_v_skylines;
+ Drul_array<vector<Real> > all_paddings;
+ Drul_array<vector<Real> > all_horizon_paddings;
+ for (UP_and_DOWN (d))
+ {
+ all_v_skylines[d].push_back (skylines);
+ all_paddings[d].push_back (0);
+ all_horizon_paddings[d].push_back (0);
+ }
- SCM padding_scm = me->get_property ("skyline-horizontal-padding");
- Real padding = robust_scm2double (padding_scm, 0.1);
- skylines.merge (Skyline_pair (boxes, padding, X_AXIS));
for (; i < elements.size (); i++)
{
if (to_boolean (elements[i]->get_property ("cross-staff")))
continue;
+ // Collect all the outside-staff grobs that have a particular priority.
SCM priority = elements[i]->get_property ("outside-staff-priority");
vector<Grob *> current_elts;
current_elts.push_back (elements[i]);
++i;
}
- add_grobs_of_one_priority (&skylines, current_elts, x_common, y_common);
+ add_grobs_of_one_priority (me,
+ &all_v_skylines,
+ &all_paddings,
+ &all_horizon_paddings,
+ current_elts,
+ x_common,
+ y_common,
+ riders);
}
+
+ // Now everything in all_v_skylines has been shifted appropriately; merge
+ // them all into skylines to get the complete outline.
+ Skyline_pair other_skylines (all_v_skylines[UP]);
+ other_skylines.merge (Skyline_pair (all_v_skylines[DOWN]));
+ skylines.merge (other_skylines);
+
+ // We began by shifting my skyline to be relative to the common refpoint; now
+ // shift it back.
skylines.shift (-me->relative_coordinate (x_common, X_AXIS));
+
return skylines;
}
"nonstaff-nonstaff-spacing "
"nonstaff-relatedstaff-spacing "
"nonstaff-unrelatedstaff-spacing "
+ "outside-staff-placement-directive "
"pure-relevant-grobs "
"pure-relevant-items "
"pure-relevant-spanners "
"staff-grouper "
"staff-staff-spacing "
"system-Y-offset "
- "vertical-skylines "
+ "vertical-skyline-elements "
"X-common "
"Y-common "
);
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
DECLARE_ACKNOWLEDGER (stem);
DECLARE_ACKNOWLEDGER (accidental);
DECLARE_ACKNOWLEDGER (clef);
+ DECLARE_ACKNOWLEDGER (octavate_eight);
DECLARE_ACKNOWLEDGER (key_signature);
DECLARE_ACKNOWLEDGER (time_signature);
DECLARE_ACKNOWLEDGER (beam);
covered_grobs_.push_back (i);
}
+void
+Beam_collision_engraver::acknowledge_octavate_eight (Grob_info i)
+{
+ covered_grobs_.push_back (i);
+}
+
void
Beam_collision_engraver::acknowledge_time_signature (Grob_info i)
{
ADD_ACKNOWLEDGER (Beam_collision_engraver, clef);
ADD_ACKNOWLEDGER (Beam_collision_engraver, key_signature);
ADD_ACKNOWLEDGER (Beam_collision_engraver, time_signature);
+ADD_ACKNOWLEDGER (Beam_collision_engraver, octavate_eight);
ADD_ACKNOWLEDGER (Beam_collision_engraver, flag);
ADD_ACKNOWLEDGER (Beam_collision_engraver, beam);
#include "lookup.hh"
#include "main.hh"
#include "misc.hh"
+#include "note-column.hh"
#include "note-head.hh"
#include "output-def.hh"
#include "pointer-group-interface.hh"
return m;
}
+//------ for whole note chord tremolos
+
+bool
+Beam::whole_note_close_chord_tremolo (Grob *me)
+{
+ if (!scm_is_integer (me->get_property ("gap-count")))
+ return false;
+
+ extract_grob_set (me, "stems", stems);
+ for (vsize i = 0; i < stems.size (); i++)
+ if (Stem::duration_log (stems[i]))
+ return false;
+
+ Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
+ if (staff)
+ {
+ Grob *outside_stems[2] = {Stem::extremal_heads (stems[0])[DOWN],
+ Stem::extremal_heads (stems.back ())[DOWN]};
+
+ Interval lines = Staff_symbol::line_span (staff);
+ for (int i = 0; i < 2; i++)
+ {
+ Real my_pos = Staff_symbol_referencer::get_position (outside_stems[i]);
+ if (my_pos > lines[UP] + 1)
+ return false;
+ else if (my_pos < lines[DOWN] - 1)
+ return false;
+ }
+ }
+
+ return (Staff_symbol_referencer::get_position (Stem::extremal_heads (stems.back ())[DOWN])
+ - Staff_symbol_referencer::get_position (Stem::extremal_heads (stems[0])[DOWN]))
+ < 2;
+}
+
+MAKE_SCHEME_CALLBACK (Beam, calc_beam_gap, 1);
+SCM
+Beam::calc_beam_gap (SCM smob)
+{
+ Spanner *me = unsmob_spanner (smob);
+ SCM default_value = scm_cons (scm_from_double (0.8), scm_from_double (0.8));
+ if (!whole_note_close_chord_tremolo (me))
+ return default_value;
+
+ Interval left = Note_column::accidental_width
+ (me->get_bound (RIGHT)->get_parent (X_AXIS));
+
+ if (left.length () > 0.4)
+ return scm_cons (scm_from_double (0.8), scm_from_double (1.3 + left.length ()));
+ else
+ return default_value;
+}
+
+MAKE_SCHEME_CALLBACK (Beam, calc_springs_and_rods, 1);
+SCM
+Beam::calc_springs_and_rods (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+
+ if (!whole_note_close_chord_tremolo (me))
+ return SCM_BOOL_F;
+
+ return scm_call_1 (Spanner::set_spacing_rods_proc, smob);
+}
+
+MAKE_SCHEME_CALLBACK (Beam, calc_minimum_length, 1);
+SCM
+Beam::calc_minimum_length (SCM smob)
+{
+ Spanner *me = unsmob_spanner (smob);
+ SCM default_value = scm_from_double (0.0);
+
+ if (!whole_note_close_chord_tremolo (me))
+ return SCM_BOOL_F;
+
+ Interval left = Note_column::accidental_width
+ (me->get_bound (RIGHT)->get_parent (X_AXIS));
+
+ if (left.length () > 0.4)
+ return scm_from_double (left.length () + 4.0);
+ else
+ return default_value;
+}
+
+//------ and everything else
+
MAKE_SCHEME_CALLBACK (Beam, calc_normal_stems, 1);
SCM
Beam::calc_normal_stems (SCM smob)
dir = to_dir (stem->get_property_data ("direction"));
else
dir = to_dir (stem->get_property ("default-direction"));
+
+ extract_grob_set (stem, "note-heads", heads);
+ /* default position of Kievan heads with beams is down
+ placing this here avoids warnings downstream */
+ if (heads.size())
+ {
+ if (heads[0]->get_property ("style") == ly_symbol2scm ("kievan"))
+ {
+ if (dir == CENTER)
+ dir = DOWN;
+ }
+ }
}
}
commonx = me->get_bound (d)->common_refpoint (commonx, X_AXIS);
int gap_count = robust_scm2int (me->get_property ("gap-count"), 0);
- Real gap_length = robust_scm2double (me->get_property ("gap"), 0.0);
+ Interval gap_lengths = robust_scm2interval (me->get_property ("beam-gap"), Interval (0.0, 0.0));
Position_stem_segments_map stem_segments;
Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
current.horizontal_[event_dir] += event_dir * seg.width_ / 2;
if (seg.gapped_)
{
- current.horizontal_[event_dir] -= event_dir * gap_length;
+ current.horizontal_[event_dir] -= event_dir * gap_lengths[event_dir];
if (Stem::is_invisible (seg.stem_))
{
for (vsize k = 0; k < heads.size (); k++)
current.horizontal_[event_dir]
= event_dir * min (event_dir * current.horizontal_[event_dir],
- - gap_length / 2
+ - gap_lengths[event_dir] / 2
+ event_dir
* heads[k]->extent (commonx,
X_AXIS)[-event_dir]);
if (!scm_is_number (scm))
return;
- Interval_set gaps;
-
- gaps.set_full ();
+ vector<Interval> forbidden_intervals;
extract_grob_set (me, "normal-stems", stems);
}
head_extents_array.push_back (head_extents);
- gaps.remove_interval (head_extents);
+ forbidden_intervals.push_back (head_extents);
}
Interval max_gap;
Real max_gap_len = 0.0;
- for (vsize i = gaps.allowed_regions_.size () - 1; i != VPOS; i--)
+ vector<Interval> allowed_regions
+ = Interval_set::interval_union (forbidden_intervals).complement ().intervals ();
+ for (vsize i = allowed_regions.size () - 1; i != VPOS; i--)
{
- Interval gap = gaps.allowed_regions_[i];
+ Interval gap = allowed_regions[i];
/*
the outer gaps are not knees.
rest_max_pos[UP]
) * ss / 2.0
- previous;
+
+ // So that ceil below kicks in for rests that would otherwise brush
+ // up against a beam quanted to a ledger line, add a bit of space
+ // between the beam and the rest.
+ shift += (0.01 * beamdir);
+
/* Always move by a whole number of staff spaces */
shift = ceil (fabs (shift / ss)) * ss * sign (shift);
"auto-knee-gap "
"beamed-stem-shorten "
"beaming "
+ "beam-gap "
"beam-segments "
"beam-thickness "
"break-overshoot "
"damping "
"details "
"direction "
- "gap "
"gap-count "
"grow-direction "
"inspect-quants "
return o;
}
+Real
+Bezier::slope_at_point (Real t) const
+{
+ Offset second_order[3];
+ Offset third_order[2];
+
+ for (vsize i = 0; i < 3; i++)
+ second_order[i] = ((control_[i + 1] - control_[i]) * t) + control_[i];
+
+ for (vsize i = 0; i < 2; i++)
+ third_order[i] = ((second_order[i + 1] - second_order[i]) * t) + second_order[i];
+
+ if (third_order[1][X_AXIS] - third_order[0][X_AXIS] == 0)
+ return infinity_f;
+
+ return (third_order[1][Y_AXIS] - third_order[0][Y_AXIS]) / (third_order[1][X_AXIS] - third_order[0][X_AXIS]);
+}
+
/*
Cache binom (3, j) t^j (1-t)^{3-j}
*/
interval_a_[i].unite (b[i]);
}
+Real
+Box::area () const
+{
+ return interval_a_[X_AXIS].length ()
+ * interval_a_[Y_AXIS].length ();
+}
+
Box::Box ()
{
}
void
Chord_name_engraver::process_music ()
{
+ if (!rest_event_ && !notes_.size ())
+ return;
+
+ chord_name_ = make_item ("ChordName",
+ rest_event_ ? rest_event_->self_scm () : notes_[0]->self_scm ());
+
+ SCM maybe_markup = chord_name_->get_property_data ("text");
+
+ bool make_markup = !(Text_interface::is_markup (maybe_markup)
+ || ly_is_procedure (maybe_markup));
+
SCM markup;
- SCM bass = SCM_EOL;
- SCM inversion = SCM_EOL;
- SCM pitches = SCM_EOL;
- if (rest_event_)
+ if (rest_event_ && !make_markup) { }
+ else if (rest_event_)
{
SCM no_chord_markup = get_property ("noChordSymbol");
if (!Text_interface::is_markup (no_chord_markup))
}
else
{
- if (!notes_.size ())
- return;
+ SCM bass = SCM_EOL;
+ SCM inversion = SCM_EOL;
+ SCM pitches = SCM_EOL;
Stream_event *inversion_event = 0;
for (vsize i = 0; i < notes_.size (); i++)
pitches = scm_sort_list (pitches, Pitch::less_p_proc);
SCM name_proc = get_property ("chordNameFunction");
- markup = scm_call_4 (name_proc, pitches, bass, inversion,
- context ()->self_scm ());
+ if (make_markup)
+ markup = scm_call_4 (name_proc, pitches, bass, inversion,
+ context ()->self_scm ());
}
/*
Ugh.
*/
- SCM chord_as_scm = scm_cons (pitches, scm_cons (bass, inversion));
-
- chord_name_ = make_item ("ChordName",
- rest_event_ ? rest_event_->self_scm () : notes_[0]->self_scm ());
- chord_name_->set_property ("text", markup);
+ if (make_markup)
+ chord_name_->set_property ("text", markup);
+ else if (Text_interface::is_markup (maybe_markup))
+ markup = maybe_markup;
SCM chord_changes = get_property ("chordChanges");
if (to_boolean (chord_changes) && scm_is_pair (last_chord_)
- && ly_is_equal (chord_as_scm, last_chord_))
+ && ly_is_equal (markup, last_chord_))
chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T);
- last_chord_ = chord_as_scm;
+ last_chord_ = markup;
}
IMPLEMENT_TRANSLATOR_LISTENER (Chord_name_engraver, note);
Stencil out = fm->find_by_name (glyph);
if (out.is_empty ())
me->warning (_f ("clef `%s' not found", glyph.c_str ()));
+
return out.smobbed_copy ();
}
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
scm_puts ("#<Context_def ", port);
scm_display (me->context_name_, port);
+ scm_puts (" ", port);
+ string loc = me->origin ()->location_string ();
+ scm_puts (loc.c_str (), port);
scm_puts (">", port);
return 1;
}
cfg.remove_collision (p);
cfg[p] = dp;
- if (Staff_symbol_referencer::on_line (dp.dot_, p))
+ if (Staff_symbol_referencer::on_line (dp.dot_, p) &&
+ dp.dot_->get_property ("style") != ly_symbol2scm ("kievan"))
cfg.remove_collision (p);
}
Dot_formatting_problem::Dot_formatting_problem (vector<Box> const &boxes,
Interval base_x)
- : head_skyline_ (boxes, 0.2, Y_AXIS, RIGHT)
+ : head_skyline_ (boxes, Y_AXIS, RIGHT)
{
best_ = 0;
head_skyline_.set_minimum_height (base_x[RIGHT]);
DECLARE_ACKNOWLEDGER (note_column);
DECLARE_ACKNOWLEDGER (slur);
DECLARE_END_ACKNOWLEDGER (slur);
- DECLARE_ACKNOWLEDGER (tie);
+ DECLARE_END_ACKNOWLEDGER (tie);
DECLARE_ACKNOWLEDGER (bass_figure_alignment);
DECLARE_END_ACKNOWLEDGER (bass_figure_alignment);
}
void
-Figured_bass_position_engraver::acknowledge_tie (Grob_info info)
+Figured_bass_position_engraver::acknowledge_end_tie (Grob_info info)
{
support_.push_back (info.grob ());
}
ADD_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
-ADD_ACKNOWLEDGER (Figured_bass_position_engraver, tie);
+ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, tie);
ADD_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2012 Mike Solomon <mike@mikesolomon.org>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "engraver.hh"
+#include "side-position-interface.hh"
+#include "pointer-group-interface.hh"
+#include "fingering-column.hh"
+#include "item.hh"
+
+#include "translator.icc"
+
+/**
+ Find potentially colliding scripts, and put them in a
+ Fingering_column, that will fix the collisions. */
+class Fingering_column_engraver : public Engraver
+{
+ Drul_array<Grob *> fingering_columns_;
+ Drul_array<vector<Grob *> > scripts_;
+ vector<Grob *> possibles_;
+
+public:
+ TRANSLATOR_DECLARATIONS (Fingering_column_engraver);
+protected:
+ DECLARE_ACKNOWLEDGER (finger);
+ void process_acknowledged ();
+ void stop_translation_timestep ();
+};
+
+Fingering_column_engraver::Fingering_column_engraver ()
+{
+ for (LEFT_and_RIGHT (d))
+ fingering_columns_[d] = 0;
+}
+
+void
+Fingering_column_engraver::stop_translation_timestep ()
+{
+ for (vsize i = 0; i < possibles_.size (); i++)
+ if (!Item::is_non_musical (possibles_[i]))
+ {
+ if (Side_position_interface::get_axis (possibles_[i]) == X_AXIS)
+ {
+ Direction d = robust_scm2dir (possibles_[i]->get_property ("direction"), CENTER);
+ if (d)
+ scripts_[d].push_back (possibles_[i]);
+ else
+ possibles_[i]->warning ("Cannot add a fingering without a direction.");
+ }
+ }
+
+ for (LEFT_and_RIGHT (d))
+ {
+ if (scripts_[d].size () < 2 && fingering_columns_[d])
+ {
+ fingering_columns_[d]->suicide ();
+ fingering_columns_[d] = 0;
+ }
+ if (fingering_columns_[d])
+ {
+ for (vsize i = 0; i < scripts_[d].size (); i++)
+ Fingering_column::add_fingering (fingering_columns_[d], scripts_[d][i]);
+
+ }
+ scripts_[d].clear ();
+ fingering_columns_[d] = 0;
+ }
+ possibles_.clear ();
+}
+
+void
+Fingering_column_engraver::acknowledge_finger (Grob_info inf)
+{
+ Item *thing = dynamic_cast<Item *> (inf.grob ());
+ if (thing)
+ possibles_.push_back (thing);
+}
+
+void
+Fingering_column_engraver::process_acknowledged ()
+{
+ for (LEFT_and_RIGHT (d))
+ {
+ if (possibles_.size () > 1 && !fingering_columns_[d])
+ fingering_columns_[d] = make_item ("FingeringColumn", SCM_EOL);
+ }
+}
+
+ADD_ACKNOWLEDGER (Fingering_column_engraver, finger);
+ADD_TRANSLATOR (Fingering_column_engraver,
+ /* doc */
+ "Find potentially colliding scripts and put them into a"
+ " @code{FingeringColumn} object; that will fix the collisions.",
+
+ /* create */
+ "FingeringColumn ",
+
+ /* read */
+ "",
+
+ /* write */
+ ""
+ );
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2012 Mike Solomon <mike@mikesolomon.org>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "grob.hh"
+#include "fingering-column.hh"
+#include "pointer-group-interface.hh"
+#include "staff-symbol-referencer.hh"
+#include "item.hh"
+#include "paper-column.hh"
+
+#include <map>
+
+MAKE_SCHEME_CALLBACK (Fingering_column, calc_positioning_done, 1);
+SCM
+Fingering_column::calc_positioning_done (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ Real padding = robust_scm2double (me->get_property ("padding"), 0.0);
+ if (!me->is_live ())
+ return SCM_BOOL_T;
+
+ map<Grob *, bool> shifted;
+
+ Real ss = Staff_symbol_referencer::staff_space (me);
+
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
+ extract_grob_set (me, "fingerings", const_fingerings);
+
+ if (const_fingerings.size () < 2)
+ {
+ me->programming_error ("This FingeringColumn should have never been created.");
+ return SCM_BOOL_T;
+ }
+
+ // order the fingerings from bottom to top
+ vector<Grob *> fingerings;
+ for (vsize i = 0; i < const_fingerings.size (); i++)
+ fingerings.push_back (const_fingerings[i]);
+
+ vector_sort (fingerings, pure_position_less);
+
+ Grob *common[2] = {common_refpoint_of_array (fingerings, me, X_AXIS),
+ common_refpoint_of_array (fingerings, me, Y_AXIS)};
+
+ for (vsize i = 0; i < fingerings.size (); i++)
+ fingerings[i]->translate_axis (-fingerings[i]->extent (common[Y_AXIS], Y_AXIS).length () / 2, Y_AXIS);
+
+ for (vsize i = min (fingerings.size () - 1, fingerings.size () / 2 + 1); i >= 1; i--)
+ for (vsize j = i; j--;)
+ {
+ Interval ex_i = fingerings[i]->extent (common[X_AXIS], X_AXIS);
+ Interval ex_j = fingerings[j]->extent (common[X_AXIS], X_AXIS);
+ Interval ey_i = fingerings[i]->extent (common[Y_AXIS], Y_AXIS);
+ Interval ey_j = fingerings[j]->extent (common[Y_AXIS], Y_AXIS);
+ Real tval = min (0.0, (ey_i[DOWN] - ey_j[UP] - padding) / 2);
+ if (tval != 0.0 && !intersection (ex_i, ex_j).is_empty ())
+ {
+ if (shifted[fingerings[i]] || shifted[fingerings[j]])
+ fingerings[j]->translate_axis (tval * 2, Y_AXIS);
+ else
+ {
+ fingerings[i]->translate_axis (-tval, Y_AXIS);
+ fingerings[j]->translate_axis (tval, Y_AXIS);
+ }
+ shifted[fingerings[i]] = true;
+ shifted[fingerings[j]] = true;
+ }
+ }
+
+ for (vsize i = fingerings.size () / 2 - 1; i < fingerings.size () - 1; i++)
+ for (vsize j = i + 1; j < fingerings.size (); j++)
+ {
+ Interval ex_i = fingerings[i]->extent (common[X_AXIS], X_AXIS);
+ Interval ex_j = fingerings[j]->extent (common[X_AXIS], X_AXIS);
+ Interval ey_i = fingerings[i]->extent (common[Y_AXIS], Y_AXIS);
+ Interval ey_j = fingerings[j]->extent (common[Y_AXIS], Y_AXIS);
+ Real tval = max (0.0, (ey_i[UP] - ey_j[DOWN] + padding) / 2);
+ if (tval != 0.0 && !intersection (ex_i, ex_j).is_empty ())
+ {
+ if (shifted[fingerings[i]] || shifted[fingerings[j]])
+ fingerings[j]->translate_axis (tval * 2, Y_AXIS);
+ else
+ {
+ fingerings[i]->translate_axis (-tval, Y_AXIS);
+ fingerings[j]->translate_axis (tval, Y_AXIS);
+ }
+ shifted[fingerings[i]] = true;
+ shifted[fingerings[j]] = true;
+ }
+ }
+
+
+ return SCM_BOOL_T;
+}
+
+void
+Fingering_column::add_fingering (Grob *fc, Grob *f)
+{
+ Pointer_group_interface::add_grob (fc, ly_symbol2scm ("fingerings"), f);
+ f->set_parent (fc, X_AXIS);
+ f->set_property ("Y-offset", Grob::x_parent_positioning_proc);
+}
+
+ADD_INTERFACE (Fingering_column,
+ "Makes sure that fingerings placed laterally"
+ " do not collide.",
+
+ /* properties */
+ "padding "
+ "positioning-done "
+ );
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
+ DECLARE_SCHEME_CALLBACK (glyph_name, (SCM));
DECLARE_SCHEME_CALLBACK (width, (SCM));
DECLARE_SCHEME_CALLBACK (calc_y_offset, (SCM));
DECLARE_SCHEME_CALLBACK (pure_calc_y_offset, (SCM, SCM, SCM));
return ly_interval2scm (sten->extent (X_AXIS) - stem->extent (stem, X_AXIS)[RIGHT]);
}
-MAKE_SCHEME_CALLBACK (Flag, print, 1);
+
+MAKE_SCHEME_CALLBACK (Flag, glyph_name, 1);
SCM
-Flag::print (SCM smob)
+Flag::glyph_name (SCM smob)
{
Grob *me = unsmob_grob (smob);
Grob *stem = me->get_parent (X_AXIS);
if (scm_is_symbol (flag_style_scm))
flag_style = ly_symbol2string (flag_style_scm);
- if (flag_style == "no-flag")
- return Stencil ().smobbed_copy ();
-
bool adjust = true;
string staffline_offs;
char dir = (d == UP) ? 'u' : 'd';
string font_char = flag_style
+ to_string (dir) + staffline_offs + to_string (log);
+ return ly_string2scm ("flags." + font_char);
+}
+
+MAKE_SCHEME_CALLBACK (Flag, print, 1);
+SCM
+Flag::print (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ Grob *stem = me->get_parent (X_AXIS);
+
+ Direction d = get_grob_direction (stem);
+ string flag_style;
+
+ SCM flag_style_scm = me->get_property ("style");
+ if (scm_is_symbol (flag_style_scm))
+ flag_style = ly_symbol2string (flag_style_scm);
+
+ if (flag_style == "no-flag")
+ return Stencil ().smobbed_copy ();
+
+ char dir = (d == UP) ? 'u' : 'd';
Font_metric *fm = Font_interface::get_default_font (me);
- Stencil flag = fm->find_by_name ("flags." + font_char);
+ string font_char = robust_scm2string (me->get_property ("glyph-name"), "");
+ Stencil flag = fm->find_by_name (font_char);
if (flag.is_empty ())
me->warning (_f ("flag `%s' not found", font_char));
Real blot
= me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
- Real y2 = pure
- ? stem->pure_height (stem, 0, INT_MAX)[d]
- : stem->extent (stem, Y_AXIS)[d];
+ Interval stem_extent = pure
+ ? stem->pure_height (stem, 0, INT_MAX)
+ : stem->extent (stem, Y_AXIS);
- return scm_from_double (y2 - d * blot / 2);
+ return scm_from_double (stem_extent.is_empty ()
+ ? 0.0
+ : stem_extent[d] - d * blot / 2);
}
MAKE_SCHEME_CALLBACK (Flag, calc_x_offset, 1);
" @code{'no-flag}, which switches off the flag.",
/* properties */
+ "glyph-name "
"style "
"stroke-style "
);
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "freetype.hh"
#include "warn.hh"
+#include <freetype/ftoutln.h>
+#include <freetype/ftbbox.h>
+
FT_Library freetype2_library;
void
error ("cannot initialize FreeType");
}
+Box
+ly_FT_get_unscaled_indexed_char_dimensions (FT_Face const &face, size_t signed_idx)
+{
+ FT_UInt idx = FT_UInt (signed_idx);
+ FT_Load_Glyph (face, idx, FT_LOAD_NO_SCALE);
+
+ FT_Glyph_Metrics m = face->glyph->metrics;
+ FT_Pos hb = m.horiBearingX;
+ FT_Pos vb = m.horiBearingY;
+
+ // is this viable for all grobs?
+ return Box (Interval (Real (hb), Real (hb + m.width)),
+ Interval (Real (vb - m.height), Real (vb)));
+}
+
+SCM
+box_to_scheme_lines (Box b)
+{
+ return scm_list_4 (scm_list_4 (scm_from_double (b[X_AXIS][LEFT]),
+ scm_from_double (b[Y_AXIS][DOWN]),
+ scm_from_double (b[X_AXIS][RIGHT]),
+ scm_from_double (b[Y_AXIS][DOWN])),
+ scm_list_4 (scm_from_double (b[X_AXIS][RIGHT]),
+ scm_from_double (b[Y_AXIS][DOWN]),
+ scm_from_double (b[X_AXIS][RIGHT]),
+ scm_from_double (b[Y_AXIS][UP])),
+ scm_list_4 (scm_from_double (b[X_AXIS][RIGHT]),
+ scm_from_double (b[Y_AXIS][UP]),
+ scm_from_double (b[X_AXIS][LEFT]),
+ scm_from_double (b[Y_AXIS][UP])),
+ scm_list_4 (scm_from_double (b[X_AXIS][LEFT]),
+ scm_from_double (b[Y_AXIS][UP]),
+ scm_from_double (b[X_AXIS][LEFT]),
+ scm_from_double (b[Y_AXIS][DOWN])));
+}
+
+Box
+ly_FT_get_glyph_outline_bbox (FT_Face const &face, size_t signed_idx)
+{
+ FT_UInt idx = FT_UInt (signed_idx);
+ FT_Load_Glyph (face, idx, FT_LOAD_NO_SCALE);
+
+ if (!(face->glyph->format == FT_GLYPH_FORMAT_OUTLINE))
+ {
+#if 0
+ // will generate a lot of warnings
+ warning ("Cannot make glyph outline");
+#endif
+ return Box (Interval (infinity_f, -infinity_f), Interval (infinity_f, -infinity_f));
+ }
+ FT_Outline *outline;
+ outline = &(face->glyph->outline);
+
+ FT_BBox bbox;
+ FT_Outline_Get_BBox (outline, &bbox);
+
+ return Box (Interval (bbox.xMin, bbox.xMax), Interval (bbox.yMin, bbox.yMax));
+}
+
+SCM
+ly_FT_get_glyph_outline (FT_Face const &face, size_t signed_idx)
+{
+ FT_UInt idx = FT_UInt (signed_idx);
+ FT_Load_Glyph (face, idx, FT_LOAD_NO_SCALE);
+
+ if (!(face->glyph->format == FT_GLYPH_FORMAT_OUTLINE))
+ {
+#if 0
+ // will generate a lot of warnings
+ warning ("Cannot make glyph outline");
+#endif
+ return box_to_scheme_lines (ly_FT_get_unscaled_indexed_char_dimensions (face, signed_idx));
+ }
+
+ FT_Outline *outline;
+ outline = &(face->glyph->outline);
+ SCM out = SCM_EOL;
+ Offset lastpos;
+ Offset firstpos;
+ vsize j = 0;
+ while (j < outline->n_points)
+ {
+ if (j == 0)
+ {
+ firstpos = Offset (outline->points[j].x, outline->points[j].y);
+ lastpos = firstpos;
+ j++;
+ }
+ else if (outline->tags[j] & 1)
+ {
+ // it is a line
+ out = scm_cons (scm_list_4 (scm_from_double (lastpos[X_AXIS]),
+ scm_from_double (lastpos[Y_AXIS]),
+ scm_from_double (outline->points[j].x),
+ scm_from_double (outline->points[j].y)),
+ out);
+ lastpos = Offset (outline->points[j].x, outline->points[j].y);
+ j++;
+ }
+ else if (outline->tags[j] & 2)
+ {
+ // it is a third order bezier
+ out = scm_cons (scm_list_n (scm_from_double (lastpos[X_AXIS]),
+ scm_from_double (lastpos[Y_AXIS]),
+ scm_from_double (outline->points[j].x),
+ scm_from_double (outline->points[j].y),
+ scm_from_double (outline->points[j + 1].x),
+ scm_from_double (outline->points[j + 1].y),
+ scm_from_double (outline->points[j + 2].x),
+ scm_from_double (outline->points[j + 2].y),
+ SCM_UNDEFINED),
+ out);
+ lastpos = Offset (outline->points[j + 2].x, outline->points[j + 2].y);
+ j += 3;
+ }
+ else
+ {
+ // it is a second order bezier
+ Real x0 = lastpos[X_AXIS];
+ Real x1 = outline->points[j].x;
+ Real x2 = outline->points[j + 1].x;
+
+ Real y0 = lastpos[Y_AXIS];
+ Real y1 = outline->points[j].y;
+ Real y2 = outline->points[j + 1].y;
+
+ Real qx2 = x0 + x2 - (2 * x1);
+ Real qx1 = (2 * x1) - (2 * x0);
+ Real qx0 = x0;
+
+ Real qy2 = y0 + y2 - (2 * y1);
+ Real qy1 = (2 * y1) - (2 * y0);
+ Real qy0 = y0;
+
+ Real cx0 = qx0;
+ Real cx1 = qx0 + (qx1 / 3);
+ Real cx2 = qx0 + (2 * qx1 / 3) + (qx2 / 3);
+ Real cx3 = qx0 + qx1 + qx2;
+
+ Real cy0 = qy0;
+ Real cy1 = qy0 + (qy1 / 3);
+ Real cy2 = qy0 + (2 * qy1 / 3) + (qy2 / 3);
+ Real cy3 = qy0 + qy1 + qy2;
+
+ out = scm_cons (scm_list_n (scm_from_double (cx0),
+ scm_from_double (cy0),
+ scm_from_double (cx1),
+ scm_from_double (cy1),
+ scm_from_double (cx2),
+ scm_from_double (cy2),
+ scm_from_double (cx3),
+ scm_from_double (cy3),
+ SCM_UNDEFINED),
+ out);
+ lastpos = Offset (outline->points[j + 1].x, outline->points[j + 1].y);
+ j += 2;
+ }
+ }
+
+ // just in case, close the figure
+ out = scm_cons (scm_list_4 (scm_from_double (lastpos[X_AXIS]),
+ scm_from_double (lastpos[Y_AXIS]),
+ scm_from_double (firstpos[X_AXIS]),
+ scm_from_double (firstpos[Y_AXIS])),
+ out);
+
+ out = scm_reverse_x (out, SCM_EOL);
+ return out;
+}
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "file-path.hh"
+#include "main.hh"
+
+/*
+ * Global options that can be overridden through command line.
+ */
+
+/* Names of header fields to be dumped to a separate file. */
+vector<string> dump_header_fieldnames_global;
+
+/* Name of initialisation file. */
+string init_name_global;
+
+/* Output formats to generate. */
+string output_format_global = "";
+
+/* Current output name. */
+string output_name_global;
+
+/* Run in safe mode? */
+bool be_safe_global = false;
+
+/* Scheme code to execute before parsing, after .scm init.
+ This is where -e arguments are appended to. */
+string init_scheme_code_global;
+string init_scheme_variables_global;
+
+bool relocate_binary = true;
+
+/*
+ * Miscellaneous global stuff.
+ */
+File_path global_path;
+
+/* Where the init files live. Typically:
+ LILYPOND_DATADIR = /usr/share/lilypond
+*/
+string lilypond_datadir;
+
+vector<string> start_environment_global;
grob_property_callback_stack = scm_cdr (grob_property_callback_stack);
#endif
- /*
- If the function returns SCM_UNSPECIFIED, we assume the
- property has been set with an explicit set_property ()
- call.
- */
if (value == SCM_UNSPECIFIED)
{
value = get_property_data (sym);
assert (value == SCM_EOL || value == marker);
if (value == marker)
- *alist = scm_assq_remove_x (*alist, marker);
+ *alist = scm_assq_remove_x (*alist, sym);
}
else
{
return ly_bool2scm (Grob::vertical_less (ga, gb));
}
+
+LY_DEFINE (ly_grob_get_vertical_axis_group_index, "ly:grob-get-vertical-axis-group-index",
+ 1, 0, 0, (SCM grob),
+ "Get the index of the vertical axis group the grob @var{grob} belongs to;"
+ " return @code{-1} if none is found.")
+{
+ Grob *gr = unsmob_grob (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+
+ return scm_from_int (Grob::get_vertical_axis_group_index (gr));
+}
\ No newline at end of file
#include "grob.hh"
#include <cstring>
+#include <set>
#include "align-interface.hh"
#include "axis-group-interface.hh"
set_property ("X-extent", Grob::stencil_width_proc);
if (get_property_data ("Y-extent") == SCM_EOL)
set_property ("Y-extent", Grob::stencil_height_proc);
+ if (get_property_data ("vertical-skylines") == SCM_EOL)
+ set_property ("vertical-skylines", Grob::simple_vertical_skylines_from_stencil_proc);
+ if (get_property_data ("horizontal-skylines") == SCM_EOL)
+ set_property ("horizontal-skylines", Grob::simple_horizontal_skylines_from_stencil_proc);
}
Grob::Grob (Grob const &s)
}
// We never want nan, so we avoid shifting infinite values.
- for (LEFT_and_RIGHT (d))
- if (!isinf (real_ext[d]))
- real_ext[d] += offset;
+ if(!isinf (offset))
+ real_ext.translate(offset);
+ else
+ this->warning(_f ("ignored infinite %s-offset",
+ a == X_AXIS ? "X" : "Y"));
return real_ext;
}
"color "
"cross-staff "
"id "
- "extra-X-extent "
- "extra-Y-extent "
"extra-offset "
"footnote-music "
"forced-spacing "
+ "horizontal-skylines "
"interfaces "
"layer "
"meta "
"outside-staff-priority "
"pure-Y-offset-in-progress "
"rotation "
+ "skyline-horizontal-padding "
"springs-and-rods "
"staff-symbol "
"stencil "
"transparent "
+ "vertical-skylines "
"whiteout "
);
return common;
}
+Grob *
+common_refpoint_of_array (set<Grob *> const &arr, Grob *common, Axis a)
+{
+ set<Grob *>::iterator it;
+
+ for (it = arr.begin (); it != arr.end (); it++)
+ if (common)
+ common = common->common_refpoint (*it, a);
+ else
+ common = *it;
+
+ return common;
+}
+
Interval
robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
{
broken[d] = bounds[d]->break_status_dir () != CENTER;
}
- broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT);
- broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT)->is_live ();
-
if (broken[RIGHT])
{
Spanner *next = me->broken_neighbor (RIGHT);
- Stencil *s = next->get_stencil ();
- if (!s || s->is_empty ())
+ // Hairpin-parts suicide in after-line-breaking if they need not be drawn
+ if (next)
+ {
+ (void) next->get_property ("after-line-breaking");
+ broken[RIGHT] = next->is_live ();
+ }
+ else
broken[RIGHT] = false;
}
+++ /dev/null
-# lily/include/Makefile
-
-depth = ../..
-STEPMAKE_TEMPLATES=c++
-
-include $(depth)/make/stepmake.make
-
-
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (height, (SCM));
DECLARE_SCHEME_CALLBACK (width, (SCM));
+ DECLARE_SCHEME_CALLBACK (horizontal_skylines, (SCM));
DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
DECLARE_GROB_INTERFACE ();
static string get_fontcharname (string style, int alteration);
- static vector<Box> accurate_boxes (Grob *me, Grob **common);
static SCM get_stencil (Grob *me);
};
#include "grob-interface.hh"
#include "skyline.hh"
-struct Axis_group_interface
+class Axis_group_interface
{
+ static Real default_outside_staff_padding_;
+ public
+:
static SCM generic_group_extent (Grob *me, Axis a);
+ static Real get_default_outside_staff_padding ();
static Interval generic_bound_extent (Grob *me, Grob *common, Axis a);
static Interval pure_group_height (Grob *me, int start, int end);
DECLARE_SCHEME_CALLBACK (width, (SCM smob));
static Interval rest_of_line_pure_height (Grob *me, int, int);
static Interval part_of_line_pure_height (Grob *me, bool begin, int, int);
- static bool has_outside_staff_parent (Grob *me);
+ static Grob *outside_staff_ancestor (Grob *me);
static Skyline_pair skyline_spacing (Grob *me, vector<Grob *> elements);
static void add_element (Grob *me, Grob *);
static void set_axes (Grob *, Axis, Axis);
void score_slope_direction (Beam_configuration *config) const;
void score_slope_musical (Beam_configuration *config) const;
void score_stem_lengths (Beam_configuration *config) const;
- void generate_quants (vector<Beam_configuration *>* scores) const;
+ void generate_quants (vector<Beam_configuration *> *scores) const;
void score_collisions (Beam_configuration *config) const;
};
DECLARE_SCHEME_CALLBACK (rest_collision_callback, (SCM element, SCM prev_off));
DECLARE_SCHEME_CALLBACK (pure_rest_collision_callback, (SCM element, SCM, SCM, SCM prev_off));
DECLARE_SCHEME_CALLBACK (print, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_beam_gap, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_springs_and_rods, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_minimum_length, (SCM));
DECLARE_SCHEME_CALLBACK (calc_beaming, (SCM));
DECLARE_SCHEME_CALLBACK (calc_stem_shorten, (SCM));
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
private:
friend class Beam_scoring_problem;
+ static bool whole_note_close_chord_tremolo (Grob *me);
static Direction get_default_dir (Grob *);
static vector<Beam_segment> get_beam_segments (Grob *);
static void set_stem_directions (Grob *, Direction);
Polynomial polynomial (Axis)const;
Offset curve_point (Real t) const;
+ Real slope_at_point (Real t) const;
Real curve_coordinate (Real t, Axis) const;
static const int CONTROL_COUNT = 4;
Interval y () const {return interval_a_[Y_AXIS]; }
Interval operator [] (Axis a) const;
Interval &operator [] (Axis a);
+ Real area () const;
Offset center () const;
Box (Interval ix, Interval iy);
};
+DECLARE_UNSMOB (Box, box);
+
#endif
Real combine_demerits (Real force, Real prev_force);
bool calc_subproblem (vsize start, vsize systems, vsize max_break_index);
- void fill_line_details (Line_details *const, vsize, vsize);
+ void fill_line_details (Line_details *, vsize, vsize);
};
#endif /* CONSTRAINED_BREAKING_HH */
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 1999--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef FINGERING_COLUMN_HH
+#define FINGERING_COLUMN_HH
+
+#include "lily-proto.hh"
+#include "grob-interface.hh"
+#include "std-vector.hh"
+
+struct Fingering_column
+{
+ static void add_fingering (Grob *, Grob *);
+ DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
+ DECLARE_GROB_INTERFACE ();
+};
+
+#endif /* FINGERING_COLUMN_HH */
#include FT_FREETYPE_H
#include "std-string.hh"
+#include "box.hh"
void init_freetype ();
extern FT_Library freetype2_library;
string freetype_error_string (FT_Error code);
+SCM box_to_scheme_lines (Box b);
+Box ly_FT_get_unscaled_indexed_char_dimensions (FT_Face const &face, size_t signed_idx);
+Box ly_FT_get_glyph_outline_bbox (FT_Face const &face, size_t signed_idx);
+SCM ly_FT_get_glyph_outline (FT_Face const &face, size_t signed_idx);
+
#endif /* FREETYPE_HH */
#include "dimension-cache.hh"
#include "grob-interface.hh"
+#include <set>
+
class Grob
{
private:
DECLARE_SCHEME_CALLBACK (y_parent_positioning, (SCM));
DECLARE_SCHEME_CALLBACK (stencil_height, (SCM smob));
DECLARE_SCHEME_CALLBACK (stencil_width, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (simple_vertical_skylines_from_stencil, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (vertical_skylines_from_stencil, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (vertical_skylines_from_element_stencils, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (simple_horizontal_skylines_from_stencil, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (horizontal_skylines_from_stencil, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (horizontal_skylines_from_element_stencils, (SCM smob));
/* R/O access */
Output_def *layout () const { return layout_; }
void fixup_refpoint ();
/* vertical ordering */
+ static bool internal_vertical_less (Grob *g1, Grob *g2, bool pure);
static Grob *get_root_vertical_alignment (Grob *g);
static Grob *get_vertical_axis_group (Grob *g);
static bool vertical_less (Grob *g1, Grob *g2);
static bool pure_vertical_less (Grob *g1, Grob *g2);
- static bool internal_vertical_less (Grob *g1, Grob *g2, bool pure);
static int get_vertical_axis_group_index (Grob *g);
+ /* skylines */
virtual Interval_t<int> spanned_rank_interval () const;
virtual bool pure_is_visible (int start, int end) const;
bool check_cross_staff (Grob *common);
static bool less (Grob *g1, Grob *g2);
+ static SCM internal_simple_skylines_from_stencil (SCM, Axis);
+ static SCM internal_skylines_from_element_stencils (SCM, Axis);
};
/* smob utilities */
/* refpoints */
Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a);
Grob *common_refpoint_of_array (vector<Grob *> const &, Grob *, Axis a);
+Grob *common_refpoint_of_array (set<Grob *> const &, Grob *, Axis a);
System *get_root_system (Grob *me);
/* extents */
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
public:
SCM eval_scm_token (SCM sval) { return eval_scm (sval, '#'); }
SCM extra_tokens_;
- YYSTYPE *lexval_;
+ SCM *lexval_;
Input *lexloc_;
bool is_main_input_;
SCM keyword_list () const;
SCM lookup_identifier (string s);
SCM lookup_identifier_symbol (SCM s);
- void push_extra_token (int token_type, SCM scm = SCM_UNDEFINED);
+ void push_extra_token (int token_type, SCM scm = SCM_UNSPECIFIED);
void push_chord_state (SCM alist);
void push_figuredbass_state ();
void push_lyric_state ();
void clear ();
void do_init_file ();
- void do_yyparse ();
+ SCM do_yyparse ();
void include_string (string ly_code);
void parse_file (string init, string name, string out_name);
void parse_string (string ly_code);
void parser_error (string);
void parser_error (Input const &, string);
// The following is called as yyerror
- static void parser_error (Input const *i, Lily_parser *parser, string s);
+ static void parser_error (Input const *i, Lily_parser *parser, SCM *, string s);
void set_yydebug (bool);
SCM make_scope () const;
Real directed_round (Real f, Direction d);
+Offset get_point_in_y_direction (Offset orig, Real slope, Real dist, Direction dir);
Real peak_around (Real epsilon, Real threshold, Real x);
Real convex_amplifier (Real standard_x, Real increase_factor, Real x);
string camel_case_to_lisp_identifier (string in);
{
public:
Stencil text_stencil (Output_def *output_state, string, bool) const;
+ Real get_magnification () const;
static SCM make_scaled_font_metric (Font_metric *fm, Real magnification);
size_t count () const;
static SCM automatic_shift (Grob *, Drul_array<vector<Grob *> >);
static SCM forced_shift (Grob *);
+ static vector<int> note_head_positions (Grob *me);
static Drul_array<vector<Grob *> > get_clash_groups (Grob *me);
DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM smob));
static void add_column (Grob *me, Grob *ncol);
static bool has_rests (Grob *me);
static Grob *dot_column (Grob *me);
static Interval cross_staff_extent (Grob *me, Grob *refp);
+ static Interval accidental_width (Grob *me);
DECLARE_GROB_INTERFACE ();
static Item *get_stem (Grob *);
DECLARE_CLASSNAME (Open_type_font);
public:
+ Real get_units_per_EM () const;
SCM get_subfonts () const;
SCM get_global_table () const;
SCM get_char_table () const;
SCM glyph_list () const;
-
+ SCM get_glyph_outline (size_t signed_idx) const;
+ Box get_glyph_outline_bbox (size_t signed_idx) const;
string get_otf_table (string tag) const;
static SCM make_otf (string);
string font_name () const;
Offset attachment_point (string) const;
size_t count () const;
Box get_indexed_char_dimensions (size_t) const;
+ Box get_unscaled_indexed_char_dimensions (size_t) const;
size_t name_to_index (string) const;
//size_t glyph_name_to_charcode (string) const;
size_t index_to_charcode (size_t) const;
SCM font_file_name () const;
void register_font_file (string, string, int);
+ size_t name_to_index (string) const;
+ SCM get_glyph_outline (size_t signed_idx) const;
+ Box get_glyph_outline_bbox (size_t signed_idx) const;
+ Box get_unscaled_indexed_char_dimensions (size_t) const;
+ Box get_scaled_indexed_char_dimensions (size_t) const;
+
Stencil pango_item_string_stencil (PangoGlyphItem const *) const;
virtual Stencil text_stencil (Output_def *output_state,
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
DECLARE_SIMPLE_SMOBS (Skyline_pair);
public:
Skyline_pair ();
- Skyline_pair (vector<Box> const &boxes, Real horizon_padding, Axis a);
- Skyline_pair (Box const &, Real horizon_padding, Axis a);
+ Skyline_pair (vector<Box> const &boxes, Axis a);
+ Skyline_pair (vector<Drul_array<Offset> > const &buildings, Axis a);
+ Skyline_pair (vector<Skyline_pair> const &skypairs);
+ Skyline_pair (Box const &, Axis a);
+
+ Real left () const;
+ Real right () const;
void raise (Real);
void shift (Real);
- void insert (Box const &, Real horizon_padding, Axis);
+ void deholify ();
+ void insert (Box const &, Axis);
void merge (Skyline_pair const &other);
Skyline &operator [] (Direction d);
Skyline const &operator [] (Direction d) const;
struct Building
{
+ Real start_;
Real end_;
Real y_intercept_;
Real slope_;
void precompute (Real start, Real start_height, Real end_height, Real end);
Building (Real start, Real start_height, Real end_height, Real end);
- Building (Box const &b, Real horizon_padding, Axis a, Direction d);
+ Building (Box const &b, Axis a, Direction d);
void print () const;
Real height (Real x) const;
Real intersection_x (Building const &other) const;
void leading_part (Real chop);
bool conceals (Building const &other, Real x) const;
- Building sloped_neighbour (Real start, Real horizon_padding, Direction d) const;
+ Real shift_to_intersect (Real x, Real y) const;
};
class Skyline
list<Building> buildings_;
Direction sky_;
- void internal_merge_skyline (list<Building>*, list<Building>*,
- list<Building> *const result);
- list<Building> internal_build_skyline (list<Box>*, Real, Axis, Direction);
+ void internal_merge_skyline (list<Building> *, list<Building> *,
+ list<Building> *result) const;
+ list<Building> internal_build_skyline (list<Building> *) const;
+ Real internal_distance (Skyline const &, Real horizon_padding, Real *touch_point) const;
+ Real internal_distance (Skyline const &, Real *touch_point) const;
+ void normalize ();
DECLARE_SIMPLE_SMOBS (Skyline);
public:
Skyline ();
Skyline (Skyline const &src);
- Skyline (Skyline const &src, Real horizon_padding, Axis a);
Skyline (Direction sky);
- Skyline (vector<Box> const &bldgs, Real horizon_padding, Axis a, Direction sky);
- Skyline (Box const &b, Real horizon_padding, Axis a, Direction sky);
+ Skyline (vector<Box> const &bldgs, Axis a, Direction sky);
+ Skyline (vector<Drul_array<Offset> > const &bldgs, Axis a, Direction sky);
+ Skyline (vector<Skyline_pair> const &skypairs, Direction sky);
+ Skyline (Box const &b, Axis a, Direction sky);
vector<Offset> to_points (Axis) const;
+ void deholify ();
void merge (Skyline const &);
- void insert (Box const &, Real horizon_padding, Axis);
+ void insert (Box const &, Axis);
void print () const;
void print_points () const;
void raise (Real);
void shift (Real);
Real distance (Skyline const &, Real horizon_padding = 0) const;
Real touching_point (Skyline const &, Real horizon_padding = 0) const;
+ Real shift_to_avoid (Skyline const &other, Real, Direction d, Real horizon_padding = 0);
+ Real raise_to_avoid (Skyline const &other, Real, Direction d, Real horizon_padding = 0);
+ Drul_array<Real> shifts_to_avoid_intersection (Skyline const &, Real horizon_padding = 0) const;
+ Interval raises_to_avoid_intersection (Skyline const &, Real horizon_padding = 0) const;
Real height (Real airplane) const;
Real max_height () const;
Real max_height_position () const;
+ Real left () const;
+ Real right () const;
void set_minimum_height (Real height);
void clear ();
bool is_empty () const;
+ Skyline padded (Real horizon_padding) const;
DECLARE_SCHEME_CALLBACK (get_touching_point, (SCM, SCM, SCM));
DECLARE_SCHEME_CALLBACK (get_distance, (SCM, SCM, SCM));
DECLARE_SCHEME_CALLBACK (get_max_height, (SCM));
DECLARE_SCHEME_CALLBACK (get_max_height_position, (SCM));
DECLARE_SCHEME_CALLBACK (get_height, (SCM, SCM));
-
-protected:
- Real internal_distance (Skyline const &, Real horizon_padding, Real *touch_point) const;
};
extern bool debug_skylines;
static void add_column (Grob *me, Grob *col);
static void add_extra_encompass (Grob *me, Grob *col);
static void replace_breakable_encompass_objects (Grob *me);
- static void auxiliary_acknowledge_extra_object (Grob_info const &, vector<Grob *>&, vector<Grob *>&);
+ static void auxiliary_acknowledge_extra_object (Grob_info const &, vector<Grob *> &, vector<Grob *> &);
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (width, (SCM));
DECLARE_SCHEME_CALLBACK (calc_style, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
static Stencil raw_stencil (Grob *, Real slope, Direction stemdir);
static Real y_offset (Grob *, bool pure);
Box extent_box () const;
bool is_empty () const;
Stencil in_color (Real r, Real g, Real b) const;
+ static SCM skylines_from_stencil (SCM, Real, Axis);
};
DECLARE_UNSMOB (Stencil, stencil);
public:
Paper_score *paper_score () const;
- Grob *get_vertical_alignment ();
Grob *get_extremal_staff (Direction dir, Interval const &);
Grob *get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t<int> bounds);
Grob *get_pure_bound (Direction dir, int start, int end);
DECLARE_SCHEME_CALLBACK (footnotes_before_line_breaking, (SCM));
DECLARE_SCHEME_CALLBACK (footnotes_after_line_breaking, (SCM));
+ DECLARE_SCHEME_CALLBACK (vertical_skyline_elements, (SCM));
DECLARE_SCHEME_CALLBACK (calc_pure_relevant_grobs, (SCM));
DECLARE_SCHEME_CALLBACK (height, (SCM));
DECLARE_SCHEME_CALLBACK (calc_pure_height, (SCM, SCM, SCM));
DECLARE_SCHEME_CALLBACK (get_staves, (SCM));
DECLARE_SCHEME_CALLBACK (get_spaceable_staves, (SCM));
DECLARE_SCHEME_CALLBACK (get_nonspaceable_staves, (SCM));
+ DECLARE_SCHEME_CALLBACK (get_vertical_alignment, (SCM));
System (SCM);
System (System const &);
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
the cancellation signature.
*/
- int last_pos = -1000;
+ Slice pos, overlapping_pos;
SCM last_glyph_name = SCM_BOOL_F;
SCM padding_pairs = me->get_property ("padding-pairs");
me->warning (_ ("alteration not found"));
else
{
- SCM what = scm_caar (s);
-
- SCM proc = ly_lily_module_constant ("key-signature-interface::alteration-position");
-
- int pos = scm_to_int (scm_call_3 (proc, what, scm_cdar (s), c0s));
- acc.translate_axis (pos * inter, Y_AXIS);
-
+ SCM proc = ly_lily_module_constant ("key-signature-interface::alteration-positions");
+
+ pos.set_empty ();
+ Stencil column;
+ for (SCM pos_list = scm_call_3 (proc, scm_car (s), c0s, smob);
+ scm_is_pair (pos_list); pos_list = scm_cdr (pos_list))
+ {
+ int p = scm_to_int (scm_car (pos_list));
+ pos.add_point (p);
+ column.add_stencil (acc.translated (Offset (0, p * inter)));
+ }
/*
The natural sign (unlike flat & sharp)
has vertical edges on both sides. A little padding is
if (scm_is_pair (handle))
padding = robust_scm2double (scm_cdr (handle), 0.0);
else if (glyph_name == "accidentals.natural"
- && last_pos < pos + 2
- && last_pos > pos - 6)
+ && !intersection (overlapping_pos, pos).is_empty ())
padding += 0.3;
- mol.add_at_edge (X_AXIS, LEFT, acc, padding);
+ mol.add_at_edge (X_AXIS, LEFT, column, padding);
- last_pos = pos;
+ pos.widen (4);
+ overlapping_pos = pos + 2;
last_glyph_name = glyph_name_scm;
}
}
"alteration-alist "
"c0-position "
"glyph-name-alist "
+ "flat-positions "
+ "sharp-positions "
"padding "
"padding-pairs "
);
if (span_)
{
span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
- Pointer_group_interface::set_ordered (span_, ly_symbol2scm ("elements"), false);
span_ = 0;
}
}
Drul_array<Interval> const &previous_extents,
Item *current_column,
Item *previous_column,
- Real min_length_fraction)
+ Real min_length)
{
- Direction d = UP;
- do
+ for (UP_and_DOWN (d))
{
if (!current_extents[d].is_empty ()
&& !previous_extents[d].is_empty ())
{
- Real total_head_length = previous_extents[d].length ()
- + current_extents[d].length ();
-
Rod rod;
- rod.distance_ = total_head_length
- * (3 / 2 * min_length_fraction)
+ rod.distance_ = 2 * min_length
/*
we go from right to left.
*/
rod.add_to_cols ();
}
}
- while (flip (&d) != DOWN);
}
MAKE_SCHEME_CALLBACK (Ledger_line_spanner, set_spacing_rods, 1);
Drul_array<Interval> current_extents;
Drul_array<Interval> previous_extents;
+ Real current_head_width = 0.0;
Item *previous_column = 0;
Item *current_column = 0;
if (staff_extent.contains (pos))
continue;
+ /* Ambitus heads can appear out-of-order in heads[],
+ * but as part of prefatory matter, they need no rods */
+ if (h->internal_has_interface (ly_symbol2scm ("ambitus-interface")))
+ continue;
+
Item *column = h->get_column ();
if (current_column != column)
{
set_rods (current_extents, previous_extents,
current_column, previous_column,
- min_length_fraction);
+ current_head_width * min_length_fraction);
previous_column = current_column;
current_column = column;
current_extents[DOWN].set_empty ();
current_extents[UP].set_empty ();
+ current_head_width = 0.0;
}
Interval head_extent = h->extent (column, X_AXIS);
continue;
current_extents[vdir].unite (head_extent);
+ current_head_width = max (current_head_width, head_extent.length ());
}
if (previous_column && current_column)
set_rods (current_extents, previous_extents,
current_column, previous_column,
- min_length_fraction);
+ current_head_width * min_length_fraction);
return SCM_UNSPECIFIED;
}
-%{ // -*- mode: c++; c-file-style: "linux" -*-
+%{ // -*- mode: c++; c-file-style: "linux"; indent-tabs-mode: t -*-
/*
This file is part of LilyPond, the GNU music typesetter.
bool is_valid_version (string s);
-#define start_quote() \
- yy_push_state (quote);\
- yylval.string = new string
+#define start_quote() do { \
+ yy_push_state (quote); \
+ yylval = SCM_EOL; \
+ } while (0)
-#define start_lyric_quote() \
- yy_push_state (lyric_quote);\
- yylval.string = new string
+#define start_lyric_quote() do { \
+ yy_push_state (lyric_quote); \
+ yylval = SCM_EOL; \
+ } while (0)
#define yylval (*lexval_)
AA {A}|_
N [0-9]
ANY_CHAR (.|\n)
-PUNCT [][()?!:'`]
-SPECIAL_CHAR [&@]
-NATIONAL [\001-\006\021-\027\031\036]
-TEX {AA}|-|{PUNCT}|{NATIONAL}|{SPECIAL_CHAR}
WORD {A}([-_]{A}|{A})*
COMMAND \\{WORD}
HORIZONTALWHITE [ \t]
BLACK [^ \n\t\f\r]
RESTNAME [rs]
-LYRICS ({AA}|{TEX})[^0-9 \t\n\r\f]*
ESCAPED [nt\\'"]
EXTENDER __
HYPHEN --
/* produce requested token */
int type = scm_to_int (scm_caar (extra_tokens_));
- yylval.scm = scm_cdar (extra_tokens_);
+ yylval = scm_cdar (extra_tokens_);
extra_tokens_ = scm_cdr (extra_tokens_);
if (scm_is_null (extra_tokens_))
yy_pop_state ();
/* produce requested token */
int type = scm_to_int (scm_caar (extra_tokens_));
- yylval.scm = scm_cdar (extra_tokens_);
+ yylval = scm_cdar (extra_tokens_);
extra_tokens_ = scm_cdr (extra_tokens_);
if (scm_is_null (extra_tokens_))
yy_pop_state ();
SCM top_scope = scm_car (scm_last_pair (scopes_));
scm_module_define (top_scope, ly_symbol2scm ("version-seen"), SCM_BOOL_T);
- if (!is_valid_version (s))
+ if (!is_valid_version (s)) {
+ yylval = SCM_UNSPECIFIED;
return INVALID;
-
-
+ }
}
<sourcefilename>\"[^""]*\" {
string s (YYText_utf8 () + 1);
<chords,notes,figures>{RESTNAME}/[-_] | // pseudo backup rule
<chords,notes,figures>{RESTNAME} {
char const *s = YYText ();
- yylval.scm = scm_from_locale_string (s);
+ yylval = scm_from_locale_string (s);
return RESTNAME;
}
<chords,notes,figures>q/[-_] | // pseudo backup rule
<chords,notes,figures>q {
+ yylval = SCM_UNSPECIFIED;
return CHORD_REPETITION;
}
<chords,notes,figures>R/[-_] | // pseudo backup rule
<chords,notes,figures>R {
+ yylval = SCM_UNSPECIFIED;
return MULTI_MEASURE_REST;
}
<INITIAL,chords,figures,lyrics,markup,notes># { //embedded scm
}
char_count_stack_.back () += n;
- yylval.scm = sval;
+ yylval = sval;
return SCM_TOKEN;
}
sval = eval_scm (sval, '$');
int token = scan_scm_id (sval);
- if (!scm_is_eq (yylval.scm, SCM_UNSPECIFIED))
+ if (!scm_is_eq (yylval, SCM_UNSPECIFIED))
return token;
}
<INITIAL,notes,lyrics>{
\<\< {
+ yylval = SCM_UNSPECIFIED;
return DOUBLE_ANGLE_OPEN;
}
\>\> {
+ yylval = SCM_UNSPECIFIED;
return DOUBLE_ANGLE_CLOSE;
}
}
<INITIAL,notes>{
\< {
+ yylval = SCM_UNSPECIFIED;
return ANGLE_OPEN;
}
\> {
+ yylval = SCM_UNSPECIFIED;
return ANGLE_CLOSE;
}
}
<figures>{
_ {
+ yylval = SCM_UNSPECIFIED;
return FIGURE_SPACE;
}
\> {
+ yylval = SCM_UNSPECIFIED;
return FIGURE_CLOSE;
}
\< {
+ yylval = SCM_UNSPECIFIED;
return FIGURE_OPEN;
}
}
return scan_escaped_word (YYText_utf8 () + 1);
}
{FRACTION} {
- yylval.scm = scan_fraction (YYText ());
+ yylval = scan_fraction (YYText ());
return FRACTION;
}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
- yylval.scm = scm_c_read_string (YYText ());
+ yylval = scm_c_read_string (YYText ());
return UNSIGNED;
}
{E_UNSIGNED} {
- yylval.i = String_convert::dec2int (string (YYText () +1));
+ yylval = scm_c_read_string (YYText () + 1);
return E_UNSIGNED;
}
}
<quote,lyric_quote>{
\\{ESCAPED} {
- *yylval.string += to_string (escaped_char (YYText ()[1]));
+ char c = escaped_char (YYText ()[1]);
+ yylval = scm_cons (scm_from_locale_stringn (&c, 1),
+ yylval);
}
[^\\""]+ {
- *yylval.string += YYText_utf8 ();
+ yylval = scm_cons (scm_from_locale_string (YYText_utf8 ()),
+ yylval);
}
\" {
yy_pop_state ();
/* yylval is union. Must remember STRING before setting SCM*/
- string *sp = yylval.string;
- yylval.scm = ly_string2scm (*sp);
- delete sp;
+
+ yylval = scm_string_concatenate_reverse (yylval,
+ SCM_UNDEFINED,
+ SCM_UNDEFINED);
+
return is_lyric_state () ? LYRICS_STRING : STRING;
}
\\ {
- *yylval.string += YYText ();
+ yylval = scm_cons (scm_from_locale_string (YYText ()),
+ yylval);
}
}
start_lyric_quote ();
}
{FRACTION} {
- yylval.scm = scan_fraction (YYText ());
+ yylval = scan_fraction (YYText ());
return FRACTION;
}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
- yylval.scm = scm_c_read_string (YYText ());
+ yylval = scm_c_read_string (YYText ());
return UNSIGNED;
}
{COMMAND}/[-_] | // backup rule
{COMMAND} {
return scan_escaped_word (YYText_utf8 () + 1);
}
- {LYRICS} {
+ /* Characters needed to express durations, assignments, barchecks */
+ [*.=|] {
+ yylval = SCM_UNSPECIFIED;
+ return YYText ()[0];
+ }
+ [^$#{}\"\\ \t\n\r\f0-9]+ {
/* ugr. This sux. */
- string s (YYText_utf8 ());
+ string s (YYText_utf8 ());
+ yylval = SCM_UNSPECIFIED;
if (s == "__")
- return yylval.i = EXTENDER;
+ return EXTENDER;
if (s == "--")
- return yylval.i = HYPHEN;
+ return HYPHEN;
s = lyric_fudge (s);
-
- char c = s[s.length () - 1];
- if (c == '{' || c == '}') // brace open is for not confusing dumb tools.
- here_input ().warning (
- _ ("Brace found at end of lyric. Did you forget a space?"));
- yylval.scm = ly_string2scm (s);
-
+ yylval = ly_string2scm (s);
return LYRICS_STRING;
}
+ /* This should really just cover {} */
. {
- return YYText ()[0]; // LYRICS already catches all multibytes.
+ yylval = SCM_UNSPECIFIED;
+ return YYText ()[0]; // above catches all multibytes.
}
}
<chords>{
return scan_escaped_word (YYText_utf8 () + 1);
}
{FRACTION} {
- yylval.scm = scan_fraction (YYText ());
+ yylval = scan_fraction (YYText ());
return FRACTION;
}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
- yylval.scm = scm_c_read_string (YYText ());
+ yylval = scm_c_read_string (YYText ());
return UNSIGNED;
}
- {
+ yylval = SCM_UNSPECIFIED;
return CHORD_MINUS;
}
: {
+ yylval = SCM_UNSPECIFIED;
return CHORD_COLON;
}
\/\+ {
+ yylval = SCM_UNSPECIFIED;
return CHORD_BASS;
}
\/ {
+ yylval = SCM_UNSPECIFIED;
return CHORD_SLASH;
}
\^ {
+ yylval = SCM_UNSPECIFIED;
return CHORD_CARET;
}
. {
+ yylval = SCM_UNSPECIFIED;
return YYText ()[0]; // WORD catches all multibyte.
}
}
<markup>{
\\score {
+ yylval = SCM_UNSPECIFIED;
return SCORE;
}
{COMMAND}/[-_] | // backup rule
// in reverse order, so the first token pushed in the
// loop will be EXPECT_NO_MORE_ARGS.
- yylval.scm = scm_car(s);
+ yylval = scm_car(s);
// yylval now contains the function to call as token
// value (for token type MARKUP_FUNCTION or
}
return token_type;
}
- [{}] {
- return YYText ()[0];
- }
[^$#{}\"\\ \t\n\r\f]+ {
string s (YYText_utf8 ());
- char c = s[s.length () - 1];
- /* brace open is for not confusing dumb tools. */
- if (c == '{' || c == '}')
- here_input ().warning (
- _ ("Brace found at end of markup. Did you forget a space?"));
- yylval.scm = ly_string2scm (s);
-
-
+ yylval = ly_string2scm (s);
return STRING;
}
. {
- return YYText()[0]; // Above is catchall for multibyte
+ yylval = SCM_UNSPECIFIED;
+ return YYText ()[0]; // Above is catchall for multibyte
}
}
<longcomment><<EOF>> {
LexerError (_ ("EOF found inside a comment").c_str ());
is_main_input_ = false; // should be safe , can't have \include in --safe.
+ yylval = SCM_UNSPECIFIED;
if (!close_input ())
yyterminate (); // can't move this, since it actually rets a YY_NULL
}
-<<EOF>> { if (is_main_input_)
+<<EOF>> {
+ yylval = SCM_UNSPECIFIED;
+ if (is_main_input_)
{
/* 2 = init.ly + current file.
> because we're before closing, but is_main_input_ should
}
{FRACTION} {
- yylval.scm = scan_fraction (YYText ());
+ yylval = scan_fraction (YYText ());
return FRACTION;
}
-{UNSIGNED} | // backup rule
{REAL} {
- yylval.scm = scm_c_read_string (YYText ());
+ yylval = scm_c_read_string (YYText ());
return REAL;
}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
- yylval.scm = scm_c_read_string (YYText ());
+ yylval = scm_c_read_string (YYText ());
return UNSIGNED;
}
[{}] {
-
+ yylval = SCM_UNSPECIFIED;
return YYText ()[0];
}
-/\. | // backup rule
[*:=] {
- char c = YYText ()[0];
-
- return c;
+ yylval = SCM_UNSPECIFIED;
+ return YYText ()[0];
}
<INITIAL,notes,figures>. {
+ yylval = SCM_UNSPECIFIED;
return YYText ()[0];
}
<INITIAL,lyrics,notes,figures>\\. {
+ yylval = SCM_UNSPECIFIED;
char c = YYText ()[1];
switch (c) {
<*>.[\200-\277]* {
string msg = _f ("invalid character: `%s'", YYText_utf8 ());
LexerError (msg.c_str ());
+ yylval = SCM_UNSPECIFIED;
return '%'; // Better not return half a utf8 character.
}
int
Lily_lexer::identifier_type (SCM sid)
{
- int k = try_special_identifiers (&yylval.scm , sid);
+ int k = try_special_identifiers (&yylval , sid);
return k >= 0 ? k : SCM_IDENTIFIER;
}
// SCM sym = ly_symbol2scm (str.c_str ());
+ yylval = SCM_UNSPECIFIED;
int i = lookup_keyword (str);
if (i == MARKUP && is_lyric_state ())
return LYRIC_MARKUP;
string msg (_f ("unknown escaped string: `\\%s'", str));
LexerError (msg.c_str ());
- yylval.scm = ly_string2scm (str);
+ yylval = ly_string2scm (str);
return STRING;
}
{
int funtype = SCM_FUNCTION;
- yylval.scm = sid;
+ yylval = sid;
SCM s = get_music_function_signature (sid);
SCM cs = scm_car (s);
}
return funtype;
}
- yylval.scm = sid;
+ yylval = sid;
return identifier_type (sid);
}
handle = scm_hashq_get_handle (scm_cdar (pitchname_tab_stack_), sym);
if (scm_is_pair (handle)) {
- yylval.scm = scm_cdr (handle);
- if (unsmob_pitch (yylval.scm))
+ yylval = scm_cdr (handle);
+ if (unsmob_pitch (yylval))
return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
- else if (scm_is_symbol (yylval.scm))
+ else if (scm_is_symbol (yylval))
return DRUM_PITCH;
}
else if ((YYSTATE == chords)
&& (handle = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
{
- yylval.scm = scm_cdr (handle);
+ yylval = scm_cdr (handle);
return CHORD_MODIFIER;
}
}
- yylval.scm = ly_string2scm (str);
+ yylval = ly_string2scm (str);
return STRING;
}
switch (extra_token) {
case '$':
token = scan_scm_id (scm_car (v));
- if (!scm_is_eq (yylval.scm, SCM_UNSPECIFIED))
- push_extra_token (token, yylval.scm);
+ if (!scm_is_eq (yylval, SCM_UNSPECIFIED))
+ push_extra_token (token, yylval);
break;
case '#':
push_extra_token (SCM_IDENTIFIER, scm_car (v));
OUT_FILE (unless IN_FILE redefines output file name). */
SCM mod = lexer_->set_current_scope ();
- do {
- do_yyparse ();
- } while (!lexer_->is_clean ());
+ do
+ {
+ do_yyparse ();
+ }
+ while (!lexer_->is_clean ());
/*
Don't mix cyclic pointers with weak tables.
SCM parser = lexer_->lookup_identifier_symbol (ly_symbol2scm ("parser"));
lexer_->set_identifier (ly_symbol2scm ("parser"), self_scm ());
lexer_->push_extra_token (EMBEDDED_LILY);
- do_yyparse ();
- SCM result = lexer_->lookup_identifier_symbol (ly_symbol2scm ("parseStringResult"));
- // parseStringResult is set in the grammar rule for embedded_lilypond
+ SCM result = do_yyparse ();
lexer_->set_identifier (ly_symbol2scm ("parser"), parser);
scm_set_current_module (mod);
}
Offset adjust = dz.direction () * Staff_symbol_referencer::staff_space (me);
-
Offset line_left = span_points[LEFT] + (arrows[LEFT] ? adjust * 1.4 : Offset (0, 0));
Offset line_right = span_points[RIGHT] - (arrows[RIGHT] ? adjust * 0.55 : Offset (0, 0));
+
if (line_right[X_AXIS] > line_left[X_AXIS])
{
line.add_stencil (Line_interface::line (me, line_left, line_right));
#include "line-interface.hh"
#include "warn.hh"
+#include "international.hh"
#include "dimensions.hh"
#include "bezier.hh"
#include "file-path.hh"
Stencil
Lookup::round_filled_box (Box b, Real blotdiameter)
{
- if (b.x ().length () < blotdiameter)
- blotdiameter = b.x ().length ();
- if (b.y ().length () < blotdiameter)
- blotdiameter = b.y ().length ();
+ Real width = b.x ().delta ();
+ blotdiameter = min (blotdiameter, width);
+ Real height = b.y ().delta ();
+ blotdiameter = min (blotdiameter, height);
+
+ if (blotdiameter < 0.0)
+ {
+ if (!isinf (blotdiameter))
+ warning (_f ("Not drawing a box with negative dimension, %.2f by %.2f.",
+ width, height));
+ return Stencil (b, SCM_EOL);
+ }
SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
scm_from_double (-b[X_AXIS][LEFT]),
#include "version.hh"
#include "warn.hh"
-/*
- * Global options that can be overridden through command line.
- */
-
-/* Names of header fields to be dumped to a separate file. */
-vector<string> dump_header_fieldnames_global;
-
-/* Name of initialisation file. */
-string init_name_global;
-
-/* Output formats to generate. */
-string output_format_global = "";
-
-/* Current output name. */
-string output_name_global;
-
-/* Run in safe mode? */
-bool be_safe_global = false;
-
-/* Scheme code to execute before parsing, after .scm init.
- This is where -e arguments are appended to. */
-string init_scheme_code_global;
-string init_scheme_variables_global;
-
-bool relocate_binary = true;
-
-/*
- * Miscellaneous global stuff.
- */
-File_path global_path;
-
/*
* File globals.
*/
"the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
"Boston, MA 02111-1307, USA.\n");
-/* Where the init files live. Typically:
- LILYPOND_DATADIR = /usr/share/lilypond
-*/
-string lilypond_datadir;
-
/* The jail specification: USER, GROUP, JAIL, DIR. */
-string jail_spec;
+static string jail_spec;
/* The option parser */
static Getopt_long *option_parser = 0;
"104857600", overwrite);
}
-vector<string> start_environment_global;
-
int
main (int argc, char **argv, char **envp)
{
along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <complex>
+
#include "misc.hh"
+#include "offset.hh"
#include "warn.hh"
/*
return result;
}
+
+Offset
+get_point_in_y_direction (Offset orig, Real slope, Real dist, Direction dir)
+{
+ if (slope == infinity_f)
+ return orig + Offset (dir * dist, 0.0);
+
+ Real x = slope == 0.0 ? 1.0 * dir : 1.0 * sign (slope) * dir;
+ Real y = slope * x;
+ Real angle = atan2 (y, x);
+
+ complex<Real> orig_c (orig[X_AXIS], orig[Y_AXIS]);
+ complex<Real> to_move = polar (dist, angle);
+ complex<Real> res = orig_c + to_move;
+
+ return Offset (real (res), imag (res));
+}
\ No newline at end of file
return b;
}
+Real
+Modified_font_metric::get_magnification () const
+{
+ return magnification_;
+}
+
vsize
Modified_font_metric::count () const
{
along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ly-module.hh"
-
+#include "ly-module.hh" // pulls in lily-guile.hh and guile-compatibility.hh
#include "warn.hh"
#include "main.hh"
#include "std-string.hh"
return SCM_UNSPECIFIED;
}
-/* Lookup SYM, but don't give error when it is not defined. */
+
+
+/* Lookup SYM, but don't give error when it is not defined.
+ N.B. this is only needed when running with Guile versions
+ prior to V2.0.3, when calls to ly_module_lookup can be replaced
+ with direct calls to the Guile API scm_module_variable in the
+ LilyPond codebase.
+*/
SCM
ly_module_lookup (SCM module, SCM sym)
{
#define FUNC_NAME __FUNCTION__
SCM_VALIDATE_MODULE (1, module);
-
+/*
+ Issue 2758:
+ Guile V2 onward has a scm_module_variable API module.
+ Guile V1.8.7 only has a (module-variable) REPL function, however
+ using ly_lily_module_constant ("module-variable") and calling
+ the memoized result is slow.
+ */
+#if GUILEV1
return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F);
+#else
+ return scm_module_variable (module, sym);
+#endif
#undef FUNC_NAME
}
/* If possible, don't wipe any heads. Else, wipe shortest head,
or head with smallest amount of dots. Note: when merging
- different heads, dots on the smaller one disappear. */
+ different heads, dots on the smaller one disappear; and when
+ merging identical heads, dots on the down-stem head disappear */
Grob *wipe_ball = 0;
Grob *dot_wipe_head = head_up;
wipe_ball = head_up;
}
else
- dot_wipe_head = head_up;
+ dot_wipe_head = head_down;
}
else if (down_ball_type > up_ball_type)
{
Axis_group_interface::add_element (me, ncol);
}
+vector<int>
+Note_collision_interface::note_head_positions (Grob *me)
+{
+ vector<int> out;
+ extract_grob_set (me, "elements", elts);
+ for (vsize i = 0; i < elts.size (); i++)
+ if (Grob *stem = unsmob_grob (elts[i]->get_object ("stem")))
+ {
+ vector<int> nhp = Stem::note_head_positions (stem);
+ out.insert (out.end (), nhp.begin (), nhp.end ());
+ }
+
+ vector_sort (out, less<int> ());
+ return out;
+}
+
ADD_INTERFACE (Note_collision_interface,
"An object that handles collisions between notes with"
" different stem directions and horizontal shifts. Most of"
annoying layer between (rest)collision & (note-head + stem)
*/
+Interval
+Note_column::accidental_width (Grob *me)
+{
+ extract_grob_set (me, "note-heads", nhs);
+ vector<Grob *> accs;
+ for (vsize i = 0; i < nhs.size (); i++)
+ if (Grob *acc = unsmob_grob (nhs[i]->get_object ("accidental-grob")))
+ accs.push_back (acc);
+
+ Grob *common = common_refpoint_of_array (accs, me, X_AXIS);
+ common = common_refpoint_of_array (nhs, common, X_AXIS);
+
+ Interval nhs_ex = Axis_group_interface::relative_group_extent (nhs, common, X_AXIS);
+ Interval accs_ex = Axis_group_interface::relative_group_extent (accs, common, X_AXIS);
+
+ if (nhs_ex.is_empty ())
+ return accs_ex;
+
+ // want an empty interval here
+ if (accs_ex.is_empty ())
+ return Interval ();
+
+ return Interval (accs_ex[LEFT], nhs_ex[LEFT]);
+}
+
bool
Note_column::has_rests (Grob *me)
{
adjust things so there are no collisions.
*/
Drul_array<Skyline> skys = Spacing_interface::skylines (me, right_col);
- Real distance = skys[LEFT].distance (skys[RIGHT]);
+ Real distance = skys[LEFT].distance (skys[RIGHT], robust_scm2double (right_col->get_property ("skyline-vertical-padding"), 0.0));
Real min_dist = max (0.0, distance);
Real min_desired_space = left_head_end + (min_dist - left_head_end + base_space - increment) / 2;
Real ideal = base_space - increment + left_head_end;
#include <freetype/tttables.h>
#include "dimensions.hh"
+#include "freetype.hh"
#include "international.hh"
#include "modified-font-metric.hh"
#include "warn.hh"
}
}
- FT_UInt idx = FT_UInt (signed_idx);
- FT_Load_Glyph (face_, idx, FT_LOAD_NO_SCALE);
-
- FT_Glyph_Metrics m = face_->glyph->metrics;
- FT_Pos hb = m.horiBearingX;
- FT_Pos vb = m.horiBearingY;
- Box b (Interval (Real (-hb), Real (m.width - hb)),
- Interval (Real (-vb), Real (m.height - vb)));
+ Box b = get_unscaled_indexed_char_dimensions (signed_idx);
b.scale (design_size () / Real (face_->units_per_EM));
return b;
}
+Real
+Open_type_font::get_units_per_EM () const
+{
+ return face_->units_per_EM;
+}
+
size_t
Open_type_font::name_to_index (string nm) const
{
return (size_t) - 1;
}
+Box
+Open_type_font::get_unscaled_indexed_char_dimensions (size_t signed_idx) const
+{
+ return ly_FT_get_unscaled_indexed_char_dimensions (face_, signed_idx);
+}
+
+Box
+Open_type_font::get_glyph_outline_bbox (size_t signed_idx) const
+{
+ return ly_FT_get_glyph_outline_bbox (face_, signed_idx);
+}
+
+SCM
+Open_type_font::get_glyph_outline (size_t signed_idx) const
+{
+ return ly_FT_get_glyph_outline (face_, signed_idx);
+}
+
size_t
Open_type_font::index_to_charcode (size_t i) const
{
// This means that we won't cache properly if page_num is negative or
// if calc_height returns a negative number. But that's likely to
// be rare, so it shouldn't affect performance.
- vector<Real>& cache = last ? last_page_height_cache_ : page_height_cache_;
+ vector<Real> &cache = last ? last_page_height_cache_ : page_height_cache_;
if (page_num >= 0 && (int) cache.size () > page_num && cache[page_num] >= 0)
return cache[page_num];
else
SCM penalty_sym;
if (is_last ())
- penalty_sym = ly_symbol2scm ("blank-last-page-force");
+ penalty_sym = ly_symbol2scm ("blank-last-page-penalty");
else if (ends_score ())
- penalty_sym = ly_symbol2scm ("blank-after-score-page-force");
+ penalty_sym = ly_symbol2scm ("blank-after-score-page-penalty");
else
- penalty_sym = ly_symbol2scm ("blank-page-force");
+ penalty_sym = ly_symbol2scm ("blank-page-penalty");
Break_position const &pos = breaks_[current_end_breakpoint_];
if (Paper_score *ps = system_specs_[pos.system_spec_index_].pscore_)
void
Page_layout_problem::append_system (System *sys, Spring const &spring, Real indent, Real padding)
{
- Grob *align = sys->get_vertical_alignment ();
+ Grob *align = unsmob_grob (sys->get_object ("vertical-alignment"));
if (!align)
return;
scm_from_int (face_index)));
}
+size_t
+Pango_font::name_to_index (string nm) const
+{
+ PangoFcFont *fcfont = PANGO_FC_FONT (pango_context_load_font (context_, pango_description_));
+ FT_Face face = pango_fc_font_lock_face (fcfont);
+ char *nm_str = (char *) nm.c_str ();
+ if (FT_UInt idx = FT_Get_Name_Index (face, nm_str))
+ {
+ pango_fc_font_unlock_face (fcfont);
+ return (size_t) idx;
+ }
+
+ pango_fc_font_unlock_face (fcfont);
+ return (size_t) - 1;
+}
+
void
Pango_font::derived_mark () const
{
sprintf (s, "uni%04lX", code);
}
+Box
+Pango_font::get_unscaled_indexed_char_dimensions (size_t signed_idx) const
+{
+ PangoFcFont *fcfont = PANGO_FC_FONT (pango_context_load_font (context_, pango_description_));
+ FT_Face face = pango_fc_font_lock_face (fcfont);
+ Box b = ly_FT_get_unscaled_indexed_char_dimensions (face, signed_idx);
+ pango_fc_font_unlock_face (fcfont);
+ return b;
+}
+
+Box
+Pango_font::get_scaled_indexed_char_dimensions (size_t signed_idx) const
+{
+ PangoFont *font = pango_context_load_font (context_, pango_description_);
+ PangoRectangle logical_rect;
+ PangoRectangle ink_rect;
+ pango_font_get_glyph_extents (font, signed_idx, &ink_rect, &logical_rect);
+ Box out (Interval (PANGO_LBEARING (ink_rect),
+ PANGO_RBEARING (ink_rect)),
+ Interval (-PANGO_DESCENT (ink_rect),
+ PANGO_ASCENT (ink_rect)));
+ out.scale (scale_);
+ return out;
+}
+
+Box
+Pango_font::get_glyph_outline_bbox (size_t signed_idx) const
+{
+ PangoFcFont *fcfont = PANGO_FC_FONT (pango_context_load_font (context_, pango_description_));
+ FT_Face face = pango_fc_font_lock_face (fcfont);
+ Box b = ly_FT_get_glyph_outline_bbox (face, signed_idx);
+ pango_fc_font_unlock_face (fcfont);
+ return b;
+}
+
+SCM
+Pango_font::get_glyph_outline (size_t signed_idx) const
+{
+ PangoFcFont *fcfont = PANGO_FC_FONT (pango_context_load_font (context_, pango_description_));
+ FT_Face face = pango_fc_font_lock_face (fcfont);
+ SCM s = ly_FT_get_glyph_outline (face, signed_idx);
+ pango_fc_font_unlock_face (fcfont);
+ return s;
+}
+
Stencil
Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
{
pango_glyph_string_extents (pgs, pa->font, &ink_rect, &logical_rect);
PangoFcFont *fcfont = PANGO_FC_FONT (pa->font);
-
FT_Face ftface = pango_fc_font_lock_face (fcfont);
Box b (Interval (PANGO_LBEARING (logical_rect),
else
char_id = scm_from_locale_string (glyph_name);
- *tail = scm_cons (scm_list_4 (scm_from_double (ggeo.width * scale_),
+ PangoRectangle logical_sub_rect;
+ PangoRectangle ink_sub_rect;
+
+ pango_glyph_string_extents_range (pgs, i, i + 1, pa->font, &ink_sub_rect, &logical_sub_rect);
+ Box b_sub (Interval (PANGO_LBEARING (logical_sub_rect),
+ PANGO_RBEARING (logical_sub_rect)),
+ Interval (-PANGO_DESCENT (ink_sub_rect),
+ PANGO_ASCENT (ink_sub_rect)));
+
+ b_sub.scale (scale_);
+
+ *tail = scm_cons (scm_list_5 (scm_from_double (b_sub[X_AXIS][RIGHT] - b_sub[X_AXIS][LEFT]),
+ scm_cons (scm_from_double (b_sub[Y_AXIS][DOWN]),
+ scm_from_double (b_sub[Y_AXIS][UP])),
scm_from_double (ggeo.x_offset * scale_),
scm_from_double (- ggeo.y_offset * scale_),
char_id),
((Pango_font *) this)->register_font_file (file_name,
ps_name,
face_index);
- pango_fc_font_unlock_face (fcfont);
- SCM expr = scm_list_5 (ly_symbol2scm ("glyph-string"),
+ SCM expr = scm_list_n (ly_symbol2scm ("glyph-string"),
+ self_scm (),
ly_string2scm (ps_name),
scm_from_double (size),
scm_from_bool (cid_keyed),
- ly_quote_scm (glyph_exprs));
+ ly_quote_scm (glyph_exprs),
+ SCM_UNDEFINED);
return Stencil (b, expr);
}
#include "lookup.hh"
#include "lookup.hh"
#include "moment.hh"
+#include "note-head.hh"
#include "output-def.hh"
#include "paper-score.hh"
#include "pointer-group-interface.hh"
return align->extent (p, X_AXIS);
}
+
/*
Print a vertical line and the rank number, to aid debugging.
*/
-/* -*- mode: c++; c-file-style: "linux" -*- */
+/* -*- mode: c++; c-file-style: "linux"; indent-tabs-mode: t -*- */
/*
This file is part of LilyPond, the GNU music typesetter.
/* We use custom location type: Input objects */
#define YYLTYPE Input
+#define YYSTYPE SCM
#define YYLLOC_DEFAULT(Current,Rhs,N) \
((Current).set_location ((Rhs)[1], (Rhs)[N]))
+#define YYPRINT(file, type, value) \
+ do { \
+ if (scm_is_eq (value, SCM_UNSPECIFIED)) \
+ break; \
+ char *p = scm_to_locale_string \
+ (scm_simple_format (SCM_BOOL_F, \
+ scm_from_locale_string ("~S"), \
+ scm_list_1 (value))); \
+ fputs (p, file); \
+ free (p); \
+ } while (0)
%}
%parse-param {Lily_parser *parser}
+%parse-param {SCM *retval}
%lex-param {Lily_parser *parser}
%error-verbose
%debug
#include "warn.hh"
void
-Lily_parser::parser_error (Input const *i, Lily_parser *parser, string s)
+Lily_parser::parser_error (Input const *i, Lily_parser *parser, SCM *, string s)
{
parser->parser_error (*i, s);
}
%}
-%union {
- Book *book;
- Output_def *outputdef;
- SCM scm;
- std::string *string;
- Score *score;
- int i;
-}
-
%{
#define MY_MAKE_MUSIC(x, spot) make_music_with_input (ly_symbol2scm (x), spot)
static Music *make_music_with_input (SCM name, Input where);
SCM check_scheme_arg (Lily_parser *parser, Input loc,
SCM arg, SCM args, SCM pred);
+SCM make_music_from_simple (Lily_parser *parser, Input loc, SCM pitch);
SCM loc_on_music (Input loc, SCM arg);
SCM make_chord_elements (Input loc, SCM pitch, SCM dur, SCM modification_list);
-SCM make_chord_step (int step, Rational alter);
+SCM make_chord_step (SCM step, Rational alter);
SCM make_simple_markup (SCM a);
bool is_duration (int t);
bool is_regular_identifier (SCM id);
int yylex (YYSTYPE *s, YYLTYPE *loc, Lily_parser *parser);
-void set_music_properties (Music *p, SCM a);
%}
%token MULTI_MEASURE_REST
-%token <i> E_UNSIGNED
-%token <scm> UNSIGNED
+%token E_UNSIGNED
+%token UNSIGNED
/* Artificial tokens, for more generic function syntax */
-%token <i> EXPECT_MARKUP "markup?"
-%token <i> EXPECT_PITCH "ly:pitch?"
-%token <i> EXPECT_DURATION "ly:duration?"
-%token <scm> EXPECT_SCM "scheme?"
-%token <scm> BACKUP "(backed-up?)"
-%token <scm> REPARSE "(reparsed?)"
-%token <i> EXPECT_MARKUP_LIST "markup-list?"
-%token <scm> EXPECT_OPTIONAL "optional?"
+%token EXPECT_MARKUP "markup?"
+%token EXPECT_PITCH "ly:pitch?"
+%token EXPECT_DURATION "ly:duration?"
+%token EXPECT_SCM "scheme?"
+%token BACKUP "(backed-up?)"
+%token REPARSE "(reparsed?)"
+%token EXPECT_MARKUP_LIST "markup-list?"
+%token EXPECT_OPTIONAL "optional?"
/* After the last argument. */
-%token <i> EXPECT_NO_MORE_ARGS;
+%token EXPECT_NO_MORE_ARGS;
/* An artificial token for parsing embedded Lilypond */
-%token <i> EMBEDDED_LILY "#{"
-
-%token <scm> BOOK_IDENTIFIER
-%token <scm> CHORDMODIFIER_PITCH
-%token <scm> CHORD_MODIFIER
-%token <scm> CHORD_REPETITION
-%token <scm> CONTEXT_DEF_IDENTIFIER
-%token <scm> CONTEXT_MOD_IDENTIFIER
-%token <scm> DRUM_PITCH
-%token <scm> PITCH_IDENTIFIER
-%token <scm> DURATION_IDENTIFIER
-%token <scm> EVENT_IDENTIFIER
-%token <scm> EVENT_FUNCTION
-%token <scm> FRACTION
-%token <scm> LYRICS_STRING
-%token <scm> LYRIC_ELEMENT
-%token <scm> LYRIC_MARKUP_IDENTIFIER
-%token <scm> MARKUP_FUNCTION
-%token <scm> MARKUP_LIST_FUNCTION
-%token <scm> MARKUP_IDENTIFIER
-%token <scm> MARKUPLIST_IDENTIFIER
-%token <scm> MUSIC_FUNCTION
-%token <scm> MUSIC_IDENTIFIER
-%token <scm> NOTENAME_PITCH
-%token <scm> NUMBER_IDENTIFIER
-%token <scm> OUTPUT_DEF_IDENTIFIER
-%token <scm> REAL
-%token <scm> RESTNAME
-%token <scm> SCM_FUNCTION
-%token <scm> SCM_IDENTIFIER
-%token <scm> SCM_TOKEN
-%token <scm> SCORE_IDENTIFIER
-%token <scm> STRING
-%token <scm> STRING_IDENTIFIER
-%token <scm> TONICNAME_PITCH
-
-
-%type <book> book_block
-%type <book> book_body
-%type <book> bookpart_block
-%type <book> bookpart_body
-
-%type <i> bare_unsigned
-%type <scm> figured_bass_alteration
-%type <i> dots
-%type <i> exclamations
-%type <i> optional_rest
-%type <i> questions
-%type <i> script_dir
-%type <i> sub_quotes
-%type <i> sup_quotes
-%type <i> tremolo_type
-
-/* Music */
-%type <scm> composite_music
-%type <scm> grouped_music_list
-%type <scm> braced_music_list
-%type <scm> closed_music
-%type <scm> music
-%type <scm> music_bare
-%type <scm> music_arg
-%type <scm> music_assign
-%type <scm> music_embedded
-%type <scm> music_or_context_def
-%type <scm> complex_music
-%type <scm> complex_music_prefix
-%type <scm> mode_changed_music
-%type <scm> repeated_music
-%type <scm> sequential_music
-%type <scm> simple_music
-%type <scm> simultaneous_music
-%type <scm> chord_body
-%type <scm> chord_body_element
-%type <scm> command_element
-%type <scm> command_event
-%type <scm> context_modification
-%type <scm> context_change
-%type <scm> direction_less_event
-%type <scm> direction_reqd_event
-%type <scm> embedded_lilypond
-%type <scm> event_chord
-%type <scm> fingering
-%type <scm> gen_text_def
-%type <scm> music_property_def
-%type <scm> note_chord_element
-%type <scm> post_event
-%type <scm> post_event_nofinger
-%type <scm> re_rhythmed_music
-%type <scm> simple_element
-%type <scm> simple_music_property_def
-%type <scm> start_symbol
-%type <scm> string_number_event
-%type <scm> tempo_event
-
-%type <outputdef> output_def_body
-%type <outputdef> output_def_head
-%type <outputdef> output_def_head_with_mode_switch
-%type <outputdef> output_def
-%type <outputdef> paper_block
-
-%type <scm> music_function_call
-%type <scm> music_list
-%type <scm> assignment_id
-%type <scm> bare_number
-%type <scm> bare_number_closed
-%type <scm> unsigned_number
-%type <scm> bass_figure
-%type <scm> figured_bass_modification
-%type <scm> br_bass_figure
-%type <scm> bass_number
-%type <scm> chord_body_elements
-%type <scm> chord_item
-%type <scm> chord_items
-%type <scm> chord_separator
-%type <scm> context_def_mod
-%type <scm> context_def_spec_block
-%type <scm> context_def_spec_body
-%type <scm> context_mod
-%type <scm> context_mod_arg
-%type <scm> context_mod_embedded
-%type <scm> context_mod_list
-%type <scm> context_prop_spec
-%type <scm> direction_less_char
-%type <scm> duration_length
-%type <scm> embedded_scm
-%type <scm> embedded_scm_arg
-%type <scm> embedded_scm_arg_closed
-%type <scm> embedded_scm_bare
-%type <scm> embedded_scm_bare_arg
-%type <scm> embedded_scm_closed
-%type <scm> event_function_event
-%type <scm> figure_list
-%type <scm> figure_spec
-%type <scm> full_markup
-%type <scm> full_markup_list
-%type <scm> function_arglist
-%type <scm> function_arglist_optional
-%type <scm> function_arglist_backup
-%type <scm> function_arglist_nonbackup
-%type <scm> function_arglist_nonbackup_common
-%type <scm> function_arglist_closed_nonbackup
-%type <scm> function_arglist_skip
-%type <scm> function_arglist_bare
-%type <scm> function_arglist_closed
-%type <scm> function_arglist_closed_optional
-%type <scm> function_arglist_common
-%type <scm> function_arglist_common_lyric
-%type <scm> function_arglist_common_minus
-%type <scm> function_arglist_closed_common
-%type <scm> function_arglist_keep
-%type <scm> function_arglist_closed_keep
-%type <scm> identifier_init
-%type <scm> lilypond
-%type <scm> lilypond_header
-%type <scm> lyric_element
-%type <scm> lyric_element_arg
-%type <scm> lyric_element_music
-%type <scm> lyric_markup
-%type <scm> markup
-%type <scm> markup_braced_list
-%type <scm> markup_braced_list_body
-%type <scm> markup_composed_list
-%type <scm> markup_command_list
-%type <scm> markup_command_list_arguments
-%type <scm> markup_command_basic_arguments
-%type <scm> markup_head_1_item
-%type <scm> markup_head_1_list
-%type <scm> markup_list
-%type <scm> markup_top
-%type <scm> maybe_notemode_duration
-%type <scm> mode_changing_head
-%type <scm> mode_changing_head_with_context
-%type <scm> multiplied_duration
-%type <scm> music_function_call_closed
-%type <scm> music_function_chord_body
-%type <scm> new_chord
-%type <scm> new_lyrics
-%type <scm> number_expression
-%type <scm> number_factor
-%type <scm> number_term
-%type <scm> octave_check
-%type <scm> optional_context_mod
-%type <scm> optional_id
-%type <scm> optional_notemode_duration
-%type <scm> pitch
-%type <scm> pitch_also_in_chords
-%type <scm> post_events
-%type <scm> property_operation
-%type <scm> property_path property_path_revved
-%type <scm> scalar
-%type <scm> scalar_closed
-%type <scm> scm_function_call
-%type <scm> scm_function_call_closed
-%type <scm> script_abbreviation
-%type <scm> simple_chord_elements
-%type <scm> simple_markup
-%type <scm> simple_string
-%type <scm> steno_duration
-%type <scm> steno_pitch
-%type <scm> steno_tonic_pitch
-%type <scm> step_number
-%type <scm> step_numbers
-%type <scm> string
-%type <scm> tempo_range
-
-%type <score> score_block
-%type <score> score_body
-
+%token EMBEDDED_LILY "#{"
+
+%token BOOK_IDENTIFIER
+%token CHORDMODIFIER_PITCH
+%token CHORD_MODIFIER
+%token CHORD_REPETITION
+%token CONTEXT_DEF_IDENTIFIER
+%token CONTEXT_MOD_IDENTIFIER
+%token DRUM_PITCH
+%token PITCH_IDENTIFIER
+%token DURATION_IDENTIFIER
+%token EVENT_IDENTIFIER
+%token EVENT_FUNCTION
+%token FRACTION
+%token LYRICS_STRING
+%token LYRIC_ELEMENT
+%token MARKUP_FUNCTION
+%token MARKUP_LIST_FUNCTION
+%token MARKUP_IDENTIFIER
+%token MARKUPLIST_IDENTIFIER
+%token MUSIC_FUNCTION
+%token MUSIC_IDENTIFIER
+%token NOTENAME_PITCH
+%token NUMBER_IDENTIFIER
+%token OUTPUT_DEF_IDENTIFIER
+%token REAL
+%token RESTNAME
+%token SCM_FUNCTION
+%token SCM_IDENTIFIER
+%token SCM_TOKEN
+%token SCORE_IDENTIFIER
+%token STRING
+%token TONICNAME_PITCH
%left '-' '+'
parser->lexer_->push_note_state (nn);
} embedded_lilypond {
parser->lexer_->pop_state ();
- parser->lexer_->set_identifier (ly_symbol2scm ("parseStringResult"), $3);
+ *retval = $3;
}
;
-lilypond: /* empty */ { }
+lilypond: /* empty */ { $$ = SCM_UNSPECIFIED; }
| lilypond toplevel_expression {
}
| lilypond assignment {
parser->lexer_->set_identifier (ly_symbol2scm ("$defaultheader"), $2);
}
| book_block {
- Book *book = $1;
SCM proc = parser->lexer_->lookup_identifier ("toplevel-book-handler");
- scm_call_2 (proc, parser->self_scm (), book->self_scm ());
- book->unprotect ();
+ scm_call_2 (proc, parser->self_scm (), $1);
}
| bookpart_block {
- Book *bookpart = $1;
SCM proc = parser->lexer_->lookup_identifier ("toplevel-bookpart-handler");
- scm_call_2 (proc, parser->self_scm (), bookpart->self_scm ());
- bookpart->unprotect ();
+ scm_call_2 (proc, parser->self_scm (), $1);
}
| score_block {
- Score *score = $1;
-
SCM proc = parser->lexer_->lookup_identifier ("toplevel-score-handler");
- scm_call_2 (proc, parser->self_scm (), score->self_scm ());
- score->unprotect ();
+ scm_call_2 (proc, parser->self_scm (), $1);
}
| composite_music {
- Music *music = unsmob_music ($1);
SCM proc = parser->lexer_->lookup_identifier ("toplevel-music-handler");
- scm_call_2 (proc, parser->self_scm (), music->self_scm ());
+ scm_call_2 (proc, parser->self_scm (), $1);
}
| full_markup {
SCM proc = parser->lexer_->lookup_identifier ("toplevel-text-handler");
SCM proc = parser->lexer_->lookup_identifier ("toplevel-text-handler");
scm_call_2 (proc, parser->self_scm (), $1);
}
+ | SCM_TOKEN {
+ // Evaluate and ignore #xxx, as opposed to \xxx
+ parser->lexer_->eval_scm_token ($1);
+ }
+ | embedded_scm_active
+ {
+ SCM out = SCM_UNDEFINED;
+ if (Text_interface::is_markup ($1))
+ out = scm_list_1 ($1);
+ else if (Text_interface::is_markup_list ($1))
+ out = $1;
+ if (scm_is_pair (out))
+ {
+ SCM proc = parser->lexer_->lookup_identifier ("toplevel-text-handler");
+ scm_call_2 (proc, parser->self_scm (), out);
+ } else if (!scm_is_eq ($1, SCM_UNSPECIFIED))
+ parser->parser_error (@1, _("bad expression type"));
+ }
| output_def {
SCM id = SCM_EOL;
- Output_def * od = $1;
+ Output_def * od = unsmob_output_def ($1);
- if ($1->c_variable ("is-paper") == SCM_BOOL_T)
+ if (od->c_variable ("is-paper") == SCM_BOOL_T)
id = ly_symbol2scm ("$defaultpaper");
- else if ($1->c_variable ("is-midi") == SCM_BOOL_T)
+ else if (od->c_variable ("is-midi") == SCM_BOOL_T)
id = ly_symbol2scm ("$defaultmidi");
- else if ($1->c_variable ("is-layout") == SCM_BOOL_T)
+ else if (od->c_variable ("is-layout") == SCM_BOOL_T)
id = ly_symbol2scm ("$defaultlayout");
- parser->lexer_->set_identifier (id, od->self_scm ());
- od->unprotect();
+ parser->lexer_->set_identifier (id, $1);
}
;
| SCM_IDENTIFIER
;
+embedded_scm_active:
+ SCM_IDENTIFIER
+ | scm_function_call
+ ;
+
embedded_scm_bare_arg:
embedded_scm_bare
| STRING
- | STRING_IDENTIFIER
| full_markup
| full_markup_list
| context_modification
| score_block
- {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
| context_def_spec_block
| book_block
- {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
| bookpart_block
- {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
| output_def
- {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
;
/* The generic version may end in music, or not */
}
| error {
parser->error_level_ = 1;
+ $$ = SCM_UNSPECIFIED;
}
| INVALID embedded_lilypond {
parser->error_level_ = 1;
+ $$ = $2;
}
;
lilypond_header_body:
- /* empty */
+ /* empty */ { $$ = SCM_UNSPECIFIED; }
| lilypond_header_body assignment {
+ }
+ | lilypond_header_body embedded_scm {
+
}
;
assignment:
assignment_id '=' identifier_init {
parser->lexer_->set_identifier ($1, $3);
+ $$ = SCM_UNSPECIFIED;
}
| assignment_id property_path '=' identifier_init {
SCM path = scm_cons (scm_string_to_symbol ($1), $2);
parser->lexer_->set_identifier (path, $4);
- ;
-/*
- TODO: devise standard for protection in parser.
-
- The parser stack lives on the C-stack, which means that
-all objects can be unprotected as soon as they're here.
-
-*/
+ $$ = SCM_UNSPECIFIED;
}
- | embedded_scm { }
;
identifier_init:
- score_block {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
- | book_block {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
- | bookpart_block {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
- | output_def {
- $$ = $1->self_scm ();
- $1->unprotect ();
- }
- | context_def_spec_block {
- $$ = $1;
- }
- | music_assign {
- $$ = $1;
- }
- | post_event_nofinger {
- $$ = $1;
- }
- | number_expression {
- $$ = $1;
- }
- | FRACTION {
- $$ = $1;
- }
- | string {
- $$ = $1;
- }
- | embedded_scm {
- $$ = $1;
- }
- | full_markup {
- $$ = $1;
- }
- | full_markup_list {
- $$ = $1;
- }
- | context_modification {
- $$ = $1;
- }
+ score_block
+ | book_block
+ | bookpart_block
+ | output_def
+ | context_def_spec_block
+ | music_assign
+ | post_event_nofinger
+ | number_expression
+ | FRACTION
+ | string
+ | embedded_scm
+ | full_markup_list
+ | context_modification
;
context_def_spec_block:
* grok \layout and \midi? */
book_body:
{
- $$ = new Book;
+ Book *book = new Book;
init_papers (parser);
- $$->origin ()->set_spot (@$);
- $$->paper_ = dynamic_cast<Output_def*> (unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultpaper"))->clone ());
- $$->paper_->unprotect ();
- push_paper (parser, $$->paper_);
- $$->header_ = get_header (parser);
- parser->lexer_->set_identifier (ly_symbol2scm ("$current-book"), $$->self_scm ());
+ book->origin ()->set_spot (@$);
+ book->paper_ = dynamic_cast<Output_def*> (unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultpaper"))->clone ());
+ book->paper_->unprotect ();
+ push_paper (parser, book->paper_);
+ book->header_ = get_header (parser);
+ $$ = book->unprotect ();
+ parser->lexer_->set_identifier (ly_symbol2scm ("$current-book"), $$);
}
| BOOK_IDENTIFIER {
- $$ = unsmob_book ($1);
- $$->protect ();
- $$->origin ()->set_spot (@$);
+ unsmob_book ($1)->origin ()->set_spot (@$);
parser->lexer_->set_identifier (ly_symbol2scm ("$current-book"), $1);
}
| book_body paper_block {
- $$->paper_ = $2;
- $2->unprotect ();
- set_paper (parser, $2);
+ unsmob_book ($1)->paper_ = unsmob_output_def ($2);
+ set_paper (parser, unsmob_output_def ($2));
}
| book_body bookpart_block {
- Book *bookpart = $2;
SCM proc = parser->lexer_->lookup_identifier ("book-bookpart-handler");
- scm_call_2 (proc, $$->self_scm (), bookpart->self_scm ());
- bookpart->unprotect ();
+ scm_call_2 (proc, $1, $2);
}
| book_body score_block {
- Score *score = $2;
SCM proc = parser->lexer_->lookup_identifier ("book-score-handler");
- scm_call_2 (proc, $$->self_scm (), score->self_scm ());
- score->unprotect ();
+ scm_call_2 (proc, $1, $2);
}
| book_body composite_music {
- Music *music = unsmob_music ($2);
SCM proc = parser->lexer_->lookup_identifier ("book-music-handler");
- scm_call_3 (proc, parser->self_scm (), $$->self_scm (), music->self_scm ());
+ scm_call_3 (proc, parser->self_scm (), $1, $2);
}
| book_body full_markup {
SCM proc = parser->lexer_->lookup_identifier ("book-text-handler");
- scm_call_2 (proc, $$->self_scm (), scm_list_1 ($2));
+ scm_call_2 (proc, $1, scm_list_1 ($2));
}
| book_body full_markup_list {
SCM proc = parser->lexer_->lookup_identifier ("book-text-handler");
- scm_call_2 (proc, $$->self_scm (), $2);
+ scm_call_2 (proc, $1, $2);
+ }
+ | book_body SCM_TOKEN {
+ // Evaluate and ignore #xxx, as opposed to \xxx
+ parser->lexer_->eval_scm_token ($2);
+ }
+ | book_body embedded_scm_active
+ {
+ SCM out = SCM_UNDEFINED;
+ if (Text_interface::is_markup ($2))
+ out = scm_list_1 ($2);
+ else if (Text_interface::is_markup_list ($2))
+ out = $2;
+ if (scm_is_pair (out))
+ {
+ SCM proc = parser->lexer_->lookup_identifier ("book-text-handler");
+ scm_call_2 (proc, $1, out);
+ } else if (!scm_is_eq ($2, SCM_UNSPECIFIED))
+ parser->parser_error (@2, _("bad expression type"));
}
| book_body
{
- parser->lexer_->add_scope ($1->header_);
+ parser->lexer_->add_scope (unsmob_book ($1)->header_);
} lilypond_header
- | book_body embedded_scm { }
| book_body error {
- $$->paper_ = 0;
- $$->scores_ = SCM_EOL;
- $$->bookparts_ = SCM_EOL;
+ Book *book = unsmob_book ($1);
+ book->paper_ = 0;
+ book->scores_ = SCM_EOL;
+ book->bookparts_ = SCM_EOL;
}
;
bookpart_body:
{
- $$ = new Book;
- $$->origin ()->set_spot (@$);
- parser->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), $$->self_scm ());
+ Book *book = new Book;
+ book->origin ()->set_spot (@$);
+ $$ = book->unprotect ();
+ parser->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), $$);
}
| BOOK_IDENTIFIER {
- $$ = unsmob_book ($1);
- $$->protect ();
- $$->origin ()->set_spot (@$);
+ unsmob_book ($1)->origin ()->set_spot (@$);
parser->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), $1);
}
| bookpart_body paper_block {
- $$->paper_ = $2;
- $2->unprotect ();
+ unsmob_book ($$)->paper_ = unsmob_output_def ($2);
}
| bookpart_body score_block {
- Score *score = $2;
SCM proc = parser->lexer_->lookup_identifier ("bookpart-score-handler");
- scm_call_2 (proc, $$->self_scm (), score->self_scm ());
- score->unprotect ();
+ scm_call_2 (proc, $1, $2);
}
| bookpart_body composite_music {
- Music *music = unsmob_music ($2);
SCM proc = parser->lexer_->lookup_identifier ("bookpart-music-handler");
- scm_call_3 (proc, parser->self_scm (), $$->self_scm (), music->self_scm ());
+ scm_call_3 (proc, parser->self_scm (), $1, $2);
}
| bookpart_body full_markup {
SCM proc = parser->lexer_->lookup_identifier ("bookpart-text-handler");
- scm_call_2 (proc, $$->self_scm (), scm_list_1 ($2));
+ scm_call_2 (proc, $1, scm_list_1 ($2));
}
| bookpart_body full_markup_list {
SCM proc = parser->lexer_->lookup_identifier ("bookpart-text-handler");
- scm_call_2 (proc, $$->self_scm (), $2);
+ scm_call_2 (proc, $1, $2);
+ }
+ | bookpart_body SCM_TOKEN {
+ // Evaluate and ignore #xxx, as opposed to \xxx
+ parser->lexer_->eval_scm_token ($2);
+ }
+ | bookpart_body embedded_scm_active
+ {
+ SCM out = SCM_UNDEFINED;
+ if (Text_interface::is_markup ($2))
+ out = scm_list_1 ($2);
+ else if (Text_interface::is_markup_list ($2))
+ out = $2;
+ if (scm_is_pair (out))
+ {
+ SCM proc = parser->lexer_->lookup_identifier ("bookpart-text-handler");
+ scm_call_2 (proc, $1, out);
+ } else if (!scm_is_eq ($2, SCM_UNSPECIFIED))
+ parser->parser_error (@2, _("bad expression type"));
}
| bookpart_body
{
- if (!ly_is_module ($1->header_))
- $1->header_ = ly_make_module (false);
- parser->lexer_->add_scope ($1->header_);
+ Book *book = unsmob_book ($1);
+ if (!ly_is_module (book->header_))
+ book->header_ = ly_make_module (false);
+ parser->lexer_->add_scope (book->header_);
} lilypond_header
- | bookpart_body embedded_scm { }
| bookpart_body error {
- $$->paper_ = 0;
- $$->scores_ = SCM_EOL;
+ Book *book = unsmob_book ($1);
+ book->paper_ = 0;
+ book->scores_ = SCM_EOL;
}
;
score_body:
music {
- SCM m = $1;
SCM scorify = ly_lily_module_constant ("scorify-music");
- SCM score = scm_call_2 (scorify, m, parser->self_scm ());
+ $$ = scm_call_2 (scorify, $1, parser->self_scm ());
- // pass ownernship to C++ again.
- $$ = unsmob_score (score);
- $$->protect ();
- $$->origin ()->set_spot (@$);
+ unsmob_score ($$)->origin ()->set_spot (@$);
}
| SCORE_IDENTIFIER {
- $$ = unsmob_score ($1);
- $$->protect ();
- $$->origin ()->set_spot (@$);
+ unsmob_score ($$)->origin ()->set_spot (@$);
}
| score_body
{
- if (!ly_is_module ($1->get_header ()))
- $1->set_header (ly_make_module (false));
- parser->lexer_->add_scope ($1->get_header ());
+ Score *score = unsmob_score ($1);
+ if (!ly_is_module (score->get_header ()))
+ score->set_header (ly_make_module (false));
+ parser->lexer_->add_scope (score->get_header ());
} lilypond_header
| score_body output_def {
- if ($2->lookup_variable (ly_symbol2scm ("is-paper")) == SCM_BOOL_T)
+ Output_def *od = unsmob_output_def ($2);
+ if (od->lookup_variable (ly_symbol2scm ("is-paper")) == SCM_BOOL_T)
{
parser->parser_error (@2, _("\\paper cannot be used in \\score, use \\layout instead"));
}
else
{
- $$->add_output_def ($2);
+ unsmob_score ($1)->add_output_def (od);
}
- $2->unprotect ();
}
| score_body error {
- $$->error_found_ = true;
+ unsmob_score ($$)->error_found_ = true;
}
;
paper_block:
output_def {
- $$ = $1;
- if ($$->lookup_variable (ly_symbol2scm ("is-paper")) != SCM_BOOL_T)
+ Output_def *od = unsmob_output_def ($1);
+
+ if (od->lookup_variable (ly_symbol2scm ("is-paper")) != SCM_BOOL_T)
{
parser->parser_error (@1, _ ("need \\paper for paper block"));
- $1->unprotect ();
- $$ = get_paper (parser);
+ $$ = get_paper (parser)->unprotect ();
}
}
;
output_def_head:
PAPER {
- $$ = get_paper (parser);
- $$->input_origin_ = @$;
- parser->lexer_->add_scope ($$->scope_);
+ Output_def *p = get_paper (parser);
+ p->input_origin_ = @$;
+ parser->lexer_->add_scope (p->scope_);
+ $$ = p->unprotect ();
}
| MIDI {
Output_def *p = get_midi (parser);
- $$ = p;
+ $$ = p->unprotect ();
parser->lexer_->add_scope (p->scope_);
}
| LAYOUT {
Output_def *p = get_layout (parser);
parser->lexer_->add_scope (p->scope_);
- $$ = p;
+ $$ = p->unprotect ();
}
;
output_def_body:
output_def_head_with_mode_switch '{' {
$$ = $1;
- $$->input_origin_.set_spot (@$);
+ unsmob_output_def ($$)->input_origin_.set_spot (@$);
}
| output_def_head_with_mode_switch '{' OUTPUT_DEF_IDENTIFIER {
- $1->unprotect ();
-
Output_def *o = unsmob_output_def ($3);
o->input_origin_.set_spot (@$);
- $$ = o;
- $$->protect ();
+ $$ = o->self_scm ();
parser->lexer_->remove_scope ();
parser->lexer_->add_scope (o->scope_);
}
| output_def_body assignment {
+ }
+ | output_def_body embedded_scm {
+
}
| output_def_body
{
} music_or_context_def
{
if (unsmob_context_def ($3))
- assign_context_def ($$, $3);
+ assign_context_def (unsmob_output_def ($1), $3);
else {
SCM proc = parser->lexer_->lookup_identifier
("output-def-music-handler");
scm_call_3 (proc, parser->self_scm (),
- $1->self_scm (), $3);
+ $1, $3);
}
}
| output_def_body error {
music_arg:
simple_music
{
- if (unsmob_pitch ($1)) {
- Music *n = MY_MAKE_MUSIC ("NoteEvent", @1);
- n->set_property ("pitch", $1);
- n->set_property ("duration",
- parser->default_duration_.smobbed_copy ());
- $$ = n->unprotect ();
- }
+ $$ = make_music_from_simple (parser, @1, $1);
+ if (!unsmob_music ($$))
+ parser->parser_error (@1, _ ("music expected"));
}
| composite_music %prec COMPOSITE
;
STRING {
$$ = $1;
}
- | STRING_IDENTIFIER {
- $$ = $1;
- }
+ | full_markup
| string '+' string {
+ if (!scm_is_string ($1)) {
+ parser->parser_error (@1, (_ ("simple string expected")));
+ $1 = scm_string (SCM_EOL);
+ }
+ if (!scm_is_string ($3)) {
+ parser->parser_error (@3, (_ ("simple string expected")));
+ $3 = scm_string (SCM_EOL);
+ }
$$ = scm_string_append (scm_list_2 ($1, $3));
}
;
| LYRICS_STRING {
$$ = $1;
}
- | STRING_IDENTIFIER {
- $$ = $1;
+ | embedded_scm_bare
+ {
+ if (scm_is_string ($1)) {
+ $$ = $1;
+ } else {
+ parser->parser_error (@1, (_ ("simple string expected")));
+ $$ = scm_string (SCM_EOL);
+ }
}
;
simple_element post_events {
// Let the rhythmic music iterator sort this mess out.
if (scm_is_pair ($2)) {
- if (unsmob_pitch ($1)) {
- Music *n = MY_MAKE_MUSIC ("NoteEvent", @1);
- n->set_property ("pitch", $1);
- n->set_property ("duration",
- parser->default_duration_.smobbed_copy ());
- $$ = n->unprotect ();
- }
- unsmob_music ($$)->set_property ("articulations",
- scm_reverse_x ($2, SCM_EOL));
+ $$ = make_music_from_simple (parser, @1, $1);
+ if (unsmob_music ($$))
+ unsmob_music ($$)->set_property ("articulations",
+ scm_reverse_x ($2, SCM_EOL));
+ else
+ parser->parser_error (@1, _("music expected"));
}
}
| simple_chord_elements post_events {
chord_body_element:
pitch exclamations questions octave_check post_events
{
- int q = $3;
- int ex = $2;
+ bool q = to_boolean ($3);
+ bool ex = to_boolean ($2);
SCM check = $4;
SCM post = $5;
Music *n = MY_MAKE_MUSIC ("NoteEvent", @$);
n->set_property ("pitch", $1);
- if (q % 2)
+ if (q)
n->set_property ("cautionary", SCM_BOOL_T);
- if (ex % 2 || q % 2)
+ if (ex || q)
n->set_property ("force-accidental", SCM_BOOL_T);
if (scm_is_pair (post)) {
}
| script_dir music_function_call_closed {
$$ = $2;
- if ($1)
+ if (!SCM_UNBNDP ($1))
{
- unsmob_music ($$)->set_property ("direction", scm_from_int ($1));
+ unsmob_music ($$)->set_property ("direction", $1);
}
}
| HYPHEN {
$$ = MY_MAKE_MUSIC ("ExtenderEvent", @$)->unprotect ();
}
| script_dir direction_reqd_event {
- if ($1)
+ if (!SCM_UNBNDP ($1))
{
Music *m = unsmob_music ($2);
- m->set_property ("direction", scm_from_int ($1));
+ m->set_property ("direction", $1);
}
$$ = $2;
}
| script_dir direction_less_event {
- if ($1)
+ if (!SCM_UNBNDP ($1))
{
Music *m = unsmob_music ($2);
- m->set_property ("direction", scm_from_int ($1));
+ m->set_property ("direction", $1);
}
$$ = $2;
}
string_number_event:
E_UNSIGNED {
Music *s = MY_MAKE_MUSIC ("StringNumberEvent", @$);
- s->set_property ("string-number", scm_from_int ($1));
+ s->set_property ("string-number", $1);
$$ = s->unprotect ();
}
;
}
| tremolo_type {
Music *a = MY_MAKE_MUSIC ("TremoloEvent", @$);
- a->set_property ("tremolo-type", scm_from_int ($1));
+ a->set_property ("tremolo-type", $1);
$$ = a->unprotect ();
}
| event_function_event
octave_check:
/**/ { $$ = SCM_EOL; }
- | '=' { $$ = scm_from_int (0); }
- | '=' sub_quotes { $$ = scm_from_int (-$2); }
- | '=' sup_quotes { $$ = scm_from_int ($2); }
+ | '=' quotes { $$ = $2; }
;
+quotes:
+ /* empty */
+ {
+ $$ = SCM_INUM0;
+ }
+ | sub_quotes
+ | sup_quotes
+ ;
+
sup_quotes:
'\'' {
- $$ = 1;
+ $$ = scm_from_int (1);
}
| sup_quotes '\'' {
- $$ ++;
+ $$ = scm_oneplus ($1);
}
;
sub_quotes:
',' {
- $$ = 1;
+ $$ = scm_from_int (-1);
}
| sub_quotes ',' {
- $$++;
+ $$ = scm_oneminus ($1);
}
;
steno_pitch:
- NOTENAME_PITCH {
- $$ = $1;
- }
- | NOTENAME_PITCH sup_quotes {
- Pitch p = *unsmob_pitch ($1);
- p = p.transposed (Pitch ($2,0,0));
- $$ = p.smobbed_copy ();
- }
- | NOTENAME_PITCH sub_quotes {
- Pitch p =* unsmob_pitch ($1);
- p = p.transposed (Pitch (-$2,0,0));
- $$ = p.smobbed_copy ();
+ NOTENAME_PITCH quotes {
+ if (!scm_is_eq (SCM_INUM0, $2))
+ {
+ Pitch p = *unsmob_pitch ($1);
+ p = p.transposed (Pitch (scm_to_int ($2),0,0));
+ $$ = p.smobbed_copy ();
+ }
}
;
*/
steno_tonic_pitch:
- TONICNAME_PITCH {
- $$ = $1;
- }
- | TONICNAME_PITCH sup_quotes {
- Pitch p = *unsmob_pitch ($1);
- p = p.transposed (Pitch ($2,0,0));
- $$ = p.smobbed_copy ();
- }
- | TONICNAME_PITCH sub_quotes {
- Pitch p = *unsmob_pitch ($1);
-
- p = p.transposed (Pitch (-$2,0,0));
- $$ = p.smobbed_copy ();
+ TONICNAME_PITCH quotes {
+ if (!scm_is_eq (SCM_INUM0, $2))
+ {
+ Pitch p = *unsmob_pitch ($1);
+ p = p.transposed (Pitch (scm_to_int ($2),0,0));
+ $$ = p.smobbed_copy ();
+ }
}
;
pitch:
- steno_pitch {
- $$ = $1;
- }
+ steno_pitch
| PITCH_IDENTIFIER
;
t->set_property ("text", $1);
$$ = t->unprotect ();
}
- | simple_string {
+ | STRING {
+ Music *t = MY_MAKE_MUSIC ("TextScriptEvent", @$);
+ t->set_property ("text",
+ make_simple_markup ($1));
+ $$ = t->unprotect ();
+ }
+ | LYRICS_STRING {
Music *t = MY_MAKE_MUSIC ("TextScriptEvent", @$);
t->set_property ("text",
make_simple_markup ($1));
$$ = t->unprotect ();
}
+ | embedded_scm_bare
+ {
+ Music *m = unsmob_music ($1);
+ if (m && m->is_mus_type ("post-event"))
+ $$ = $1;
+ else if (Text_interface::is_markup ($1)) {
+ Music *t = MY_MAKE_MUSIC ("TextScriptEvent", @$);
+ t->set_property ("text", $1);
+ $$ = t->unprotect ();
+ } else
+ parser->parser_error (@1, _ ("not an articulation"));
+ }
;
fingering:
;
script_dir:
- '_' { $$ = DOWN; }
- | '^' { $$ = UP; }
- | '-' { $$ = CENTER; }
+ '_' { $$ = scm_from_int (DOWN); }
+ | '^' { $$ = scm_from_int (UP); }
+ | '-' { $$ = SCM_UNDEFINED; }
;
duration_length:
;
steno_duration:
- bare_unsigned dots {
+ UNSIGNED dots {
int len = 0;
- if (!is_duration ($1))
- parser->parser_error (@1, _f ("not a duration: %d", $1));
+ int n = scm_to_int ($1);
+ if (!is_duration (n))
+ parser->parser_error (@1, _f ("not a duration: %d", n));
else
- len = intlog2 ($1);
+ len = intlog2 (n);
- $$ = Duration (len, $2).smobbed_copy ();
+ $$ = Duration (len, scm_to_int ($2)).smobbed_copy ();
}
| DURATION_IDENTIFIER dots {
Duration *d = unsmob_duration ($1);
- Duration k (d->duration_log (), d->dot_count () + $2);
+ Duration k (d->duration_log (),
+ d->dot_count () + scm_to_int ($2));
k = k.compressed (d->factor ());
- *d = k;
- $$ = $1;
+ scm_remember_upto_here_1 ($1);
+ $$ = k.smobbed_copy ();
}
;
steno_duration {
$$ = $1;
}
- | multiplied_duration '*' bare_unsigned {
- $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
+ | multiplied_duration '*' UNSIGNED {
+ $$ = unsmob_duration ($$)->compressed (scm_to_int ($3)).smobbed_copy ();
}
| multiplied_duration '*' FRACTION {
Rational m (scm_to_int (scm_car ($3)), scm_to_int (scm_cdr ($3)));
dots:
/* empty */ {
- $$ = 0;
+ $$ = SCM_INUM0;
}
| dots '.' {
- $$ ++;
+ $$ = scm_oneplus ($1);
}
;
tremolo_type:
':' {
- $$ = 0;
+ $$ = SCM_INUM0;
}
- | ':' bare_unsigned {
- if (!is_duration ($2))
- parser->parser_error (@2, _f ("not a duration: %d", $2));
+ | ':' UNSIGNED {
+ int n = scm_to_int ($2);
+ if (!is_duration (n))
+ parser->parser_error (@2, _f ("not a duration: %d", n));
$$ = $2;
}
;
UNSIGNED { $$ = $1; }
| STRING { $$ = $1; }
| full_markup { $$ = $1; }
+ | embedded_scm_bare
+ {
+ // as an integer, it needs to be non-negative, and otherwise
+ // it needs to be suitable as a markup.
+ if (scm_is_integer ($1)
+ ? scm_is_true (scm_negative_p ($1))
+ : !Text_interface::is_markup ($1))
+ {
+ parser->parser_error (@1, _ ("bass number expected"));
+ $$ = SCM_INUM0;
+ }
+ }
;
figured_bass_alteration:
optional_rest:
- /**/ { $$ = 0; }
- | REST { $$ = 1; }
+ /**/ { $$ = SCM_BOOL_F; }
+ | REST { $$ = SCM_BOOL_T; }
;
simple_element:
pitch exclamations questions octave_check maybe_notemode_duration optional_rest {
if (!parser->lexer_->is_note_state ())
parser->parser_error (@1, _ ("have to be in Note mode for notes"));
- if ($2 || $3 || scm_is_number ($4) || !SCM_UNBNDP ($5) || $6)
+ if (!SCM_UNBNDP ($2)
+ || !SCM_UNBNDP ($3)
+ || scm_is_number ($4)
+ || !SCM_UNBNDP ($5)
+ || scm_is_true ($6))
{
Music *n = 0;
- if ($6)
+ if (scm_is_true ($6))
n = MY_MAKE_MUSIC ("RestEvent", @$);
else
n = MY_MAKE_MUSIC ("NoteEvent", @$);
n->set_property ("absolute-octave", scm_from_int (q-1));
}
- if ($3 % 2)
+ if (to_boolean ($3))
n->set_property ("cautionary", SCM_BOOL_T);
- if ($2 % 2 || $3 % 2)
+ if (to_boolean ($2) || to_boolean ($3))
n->set_property ("force-accidental", SCM_BOOL_T);
$$ = n->unprotect ();
;
step_number:
- bare_unsigned {
+ UNSIGNED {
$$ = make_chord_step ($1, 0);
}
- | bare_unsigned '+' {
+ | UNSIGNED '+' {
$$ = make_chord_step ($1, SHARP_ALTERATION);
}
- | bare_unsigned CHORD_MINUS {
+ | UNSIGNED CHORD_MINUS {
$$ = make_chord_step ($1, FLAT_ALTERATION);
}
;
tempo_range:
- bare_unsigned {
- $$ = scm_from_int ($1);
+ UNSIGNED {
+ $$ = $1;
}
- | bare_unsigned '~' bare_unsigned {
- $$ = scm_cons (scm_from_int ($1), scm_from_int ($3));
+ | UNSIGNED '~' UNSIGNED {
+ $$ = scm_cons ($1, $3);
}
;
| NUMBER_IDENTIFIER
;
-bare_unsigned:
- UNSIGNED {
- $$ = scm_to_int ($1);
- }
- ;
-
unsigned_number:
UNSIGNED
| NUMBER_IDENTIFIER
;
exclamations:
- { $$ = 0; }
- | exclamations '!' { $$ ++; }
+ { $$ = SCM_UNDEFINED; }
+ | exclamations '!'
+ {
+ if (SCM_UNBNDP ($1))
+ $$ = SCM_BOOL_T;
+ else
+ $$ = scm_not ($1);
+ }
;
questions:
- { $$ = 0; }
- | questions '?' { $$ ++; }
+ { $$ = SCM_UNDEFINED; }
+ | questions '?'
+ {
+ if (SCM_UNBNDP ($1))
+ $$ = SCM_BOOL_T;
+ else
+ $$ = scm_not ($1);
+ }
;
/*
*/
lyric_markup:
- LYRIC_MARKUP_IDENTIFIER {
- $$ = $1;
- }
- | LYRIC_MARKUP
+ LYRIC_MARKUP
{ parser->lexer_->push_markup_state (); }
markup_top {
$$ = $3;
;
full_markup_list:
- MARKUPLIST_IDENTIFIER {
- $$ = $1;
- }
- | MARKUPLIST
+ MARKUPLIST
{ parser->lexer_->push_markup_state (); }
markup_list {
$$ = $3;
;
full_markup:
- MARKUP_IDENTIFIER {
- $$ = $1;
- }
- | MARKUP
+ MARKUP
{ parser->lexer_->push_markup_state (); }
markup_top {
$$ = $3;
markup_list:
- MARKUPLIST_IDENTIFIER {
- $$ = $1;
- }
- | markup_composed_list {
+ markup_composed_list {
$$ = $1;
}
| markup_braced_list {
STRING {
$$ = make_simple_markup ($1);
}
- | MARKUP_IDENTIFIER {
- $$ = $1;
- }
- | LYRIC_MARKUP_IDENTIFIER {
- $$ = $1;
- }
- | STRING_IDENTIFIER {
- $$ = $1;
- }
| SCORE {
SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
parser->lexer_->push_note_state (nn);
} '{' score_body '}' {
- Score * sc = $4;
- $$ = scm_list_2 (ly_lily_module_constant ("score-markup"), sc->self_scm ());
- sc->unprotect ();
+ $$ = scm_list_2 (ly_lily_module_constant ("score-markup"), $4);
parser->lexer_->pop_state ();
}
| MARKUP_FUNCTION markup_command_basic_arguments {
yydebug = x;
}
-void
+SCM
Lily_parser::do_yyparse ()
{
- yyparse (this);
+ SCM retval = SCM_UNDEFINED;
+ yyparse (this, &retval);
+ return retval;
}
int
Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
{
- if (scm_is_string (sid)) {
- *destination = sid;
- return STRING_IDENTIFIER;
- } else if (unsmob_book (sid)) {
+ if (unsmob_book (sid)) {
Book *book = unsmob_book (sid)->clone ();
*destination = book->self_scm ();
book->unprotect ();
*destination = p->self_scm ();
p->unprotect ();
return OUTPUT_DEF_IDENTIFIER;
- } else if (Text_interface::is_markup (sid)) {
- *destination = sid;
- if (is_lyric_state ())
- return LYRIC_MARKUP_IDENTIFIER;
- return MARKUP_IDENTIFIER;
- } else if (Text_interface::is_markup_list (sid)) {
- *destination = sid;
- return MARKUPLIST_IDENTIFIER;
}
return -1;
return v;
}
+SCM
+make_music_from_simple (Lily_parser *parser, Input loc, SCM simple)
+{
+ if (unsmob_music (simple))
+ return simple;
+ if (parser->lexer_->is_note_state ()) {
+ Music *n = MY_MAKE_MUSIC ("NoteEvent", loc);
+ n->set_property ("duration", parser->default_duration_.smobbed_copy ());
+ if (scm_is_symbol (simple))
+ n->set_property ("drum-type", simple);
+ else if (unsmob_pitch (simple))
+ n->set_property ("pitch", simple);
+ else {
+ n->unprotect ();
+ return simple;
+ }
+ return n->unprotect ();
+ } else if (parser->lexer_->is_lyric_state ()) {
+ if (Text_interface::is_markup (simple))
+ return MAKE_SYNTAX ("lyric-event", loc, simple,
+ parser->default_duration_.smobbed_copy ());
+ } else if (parser->lexer_->is_chord_state ()) {
+ if (unsmob_pitch (simple))
+ return make_chord_elements (loc, simple,
+ parser->default_duration_.smobbed_copy (),
+ SCM_EOL);
+ }
+ return simple;
+}
+
Music *
make_music_with_input (SCM name, Input where)
{
return t && t == 1 << intlog2 (t);
}
-void
-set_music_properties (Music *p, SCM a)
-{
- for (SCM k = a; scm_is_pair (k); k = scm_cdr (k))
- p->set_property (scm_caar (k), scm_cdar (k));
-}
-
-
SCM
-make_chord_step (int step, Rational alter)
+make_chord_step (SCM step_scm, Rational alter)
{
+ int step = scm_to_int (step_scm);
+
if (step == 7)
alter += FLAT_ALTERATION;
DECLARE_ACKNOWLEDGER (script);
DECLARE_ACKNOWLEDGER (dots);
DECLARE_ACKNOWLEDGER (text_script);
- DECLARE_ACKNOWLEDGER (tie);
+ DECLARE_END_ACKNOWLEDGER (tie);
DECLARE_ACKNOWLEDGER (tuplet_number);
void acknowledge_extra_object (Grob_info);
}
void
-Phrasing_slur_engraver::acknowledge_tie (Grob_info info)
+Phrasing_slur_engraver::acknowledge_end_tie (Grob_info info)
{
acknowledge_extra_object (info);
}
ADD_ACKNOWLEDGER (Phrasing_slur_engraver, script);
ADD_ACKNOWLEDGER (Phrasing_slur_engraver, dots);
ADD_ACKNOWLEDGER (Phrasing_slur_engraver, text_script);
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tie);
+ADD_END_ACKNOWLEDGER (Phrasing_slur_engraver, tie);
ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tuplet_number);
ADD_TRANSLATOR (Phrasing_slur_engraver,
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (relocate_binary)
{
string prefix_directory;
- if (getenv ("LILYPOND_RELOCATE_PREFIX"))
+ string argv0_abs;
+ if (argv0_filename.is_absolute ())
{
- prefix_directory = getenv ("LILYPOND_RELOCATE_PREFIX");
-#ifdef __MINGW32__
- /* Normalize file name. */
- prefix_directory = File_name (prefix_directory).to_string ();
-#endif /* __MINGW32__ */
-
- prefix_relocation (prefix_directory);
- string bindir = prefix_directory + "/bin";
- framework_relocation (bindir);
+ argv0_abs = argv0_filename.to_string ();
+ debug_output (_f ("Relocation: is absolute: argv0=%s\n", argv0_ptr));
}
- else if (relocate_binary)
+ else if (argv0_filename.dir_.length ())
{
- string argv0_abs;
- if (argv0_filename.is_absolute ())
- {
- argv0_abs = argv0_filename.to_string ();
- debug_output (_f ("Relocation: is absolute: argv0=%s\n", argv0_ptr));
- }
- else if (argv0_filename.dir_.length ())
- {
- argv0_abs = get_working_directory ()
- + "/" + string (argv0_filename.to_string ());
- debug_output (_f ("Relocation: from cwd: argv0=%s\n", argv0_ptr));
- }
- else
- {
- /* Find absolute ARGV0 name, using PATH. */
- File_path path;
- path.parse_path (getenv ("PATH"));
+ argv0_abs = get_working_directory ()
+ + "/" + string (argv0_filename.to_string ());
+ debug_output (_f ("Relocation : from cwd: argv0=%s\n", argv0_ptr));
+ }
+ else
+ {
+ /* Find absolute ARGV0 name, using PATH. */
+ File_path path;
+ path.parse_path (getenv ("PATH"));
#ifndef __MINGW32__
- argv0_abs = path.find (argv0_filename.to_string ());
+ argv0_abs = path.find (argv0_filename.to_string ());
#else /* __MINGW32__ */
- path.prepend (get_working_directory ());
- char const *ext[] = {"exe", "", 0 };
- argv0_abs = path.find (argv0_filename.to_string (), ext);
+ path.prepend (get_working_directory ());
+ char const *ext[] = {"exe", "", 0 };
+ argv0_abs = path.find (argv0_filename.to_string (), ext);
#endif /* __MINGW32__ */
- debug_output (_f ("Relocation: from PATH=%s\nargv0=%s",
- path.to_string ().c_str (), argv0_ptr), true);
+ debug_output (_f ("Relocation: from PATH=%s\nargv0=%s\n",
+ path.to_string ().c_str (), argv0_ptr), true);
- if (argv0_abs.empty ())
- programming_error ("cannot find absolute argv0");
- }
+ if (argv0_abs.empty ())
+ programming_error ("cannot find absolute argv0");
+ }
- string bindir = dir_name (argv0_abs);
- string argv0_prefix = dir_name (bindir);
- string compile_prefix = dir_name (dir_name (dir_name (lilypond_datadir)));
- if (argv0_prefix != compile_prefix)
- {
- prefix_relocation (argv0_prefix);
- prefix_directory = argv0_prefix;
- }
- if (argv0_prefix != compile_prefix || string (FRAMEWORKDIR) != "..")
- {
- framework_relocation (bindir + "/" + FRAMEWORKDIR);
- prefix_directory = bindir + "/" + FRAMEWORKDIR;
- }
+ string bindir = dir_name (argv0_abs);
+ string argv0_prefix = dir_name (bindir);
+ string compile_prefix = dir_name (dir_name (dir_name (lilypond_datadir)));
+ if (argv0_prefix != compile_prefix)
+ {
+ prefix_relocation (argv0_prefix);
+ prefix_directory = argv0_prefix;
+ }
+ if (argv0_prefix != compile_prefix || string (FRAMEWORKDIR) != "..")
+ {
+ framework_relocation (bindir + "/" + FRAMEWORKDIR);
+ prefix_directory = bindir + "/" + FRAMEWORKDIR;
}
lilypond_datadir = prefix_directory
if (segno)
if (start)
if (end) // { segno, start, end }
- s = robust_scm2string (get_property ("doubleRepeatSegnoType"), ":|S|:");
+ s = robust_scm2string (get_property ("doubleRepeatSegnoType"), ":|.S.|:");
else // { segno, start }
- s = robust_scm2string (get_property ("startRepeatSegnoType"), ".S|:");
+ s = robust_scm2string (get_property ("startRepeatSegnoType"), "S.|:");
else if (end) // { segno, end }
- s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|S");
+ s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|.S");
else // { segno }
s = robust_scm2string (get_property ("segnoType"), "S");
else if (start)
if (end) // { start, end }
- s = robust_scm2string (get_property ("doubleRepeatType"), ":|:");
+ s = robust_scm2string (get_property ("doubleRepeatType"), ":|.|:");
else // { start }
- s = robust_scm2string (get_property ("startRepeatType"), "|:");
+ s = robust_scm2string (get_property ("startRepeatType"), ".|:");
else if (end) // { end }
- s = robust_scm2string (get_property ("endRepeatType"), ":|");
+ s = robust_scm2string (get_property ("endRepeatType"), ":|.");
/*
TODO: line breaks might be allowed if we set whichBar to "".
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
DECLARE_ACKNOWLEDGER (rhythmic_head);
DECLARE_ACKNOWLEDGER (stem);
DECLARE_ACKNOWLEDGER (stem_tremolo);
+ DECLARE_ACKNOWLEDGER (tie);
+ DECLARE_END_ACKNOWLEDGER (tie);
DECLARE_ACKNOWLEDGER (note_column);
DECLARE_ACKNOWLEDGER (inline_accidental);
}
}
+void
+Script_engraver::acknowledge_tie (Grob_info info)
+{
+ for (vsize i = 0; i < scripts_.size (); i++)
+ {
+ Grob *e = scripts_[i].script_;
+ Side_position_interface::add_support (e, info.grob ());
+ }
+}
+
+void
+Script_engraver::acknowledge_end_tie (Grob_info info)
+{
+ for (vsize i = 0; i < scripts_.size (); i++)
+ {
+ Grob *e = scripts_[i].script_;
+ Side_position_interface::add_support (e, info.grob ());
+ }
+}
+
void
Script_engraver::acknowledge_inline_accidental (Grob_info info)
{
ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
ADD_ACKNOWLEDGER (Script_engraver, stem);
+ADD_ACKNOWLEDGER (Script_engraver, tie);
+ADD_END_ACKNOWLEDGER (Script_engraver, tie);
ADD_ACKNOWLEDGER (Script_engraver, note_column);
ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
ADD_ACKNOWLEDGER (Script_engraver, inline_accidental);
"An object that is put above or below a note.",
/* properties */
- "add-stem-support "
"avoid-slur "
"script-priority "
"slur "
"An object that is put above or below a note.",
/* properties */
- "add-stem-support "
"avoid-slur "
"direction-source "
"positioning-done "
Interval iv = me->extent (me, a) + offset;
for (vsize i = 0; i < colls.size (); i++)
- ivs.push_back (colls[i]->extent (refp, a));
+ {
+ int my_vai = Grob::get_vertical_axis_group_index (colls[i]);
+ Direction dir = get_grob_direction (colls[i]);
+ // if coll is cross staff but extremal and pointing in the
+ // direction of the extrema, we don't take it into consideration
+ if (Grob *beam = unsmob_grob (colls[i]->get_object ("beam")))
+ {
+ Interval_t<int> vais;
+ extract_grob_set (beam, "normal-stems", stems);
+ for (vsize j = 0; j < stems.size (); j++)
+ vais.add_point (Grob::get_vertical_axis_group_index (stems[j]));
+ // ugh...up and down are different for VerticalAxisGroup order...
+ if ((my_vai == vais[DOWN] && dir == UP)
+ || (my_vai == vais[UP] && dir == DOWN))
+ continue;
+ }
+ ivs.push_back (colls[i]->extent (refp, a));
+ }
Interval_minefield minefield (Interval (iv.center (), iv.center ()), iv.length ());
for (vsize i = 0; i < ivs.size (); i++)
Separation_item::conditional_skyline (Grob *me, Grob *left)
{
vector<Box> bs = boxes (me, left);
- Real horizon_padding = robust_scm2double (me->get_property ("skyline-vertical-padding"), 0.0);
- return Skyline (bs, horizon_padding, Y_AXIS, LEFT);
+ return Skyline (bs, Y_AXIS, LEFT);
}
MAKE_SCHEME_CALLBACK (Separation_item, calc_skylines, 1);
{
Item *me = unsmob_item (smob);
vector<Box> bs = boxes (me, 0);
- Real horizon_padding = robust_scm2double (me->get_property ("skyline-vertical-padding"), 0.0);
- return Skyline_pair (bs, horizon_padding, Y_AXIS).smobbed_copy ();
+ Skyline_pair sp (bs, Y_AXIS);
+ /*
+ TODO: We need to decide if padding is 'intrinsic'
+ to a skyline or if it is something that is only added on in
+ distance calculations. Here, we make it intrinsic, which copies
+ the behavior from the old code but no longer corresponds to how
+ vertical skylines are handled (where padding is not built into
+ the skyline).
+ */
+ Real vp = robust_scm2double (me->get_property ("skyline-vertical-padding"), 0.0);
+ sp[LEFT] = sp[LEFT].padded (vp);
+ sp[RIGHT] = sp[RIGHT].padded (vp);
+ return sp.smobbed_copy ();
}
/* if left is non-NULL, get the boxes corresponding to the
#include <cmath> // ceil.
#include <algorithm>
+#include <set>
+#include <map>
using namespace std;
#include "accidental-interface.hh"
+#include "accidental-placement.hh"
#include "axis-group-interface.hh"
#include "directional-element-interface.hh"
#include "grob.hh"
#include "main.hh"
#include "misc.hh"
#include "note-head.hh"
+#include "note-column.hh"
#include "pointer-group-interface.hh"
+#include "skyline-pair.hh"
#include "staff-symbol-referencer.hh"
#include "staff-symbol.hh"
#include "stem.hh"
return scm_from_double (total_off);
}
+set<Grob *>
+get_support_set (Grob *me)
+{
+ // Only slightly kludgy heuristic...
+ // We want to make sure that all AccidentalPlacements'
+ // accidentals make it into the side support
+ extract_grob_set (me, "side-support-elements", proto_support);
+ set<Grob *> support;
+
+ for (vsize i = 0; i < proto_support.size (); i++)
+ {
+ if (Accidental_placement::has_interface (proto_support[i]))
+ {
+ Grob *accs = proto_support[i];
+ for (SCM acs = accs->get_object ("accidental-grobs"); scm_is_pair (acs);
+ acs = scm_cdr (acs))
+ for (SCM s = scm_cdar (acs); scm_is_pair (s); s = scm_cdr (s))
+ {
+ Grob *a = unsmob_grob (scm_car (s));
+ support.insert (a);
+ }
+ }
+ else
+ support.insert (proto_support[i]);
+ }
+ return support;
+}
+
/* Put the element next to the support, optionally taking in
account the extent of the support.
bool pure, int start, int end,
Real *current_offset)
{
- extract_grob_set (me, "side-support-elements", support);
+ set<Grob *> support = get_support_set (me);
Grob *common = common_refpoint_of_array (support, me->get_parent (a), a);
Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (me);
Direction dir = get_grob_direction (me);
- for (vsize i = 0; i < support.size (); i++)
+ set<Grob *>::iterator it;
+
+ for (it = support.begin (); it != support.end (); it++)
{
- Grob *e = support[i];
+ Grob *e = *it;
// In the case of a stem, we will find a note head as well
// ignoring the stem solves cyclic dependencies if the stem is
bool pure, int start, int end,
Real *current_offset)
{
- extract_grob_set (me, "side-support-elements", support);
+ set<Grob *> support = get_support_set (me);
Grob *common[2];
for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (me);
Direction dir = get_grob_direction (me);
- Box off;
- for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
+ Skyline my_dim;
+ Skyline_pair *sp = Skyline_pair::unsmob (me->get_property ("vertical-skylines"));
+ if (sp && a == Y_AXIS && !pure)
{
- if (ax == a)
- off[ax] = me->get_parent (ax)->maybe_pure_coordinate (common[ax], ax, pure, start, end)
- + me->maybe_pure_extent (me, ax, pure, start, end);
- else
- off[ax] = me->maybe_pure_extent (common[ax], ax, pure, start, end);
+ Skyline_pair copy = Skyline_pair (*sp);
+ copy.shift (me->relative_coordinate (common[X_AXIS], X_AXIS));
+ copy.raise (me->get_parent (Y_AXIS)->relative_coordinate (common[Y_AXIS], Y_AXIS));
+ my_dim = copy[-dir];
}
+ else
+ {
+ Box off;
+ for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
+ {
+ if (ax == a)
+ off[ax] = me->get_parent (ax)->maybe_pure_coordinate (common[ax], ax, pure, start, end)
+ + me->maybe_pure_extent (me, ax, pure, start, end);
+ else
+ off[ax] = me->maybe_pure_extent (common[ax], ax, pure, start, end);
+ }
- if (off[X_AXIS].is_empty () || off[Y_AXIS].is_empty ())
- return scm_from_double (0.0);
-
- Real skyline_padding = 0.1;
-
- Skyline my_dim (off, skyline_padding, other_axis (a), -dir);
+ if (off[X_AXIS].is_empty () || off[Y_AXIS].is_empty ())
+ return scm_from_double (0.0);
+ my_dim = Skyline (off, other_axis (a), -dir);
+ }
bool include_staff
= staff_symbol
&& a == Y_AXIS
&& !to_boolean (me->get_property ("quantize-position"));
vector<Box> boxes;
+ vector<Skyline_pair> skyps;
Real min_h = dir == LEFT ? infinity_f : -infinity_f;
- for (vsize i = 0; i < support.size (); i++)
+ set<Grob *>::iterator it;
+
+ map<Grob *, vector<Grob *> > note_column_map; // for parts of a note column
+ for (it = support.begin (); it != support.end (); it++)
{
- Grob *e = support[i];
+ Grob *e = *it;
// In the case of a stem, we will find a note head as well
// ignoring the stem solves cyclic dependencies if the stem is
if (e)
{
- if (Accidental_interface::has_interface (e))
- {
- vector<Box> bs = Accidental_interface::accurate_boxes (e, common);
- boxes.insert (boxes.end (), bs.begin (), bs.end ());
- }
- else
- {
- Box b;
- for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
- b[ax] = e->maybe_pure_extent (common[ax], ax, pure, start, end);
+ if (Note_column::has_interface (e->get_parent (X_AXIS))
+ && to_boolean (me->get_property ("add-stem-support")))
+ {
+ note_column_map[e->get_parent (X_AXIS)].push_back (e);
+ continue;
+ }
+
+ Skyline_pair *sp = Skyline_pair::unsmob (e->get_property ("vertical-skylines"));
+ if (sp && a == Y_AXIS && !pure)
+ {
+ Skyline_pair copy = Skyline_pair (*sp);
+ copy.shift (e->relative_coordinate (common[X_AXIS], X_AXIS));
+ copy.raise (e->relative_coordinate (common[Y_AXIS], Y_AXIS));
+ skyps.push_back (copy);
+ continue;
+ }
+ Box b;
+ for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
+ b[ax] = e->maybe_pure_extent (common[ax], ax, pure, start, end);
+
+ if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
+ continue;
+
+ boxes.push_back (b);
+ min_h = minmax (dir, b[a][-dir], min_h);
+ }
+ }
- if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
- continue;
+ // this loop ensures that parts of a note column will be in the same box
+ // pushes scripts and such over stems instead of just over heads
+ for (map<Grob *, vector<Grob *> >::iterator i = note_column_map.begin (); i != note_column_map.end (); i++)
+ {
+ Box big;
+ for (vsize j = 0; j < (*i).second.size (); j++)
+ {
+ Grob *e = (*i).second[j];
+ Box b;
+ for (Axis ax = X_AXIS; ax < NO_AXES; incr (ax))
+ b[ax] = e->maybe_pure_extent (common[ax], ax, pure, start, end);
- boxes.push_back (b);
- min_h = minmax (dir, b[a][-dir], min_h);
- }
+ if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
+ continue;
+
+ big.unite (b);
}
+ if (!big[X_AXIS].is_empty () && !big[Y_AXIS].is_empty ())
+ boxes.push_back (big);
}
- Skyline dim (boxes, skyline_padding, other_axis (a), dir);
+ Skyline dim (boxes, other_axis (a), dir);
+ if (skyps.size ())
+ {
+ Skyline_pair merged (skyps);
+ dim.merge (merged[dir]);
+ }
if (!boxes.size ())
dim.set_minimum_height (0.0);
else
dim.set_minimum_height (minmax (dir, min_h, staff_extents[dir]));
}
- Real total_off = dir * dim.distance (my_dim);
+ Real dist = dim.distance (my_dim, 0.1); // 0.1 m4g1c value...fix...
+ Real total_off = !isinf (dist) ? dir * dist : 0.0;
+
return finish_offset (me, dir, total_off, current_offset);
}
Direction dir = get_grob_direction (me);
bool skyline = to_boolean (me->get_property ("use-skylines"));
- Real o = scm_to_double (skyline
+ Real o = scm_to_double (skyline && !pure
? skyline_side_position (me, a, pure, start, end, current_off)
: general_side_position (me, a, true, true, pure, start, end, current_off));
" is ignored.",
/* properties */
+ "add-stem-support "
"direction "
"minimum-space "
"padding "
{
}
-Skyline_pair::Skyline_pair (vector<Box> const &boxes, Real padding, Axis a)
- : skylines_ (Skyline (boxes, padding, a, DOWN), Skyline (boxes, padding, a, UP))
+Skyline_pair::Skyline_pair (vector<Box> const &boxes, Axis a)
+ : skylines_ (Skyline (boxes, a, DOWN), Skyline (boxes, a, UP))
{
}
-Skyline_pair::Skyline_pair (Box const &b, Real padding, Axis a)
- : skylines_ (Skyline (b, padding, a, DOWN), Skyline (b, padding, a, UP))
+Skyline_pair::Skyline_pair (vector<Drul_array<Offset> > const &buildings, Axis a)
+ : skylines_ (Skyline (buildings, a, DOWN), Skyline (buildings, a, UP))
+{
+}
+
+Skyline_pair::Skyline_pair (vector<Skyline_pair> const &skypairs)
+ : skylines_ (Skyline (skypairs, DOWN), Skyline (skypairs, UP))
+{
+}
+
+Skyline_pair::Skyline_pair (Box const &b, Axis a)
+ : skylines_ (Skyline (b, a, DOWN), Skyline (b, a, UP))
{
}
skylines_[DOWN].raise (r);
}
+void
+Skyline_pair::deholify ()
+{
+ skylines_[UP].deholify ();
+ skylines_[DOWN].deholify ();
+}
+
void
Skyline_pair::shift (Real r)
{
}
void
-Skyline_pair::insert (Box const &b, Real padding, Axis a)
+Skyline_pair::insert (Box const &b, Axis a)
{
- skylines_[UP].insert (b, padding, a);
- skylines_[DOWN].insert (b, padding, a);
+ skylines_[UP].insert (b, a);
+ skylines_[DOWN].insert (b, a);
}
void
skylines_[DOWN].print ();
}
+Real
+Skyline_pair::left () const
+{
+ return min (skylines_[UP].left (), skylines_[DOWN].left ());
+}
+
+Real
+Skyline_pair::right () const
+{
+ return max (skylines_[UP].right (), skylines_[DOWN].right ());
+}
+
void
Skyline_pair::print_points () const
{
- skylines_[UP].print ();
- skylines_[DOWN].print ();
+ skylines_[UP].print_points ();
+ skylines_[DOWN].print_points ();
}
bool
*/
#include "skyline.hh"
+#include "skyline-pair.hh"
#include <deque>
#include <cstdio>
if (isinf (start) || isinf (end))
assert (start_height == end_height);
+ start_ = start;
end_ = end;
precompute (start, start_height, end_height, end);
}
-Building::Building (Box const &b, Real horizon_padding, Axis horizon_axis, Direction sky)
+Building::Building (Box const &b, Axis horizon_axis, Direction sky)
{
- Real start = b[horizon_axis][LEFT] - horizon_padding;
- Real end = b[horizon_axis][RIGHT] + horizon_padding;
+ Real start = b[horizon_axis][LEFT];
+ Real end = b[horizon_axis][RIGHT];
Real height = sky * b[other_axis (horizon_axis)][sky];
+ start_ = start;
end_ = end;
precompute (start, height, height, end);
}
void
Building::precompute (Real start, Real start_height, Real end_height, Real end)
{
- slope_ = (end_height - start_height) / (end - start);
- if (start_height == end_height) /* if they were both infinite, we would get nan, not 0, from the prev line */
- slope_ = 0;
+ slope_ = 0.0; /* if they were both infinite, we would get nan, not 0, from the prev line */
+ if (start_height != end_height)
+ slope_ = (end_height - start_height) / (end - start);
assert (!isinf (slope_) && !isnan (slope_));
y_intercept_ = start_height - slope_ * start;
}
-Real
+inline Real
Building::height (Real x) const
{
return isinf (x) ? y_intercept_ : slope_ * x + y_intercept_;
void
Building::print () const
{
- printf ("%f x + %f ends at %f\n", slope_, y_intercept_, end_);
+ printf ("%f x + %f from %f to %f\n", slope_, y_intercept_, start_, end_);
}
-Real
+inline Real
Building::intersection_x (Building const &other) const
{
Real ret = (y_intercept_ - other.y_intercept_) / (other.slope_ - slope_);
end_ = chop;
}
-Building
-Building::sloped_neighbour (Real start, Real horizon_padding, Direction d) const
+// Returns a shift s such that (x + s, y) intersects the roof of
+// this building. If no such shift exists, returns infinity_f.
+Real
+Building::shift_to_intersect (Real x, Real y) const
{
- Real x = (d == LEFT) ? start : end_;
- Real left = x;
- Real right = x + d * horizon_padding;
- Real left_height = height (x);
- Real right_height = left_height - horizon_padding;
- if (d == LEFT)
- {
- swap (left, right);
- swap (left_height, right_height);
- }
- return Building (left, left_height, right_height, right);
+ // Solve for s: y = (x + s)*m + b
+ Real ret = (y - y_intercept_ - slope_ * x) / slope_;
+
+ if (ret >= start_ && ret <= end_ && !isinf (ret))
+ return ret;
+ return infinity_f;
}
static Real
while (!s->empty () && start_x < b.end_)
{
Building c = s->front ();
+
+ // conceals and intersection_x involve multiplication and
+ // division. Avoid that, if we can.
+ if (c.y_intercept_ == -infinity_f)
+ {
+ if (c.end_ > b.end_)
+ return b.end_;
+ start_x = c.end_;
+ s->pop_front ();
+ continue;
+ }
+
if (c.conceals (b, start_x))
return start_x;
|| (i > x && slope_ < other.slope_);
}
+// Remove redundant empty buildings from the skyline.
+// If there are two adjacent empty buildings, they can be
+// turned into one.
+void
+Skyline::normalize ()
+{
+ bool last_empty = false;
+ list<Building>::iterator i;
+ for (i = buildings_.begin (); i != buildings_.end (); i++)
+ {
+ if (last_empty && i->y_intercept_ == -infinity_f)
+ {
+ list<Building>::iterator last = i;
+ last--;
+ last->end_ = i->end_;
+ buildings_.erase (i);
+ i = last;
+ }
+ last_empty = (i->y_intercept_ == -infinity_f);
+ }
+
+ assert (buildings_.front ().start_ == -infinity_f);
+ assert (buildings_.back ().end_ == infinity_f);
+}
+
+void
+Skyline::deholify ()
+{
+ // Since a skyline should always be normalized, we can
+ // assume that there are never two adjacent empty buildings.
+ // That is, if center is empty then left and right are not.
+ list<Building>::iterator left = buildings_.begin ();
+ list<Building>::iterator center = buildings_.begin ();
+ list<Building>::iterator right;
+
+ for (right = buildings_.begin (); right != buildings_.end (); right++)
+ {
+ if (center != buildings_.begin () && center->y_intercept_ == -infinity_f)
+ {
+ Real p1 = left->height (left->end_);
+ Real p2 = right->height (right->start_);
+ *center = Building (center->start_, p1, p2, center->end_);
+
+ left = center;
+ center = right;
+ }
+ }
+}
+
void
Skyline::internal_merge_skyline (list<Building> *s1, list<Building> *s2,
- list<Building> *const result)
+ list<Building> *const result) const
{
if (s1->empty () || s2->empty ())
{
}
Real x = -infinity_f;
+ Real last_end = -infinity_f;
while (!s1->empty ())
{
if (s2->front ().conceals (s1->front (), x))
swap (s1, s2);
Building b = s1->front ();
- Real end = first_intersection (b, s2, x);
+ Building c = s2->front ();
+ // Optimization: if the other skyline is empty at this point,
+ // we can avoid testing some intersections. Just grab as many
+ // buildings from s1 as we can, and shove them onto the output.
+ if (c.y_intercept_ == -infinity_f
+ && c.end_ >= b.end_)
+ {
+ list<Building>::iterator i = s1->begin ();
+ i++;
+ while (i != s1->end () && i->end_ <= c.end_)
+ i++;
+
+ s1->front ().start_ = x;
+ result->splice (result->end (), *s1, s1->begin (), i);
+ x = result->back ().end_;
+ last_end = x;
+ continue;
+ }
+
+ Real end = first_intersection (b, s2, x);
if (s2->empty ())
{
- result->push_front (b);
+ b.start_ = last_end;
+ result->push_back (b);
break;
}
if (end > x + EPS)
{
b.leading_part (end);
- result->push_front (b);
+ b.start_ = last_end;
+ last_end = b.end_;
+ result->push_back (b);
}
if (end >= s1->front ().end_)
x = end;
}
- result->reverse ();
}
static void
}
/*
- Given Building 'b' with starting wall location 'start', extend each side
- with a sloped roofline of width 'horizon_padding'; put the skyline in 'ret'
+ Given Building 'b', build a skyline containing only that building.
*/
static void
-single_skyline (Building b, Real start, Real horizon_padding, list<Building> *const ret)
+single_skyline (Building b, list<Building> *const ret)
{
- bool sloped_neighbours = horizon_padding > 0 && !isinf (start) && !isinf (b.end_);
- if (!isinf (b.end_))
- ret->push_front (Building (b.end_ + horizon_padding, -infinity_f,
- -infinity_f, infinity_f));
- if (sloped_neighbours)
- ret->push_front (b.sloped_neighbour (start, horizon_padding, RIGHT));
-
- if (b.end_ > start + EPS)
- ret->push_front (b);
-
- if (sloped_neighbours)
- ret->push_front (b.sloped_neighbour (start, horizon_padding, LEFT));
-
- if (!isinf (start))
- ret->push_front (Building (-infinity_f, -infinity_f,
- -infinity_f, start - horizon_padding));
+ if (b.end_ > b.start_ + EPS)
+ {
+ ret->push_back (Building (-infinity_f, -infinity_f,
+ -infinity_f, b.start_));
+ ret->push_back (b);
+ ret->push_back (Building (b.end_, -infinity_f,
+ -infinity_f, infinity_f));
+ }
+ else
+ {
+ empty_skyline (ret);
+ }
}
/* remove a non-overlapping set of boxes from BOXES and build a skyline
out of them */
static list<Building>
-non_overlapping_skyline (list<Box> *const boxes, Real horizon_padding, Axis horizon_axis, Direction sky)
+non_overlapping_skyline (list<Building> *const buildings)
{
list<Building> result;
Real last_end = -infinity_f;
- list<Box>::iterator i = boxes->begin ();
- while (i != boxes->end ())
+ Building last_building (-infinity_f, -infinity_f, -infinity_f, infinity_f);
+ list<Building>::iterator i = buildings->begin ();
+ while (i != buildings->end ())
{
- Interval iv = (*i)[horizon_axis];
+ Real x1 = i->start_;
+ Real y1 = i->height (i->start_);
+ Real x2 = i->end_;
+ Real y2 = i->height (i->end_);
+
+ // Drop buildings that will obviously have no effect.
+ if (last_building.height (x1) >= y1
+ && last_building.end_ >= x2
+ && last_building.height (x2) >= y2)
+ {
+ list<Building>::iterator j = i++;
+ buildings->erase (j);
+ continue;
+ }
- if (iv[LEFT] - horizon_padding < last_end)
+ if (x1 < last_end)
{
i++;
continue;
}
- if (iv[LEFT] - horizon_padding > last_end + EPS)
- result.push_front (Building (last_end, -infinity_f, -infinity_f, iv[LEFT] - 2 * horizon_padding));
+ if (x1 > last_end + EPS)
+ result.push_back (Building (last_end, -infinity_f, -infinity_f, x1));
- Building b (*i, horizon_padding, horizon_axis, sky);
- bool sloped_neighbours = horizon_padding > 0 && !isinf (iv.length ());
- if (sloped_neighbours)
- result.push_front (b.sloped_neighbour (iv[LEFT] - horizon_padding, horizon_padding, LEFT));
- result.push_front (b);
- if (sloped_neighbours)
- result.push_front (b.sloped_neighbour (iv[LEFT] - horizon_padding, horizon_padding, RIGHT));
+ result.push_back (*i);
+ last_building = *i;
+ last_end = i->end_;
- list<Box>::iterator j = i++;
- boxes->erase (j);
- last_end = result.front ().end_;
+ list<Building>::iterator j = i++;
+ buildings->erase (j);
}
+
if (last_end < infinity_f)
- result.push_front (Building (last_end, -infinity_f, -infinity_f, infinity_f));
- result.reverse ();
+ result.push_back (Building (last_end, -infinity_f, -infinity_f, infinity_f));
return result;
}
-class LessThanBox
+class LessThanBuilding
{
- Axis a_;
-
public:
- LessThanBox (Axis a)
- {
- a_ = a;
- }
-
- bool operator () (Box const &b1, Box const &b2)
+ bool operator () (Building const &b1, Building const &b2)
{
- return b1[a_][LEFT] < b2[a_][LEFT];
+ return b1.start_ < b2.start_
+ || (b1.start_ == b2.start_ && b1.height (b1.start_) > b2.height (b1.start_));
}
};
+/**
+ BUILDINGS is a list of buildings, but they could be overlapping
+ and in any order. The returned list of buildings is ordered and non-overlapping.
+*/
list<Building>
-Skyline::internal_build_skyline (list<Box> *boxes, Real horizon_padding, Axis horizon_axis, Direction sky)
+Skyline::internal_build_skyline (list<Building> *buildings) const
{
- vsize size = boxes->size ();
+ vsize size = buildings->size ();
if (size == 0)
{
else if (size == 1)
{
list<Building> result;
- single_skyline (Building (boxes->front (), horizon_padding, horizon_axis, sky),
- boxes->front ()[horizon_axis][LEFT] - horizon_padding,
- horizon_padding, &result);
+ single_skyline (buildings->front (), &result);
return result;
}
deque<list<Building> > partials;
- boxes->sort (LessThanBox (horizon_axis));
- while (!boxes->empty ())
- partials.push_back (non_overlapping_skyline (boxes, horizon_padding, horizon_axis, sky));
+ buildings->sort (LessThanBuilding ());
+ while (!buildings->empty ())
+ partials.push_back (non_overlapping_skyline (buildings));
/* we'd like to say while (partials->size () > 1) but that's O (n).
Instead, we exit in the middle of the loop */
}
/*
- build padded skyline from an existing skyline with padding
- added to it.
-*/
+ Build skyline from a set of boxes.
-Skyline::Skyline (Skyline const &src, Real horizon_padding, Axis /*a*/)
+ Boxes should have fatness in the horizon_axis, otherwise they are ignored.
+ */
+Skyline::Skyline (vector<Box> const &boxes, Axis horizon_axis, Direction sky)
{
- /*
- We extract boxes from the skyline, then build a new skyline from
- the boxes.
- A box is created for every horizontal portion of the skyline
- Because skylines are defined positive, and then inverted if they
- are to be down-facing, we create the new skyline in the UP
- direction, then give it the down direction if needed.
- */
- Real start = -infinity_f;
- list<Box> boxes;
-
- // establish a baseline box
- // FIXME: This has hardcoded logic, assuming a == X_AXIS!
- boxes.push_back (Box (Interval (-infinity_f, infinity_f),
- Interval (0, 0)));
- list<Building>::const_iterator end = src.buildings_.end ();
- for (list<Building>::const_iterator i = src.buildings_.begin (); i != end; start = i->end_, i++)
- if ((i->slope_ == 0) && !isinf (i->y_intercept_))
- boxes.push_back (Box (Interval (start, i->end_),
- Interval (-infinity_f, i->y_intercept_)));
- buildings_ = internal_build_skyline (&boxes, horizon_padding, X_AXIS, UP);
- sky_ = src.sky_;
+ list<Building> buildings;
+ sky_ = sky;
+
+ Axis vert_axis = other_axis (horizon_axis);
+ for (vsize i = 0; i < boxes.size (); i++)
+ {
+ Interval iv = boxes[i][horizon_axis];
+ if (iv.length () > EPS && !boxes[i][vert_axis].is_empty ())
+ buildings.push_front (Building (boxes[i], horizon_axis, sky));
+ }
+
+ buildings_ = internal_build_skyline (&buildings);
+ normalize ();
}
/*
- build skyline from a set of boxes. If horizon_padding > 0, expand all the boxes
- by that amount and add 45-degree sloped boxes to the edges of each box (of
- width horizon_padding). That is, the total amount of horizontal expansion is
- horizon_padding*4, half of which is sloped and half of which is flat.
+ build skyline from a set of line segments.
- Boxes should have fatness in the horizon_axis (after they are expanded by
- horizon_padding), otherwise they are ignored.
+ Buildings should have fatness in the horizon_axis, otherwise they are ignored.
*/
-Skyline::Skyline (vector<Box> const &boxes, Real horizon_padding, Axis horizon_axis, Direction sky)
+Skyline::Skyline (vector<Drul_array<Offset> > const &segments, Axis horizon_axis, Direction sky)
{
- list<Box> filtered_boxes;
+ list<Building> buildings;
sky_ = sky;
- Axis vert_axis = other_axis (horizon_axis);
- for (vsize i = 0; i < boxes.size (); i++)
+ for (vsize i = 0; i < segments.size (); i++)
{
- Interval iv = boxes[i][horizon_axis];
- iv.widen (horizon_padding);
- if (iv.length () > EPS && !boxes[i][vert_axis].is_empty ())
- filtered_boxes.push_front (boxes[i]);
+ Drul_array<Offset> const &seg = segments[i];
+ Offset left = seg[LEFT];
+ Offset right = seg[RIGHT];
+ if (left[horizon_axis] > right[horizon_axis])
+ swap (left, right);
+
+ Real x1 = left[horizon_axis];
+ Real x2 = right[horizon_axis];
+ Real y1 = left[other_axis (horizon_axis)] * sky;
+ Real y2 = right[other_axis (horizon_axis)] * sky;
+
+ if (x1 + EPS < x2)
+ buildings.push_back (Building (x1, y1, y2, x2));
}
- buildings_ = internal_build_skyline (&filtered_boxes, horizon_padding, horizon_axis, sky);
+ buildings_ = internal_build_skyline (&buildings);
+ normalize ();
}
-Skyline::Skyline (Box const &b, Real horizon_padding, Axis horizon_axis, Direction sky)
+Skyline::Skyline (vector<Skyline_pair> const &skypairs, Direction sky)
{
sky_ = sky;
- Building front (b, horizon_padding, horizon_axis, sky);
- single_skyline (front, b[horizon_axis][LEFT] - horizon_padding,
- horizon_padding, &buildings_);
+
+ deque<Skyline> partials;
+ for (vsize i = 0; i < skypairs.size (); i++)
+ partials.push_back (Skyline ((skypairs[i])[sky]));
+
+ while (partials.size () > 1)
+ {
+ Skyline one = partials.front ();
+ partials.pop_front ();
+ Skyline two = partials.front ();
+ partials.pop_front ();
+
+ one.merge (two);
+ partials.push_back (one);
+ }
+
+ if (partials.size ())
+ buildings_.swap (partials.front ().buildings_);
+ else
+ buildings_.clear ();
+}
+
+Skyline::Skyline (Box const &b, Axis horizon_axis, Direction sky)
+{
+ sky_ = sky;
+ Building front (b, horizon_axis, sky);
+ single_skyline (front, &buildings_);
}
void
{
assert (sky_ == other.sky_);
+ if (other.is_empty ())
+ return;
+
+ if (is_empty ())
+ {
+ buildings_ = other.buildings_;
+ return;
+ }
+
list<Building> other_bld (other.buildings_);
list<Building> my_bld;
my_bld.splice (my_bld.begin (), buildings_);
internal_merge_skyline (&other_bld, &my_bld, &buildings_);
+ normalize ();
}
void
-Skyline::insert (Box const &b, Real horizon_padding, Axis a)
+Skyline::insert (Box const &b, Axis a)
{
list<Building> other_bld;
list<Building> my_bld;
/* do the same filtering as in Skyline (vector<Box> const&, etc.) */
Interval iv = b[a];
- iv.widen (horizon_padding);
if (iv.length () <= EPS || b[other_axis (a)].is_empty ())
return;
my_bld.splice (my_bld.begin (), buildings_);
- single_skyline (Building (b, horizon_padding, a, sky_), b[a][LEFT] - horizon_padding,
- horizon_padding, &other_bld);
+ single_skyline (Building (b, a, sky_), &other_bld);
internal_merge_skyline (&other_bld, &my_bld, &buildings_);
+ normalize ();
}
void
list<Building>::iterator end = buildings_.end ();
for (list<Building>::iterator i = buildings_.begin (); i != end; i++)
{
+ i->start_ += s;
i->end_ += s;
i->y_intercept_ -= s * i->slope_;
}
Real
Skyline::internal_distance (Skyline const &other, Real horizon_padding, Real *touch_point) const
{
- assert (sky_ == -other.sky_);
+ if (horizon_padding == 0.0)
+ return internal_distance (other, touch_point);
+
+ // Note that it is not necessary to build a padded version of other,
+ // because the same effect can be achieved just by doubling horizon_padding.
+ Skyline padded_this = padded (horizon_padding);
+ return padded_this.internal_distance (other, touch_point);
+}
- Skyline const *padded_this = this;
- Skyline const *padded_other = &other;
- bool created_tmp_skylines = false;
-
- /*
- For systems, padding is not added at creation time. Padding is
- added to AxisGroup objects when outside-staff objects are added.
- Thus, when we want to place systems with horizontal padding,
- we do it at distance calculation time.
- */
- if (horizon_padding != 0.0)
+Skyline
+Skyline::padded (Real horizon_padding) const
+{
+ list<Building> pad_buildings;
+ for (list<Building>::const_iterator i = buildings_.begin (); i != buildings_.end (); ++i)
{
- padded_this = new Skyline (*padded_this, horizon_padding, X_AXIS);
- padded_other = new Skyline (*padded_other, horizon_padding, X_AXIS);
- created_tmp_skylines = true;
+ if (i->start_ > -infinity_f)
+ {
+ Real height = i->height (i->start_);
+ if (height > -infinity_f)
+ {
+ // Add the sloped building that pads the left side of the current building.
+ Real start = i->start_ - 2 * horizon_padding;
+ Real end = i->start_ - horizon_padding;
+ pad_buildings.push_back (Building (start, height - horizon_padding, height, end));
+
+ // Add the flat building that pads the left side of the current building.
+ start = i->start_ - horizon_padding;
+ end = i->start_;
+ pad_buildings.push_back (Building (start, height, height, end));
+ }
+ }
+
+ if (i->end_ < infinity_f)
+ {
+ Real height = i->height (i->end_);
+ if (height > -infinity_f)
+ {
+ // Add the flat building that pads the right side of the current building.
+ Real start = i->end_;
+ Real end = start + horizon_padding;
+ pad_buildings.push_back (Building (start, height, height, end));
+
+ // Add the sloped building that pads the right side of the current building.
+ start = end;
+ end += horizon_padding;
+ pad_buildings.push_back (Building (start, height, height - horizon_padding, end));
+ }
+ }
}
- list<Building>::const_iterator i = padded_this->buildings_.begin ();
- list<Building>::const_iterator j = padded_other->buildings_.begin ();
+ // The buildings may be overlapping, so resolve that.
+ list<Building> pad_skyline = internal_build_skyline (&pad_buildings);
+
+ // Merge the padding with the original, to make a new skyline.
+ Skyline padded (sky_);
+ list<Building> my_buildings = buildings_;
+ padded.buildings_.clear ();
+ internal_merge_skyline (&pad_skyline, &my_buildings, &padded.buildings_);
+ padded.normalize ();
+
+ return padded;
+}
+
+Real
+Skyline::internal_distance (Skyline const &other, Real *touch_point) const
+{
+ assert (sky_ == -other.sky_);
+
+ list<Building>::const_iterator i = buildings_.begin ();
+ list<Building>::const_iterator j = other.buildings_.begin ();
Real dist = -infinity_f;
Real start = -infinity_f;
Real touch = -infinity_f;
- while (i != padded_this->buildings_.end () && j != padded_other->buildings_.end ())
+ while (i != buildings_.end () && j != other.buildings_.end ())
{
Real end = min (i->end_, j->end_);
Real start_dist = i->height (start) + j->height (start);
start = end;
}
- if (created_tmp_skylines)
- {
- delete padded_this;
- delete padded_other;
- }
-
*touch_point = touch;
return dist;
}
Real
Skyline::max_height () const
{
- Skyline s (-sky_);
- s.set_minimum_height (0);
- return sky_ * distance (s);
+ Real ret = -infinity_f;
+
+ list<Building>::const_iterator i;
+ for (i = buildings_.begin (); i != buildings_.end (); ++i)
+ {
+ ret = max (ret, i->height (i->start_));
+ ret = max (ret, i->height (i->end_));
+ }
+
+ return sky_ * ret;
+}
+
+Real
+Skyline::left () const
+{
+ for (list<Building>::const_iterator i (buildings_.begin ());
+ i != buildings_.end (); i++)
+ if (i->y_intercept_ > -infinity_f)
+ return i->start_;
+
+ return infinity_f;
+}
+
+Real
+Skyline::right () const
+{
+ for (list<Building>::const_reverse_iterator i (buildings_.rbegin ());
+ i != buildings_.rend (); ++i)
+ if (i->y_intercept_ > -infinity_f)
+ return i->end_;
+
+ return -infinity_f;
}
Real
bool
Skyline::is_empty () const
{
+ if (!buildings_.size ())
+ return true;
Building b = buildings_.front ();
return b.end_ == infinity_f && b.y_intercept_ == -infinity_f;
}
DECLARE_ACKNOWLEDGER (script);
DECLARE_ACKNOWLEDGER (dots);
DECLARE_ACKNOWLEDGER (text_script);
- DECLARE_ACKNOWLEDGER (tie);
+ DECLARE_END_ACKNOWLEDGER (tie);
DECLARE_ACKNOWLEDGER (tuplet_number);
void acknowledge_extra_object (Grob_info);
}
void
-Slur_engraver::acknowledge_tie (Grob_info info)
+Slur_engraver::acknowledge_end_tie (Grob_info info)
{
acknowledge_extra_object (info);
}
ADD_ACKNOWLEDGER (Slur_engraver, script);
ADD_ACKNOWLEDGER (Slur_engraver, text_script);
ADD_ACKNOWLEDGER (Slur_engraver, dots);
-ADD_ACKNOWLEDGER (Slur_engraver, tie);
+ADD_END_ACKNOWLEDGER (Slur_engraver, tie);
ADD_ACKNOWLEDGER (Slur_engraver, tuplet_number);
ADD_TRANSLATOR (Slur_engraver,
/* doc */
{
if (extremes_[d].note_column_)
{
- end_ys[d] = dir_
- * max (max (dir_ * (base_attachments_[d][Y_AXIS]
- + parameters_.region_size_ * dir_),
- dir_ * (dir_ + extremes_[d].note_column_->extent (common_[Y_AXIS], Y_AXIS)[dir_])),
- dir_ * base_attachments_[-d][Y_AXIS]);
+ Interval nc_extent = extremes_[d].note_column_
+ ->extent (common_[Y_AXIS], Y_AXIS);
+ if (nc_extent.is_empty ())
+ slur_->warning ("slur trying to encompass an empty note column.");
+ else
+ end_ys[d] = dir_
+ * max (max (dir_ * (base_attachments_[d][Y_AXIS]
+ + parameters_.region_size_ * dir_),
+ dir_ * (dir_ + nc_extent[dir_])),
+ dir_ * base_attachments_[-d][Y_AXIS]);
}
else
end_ys[d] = base_attachments_[d][Y_AXIS] + parameters_.region_size_ * dir_;
#include "main.hh" // DEBUG_SLUR_SCORING
#include "note-column.hh"
#include "output-def.hh"
-#include "spanner.hh"
#include "skyline-pair.hh"
+#include "spanner.hh"
#include "staff-symbol-referencer.hh"
#include "stem.hh"
#include "text-interface.hh"
return scm_from_double (offset + avoidance_offset);
}
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, vertical_skylines, 1, 0, "");
+MAKE_SCHEME_CALLBACK (Slur, vertical_skylines, 1);
SCM
Slur::vertical_skylines (SCM smob)
{
vector<Box> boxes;
if (!me)
- return Skyline_pair (boxes, 0.0, X_AXIS).smobbed_copy ();
+ return Skyline_pair (boxes, X_AXIS).smobbed_copy ();
Bezier curve = Slur::get_curve (me);
vsize box_count = robust_scm2vsize (me->get_property ("skyline-quantizing"), 10);
boxes.push_back (b);
}
- return Skyline_pair (boxes, 0.0, X_AXIS).smobbed_copy ();
+ return Skyline_pair (boxes, X_AXIS).smobbed_copy ();
}
/*
"inspect-index "
"line-thickness "
"note-columns "
- "skyline-quantizing "
"positions "
"ratio "
"thickness "
- "vertical-skylines "
);
static void
set_column_rods (vector<Grob *> const &cols, Real padding)
{
- /* distances[i] will be the minimum distance between column i and column i+1 */
- vector<Real> distances;
+ /* distances[i] will be the distance betwen cols[i-1] and cols[i], and
+ overhangs[j] the amount by which cols[0 thru j] extend beyond cols[j]
+ when each column is placed as far to the left as possible. */
+ vector<Real> distances (cols.size ());
+ vector<Real> overhangs (cols.size ());
- for (vsize i = 1; i < cols.size (); i++)
+ for (vsize i = 0; i < cols.size (); i++)
{
- assert (distances.size () == i - 1);
-
Item *r = dynamic_cast<Item *> (cols[i]);
Item *rb = r->find_prebroken_piece (LEFT);
if (Separation_item::is_empty (r) && (!rb || Separation_item::is_empty (rb)))
- {
- distances.push_back (0);
- continue;
- }
+ continue;
Skyline_pair *skys = Skyline_pair::unsmob (r->get_property ("horizontal-skylines"));
- Real right_stickout = skys ? (*skys)[LEFT].max_height () : 0.0;
+ overhangs[i] = skys ? (*skys)[RIGHT].max_height () : 0.0;
+
+ if (0 == i) continue;
- /* min rather than max because right-stickout will be negative if the right-hand column
+ /* min rather than max because stickout will be negative if the right-hand column
sticks out a lot to the left */
- right_stickout = min (right_stickout,
- Separation_item::conditional_skyline (r, cols[i - 1]).max_height ());
+ Real stickout = min (skys ? (*skys)[LEFT].max_height () : 0.0,
+ Separation_item::conditional_skyline (r, cols[i - 1]).max_height ());
- Drul_array<Item *> r_cols (r, rb);
- Drul_array<Real> cur_dist (0.0, 0.0);
+ Real prev_distances = 0.0;
/* This is an inner loop and hence it is potentially quadratic. However, we only continue
as long as there is a rod to insert. Therefore, this loop will usually only execute
a constant number of times per iteration of the outer loop. */
for (vsize j = i; j--;)
{
+ if (overhangs[j] + padding <= prev_distances + distances[i] + stickout)
+ break; // cols[0 thru j] cannot reach cols[i]
+
Item *l = dynamic_cast<Item *> (cols[j]);
Item *lb = l->find_prebroken_piece (RIGHT);
- Skyline_pair *skys = Skyline_pair::unsmob (l->get_property ("horizontal-skylines"));
- Real left_stickout = skys ? (*skys)[RIGHT].max_height () : 0.0;
- bool done = true;
- for (LEFT_and_RIGHT (d))
- {
- if (j < i - 1)
- cur_dist[d] += distances[j];
+ Real dist = Separation_item::set_distance (l, r, padding);
+ distances[i] = max (distances[i], dist - prev_distances);
- Item *r_col = r_cols[d];
- bool touches = right_stickout - left_stickout + cur_dist[d] < 0.0;
- Real dist = 0.0;
-
- /* we set a distance for the line-starter column even if its non-broken counterpart
- doesn't touch the right column. */
- if (lb)
- Separation_item::set_distance (lb, r_col, padding);
-
- if (touches || j == i - 1)
- dist = Separation_item::set_distance (l, r_col, padding);
-
- if (j == i - 1 && d == LEFT)
- distances.push_back (dist);
-
- if (j == i - 1)
- cur_dist[d] = distances[j];
-
- cur_dist[d] = max (cur_dist[d], dist);
- done = done && !touches;
-
- if (!rb)
- break;
+ if (lb)
+ {
+ dist = Separation_item::set_distance (lb, r, padding);
+ // The left-broken version might reach more columns to the
+ // right than the unbroken version, by extending farther and/or
+ // nesting more closely;
+ if (j == i - 1) // check this, the first time we see each lb.
+ overhangs[j] = max (overhangs[j],
+ lb->extent (lb, X_AXIS)[RIGHT]
+ + distances[i] - dist);
}
+ if (rb)
+ Separation_item::set_distance (l, rb, padding);
+ if (lb && rb)
+ Separation_item::set_distance (lb, rb, padding);
- /* we need the empty check for gregorian notation, where there are a lot of
- extraneous paper-columns that we need to skip over */
- if (done && !Separation_item::is_empty (l))
- break;
+ prev_distances += distances[j];
}
+ overhangs[i] = max (overhangs[i],
+ overhangs[i - 1] - distances[i]);
}
}
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Staff_performer::get_channel (string instrument)
{
SCM channel_mapping = get_property ("midiChannelMapping");
- map<string, int>& channel_map
+ map<string, int> &channel_map
= (channel_mapping != ly_symbol2scm ("instrument"))
? channel_map_
: static_channel_map_;
#include "directional-element-interface.hh"
#include "item.hh"
#include "lookup.hh"
+#include "note-collision.hh"
+#include "note-column.hh"
#include "output-def.hh"
#include "staff-symbol-referencer.hh"
#include "stem.hh"
else
/* down stems with flags should have more sloped trems (helps avoid
flag/stem collisions without making the stem very long) */
- return scm_from_double ((Stem::duration_log (stem) >= 3 && get_grob_direction (stem) == DOWN)
+ return scm_from_double ((Stem::duration_log (stem) >= 3 && get_grob_direction (me) == DOWN)
? 0.40 : 0.25);
}
{
Grob *me = unsmob_grob (smob);
Grob *stem = unsmob_grob (me->get_object ("stem"));
- Direction stemdir = get_grob_direction (stem);
+ Direction dir = get_grob_direction (me);
bool beam = Stem::get_beam (stem);
bool flag = Stem::duration_log (stem) >= 3 && !beam;
/* beamed stems and up-stems with flags have shorter tremolos */
- return scm_from_double (((stemdir == UP && flag) || beam) ? 1.0 : 1.5);
+ return scm_from_double (((dir == UP && flag) || beam) ? 1.0 : 1.5);
}
MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_style, 1)
{
Grob *me = unsmob_grob (smob);
Grob *stem = unsmob_grob (me->get_object ("stem"));
- Direction stemdir = get_grob_direction (stem);
+ Direction dir = get_grob_direction (me);
bool beam = Stem::get_beam (stem);
bool flag = Stem::duration_log (stem) >= 3 && !beam;
- return ly_symbol2scm (((stemdir == UP && flag) || beam) ? "rectangle" : "default");
+ return ly_symbol2scm (((dir == UP && flag) || beam) ? "rectangle" : "default");
}
Real
}
Stencil
-Stem_tremolo::raw_stencil (Grob *me, Real slope, Direction stemdir)
+Stem_tremolo::raw_stencil (Grob *me, Real slope, Direction dir)
{
Real ss = Staff_symbol_referencer::staff_space (me);
Real thick = robust_scm2double (me->get_property ("beam-thickness"), 1);
for (int i = 0; i < tremolo_flags; i++)
{
Stencil b (a);
- b.translate_axis (beam_translation * i * stemdir * -1, Y_AXIS);
+ b.translate_axis (beam_translation * i * dir * -1, Y_AXIS);
mol.add_stencil (b);
}
return mol;
if (!stem)
return ly_interval2scm (s1.extent (Y_AXIS));
- Direction stemdir = get_grob_direction (stem);
- if (stemdir == 0)
- stemdir = UP;
+ Direction dir = get_grob_direction (me);
Spanner *beam = Stem::get_beam (stem);
Interval ph = stem->pure_height (stem, 0, INT_MAX);
Stem_info si = Stem::get_stem_info (stem);
- ph[-stemdir] = si.shortest_y_;
+ ph[-dir] = si.shortest_y_;
int beam_count = Stem::beam_multiplicity (stem).length () + 1;
Real beam_translation = get_beam_translation (me);
- ph = ph - stemdir * max (beam_count, 1) * beam_translation;
+ ph = ph - dir * max (beam_count, 1) * beam_translation;
ph = ph - ph.center ();
return ly_interval2scm (ph);
return Stencil ();
}
- Direction stemdir = get_grob_direction (stem);
- if (!stemdir)
- stemdir = UP;
+ Direction dir = get_grob_direction (me);
bool whole_note = Stem::duration_log (stem) <= 0;
/* for a whole note, we position relative to the notehead, so we want the
stencil aligned on the flag closest to the head */
- Direction stencil_dir = whole_note ? -stemdir : stemdir;
+ Direction stencil_dir = whole_note ? -dir : dir;
return raw_stencil (me, slope, stencil_dir);
}
return scm_from_double (y_offset (me, true));
}
+MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_direction, 1);
+SCM
+Stem_tremolo::calc_direction (SCM smob)
+{
+ Item *me = unsmob_item (smob);
+
+ Item *stem = unsmob_item (me->get_object ("stem"));
+ if (!stem)
+ return scm_from_int (CENTER);
+
+ Direction stemdir = get_grob_direction (stem);
+
+ vector<int> nhp = Stem::note_head_positions (stem);
+ /*
+ * We re-decide stem-dir if there may be collisions with other
+ * note heads in the staff.
+ */
+ Grob *maybe_nc = stem->get_parent (X_AXIS)->get_parent (X_AXIS);
+ bool whole_note = Stem::duration_log (stem) <= 0;
+ if (whole_note && Note_collision_interface::has_interface (maybe_nc))
+ {
+ Drul_array<bool> avoid_me (false, false);
+ vector<int> all_nhps = Note_collision_interface::note_head_positions (maybe_nc);
+ if (all_nhps[0] < nhp[0])
+ avoid_me[DOWN] = true;
+ if (all_nhps.back () > nhp.back ())
+ avoid_me[UP] = true;
+ if (avoid_me[stemdir])
+ {
+ stemdir = -stemdir;
+ if (avoid_me[stemdir])
+ {
+ me->warning ("Whole-note tremolo may collide with simultaneous notes.");
+ stemdir = -stemdir;
+ }
+ }
+ }
+ return scm_from_int (stemdir);
+}
+
Real
Stem_tremolo::y_offset (Grob *me, bool pure)
{
if (!stem)
return 0.0;
- Direction stemdir = get_grob_direction (stem);
- if (stemdir == 0)
- stemdir = UP;
+ Direction dir = get_grob_direction (me);
Spanner *beam = Stem::get_beam (stem);
Real beam_translation = get_beam_translation (me);
{
Interval ph = stem->pure_height (stem, 0, INT_MAX);
Stem_info si = Stem::get_stem_info (stem);
- ph[-stemdir] = si.shortest_y_;
+ ph[-dir] = si.shortest_y_;
- return (ph - stemdir * max (beam_count, 1) * beam_translation)[stemdir] - stemdir * 0.5 * me->pure_height (me, 0, INT_MAX).length ();
+ return (ph - dir * max (beam_count, 1) * beam_translation)[dir] - dir * 0.5 * me->pure_height (me, 0, INT_MAX).length ();
}
Real end_y
= (pure
- ? stem->pure_height (stem, 0, INT_MAX)[stemdir]
- : stem->extent (stem, Y_AXIS)[stemdir])
- - stemdir * max (beam_count, 1) * beam_translation
+ ? stem->pure_height (stem, 0, INT_MAX)[dir]
+ : stem->extent (stem, Y_AXIS)[dir])
+ - dir * max (beam_count, 1) * beam_translation
- Stem::beam_end_corrective (stem);
if (!beam && Stem::duration_log (stem) >= 3)
{
- end_y -= stemdir * (Stem::duration_log (stem) - 2) * beam_translation;
- if (stemdir == UP)
- end_y -= stemdir * beam_translation * 0.5;
+ end_y -= dir * (Stem::duration_log (stem) - 2) * beam_translation;
+ if (dir == UP)
+ end_y -= dir * beam_translation * 0.5;
}
bool whole_note = Stem::duration_log (stem) <= 0;
- if (whole_note)
+ if (whole_note || isinf(end_y))
{
/* we shouldn't position relative to the end of the stem since the stem
is invisible */
Real ss = Staff_symbol_referencer::staff_space (me);
vector<int> nhp = Stem::note_head_positions (stem);
- Real note_head = (stemdir == UP ? nhp.back () : nhp[0]) * ss / 2;
- end_y = note_head + stemdir * 1.5;
+ Real note_head = (dir == UP ? nhp.back () : nhp[0]) * ss / 2;
+ end_y = note_head + dir * 1.5;
}
return end_y;
/* properties */
"beam-thickness "
"beam-width "
+ "direction "
"flag-count "
"length-fraction "
"stem "
bool
Stem::is_invisible (Grob *me)
{
- return !is_normal_stem (me)
- && (robust_scm2double (me->get_property ("stemlet-length"),
- 0.0) == 0.0);
+ if (is_normal_stem (me))
+ return false;
+ else if (head_count (me))
+ return true;
+ else // if there are no note-heads, we might want stemlets
+ return 0.0 == robust_scm2double (me->get_property ("stemlet-length"), 0.0);
}
bool
= hed->extent (hed, X_AXIS).linear_combination (CENTER)
- heads[i]->extent (heads[i], X_AXIS).linear_combination (CENTER);
- heads[i]->translate_axis (amount, X_AXIS);
+ if (!isnan (amount)) // empty heads can produce NaN
+ heads[i]->translate_axis (amount, X_AXIS);
}
bool parity = true;
Real lastpos = Real (Staff_symbol_referencer::get_position (heads[0]));
Real y_attach = Note_head::stem_attachment_coordinate (head, Y_AXIS);
y_attach = head_height.linear_combination (y_attach);
- pos += d * y_attach * 2 / ss;
+ if (!isinf (y_attach) && !isnan (y_attach)) // empty heads
+ pos += d * y_attach * 2 / ss;
}
return pos;
if (!lh && !beam)
return false;
- if (lh && robust_scm2int (lh->get_property ("duration-log"), 0) < 1)
- return false;
-
if (is_invisible (me))
return false;
Direction d = get_grob_direction (me);
Real real_attach = head_wid.linear_combination (d * attach);
- Real r = real_attach;
+ Real r = isnan(real_attach)? 0.0: real_attach;
/* If not centered: correct for stem thickness. */
string style = robust_symbol2string (f->get_property ("style"), "default");
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2012 Mike Solomon <mike@mikesolomon.org>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+tools for transform-matrices following the standard at
+http://www.w3.org/TR/SVG/coords.html
+
+a list in the form
+(list a b c d e f g)
+becomes this matrix:
+[ a c e ]
+[ b d f ]
+[ 0 0 1 ]
+when this transforms a point (x,y), the point is written as matrix:
+[ x ]
+[ y ]
+[ 1 ]
+*/
+
+#include <pango/pango-matrix.h>
+#include <complex>
+#include "box.hh"
+#include "bezier.hh"
+#include "dimensions.hh"
+#include "font-metric.hh"
+#include "grob.hh"
+#include "interval.hh"
+#include "freetype.hh"
+#include "misc.hh"
+#include "offset.hh"
+#include "modified-font-metric.hh"
+#include "open-type-font.hh"
+#include "pango-font.hh"
+#include "pointer-group-interface.hh"
+#include "lily-guile.hh"
+#include "real.hh"
+#include "stencil.hh"
+#include "string-convert.hh"
+#include "skyline.hh"
+#include "skyline-pair.hh"
+using namespace std;
+
+Real QUANTIZATION_UNIT = 0.2;
+
+void create_path_cap (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, Offset pt, Real rad, Real slope, Direction d);
+
+struct Transform_matrix_and_expression
+{
+ PangoMatrix tm_;
+ SCM expr_;
+
+ Transform_matrix_and_expression (PangoMatrix tm, SCM expr);
+};
+
+Transform_matrix_and_expression::Transform_matrix_and_expression (PangoMatrix tm, SCM expr)
+{
+ tm_ = tm;
+ expr_ = expr;
+}
+
+PangoMatrix
+make_transform_matrix (Real p0, Real p1, Real p2, Real p3, Real p4, Real p5)
+{
+ PangoMatrix out;
+ out.xx = p0;
+ out.xy = p1;
+ out.yx = p2;
+ out.yy = p3;
+ out.x0 = p4;
+ out.y0 = p5;
+ return out;
+}
+
+//// UTILITY FUNCTIONS
+
+/*
+ map x's placement between orig_l and orig_r onto
+ the interval final_l final_r
+*/
+Real
+linear_map (Real final_l, Real final_r, Real orig_l, Real orig_r, Real x)
+{
+ return final_l + ((final_r - final_l) * ((x - orig_l) / (orig_r - orig_l)));
+}
+
+/*
+ from a nested SCM list, return the first list of numbers
+ useful for polygons
+*/
+SCM
+get_number_list (SCM l)
+{
+ if (scm_is_pair (l))
+ {
+ if (scm_is_number (scm_car (l)))
+ return l;
+ SCM res = get_number_list (scm_car (l));
+ if (res == SCM_BOOL_F)
+ return get_number_list (scm_cdr (l));
+ return res;
+ }
+ return SCM_BOOL_F;
+}
+
+/*
+ from a nested SCM list, return the first list of numbers
+ useful for paths
+*/
+SCM
+get_path_list (SCM l)
+{
+ if (scm_is_pair (l))
+ {
+ if (scm_memv (scm_car (l),
+ scm_list_n (ly_symbol2scm ("moveto"),
+ ly_symbol2scm ("rmoveto"),
+ ly_symbol2scm ("lineto"),
+ ly_symbol2scm ("rlineto"),
+ ly_symbol2scm ("curveto"),
+ ly_symbol2scm ("rcurveto"),
+ ly_symbol2scm ("closepath"),
+ SCM_UNDEFINED))
+ != SCM_BOOL_F)
+ return l;
+ SCM res = get_path_list (scm_car (l));
+ if (res == SCM_BOOL_F)
+ return get_path_list (scm_cdr (l));
+ return res;
+ }
+ return SCM_BOOL_F;
+}
+
+Real
+perpendicular_slope (Real s)
+{
+ if (s == 0.0)
+ return infinity_f;
+ if (s == infinity_f)
+ return 0.0;
+ return -1.0 / s;
+}
+
+//// END UTILITY FUNCTIONS
+
+/*
+ below, for all of the functions make_X_boxes, the expression
+ is always unpacked into variables.
+ then, after a line of /////, there are manipulations of these variables
+ (there may be no manipulations necessary depending on the function)
+ afterwards, there is another ///// followed by the creation of points
+ and boxes
+*/
+
+void
+make_draw_line_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr, bool use_building)
+{
+ Real thick = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x0 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y0 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x1 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y1 = robust_scm2double (scm_car (expr), 0.0);
+ Real slope = x1 == x0 ? infinity_f : (y1 - y0) / (x1 - x0);
+ //////////////////////
+ if (x1 < x0)
+ {
+ swap (x0, x1);
+ swap (y0, y1);
+ }
+ Offset left (x0, y0);
+ Offset right (x1, y1);
+ Direction d = DOWN;
+ do
+ {
+ Offset inter_l = get_point_in_y_direction (left, perpendicular_slope (slope), thick / 2, d);
+ Offset inter_r = get_point_in_y_direction (right, perpendicular_slope (slope), thick / 2, d);//printf ("O %4.4f %4.4f\n", inter_l[X_AXIS], inter_r[X_AXIS]);printf ("TRANNY %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f\n", trans.xx, trans.xy, trans.yx, trans.yy, trans.x0, trans.y0);
+ pango_matrix_transform_point (&trans, &inter_l[X_AXIS], &inter_l[Y_AXIS]);
+ pango_matrix_transform_point (&trans, &inter_r[X_AXIS], &inter_r[Y_AXIS]);
+ if ((inter_l[X_AXIS] == inter_r[X_AXIS]) || (inter_l[Y_AXIS] == inter_r[Y_AXIS]))
+ {
+ //printf ("OO %4.4f %4.4f\n", inter_l[X_AXIS], inter_r[X_AXIS]);
+ Box b;
+ b.add_point (inter_l);
+ b.add_point (inter_r);
+ boxes.push_back (b);
+ }
+ else if (use_building)
+ buildings.push_back (Drul_array<Offset> (inter_l, inter_r));
+ else
+ {
+ Offset inter_l = get_point_in_y_direction (left, perpendicular_slope (slope), thick / 2, d);
+ Offset inter_r = get_point_in_y_direction (right, perpendicular_slope (slope), thick / 2, d);
+ pango_matrix_transform_point (&trans, &inter_l[X_AXIS], &inter_l[Y_AXIS]);
+ pango_matrix_transform_point (&trans, &inter_r[X_AXIS], &inter_r[Y_AXIS]);
+ Real length = sqrt (((inter_l[X_AXIS] - inter_r[X_AXIS]) * (inter_l[X_AXIS] - inter_r[X_AXIS])) + ((inter_l[Y_AXIS] - inter_r[Y_AXIS]) * (inter_l[Y_AXIS] - inter_r[Y_AXIS])));
+
+ vsize passes = (vsize) ((length * 2) + 1);
+ vector<Offset> points;
+
+ for (vsize i = 0; i < 1 + passes; i++)
+ {
+ Offset pt (linear_map (x0, x1, 0, passes, i),
+ linear_map (y0, y1, 0, passes, i));
+ Offset inter = get_point_in_y_direction (pt, perpendicular_slope (slope), thick / 2, d);
+ pango_matrix_transform_point (&trans, &inter[X_AXIS], &inter[Y_AXIS]);
+ points.push_back (inter);
+ }
+ for (vsize i = 0; i < points.size () - 1; i++)
+ {
+ Box b;
+ b.add_point (points[i]);
+ b.add_point (points[i + 1]);
+ boxes.push_back (b);
+ }
+ }
+ }
+ while (flip (&d) != DOWN);
+
+ if (thick > 0.0)
+ {
+ // beg line cap
+ create_path_cap (boxes,
+ buildings,
+ trans,
+ Offset (x0, y0),
+ thick / 2,
+ perpendicular_slope (slope),
+ Direction (sign (slope)));
+
+ // end line cap
+ create_path_cap (boxes,
+ buildings,
+ trans,
+ Offset (x1, y1),
+ thick / 2,
+ perpendicular_slope (slope),
+ Direction (sign (-slope)));
+ }
+}
+
+void
+make_partial_ellipse_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
+{
+ Real x_rad = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y_rad = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real start = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real end = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real th = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ bool connect = to_boolean (scm_car (expr));
+ expr = scm_cdr (expr);
+ bool fill = to_boolean (scm_car (expr));
+ //////////////////////
+ start = M_PI * start / 180;
+ end = M_PI * end / 180;
+ if (end == start)
+ end += (2 * M_PI);
+ complex<Real> sunit = polar (1.0, start);
+ complex<Real> eunit = polar (1.0, end);
+ Offset sp (real (sunit) * x_rad, imag (sunit) * y_rad);
+ Offset ep (real (eunit) * x_rad, imag (eunit) * y_rad);
+ //////////////////////
+ Drul_array<vector<Offset> > points;
+ Direction d = DOWN;
+ int quantization = max (1, (int) (((x_rad * trans.xx) + (y_rad * trans.yy)) * M_PI / QUANTIZATION_UNIT));
+ do
+ {
+ for (vsize i = 0; i < 1 + quantization; i++)
+ {
+ Real ang = linear_map (start, end, 0, quantization, i);
+ complex<Real> coord = polar (1.0, ang);
+ Offset pt (real (coord) * x_rad,
+ imag (coord) * y_rad);
+ Real slope = pt[Y_AXIS] / pt[X_AXIS];
+ Offset inter = get_point_in_y_direction (pt, perpendicular_slope (slope), th / 2, d);
+ pango_matrix_transform_point (&trans, &inter[X_AXIS], &inter[Y_AXIS]);
+ points[d].push_back (inter);
+ }
+ }
+ while (flip (&d) != DOWN);
+
+ for (vsize i = 0; i < points[DOWN].size () - 1; i++)
+ {
+ Box b;
+ do
+ {
+ b.add_point (points[d][i]);
+ b.add_point (points[d][i + 1]);
+ }
+ while (flip (&d) != DOWN);
+ boxes.push_back (b);
+ }
+
+ if (connect || fill)
+ {
+ make_draw_line_boxes (boxes, buildings, trans, scm_list_5 (scm_from_double (th),
+ scm_from_double (sp[X_AXIS]),
+ scm_from_double (sp[Y_AXIS]),
+ scm_from_double (ep[X_AXIS]),
+ scm_from_double (ep[Y_AXIS])),
+ false);
+ }
+
+ if (th > 0.0)
+ {
+ // beg line cap
+ complex<Real> coord = polar (1.0, start);
+ Offset pt (real (coord) * x_rad,
+ imag (coord) * y_rad);
+ Real slope = pt[Y_AXIS] / pt[X_AXIS];
+ create_path_cap (boxes,
+ buildings,
+ trans,
+ pt,
+ th / 2,
+ perpendicular_slope (slope),
+ Direction (sign (slope)));
+
+ // end line cap
+ coord = polar (1.0, start);
+ pt = Offset (real (coord) * x_rad,
+ imag (coord) * y_rad);
+ slope = pt[Y_AXIS] / pt[X_AXIS];
+ create_path_cap (boxes,
+ buildings,
+ trans,
+ pt,
+ th / 2,
+ perpendicular_slope (slope),
+ Direction (sign (-slope)));
+ }
+}
+
+void
+make_round_filled_box_boxes (vector<Box> &boxes, PangoMatrix trans, SCM expr)
+{
+ Real left = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real right = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real bottom = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real top = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real th = robust_scm2double (scm_car (expr), 0.0);
+ //////////////////////
+ vector<Offset> points;
+ Box b;
+ Offset p0 = Offset (-left - (th / 2), -bottom - (th / 2));
+ Offset p1 = Offset (right + (th / 2), top + (th / 2));
+ pango_matrix_transform_point (&trans, &p0[X_AXIS], &p0[Y_AXIS]);
+ pango_matrix_transform_point (&trans, &p1[X_AXIS], &p1[Y_AXIS]);
+ b.add_point (p0);
+ b.add_point (p1);
+ boxes.push_back (b);
+}
+
+void
+create_path_cap (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, Offset pt, Real rad, Real slope, Direction d)
+{
+ Real angle = atan (slope) * 180 / M_PI;
+ Real other = angle > 180 ? angle - 180 : angle + 180;
+ if (angle < other)
+ {
+ Real holder = other;
+ other = angle;
+ angle = holder;
+ }
+ other = (slope >= 0 && d == DOWN) || (slope < 0 && d == UP)
+ ? other + 360.0
+ : other;
+ PangoMatrix new_trans (trans);
+ pango_matrix_translate (&new_trans, pt[X_AXIS], pt[Y_AXIS]);
+ make_partial_ellipse_boxes (boxes, buildings, new_trans,
+ scm_list_n (scm_from_double (rad),
+ scm_from_double (rad),
+ scm_from_double (angle),
+ scm_from_double (other),
+ scm_from_double (0.0),
+ SCM_BOOL_F,
+ SCM_BOOL_F,
+ SCM_UNDEFINED));
+}
+
+void
+make_draw_bezier_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
+{
+ Real th = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x0 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y0 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x1 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y1 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x2 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y2 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x3 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y3 = robust_scm2double (scm_car (expr), 0.0);
+ //////////////////////
+ Bezier curve;
+ curve.control_[0] = Offset (x0, y0);
+ curve.control_[1] = Offset (x1, y1);
+ curve.control_[2] = Offset (x2, y2);
+ curve.control_[3] = Offset (x3, y3);
+ Offset temp0 (x0, y0);
+ Offset temp1 (x1, y1);
+ Offset temp2 (x2, y2);
+ Offset temp3 (x3, y3);
+ pango_matrix_transform_point (&trans, &temp0[X_AXIS], &temp0[Y_AXIS]);
+ pango_matrix_transform_point (&trans, &temp1[X_AXIS], &temp1[Y_AXIS]);
+ pango_matrix_transform_point (&trans, &temp2[X_AXIS], &temp2[Y_AXIS]);
+ pango_matrix_transform_point (&trans, &temp3[X_AXIS], &temp3[Y_AXIS]);
+ //////////////////////
+ Drul_array<vector<Offset> > points;
+ Direction d = DOWN;
+ int quantization = int (((temp1 - temp0).length ()
+ + (temp2 - temp1).length ()
+ + (temp3 - temp2).length ())
+ / QUANTIZATION_UNIT);
+ do
+ {
+ Offset first = get_point_in_y_direction (curve.control_[0], perpendicular_slope (curve.slope_at_point (0.0)), th / 2, d);
+ pango_matrix_transform_point (&trans, &first[X_AXIS], &first[Y_AXIS]);
+ points[d].push_back (first);
+ for (vsize i = 1; i < quantization; i++)
+ {
+ Real pt = (i * 1.0) / quantization;
+ Offset inter = get_point_in_y_direction (curve.curve_point (pt), perpendicular_slope (curve.slope_at_point (pt)), th / 2, d);
+ pango_matrix_transform_point (&trans, &inter[X_AXIS], &inter[Y_AXIS]);
+ points[d].push_back (inter);
+ }
+ Offset last = get_point_in_y_direction (curve.control_[3], curve.slope_at_point (1.0), th / 2, d);
+ pango_matrix_transform_point (&trans, &last[X_AXIS], &last[Y_AXIS]);
+ points[d].push_back (last);
+ }
+ while (flip (&d) != DOWN);
+
+ for (vsize i = 0; i < points[DOWN].size () - 1; i++)
+ {
+ Box b;
+ do
+ {
+ b.add_point (points[d][i]);
+ b.add_point (points[d][i + 1]);
+ }
+ while (flip (&d) != DOWN);
+ boxes.push_back (b);
+ }
+
+ // beg line cap
+ if (th >= 0)
+ {
+ Real slope = curve.slope_at_point (0.0);
+ d = Direction (sign (slope == 0.0 || abs (slope) == infinity_f
+ ? curve.slope_at_point (0.0001)
+ : slope));
+
+ create_path_cap (boxes,
+ buildings,
+ trans,
+ curve.control_[0],
+ th / 2,
+ perpendicular_slope (curve.slope_at_point (0.0)),
+ d);
+
+ // end line cap
+ slope = curve.slope_at_point (1.0);
+ d = Direction (sign (slope == 0.0 || abs (slope) == infinity_f
+ ? curve.slope_at_point (0.9999)
+ : slope));
+
+ create_path_cap (boxes,
+ buildings,
+ trans,
+ curve.control_[3],
+ th / 2,
+ perpendicular_slope (curve.slope_at_point (1.0)),
+ d);
+ }
+}
+
+/*
+ converts a path into lists of 4 (line) or 8 (curve) absolute coordinates
+ for example:
+ '(moveto 1 2 lineto 3 4 rlineto -1 -1 curveto 3 3 5 5 6 6 rcurveto -1 -1 -1 -1 -1 -1 closepath)
+ becomes
+ '((1 2 3 4)
+ (3 4 2 3)
+ (2 3 3 3 5 5 6 6)
+ (6 6 5 5 4 4 3 3)
+ (3 3 1 2))
+*/
+
+SCM
+all_commands_to_absolute_and_group (SCM expr)
+{
+ SCM out = SCM_EOL;
+ Offset start (0, 0);
+ Offset current (0, 0);
+ bool first = true;
+ while (scm_is_pair (expr))
+ {
+ if (scm_car (expr) == ly_symbol2scm ("moveto")
+ || (scm_car (expr) == ly_symbol2scm ("rmoveto") && first))
+ {
+ Real x = robust_scm2double (scm_cadr (expr), 0.0);
+ Real y = robust_scm2double (scm_caddr (expr), 0.0);
+ start = Offset (x, y);
+ current = start;
+ expr = scm_cdddr (expr);
+ }
+ if (scm_car (expr) == ly_symbol2scm ("rmoveto"))
+ {
+ Real x = robust_scm2double (scm_cadr (expr), 0.0);
+ Real y = robust_scm2double (scm_caddr (expr), 0.0);
+ start = (Offset (x, y) + current);
+ current = start;
+ expr = scm_cdddr (expr);
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("lineto"))
+ {
+ Real x = robust_scm2double (scm_cadr (expr), 0.0);
+ Real y = robust_scm2double (scm_caddr (expr), 0.0);
+ out = scm_cons (scm_list_4 (scm_from_double (current[X_AXIS]),
+ scm_from_double (current[Y_AXIS]),
+ scm_from_double (x),
+ scm_from_double (y)),
+ out);
+ current = Offset (x, y);
+ expr = scm_cdddr (expr);
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("rlineto"))
+ {
+ Real x = robust_scm2double (scm_cadr (expr), 0.0);
+ Real y = robust_scm2double (scm_caddr (expr), 0.0);
+ out = scm_cons (scm_list_4 (scm_from_double (current[X_AXIS]),
+ scm_from_double (current[Y_AXIS]),
+ scm_from_double (x + current[X_AXIS]),
+ scm_from_double (y + current[Y_AXIS])),
+ out);
+ current = (Offset (x, y) + current);
+ expr = scm_cdddr (expr);
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("curveto"))
+ {
+ Real x1 = robust_scm2double (scm_cadr (expr), 0.0);
+ expr = scm_cddr (expr);
+ Real y1 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x2 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y2 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x3 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y3 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ out = scm_cons (scm_list_n (scm_from_double (current[X_AXIS]),
+ scm_from_double (current[Y_AXIS]),
+ scm_from_double (x1),
+ scm_from_double (y1),
+ scm_from_double (x2),
+ scm_from_double (y2),
+ scm_from_double (x3),
+ scm_from_double (y3),
+ SCM_UNDEFINED),
+ out);
+ current = Offset (x3, y3);
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("rcurveto"))
+ {
+ Real x1 = robust_scm2double (scm_cadr (expr), 0.0);
+ expr = scm_cddr (expr);
+ Real y1 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x2 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y2 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real x3 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ Real y3 = robust_scm2double (scm_car (expr), 0.0);
+ expr = scm_cdr (expr);
+ out = scm_cons (scm_list_n (scm_from_double (current[X_AXIS]),
+ scm_from_double (current[Y_AXIS]),
+ scm_from_double (x1 + current[X_AXIS]),
+ scm_from_double (y1 + current[Y_AXIS]),
+ scm_from_double (x2 + current[X_AXIS]),
+ scm_from_double (y2 + current[Y_AXIS]),
+ scm_from_double (x3 + current[X_AXIS]),
+ scm_from_double (y3 + current[Y_AXIS]),
+ SCM_UNDEFINED),
+ out);
+ current = (Offset (x3, y3) + current);
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("closepath"))
+ {
+ if ((current[X_AXIS] != start[X_AXIS]) || (current[Y_AXIS] != start[Y_AXIS]))
+ {
+ out = scm_cons (scm_list_4 (scm_from_double (current[X_AXIS]),
+ scm_from_double (current[Y_AXIS]),
+ scm_from_double (start[X_AXIS]),
+ scm_from_double (start[Y_AXIS])),
+ out);
+ current = start;
+ }
+ expr = scm_cdr (expr);
+ }
+ else
+ {
+ warning ("Malformed path for path stencil.");
+ return out;
+ }
+ first = false;
+ }
+ return scm_reverse_x (out, SCM_EOL);
+}
+
+void
+internal_make_path_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr, bool use_building)
+{
+ SCM blot = scm_car (expr);
+ expr = scm_cdr (expr);
+ SCM path = all_commands_to_absolute_and_group (expr);
+ // note that expr has more stuff that we don't need after this - simply ignore it
+ //////////////////////
+ for (SCM s = path; scm_is_pair (s); s = scm_cdr (s))
+ {
+ scm_to_int (scm_length (scm_car (s))) == 4
+ ? make_draw_line_boxes (boxes, buildings, trans, scm_cons (blot, scm_car (s)), use_building)
+ : make_draw_bezier_boxes (boxes, buildings, trans, scm_cons (blot, scm_car (s)));
+ }
+}
+
+void
+make_path_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
+{
+ return internal_make_path_boxes (boxes, buildings, trans, scm_cons (scm_car (expr), get_path_list (scm_cdr (expr))), false);
+}
+
+void
+make_polygon_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
+{
+ SCM coords = get_number_list (scm_car (expr));
+ expr = scm_cdr (expr);
+ SCM blot_diameter = scm_car (expr);
+ //////////////////////
+ bool first = true;
+ SCM l = SCM_EOL;
+ for (SCM s = coords; scm_is_pair (s); s = scm_cddr (s))
+ {
+ l = scm_cons (first ? ly_symbol2scm ("moveto") : ly_symbol2scm ("lineto"), l);
+ l = scm_cons (scm_car (s), l);
+ l = scm_cons (scm_cadr (s), l);
+ first = false;
+ }
+ l = scm_cons (ly_symbol2scm ("closepath"), l);
+ internal_make_path_boxes (boxes, buildings, trans, scm_cons (blot_diameter, scm_reverse_x (l, SCM_EOL)), true);
+}
+
+void
+make_named_glyph_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
+{
+ SCM fm_scm = scm_car (expr);
+ Font_metric *fm = unsmob_metrics (fm_scm);
+ expr = scm_cdr (expr);
+ SCM glyph = scm_car (expr);
+ string glyph_s = ly_scm2string (glyph);
+
+ //////////////////////
+ Open_type_font *open_fm
+ = dynamic_cast<Open_type_font *>
+ (dynamic_cast<Modified_font_metric *>(fm)->original_font ());
+ SCM_ASSERT_TYPE (open_fm, fm_scm, SCM_ARG1, __FUNCTION__, "OpenType font");
+
+ size_t gidx = open_fm->name_to_index (glyph_s);
+ // Bbox is the best approximation of the width based on how it would be
+ // calculated in open-type-font.cc if it were based on real extents
+ Box bbox = open_fm->get_unscaled_indexed_char_dimensions (gidx);
+ bbox.scale (dynamic_cast<Modified_font_metric *>(fm)->get_magnification () * open_fm->design_size () / open_fm->get_units_per_EM ());
+ // Real bbox is the real bbox of the object
+ Box real_bbox = open_fm->get_glyph_outline_bbox (gidx);
+
+ Real scale = bbox[X_AXIS].length () / real_bbox[X_AXIS].length ();
+
+ pango_matrix_scale (&trans, scale, scale);
+
+ SCM outline = open_fm->get_glyph_outline (gidx);
+ //////////////////////
+ for (SCM s = outline;
+ scm_is_pair (s);
+ s = scm_cdr (s))
+ {
+ scm_to_int (scm_length (scm_car (s))) == 4
+ ? make_draw_line_boxes (boxes, buildings, trans, scm_cons (scm_from_double (0), scm_car (s)), false)
+ : make_draw_bezier_boxes (boxes, buildings, trans, scm_cons (scm_from_double (0), scm_car (s)));
+ }
+}
+
+void
+make_glyph_string_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
+{
+ SCM fm_scm = scm_car (expr);
+ Font_metric *fm = unsmob_metrics (fm_scm);
+ expr = scm_cdr (expr);
+ expr = scm_cdr (expr); // font-name
+ expr = scm_cdr (expr); // size
+ expr = scm_cdr (expr); // cid?
+ SCM whxy = scm_cadar (expr);
+ vector<Real> widths;
+ vector<Interval> heights;
+ vector<Real> xos;
+ vector<Real> yos;
+ vector<string> char_ids;
+ //////////////////////
+ Pango_font *pango_fm = dynamic_cast<Pango_font *> (fm);
+ SCM_ASSERT_TYPE (pango_fm, fm_scm, SCM_ARG1, __FUNCTION__, "Pango font");
+
+ for (SCM s = whxy; scm_is_pair (s); s = scm_cdr (s))
+ {
+ SCM now = scm_car (s);
+ widths.push_back (robust_scm2double (scm_car (now), 0.0));
+ now = scm_cdr (now);
+ heights.push_back (robust_scm2interval (scm_car (now), Interval (0, 0)));
+ now = scm_cdr (now);
+ xos.push_back (robust_scm2double (scm_car (now), 0.0));
+ now = scm_cdr (now);
+ yos.push_back (robust_scm2double (scm_car (now), 0.0));
+ now = scm_cdr (now);
+ char_ids.push_back (robust_scm2string (scm_car (now), ""));
+ }
+ Real cumulative_x = 0.0;
+ for (vsize i = 0; i < widths.size (); i++)
+ {
+ PangoMatrix transcopy (trans);
+ Offset pt0 (cumulative_x + xos[i], heights[i][DOWN] + yos[i]);
+ Offset pt1 (cumulative_x + widths[i] + xos[i], heights[i][UP] + yos[i]);
+ cumulative_x += widths[i];
+
+ Box kerned_bbox;
+ kerned_bbox.add_point (pt0);
+ kerned_bbox.add_point (pt1);
+ size_t gidx = pango_fm->name_to_index (char_ids[i]);
+ Box real_bbox = pango_fm->get_scaled_indexed_char_dimensions (gidx);
+ Box bbox = pango_fm->get_unscaled_indexed_char_dimensions (gidx);
+ SCM outline = pango_fm->get_glyph_outline (gidx);
+
+ // scales may have rounding error but should be close
+ Real xlen = real_bbox[X_AXIS].length () / bbox[X_AXIS].length ();
+ Real ylen = real_bbox[Y_AXIS].length () / bbox[Y_AXIS].length ();
+
+ /*
+ TODO:
+
+ The value will be nan for whitespace, in which case we just want
+ filler, so the kerned bbox is ok.
+
+ However, if the value is inf, this likely means that LilyPond is
+ using a font that is currently difficult to get the measurements
+ from the Pango_font. This should eventually be fixed. The solution
+ for now is just to use the bounding box.
+ */
+ if (isnan (xlen) || isnan (ylen) || isinf (xlen) || isinf (ylen))
+ outline = box_to_scheme_lines (kerned_bbox);
+ else
+ {
+ assert (abs (xlen - ylen) < 10e-3);
+
+ Real scale_factor = max (xlen, ylen);
+ // the three operations below move the stencil from its original coordinates to current coordinates
+ pango_matrix_translate (&transcopy, kerned_bbox[X_AXIS][LEFT], kerned_bbox[Y_AXIS][DOWN] - real_bbox[Y_AXIS][DOWN]);
+ pango_matrix_translate (&transcopy, real_bbox[X_AXIS][LEFT], real_bbox[Y_AXIS][DOWN]);
+ pango_matrix_scale (&transcopy, scale_factor, scale_factor);
+ pango_matrix_translate (&transcopy, -bbox[X_AXIS][LEFT], -bbox[Y_AXIS][DOWN]);
+ }
+ //////////////////////
+ for (SCM s = outline;
+ scm_is_pair (s);
+ s = scm_cdr (s))
+ {
+ scm_to_int (scm_length (scm_car (s))) == 4
+ ? make_draw_line_boxes (boxes, buildings, transcopy, scm_cons (scm_from_double (0), scm_car (s)), false)
+ : make_draw_bezier_boxes (boxes, buildings, transcopy, scm_cons (scm_from_double (0), scm_car (s)));
+ }
+ }
+}
+
+/*
+ receives a stencil expression and a transform matrix
+ depending on the stencil name, dispatches it to the appropriate function
+*/
+
+void
+stencil_dispatcher (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
+{
+ if (not scm_is_pair (expr))
+ return;
+ if (scm_car (expr) == ly_symbol2scm ("draw-line"))
+ make_draw_line_boxes (boxes, buildings, trans, scm_cdr (expr), true);
+ else if (scm_car (expr) == ly_symbol2scm ("dashed-line"))
+ {
+ expr = scm_cdr (expr);
+ SCM th = scm_car (expr);
+ expr = scm_cdr (expr);
+ expr = scm_cdr (expr); // on
+ expr = scm_cdr (expr); // off
+ SCM x1 = scm_car (expr);
+ expr = scm_cdr (expr);
+ SCM x2 = scm_car (expr);
+ make_draw_line_boxes (boxes, buildings, trans, scm_list_5 (th, scm_from_double (0.0), scm_from_double (0.0), x1, x2), true);
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("circle"))
+ {
+ expr = scm_cdr (expr);
+ SCM rad = scm_car (expr);
+ expr = scm_cdr (expr);
+ SCM th = scm_car (expr);
+ make_partial_ellipse_boxes (boxes, buildings, trans,
+ scm_list_n (rad,
+ rad,
+ scm_from_double (0.0),
+ scm_from_double (360.0),
+ th,
+ SCM_BOOL_F,
+ SCM_BOOL_T,
+ SCM_UNDEFINED));
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("ellipse"))
+ {
+ expr = scm_cdr (expr);
+ SCM x_rad = scm_car (expr);
+ expr = scm_cdr (expr);
+ SCM y_rad = scm_car (expr);
+ expr = scm_cdr (expr);
+ SCM th = scm_car (expr);
+ make_partial_ellipse_boxes (boxes, buildings, trans,
+ scm_list_n (x_rad,
+ y_rad,
+ scm_from_double (0.0),
+ scm_from_double (360.0),
+ th,
+ SCM_BOOL_F,
+ SCM_BOOL_T,
+ SCM_UNDEFINED));
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("partial-ellipse"))
+ make_partial_ellipse_boxes (boxes, buildings, trans, scm_cdr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("round-filled-box"))
+ make_round_filled_box_boxes (boxes, trans, scm_cdr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("named-glyph"))
+ make_named_glyph_boxes (boxes, buildings, trans, scm_cdr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("polygon"))
+ make_polygon_boxes (boxes, buildings, trans, scm_cdr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("path"))
+ make_path_boxes (boxes, buildings, trans, scm_cdr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("glyph-string"))
+ make_glyph_string_boxes (boxes, buildings, trans, scm_cdr (expr));
+ else
+ {
+#if 0
+ warning ("Stencil expression not supported by the veritcal skylines.");
+#endif
+ /*
+ We don't issue a warning here, as we assume that stencil-expression.cc
+ is doing stencil-checking correctly.
+ */
+ }
+}
+
+/*
+ traverses a stencil expression, returning a vector of Transform_matrix_and_expression
+ the struct Transform_matrix_and_expression contains two members,
+ a Transform_matrix that indicates where to move a stencil and the stencil expression
+ to show how to construct the stencil
+*/
+vector<Transform_matrix_and_expression>
+stencil_traverser (PangoMatrix trans, SCM expr)
+{
+ if (scm_is_null (expr))
+ return vector<Transform_matrix_and_expression> ();
+ else if (expr == ly_string2scm (""))
+ return vector<Transform_matrix_and_expression> ();
+ else if (scm_car (expr) == ly_symbol2scm ("combine-stencil"))
+ {
+ vector<Transform_matrix_and_expression> out;
+ for (SCM s = scm_cdr (expr); scm_is_pair (s); s = scm_cdr (s))
+ {
+ vector<Transform_matrix_and_expression> res = stencil_traverser (trans, scm_car (s));
+ out.insert (out.end (), res.begin (), res.end ());
+ }
+ return out;
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("footnote"))
+ return vector<Transform_matrix_and_expression> ();
+ else if (scm_car (expr) == ly_symbol2scm ("translate-stencil"))
+ {
+ Real x = robust_scm2double (scm_caadr (expr), 0.0);
+ Real y = robust_scm2double (scm_cdadr (expr), 0.0);
+ pango_matrix_translate (&trans, x, y);
+ return stencil_traverser (trans, scm_caddr (expr));
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("scale-stencil"))
+ {
+ Real x = robust_scm2double (scm_caadr (expr), 0.0);
+ Real y = robust_scm2double (scm_cadadr (expr), 0.0);
+ pango_matrix_scale (&trans, x, y);
+ return stencil_traverser (trans, scm_caddr (expr));
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("rotate-stencil"))
+ {
+ Real ang = robust_scm2double (scm_caadr (expr), 0.0);
+ Real x = robust_scm2double (scm_car (scm_cadadr (expr)), 0.0);
+ Real y = robust_scm2double (scm_cdr (scm_cadadr (expr)), 0.0);
+ pango_matrix_translate (&trans, x, y);
+ pango_matrix_rotate (&trans, -ang);
+ pango_matrix_translate (&trans, -x, -y);
+ return stencil_traverser (trans, scm_caddr (expr));
+ }
+ else if (scm_car (expr) == ly_symbol2scm ("delay-stencil-evaluation"))
+ return stencil_traverser (trans, scm_force (scm_cadr (expr)));
+ else if (scm_car (expr) == ly_symbol2scm ("grob-cause"))
+ return stencil_traverser (trans, scm_caddr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("color"))
+ return stencil_traverser (trans, scm_caddr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("id"))
+ return stencil_traverser (trans, scm_caddr (expr));
+ else
+ {
+ vector<Transform_matrix_and_expression> out;
+ out.push_back (Transform_matrix_and_expression (trans, expr));
+ return out;
+ }
+ warning ("Stencil expression not supported by the veritcal skylines.");
+ return vector<Transform_matrix_and_expression> ();
+}
+
+SCM
+Grob::internal_simple_skylines_from_stencil (SCM smob, Axis a)
+{
+ Grob *me = unsmob_grob (smob);
+
+ if (to_boolean (me->get_property ("cross-staff")))
+ return Skyline_pair ().smobbed_copy ();
+
+ extract_grob_set (me, "elements", elts);
+ if (elts.size ())
+ return internal_skylines_from_element_stencils (smob, a);
+
+ Stencil *s = unsmob_stencil (me->get_property ("stencil"));
+ if (!s)
+ return Skyline_pair ().smobbed_copy ();
+
+ vector<Box> boxes;
+ boxes.push_back (Box (s->extent (X_AXIS), s->extent (Y_AXIS)));
+ return Skyline_pair (boxes, a).smobbed_copy ();
+}
+
+MAKE_SCHEME_CALLBACK (Grob, simple_vertical_skylines_from_stencil, 1);
+SCM
+Grob::simple_vertical_skylines_from_stencil (SCM smob)
+{
+ return internal_simple_skylines_from_stencil (smob, X_AXIS);
+}
+
+MAKE_SCHEME_CALLBACK (Grob, simple_horizontal_skylines_from_stencil, 1);
+SCM
+Grob::simple_horizontal_skylines_from_stencil (SCM smob)
+{
+ return internal_simple_skylines_from_stencil (smob, Y_AXIS);
+}
+
+SCM
+Stencil::skylines_from_stencil (SCM sten, Real pad, Axis a)
+{
+ Stencil *s = unsmob_stencil (sten);
+ if (!s)
+ return Skyline_pair ().smobbed_copy ();
+
+ vector<Transform_matrix_and_expression> data
+ = stencil_traverser (make_transform_matrix (1.0, 0.0, 0.0, 1.0, 0.0, 0.0),
+ s->expr ());
+ vector<Box> boxes;
+ vector<Drul_array<Offset> > buildings;
+ for (vsize i = 0; i < data.size (); i++)
+ stencil_dispatcher (boxes, buildings, data[i].tm_, data[i].expr_);
+
+ // we use the bounding box if there are no boxes
+ if (!boxes.size () && !buildings.size ())
+ boxes.push_back (Box (s->extent (X_AXIS), s->extent (Y_AXIS)));
+
+ Skyline_pair out (boxes, a);
+ out.merge (Skyline_pair (buildings, a));
+
+ for (DOWN_and_UP (d))
+ out[d] = out[d].padded (pad);
+
+ out.deholify ();
+ return out.smobbed_copy ();
+}
+
+MAKE_SCHEME_CALLBACK (Grob, vertical_skylines_from_stencil, 1);
+SCM
+Grob::vertical_skylines_from_stencil (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+
+ Real pad = robust_scm2double (me->get_property ("skyline-horizontal-padding"), 0.0);
+ SCM out = Stencil::skylines_from_stencil (me->get_property ("stencil"), pad, X_AXIS);
+
+ return out;
+}
+
+MAKE_SCHEME_CALLBACK (Grob, horizontal_skylines_from_stencil, 1);
+SCM
+Grob::horizontal_skylines_from_stencil (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+
+ Real pad = robust_scm2double (me->get_property ("skyline-vertical-padding"), 0.0);
+ SCM out = Stencil::skylines_from_stencil (me->get_property ("stencil"), pad, Y_AXIS);
+
+ return out;
+}
+
+SCM
+Grob::internal_skylines_from_element_stencils (SCM smob, Axis a)
+{
+ Grob *me = unsmob_grob (smob);
+
+ extract_grob_set (me, "elements", elts);
+ vector<Real> x_pos;
+ vector<Real> y_pos;
+ Grob *x_common = common_refpoint_of_array (elts, me, X_AXIS);
+ Grob *y_common = common_refpoint_of_array (elts, me, Y_AXIS);
+ for (vsize i = 0; i < elts.size (); i++)
+ {
+ x_pos.push_back (elts[i]->relative_coordinate (x_common, X_AXIS));
+ y_pos.push_back (elts[i]->relative_coordinate (y_common, Y_AXIS));
+ }
+ Real my_x = me->relative_coordinate (x_common, X_AXIS);
+ Real my_y = me->relative_coordinate (y_common, Y_AXIS);
+ Skyline_pair res;
+ for (vsize i = 0; i < elts.size (); i++)
+ {
+ Skyline_pair *skyp = Skyline_pair::unsmob (elts[i]->get_property (a == X_AXIS ? "vertical-skylines" : "horizontal-skylines"));
+ if (skyp)
+ {
+ /*
+ Here, copying is essential. Otherwise, the skyline pair will
+ get doubly shifted!
+ */
+ /*
+ It took Mike about 6 months of his life to add the `else' clause
+ below. For horizontal skylines, the raise and shift calls need
+ to be reversed. This is what was causing the problems in the
+ shifting with all of the tests. RIP 6 months!
+ */
+ Skyline_pair copy = Skyline_pair (*skyp);
+ if (a == X_AXIS)
+ {
+ copy.shift (x_pos[i] - my_x);
+ copy.raise (y_pos[i] - my_y);
+ }
+ else
+ {
+ copy.raise (x_pos[i] - my_x);
+ copy.shift (y_pos[i] - my_y);
+ }
+ res.merge (copy);
+ }
+ }
+ return res.smobbed_copy ();
+}
+
+MAKE_SCHEME_CALLBACK (Grob, vertical_skylines_from_element_stencils, 1);
+SCM
+Grob::vertical_skylines_from_element_stencils (SCM smob)
+{
+ return internal_skylines_from_element_stencils (smob, X_AXIS);
+}
+
+MAKE_SCHEME_CALLBACK (Grob, horizontal_skylines_from_element_stencils, 1);
+SCM
+Grob::horizontal_skylines_from_element_stencils (SCM smob)
+{
+ return internal_skylines_from_element_stencils (smob, Y_AXIS);
+}
Stencil *s = unsmob_stencil (stil);
LY_ASSERT_SMOB (Stencil, stil, 1);
LY_ASSERT_TYPE (scm_is_number, amount, 2);
+
LY_ASSERT_TYPE (is_axis, axis, 3);
Real real_amount = scm_to_double (amount);
#include "pointer-group-interface.hh"
#include "skyline-pair.hh"
#include "staff-symbol-referencer.hh"
+#include "system-start-delimiter.hh"
#include "text-interface.hh"
#include "warn.hh"
#include "unpure-pure-container.hh"
return grobs_scm;
}
+MAKE_SCHEME_CALLBACK (System, vertical_skyline_elements, 1);
+SCM
+System::vertical_skyline_elements (SCM smob)
+{
+ Grob *me_grob = unsmob_grob (smob);
+ vector<Grob *> vertical_skyline_grobs;
+ extract_grob_set (me_grob, "elements", my_elts);
+ for (vsize i = 0; i < my_elts.size (); i++)
+ if (System_start_delimiter::has_interface (my_elts[i]))
+ vertical_skyline_grobs.push_back (my_elts[i]);
+
+ System *me = dynamic_cast<System *> (me_grob);
+ Grob *align = unsmob_grob (me->get_object ("vertical-alignment"));
+ if (!align)
+ {
+ SCM grobs_scm = Grob_array::make_array ();
+ unsmob_grob_array (grobs_scm)->set_array (vertical_skyline_grobs);
+ return grobs_scm;
+ }
+
+ extract_grob_set (align, "elements", elts);
+
+ for (vsize i = 0; i < elts.size (); i++)
+ if (Hara_kiri_group_spanner::has_interface (elts[i]))
+ vertical_skyline_grobs.push_back (elts[i]);
+
+ SCM grobs_scm = Grob_array::make_array ();
+ unsmob_grob_array (grobs_scm)->set_array (vertical_skyline_grobs);
+ return grobs_scm;
+}
+
void
System::break_into_pieces (vector<Column_x_positions> const &breaking)
{
pl->set_property ("last-in-score", SCM_BOOL_T);
Interval staff_refpoints;
- if (Grob *align = get_vertical_alignment ())
+ if (Grob *align = unsmob_grob (get_object ("vertical-alignment")))
{
extract_grob_set (align, "elements", staves);
for (vsize i = 0; i < staves.size (); i++)
return dynamic_cast<System *> (system_grob);
}
-Grob *
-System::get_vertical_alignment ()
+MAKE_SCHEME_CALLBACK (System, get_vertical_alignment, 1);
+SCM
+System::get_vertical_alignment (SCM smob)
{
- extract_grob_set (this, "elements", elts);
+ Grob *me = unsmob_grob (smob);
+ extract_grob_set (me, "elements", elts);
Grob *ret = 0;
for (vsize i = 0; i < elts.size (); i++)
if (Align_interface::has_interface (elts[i]))
{
if (ret)
- programming_error ("found multiple vertical alignments in this system");
+ me->programming_error ("found multiple vertical alignments in this system");
ret = elts[i];
}
if (!ret)
- programming_error ("didn't find a vertical alignment in this system");
- return ret;
+ {
+ me->programming_error ("didn't find a vertical alignment in this system");
+ return SCM_EOL;
+ }
+ return ret->self_scm ();
}
// Finds the furthest staff in the given direction whose x-extent
Grob *
System::get_extremal_staff (Direction dir, Interval const &iv)
{
- Grob *align = get_vertical_alignment ();
+ Grob *align = unsmob_grob (get_object ("vertical-alignment"));
if (!align)
return 0;
Grob *
System::get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t<int> bounds)
{
- Grob *align = get_vertical_alignment ();
+ Grob *align = unsmob_grob (get_object ("vertical-alignment"));
if (!align)
return 0;
System::pure_refpoint_extent (vsize start, vsize end)
{
Interval ret;
- Grob *alignment = get_vertical_alignment ();
+ Grob *alignment = unsmob_grob (get_object ("vertical-alignment"));
if (!alignment)
return Interval ();
Interval
System::part_of_line_pure_height (vsize start, vsize end, bool begin)
{
- Grob *alignment = get_vertical_alignment ();
+ Grob *alignment = unsmob_grob (get_object ("vertical-alignment"));
if (!alignment)
return Interval ();
get_maybe_spaceable_staves (SCM smob, int filter)
{
System *me = dynamic_cast<System *> (unsmob_grob (smob));
- Grob *align = me->get_vertical_alignment ();
+ Grob *align = unsmob_grob (me->get_object ("vertical_alignment"));
SCM ret = SCM_EOL;
if (align)
"in-note-stencil "
"labels "
"pure-Y-extent "
- "skyline-horizontal-padding "
+ "vertical-alignment "
);
*/
#include "text-interface.hh"
+#include "skyline-pair.hh"
+#include "lookup.hh"
#include "config.hh"
#include "font-interface.hh"
#include "grob.hh"
{
Grob *head_;
Moment end_moment_;
- SCM tie_definition_;
Stream_event *tie_stream_event_;
Stream_event *tie_event_;
+ Spanner *tie_;
// Indicate whether a tie from the same moment has been processed successfully
// This is needed for tied chords, e.g. <c e g>~ g, because otherwise the c
// and e will trigger a warning for an unterminated tie!
Head_event_tuple ()
{
head_ = 0;
- tie_definition_ = SCM_EOL;
tie_event_ = 0;
tie_stream_event_ = 0;
tie_from_chord_created = false;
+ tie_ = 0;
}
};
class Tie_engraver : public Engraver
{
+ /*
+ Whether tie event has been processed and can be deleted or should
+ be kept for later portions of a split note.
+ */
+ bool event_processed_;
Stream_event *event_;
vector<Grob *> now_heads_;
vector<Head_event_tuple> heads_to_tie_;
Spanner *tie_column_;
protected:
+ void process_acknowledged ();
void stop_translation_timestep ();
- virtual void derived_mark () const;
void start_translation_timestep ();
DECLARE_ACKNOWLEDGER (note_head);
DECLARE_TRANSLATOR_LISTENER (tie);
TRANSLATOR_DECLARATIONS (Tie_engraver);
};
-void
-Tie_engraver::derived_mark () const
-{
- Engraver::derived_mark ();
- for (vsize i = 0; i < heads_to_tie_.size (); i++)
- scm_gc_mark (heads_to_tie_[i].tie_definition_);
-}
-
Tie_engraver::Tie_engraver ()
{
event_ = 0;
tie_column_ = 0;
+ event_processed_ = false;
}
IMPLEMENT_TRANSLATOR_LISTENER (Tie_engraver, tie);
// moment that created a tie, so this is not necessarily an unterminated
// tie. Happens e.g. for <c e g>~ g
if (!tie_start.tie_from_chord_created)
- tie_start.head_->warning (_ ("unterminated tie"));
+ {
+ tie_start.tie_->warning (_ ("unterminated tie"));
+ tie_start.tie_->suicide ();
+ }
}
/*
if (ly_is_equal (right_ev->get_property ("pitch"), left_ev->get_property ("pitch"))
&& (!Tie_engraver::has_autosplit_end (left_ev)))
{
- Grob *p = new Spanner (heads_to_tie_[i].tie_definition_);
+ Grob *p = heads_to_tie_[i].tie_;
Moment end = heads_to_tie_[i].end_moment_;
- SCM cause = heads_to_tie_[i].tie_event_
- ? heads_to_tie_[i].tie_event_->self_scm ()
- : heads_to_tie_[i].tie_stream_event_->self_scm ();
+ Stream_event *cause = heads_to_tie_[i].tie_event_
+ ? heads_to_tie_[i].tie_event_
+ : heads_to_tie_[i].tie_stream_event_;
+
+ announce_end_grob (p, cause->self_scm ());
- announce_grob (p, cause);
Tie::set_head (p, LEFT, th);
Tie::set_head (p, RIGHT, h);
- if (is_direction (unsmob_stream_event (cause)->get_property ("direction")))
+ if (is_direction (cause->get_property ("direction")))
{
- Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction"));
+ Direction d = to_dir (cause->get_property ("direction"));
p->set_property ("direction", scm_from_int (d));
}
}
void
-Tie_engraver::stop_translation_timestep ()
+Tie_engraver::process_acknowledged ()
{
bool wait = to_boolean (get_property ("tieWaitForNote"));
if (ties_.size ())
vector<Head_event_tuple> new_heads_to_tie;
- /*
- Whether tie event has been processed and can be deleted or should
- be kept for later portions of a split note.
- */
- bool event_processed = false;
for (vsize i = 0; i < now_heads_.size (); i++)
{
if (left_ev && (tie_event || tie_stream_event)
&& (!Tie_engraver::has_autosplit_end (left_ev)))
{
- event_processed = true;
+ event_processed_ = true;
Head_event_tuple event_tup;
- SCM start_definition
- = updated_grob_properties (context (), ly_symbol2scm ("Tie"));
-
event_tup.head_ = head;
- event_tup.tie_definition_ = start_definition;
event_tup.tie_event_ = tie_event;
event_tup.tie_stream_event_ = tie_stream_event;
+ event_tup.tie_ = make_spanner ("Tie", tie_event
+ ? tie_event->self_scm ()
+ : tie_stream_event->self_scm ());
Moment end = now_mom ();
if (end.grace_part_)
for (vsize i = 0; i < new_heads_to_tie.size (); i++)
heads_to_tie_.push_back (new_heads_to_tie[i]);
+ now_heads_.clear ();
+}
+
+void
+Tie_engraver::stop_translation_timestep ()
+{
/*
Discard event only if it has been processed with at least one
appropriate note.
*/
- if (event_processed)
+ if (event_processed_)
event_ = 0;
- now_heads_.clear ();
+ event_processed_ = false;
}
void
boxes.push_back (Box (x, y));
}
- /* todo: the horizon_padding is somewhat arbitrary */
- chord_outlines_[key] = Skyline (boxes, details_.skyline_padding_, Y_AXIS, -dir);
+ chord_outlines_[key] = Skyline (boxes, Y_AXIS, -dir).padded (details_.skyline_padding_);
if (bounds[0]->break_status_dir ())
{
Interval iv (Axis_group_interface::staff_extent (bounds[0], x_refpoint_, X_AXIS, y_refpoint_, Y_AXIS));
if (tuplets_[j].bracket_)
{
Item *i = dynamic_cast<Item *> (inf.grob ());
- Tuplet_bracket::add_script (tuplets_[j].bracket_, i);
+ if (!i->internal_has_interface (ly_symbol2scm ("dynamic-interface")))
+ Tuplet_bracket::add_script (tuplets_[j].bracket_, i);
}
}
/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2011--2012 Mike Solomon <mike@apollinemike.com>
+ Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
LilyPond is free software: you can redistribute it and/or modify
== (Spanner *)me);
Output_def *layout = me->layout ();
- Real half_space = 0.5;
Item *bound = dynamic_cast<Spanner *> (me)->get_bound (LEFT);
Interval empty;
Offset start;
- start[X_AXIS] = me->spanner_length () - left - half_space;
+ start[X_AXIS] = me->spanner_length () - left;
/*
ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
else
str = "|";
- no_vertical_end
- |= (str != ":|"
- && str != "|:"
- && str != "|."
- && str != ":|:"
- && str != ":|.|:"
- && str != ":|.:"
- && str != ".|");
+ no_vertical_end |= ly_scm2bool (scm_call_1 (ly_lily_module_constant ("volta-bracket::calc-hook-visibility"),
+ ly_string2scm (str)));
if (no_vertical_end || no_vertical_start)
{
"bars "
"thickness "
"height "
+ "shorten-pair "
);
\consists "Script_engraver"
\consists "Script_column_engraver"
+ \consists "Fingering_column_engraver"
\consists "Rhythmic_column_engraver"
\consists "Note_spacing_engraver"
\consists "Spanner_break_forbid_engraver"
\consists "Dynamic_align_engraver"
\consists "Text_engraver"
\consists "Text_spanner_engraver"
+ \consists "Font_size_engraver"
\consists "Axis_group_engraver"
\consists "Tweak_engraver"
decrescendoSpanner = #'hairpin
defaultBarType = #"|"
- doubleRepeatType = #":|:"
- startRepeatType = #"|:"
- endRepeatType = #":|"
+ doubleRepeatType = #":..:"
+ startRepeatType = #".|:"
+ endRepeatType = #":|."
barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers
barNumberFormatter = #robust-bar-number-function
automaticBars = ##t
\once \override BreathingSign #'font-size = #-2
% Workaround: add padding. Correct fix would be spacing engine handle this.
- \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
+ \once \override BreathingSign #'minimum-X-extent = #'(-1.0 . 0.0)
+ \once \override BreathingSign #'minimum-Y-extent = #'(-2.5 . 2.5)
\breathe
}
\once \override BreathingSign #'font-size = #-2
% Workaround: add padding. Correct fix would be spacing engine handle this.
- \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
+ \once \override BreathingSign #'minimum-X-extent = #'(-1.0 . 0.0)
+ \once \override BreathingSign #'minimum-Y-extent = #'(-2.5 . 2.5)
\breathe
}
\once \override BreathingSign #'stencil = #ly:breathing-sign::divisio-minima
% Workaround: add padding. Correct fix would be spacing engine handle this.
- \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
+ \once \override BreathingSign #'minimum-X-extent = #'(-1.0 . 0.0)
+ \once \override BreathingSign #'minimum-Y-extent = #'(-2.5 . 2.5)
\breathe
}
\once \override BreathingSign #'Y-offset = #0
% Workaround: add padding. Correct fix would be spacing engine handle this.
- \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
+ \once \override BreathingSign #'minimum-X-extent = #'(-1.0 . 0.0)
+ \once \override BreathingSign #'minimum-Y-extent = #'(-2.5 . 2.5)
\breathe
}
\once \override BreathingSign #'Y-offset = #0
% Workaround: add padding. Correct fix would be spacing engine handle this.
- \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
+ \once \override BreathingSign #'minimum-X-extent = #'(-1.0 . 0.0)
+ \once \override BreathingSign #'minimum-Y-extent = #'(-2.5 . 2.5)
\breathe
}
\once \override BreathingSign #'Y-offset = #0
% Workaround: add padding. Correct fix would be spacing engine handle this.
- \once \override BreathingSign #'extra-X-extent = #'(-1.0 . 0)
- \once \override BreathingSign #'extra-spacing-height = #'(-0.5 . 0.5)
+ \once \override BreathingSign #'minimum-X-extent = #'(-1.0 . 0.0)
+ \once \override BreathingSign #'minimum-Y-extent = #'(-2.5 . 2.5)
\breathe
}
\version "2.16.0"
-#(if (not (ly:undead? lilypond-declarations))
- (ly:parser-include-string parser
- "\\include \"declarations-init.ly\""))
+#(session-initialize
+ (lambda ()
+ ;; we can't use ly:parser-include-string here since that does not
+ ;; actually do any parsing but merely switches inputs, so the
+ ;; session saved by the session initializer after calling this
+ ;; function has not actually started. A parser clone, in contrast,
+ ;; can run and complete synchronously and shares the module with
+ ;; the current parser.
+ (ly:parser-parse-string (ly:parser-clone parser)
+ "\\include \"declarations-init.ly\"")))
-%% We need to save the variables of the current module along with
-%% their values: functions defined in the module might refer to the
-%% variables
-
-#(if lilypond-declarations
- (if (ly:undead? lilypond-declarations)
- (begin
- (for-each
- (lambda (p)
- (let ((var (cadr p))
- (val (cddr p)))
- (variable-set! var
- (if (ly:output-def? val)
- (ly:output-def-clone val)
- val))
- (module-add! (current-module) (car p) var)))
- (ly:get-undead lilypond-declarations))
- (note-names-language parser default-language))
- (let ((decl '()))
- (module-for-each
- (lambda (s v)
- (let ((val (variable-ref v)))
- (if (not (ly:lily-parser? val))
- (set! decl
- (cons
- (cons*
- s v
- (if (ly:output-def? val)
- (ly:output-def-clone val)
- val))
- decl)))))
- (current-module))
- (set! lilypond-declarations (ly:make-undead decl)))))
+#(note-names-language parser default-language)
#(ly:set-option 'old-relative #f)
#(define toplevel-scores (list))
\revert NoteHead #'stencil
#})
+hide =
+#(define-music-function (parser location item) (string-or-music?)
+ (_i "Set @var{item}'s @samp{transparent} property to @code{#t},
+making it invisible while still retaining its dimensions.
+
+If @var{item} is a string, the result is an override for the grob name
+specified by it. If @var{item} is a music expression, the result is
+the same music expression with an appropriate tweak applied to it.")
+ (if (string? item)
+ #{ \override $item #'transparent = ##t #}
+ #{ \tweak #'transparent ##t $item #}))
+
inStaffSegno =
#(define-music-function (parser location) ()
(_i "Put the segno variant 'varsegno' at this position into the staff,
(make-music 'RelativeOctaveCheck
'pitch pitch))
+omit =
+#(define-music-function (parser location item) (string-or-music?)
+ (_i "Set @var{item}'s @samp{stencil} property to @code{#f},
+effectively omitting it without taking up space.
+
+If @var{item} is a string, the result is an override for the grob name
+specified by it. If @var{item} is a music expression, the result is
+the same music expression with an appropriate tweak applied to it.")
+ (if (string? item)
+ #{ \override $item #'stencil = ##f #}
+ #{ \tweak #'stencil ##f $item #}))
+
once =
#(define-music-function (parser location music) (ly:music?)
(_i "Set @code{once} to @code{#t} on all layout instruction events in @var{music}.")
mods))
shape =
-#(define-music-function (parser location grob offsets)
- (string? list?)
- (_i "Offset control-points of @var{grob} by @var{offsets}. The argument
-is a list of number pairs or list of such lists. Each element of a pair
-represents an offset to one of the coordinates of a control-point.")
- (define ((shape-curve offsets) grob)
+#(define-music-function (parser location offsets item)
+ (list? string-or-music?)
+ (_i "Offset control-points of @var{item} by @var{offsets}. The
+argument is a list of number pairs or list of such lists. Each
+element of a pair represents an offset to one of the coordinates of a
+control-point. If @var{item} is a string, the result is
+@code{\\once\\override} for the specified grob type. If @var{item} is
+a music expression, the result is the same music expression with an
+appropriate tweak applied.")
+ (define (shape-curve grob)
(let* ((orig (ly:grob-original grob))
(siblings (if (ly:spanner? grob)
(ly:spanner-broken-into orig) '()))
(if (>= total-found 2)
(helper siblings offsets)
(offset-control-points (car offsets)))))
-
- #{
- \once \override $grob #'control-points = #(shape-curve offsets)
- #})
+ (if (ly:music? item)
+ #{
+ \tweak #'control-points #shape-curve $item
+ #}
+ #{
+ \once \override $item #'control-points = #shape-curve
+ #}))
shiftDurations =
#(define-music-function (parser location dur dots arg)
(lambda (x)
(shift-one-duration-log x dur dots)) arg))
+single =
+#(define-music-function (parser location overrides music)
+ (ly:music? ly:music?)
+ (_i "Convert @var{overrides} to tweaks and apply them to @var{music}.
+This does not convert @code{\\revert}, @code{\\set} or @code{\\unset}
+and ignores nested overrides.")
+ (set! (ly:music-property music 'tweaks)
+ (fold-some-music
+ (lambda (m) (eq? (ly:music-property m 'name)
+ 'OverrideProperty))
+ (lambda (m tweaks)
+ (let ((p (cond
+ ((ly:music-property m 'grob-property #f) => list)
+ (else
+ (ly:music-property m 'grob-property-path)))))
+ (if (pair? (cdr p))
+ tweaks ;ignore nested properties
+ (acons (cons (ly:music-property m 'symbol) ;grob name
+ (car p)) ;grob property
+ (ly:music-property m 'grob-value)
+ tweaks))))
+ (ly:music-property music 'tweaks)
+ overrides))
+ music)
+
skip =
#(define-music-function (parser location dur) (ly:duration?)
(_i "Skip forward by @var{dur}.")
(ly:music-property music 'tweaks)))
music)
+undo =
+#(define-music-function (parser location music)
+ (ly:music?)
+ (_i "Convert @code{\\override} and @code{\\set} in @var{music} to
+@code{\\revert} and @code{\\unset}, respectively. Any reverts and
+unsets already in @var{music} are ignored and not converted.")
+ (let loop
+ ((music music))
+ (let
+ ((lst
+ (fold-some-music
+ (lambda (m) (or (music-is-of-type? m 'layout-instruction-event)
+ (music-is-of-type? m 'context-specification)))
+ (lambda (m overrides)
+ (case (ly:music-property m 'name)
+ ((OverrideProperty)
+ (cons
+ (make-music 'RevertProperty
+ 'symbol (ly:music-property m 'symbol)
+ 'grob-property-path
+ (cond
+ ((ly:music-property m 'grob-property #f) => list)
+ (else
+ (ly:music-property m 'grob-property-path))))
+ overrides))
+ ((PropertySet)
+ (cons
+ (make-music 'PropertyUnset
+ 'symbol (ly:music-property m 'symbol))
+ overrides))
+ ((ContextSpeccedMusic)
+ (cons
+ (make-music 'ContextSpeccedMusic
+ 'element (loop (ly:music-property m 'element))
+ 'context-type (ly:music-property m 'context-type))
+ overrides))
+ (else overrides)))
+ '()
+ music)))
+ (cond
+ ((null? lst) (make-music 'Music))
+ ((null? (cdr lst)) (car lst))
+ (else (make-sequential-music lst))))))
+
unfoldRepeats =
#(define-music-function (parser location music) (ly:music?)
(_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or
%%
%% Page breaking
%%
- blank-after-score-page-force = 2
- blank-last-page-force = 0
- blank-page-force = 5
+ blank-after-score-page-penalty = 2
+ blank-last-page-penalty = 0
+ blank-page-penalty = 5
page-breaking = #ly:optimal-breaking
}
+%% bar lines
+
+defineBarLine =
+#(define-void-function
+ (parser location bar glyph-list) (string? list?)
+ (_i "Define bar line settings for bar line @var{bar}.
+ The list @var{glyph-list} must have three entries which define
+ the appearance at the end of line, at the beginning of the next line,
+ and the span bar, respectively." )
+ (if (not (= (length glyph-list) 3))
+ (ly:error (_ "Argument list for bar '~a' must have three components.") bar)
+ (define-bar-line bar
+ (car glyph-list)
+ (cadr glyph-list)
+ (caddr glyph-list))))
+
+
%% bass figures
bassFigureExtendersOn = {
}
+%% volta brackets
+
+allowVoltaHook =
+#(define-void-function (parser location bar) (string?)
+ (allow-volta-hook bar))
+
%% x notes
xNotesOn =
empty-stencil))
%% Bookpart first page and last page predicates
+#(define (part-first-page? layout props)
+ (= (chain-assoc-get 'page:page-number props -1)
+ (ly:output-def-lookup layout 'first-page-number)))
+
+#(define (part-last-page? layout props)
+ (chain-assoc-get 'page:is-bookpart-last-page props #f))
+
#(define (part-first-page layout props arg)
- (if (= (chain-assoc-get 'page:page-number props -1)
- (ly:output-def-lookup layout 'first-page-number))
+ (if (part-first-page? layout props)
+ (interpret-markup layout props arg)
+ empty-stencil))
+
+#(define (not-part-first-page layout props arg)
+ (if (not (part-first-page? layout props))
(interpret-markup layout props arg)
empty-stencil))
#(define (part-last-page layout props arg)
- (if (chain-assoc-get 'page:is-bookpart-last-page props #f)
+ (if (part-last-page? layout props)
(interpret-markup layout props arg)
empty-stencil))
empty-stencil))
#(define (print-page-number-check-first layout props arg)
- (if (or (not (book-first-page? layout props))
+ (if (or (not (part-first-page? layout props))
(eq? (ly:output-def-lookup layout 'print-first-page-number) #t))
(create-page-number-stencil layout props arg)
empty-stencil))
%% force the header to take some space, otherwise the
%% page layout becomes a complete mess.
" "
- \on-the-fly #not-first-page \fromproperty #'header:instrument
+ \on-the-fly #not-part-first-page \fromproperty #'header:instrument
\on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
}
evenHeaderMarkup = \markup
\fill-line {
\on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
- \on-the-fly #not-first-page \fromproperty #'header:instrument
+ \on-the-fly #not-part-first-page \fromproperty #'header:instrument
" "
}
\column {
\fill-line {
%% Copyright header field only on first page.
- \on-the-fly #first-page \fromproperty #'header:copyright
+ \on-the-fly #part-first-page \fromproperty #'header:copyright
}
\fill-line {
%% Tagline header field only on last page.
- \on-the-fly #last-page \fromproperty #'header:tagline
+ \on-the-fly #part-last-page \fromproperty #'header:tagline
}
}
}
+++ /dev/null
-depth = ..
-
-STEPMAKE_TEMPLATES=makedir install
-
-include $(depth)/make/stepmake.make
-
-default: spec
-
ABC_FILES = $(call src-wildcard,*.abc)
OUT_LY_FILES = $(sort ${ABC_FILES:%.abc=$(outdir)/%.ly})
OUT_FILES = $(OUT_LY_FILES)
-
-EXTRA_DIST_FILES += $(ABC_FILES)
# Add the xml => pdf rule only if we have dblatex
ifeq (,$(findstring dblatex,$(MISSING_OPTIONAL)))
$(outdir)/%.pdf: $(outdir)/%.xml
- cd $(outdir) && $(DBLATEX) $(notdir $<)
+ cd $(outdir) && $(buildscript-dir)/run-and-check "$(DBLATEX) $(notdir $<)" "$*.dblatex.log"
endif
BSTINPUTS=$(top-src-dir)/Documentation/web/ $(buildscript-dir)/bib2texi \
-s $(top-src-dir)/Documentation/lily-bib \
-o $(outdir)/$*.itexi \
+ -q \
$(top-src-dir)/Documentation/web/$*.bib
TEXINFO_SOURCES += $(TELY_FILES) $(ITELY_FILES) $(ITEXI_FILES)
-EXTRA_DIST_FILES +=$(TELY_FILES) $(LY_FILES) $(ITEXI_FILES) $(ITELY_FILES) $(ILY_FILES)
-
# prerequisites for all rules invoking compiled lilypond binary
ifeq ($(LILYPOND_EXTERNAL_BINARY),)
INIT_LY_SOURCES = $(wildcard $(top-src-dir)/scm/*.scm)
OUT_DIFF_FILES = ${LY_FILES:%.ly=$(outdir)/%.diff}
MIDI2LY_IGNORE_RES = -I 'Lily was here' -I '^\\version ' -I 'TEXT_EVENT.*GNU LilyPond' -I '^% included from'
DIFF = diff
-
-EXTRA_DIST_FILES += $(MIDI_FILES) $(HEADER_FILES)
MUSICMXL_FILES = $(call src-wildcard,*.mxl) # Allow .mxl for compressed files
OUT_LY_FILES = $(sort ${MUSICXML_FILES:%.xml=$(outdir)/%.ly} ${MUSICMXL_FILES:%.mxl=$(outdir)/%.ly})
OUT_FILES = $(OUT_LY_FILES)
-
-EXTRA_DIST_FILES += $(MUSICXML_FILES) $(MUSICMXL_FILES) $(call src-wildcard,*.broken)
fet_endchar;
+% A tick character to use instead of a comma or caesura as a breath mark.
+% Very common in vocal notation.
+
+fet_beginchar ("Tick mark", "tickmark");
+ save end_rad, bot_rad, pat, x_centre, x_extent;
+ path pat;
+
+ end_rad = linethickness / 2;
+ bot_rad = linethickness;
+
+ x_centre# = 0.6 staff_space#;
+ x_extent# = 1.7 staff_space#;
+
+ define_pixels (x_centre, x_extent);
+
+ pickup pencircle scaled end_rad;
+
+ lft x1 = -x_centre;
+ y1 = 0.8 staff_space;
+
+ x2 = 0;
+ y2l = 0;
+
+ top rt z3 = (x_extent - x_centre, x_extent);
+
+ x4 = lft x1;
+ y4 = staff_space;
+
+ penpos2 (0.4 staff_space, 90);
+ penpos3 (end_rad, angle(z4 - z3) + 90);
+ penpos1 (end_rad, angle(z2 - z1) + 90);
+
+ pat = z1r
+ .. top z1
+ .. z1l{z2 - z1}
+ .. {z2 - (z1 + (0.3 staff_space,0))}z2l + (-bot_rad, bot_rad)
+ .. z2l
+ .. z2l + (bot_rad, bot_rad){z3 - (0.6 staff_space, 0) - z2}
+ .. {z3 - z4}z3r
+ .. rt z3
+ .. {z4 - z3}z3l
+ .. {z2 - (z3 - (0.6 staff_space, 0))}rt z2r
+ .. {z1 - z2}lft z2r{z1 - z2}
+ .. cycle;
+ fill pat;
+
+ set_char_box (x_centre#, x_extent# - x_centre#, 0, x_extent#);
+
+ penlabels (1, 2, 3);
+ labels (4);
+fet_endchar;
+
+
fet_beginchar ("snap pizzicato (Bartok pizzicato)", "snappizzicato");
save height, width, thickness, superness;
penlabels (1, 2, 3);
enddef;
+
%
% Draw two brevis notes; the second one shifted down by `shift'.
% The other parameters are the same as with `draw_brevis'.
enddef;
-%
-% Draw three brevis notes; the second one shifted down by `shift',
-% the third one by `2 shift'.
-% The other parameters are the same as with `draw_brevis'.
-%
-def draw_triple_brevis (expr exact_center, bwidth, bheight,
- blinethickness, shift) =
- save brevis_width, brevis_height, linethickness;
-
- brevis_width# = bwidth;
- brevis_height# = bheight;
- linethickness# = blinethickness;
-
- save beam_width, beam_height;
- save serif_size, serif_protrude, hole_height;
-
- beam_width# = 1.4 linethickness#;
- hole_height# = 3 linethickness#;
- 2 beam_height# + hole_height# = brevis_height#;
- serif_size# = (hole_height# - linethickness#) / 2;
- serif_protrude# = 1.5 serif_size#;
-
- save xoffs, yoffs;
-
- xoffs# = xpart exact_center;
- yoffs# = ypart exact_center;
-
- define_pixels (xoffs, yoffs);
- define_pixels (brevis_width, brevis_height, linethickness);
- define_pixels (beam_width, beam_height, serif_size, serif_protrude);
-
- z1l = (xoffs, yoffs - linethickness);
- z2r = z1r + serif_size * (1, -1);
- z3l = z2l + (-serif_size, -serif_protrude);
-
- penpos1 (beam_width, 0);
- penpos2 (beam_height, 90);
- penpos3 (beam_width, 180);
-
- z7 = z1 shifted (0, -2 shift);
- z8 = z2 shifted (0, -2 shift);
- z9 = z3 shifted (0, -2 shift);
-
- penpos7 (beam_width, 0);
- penpos8 (beam_height, 90);
- penpos9 (beam_width, 180);
-
- save pat_in, pat_out;
- path pat_in, pat_out;
-
- pat_out := z9r{down}
- .. z9l{up}
- .. z8l{right};
- pat_out := pat_out
- -- reverse pat_out xscaled -1
- shifted (2 xoffs + brevis_width, 0);
- pat_out := pat_out
- -- reverse pat_out yscaled -1
- shifted (0, -2 yoffs)
- -- cycle;
-
- fill pat_out;
-
- pat_in := z1r{down}
- .. z2r{right};
- pat_in := pat_in
- -- reverse pat_in xscaled -1
- shifted (2 xoffs + brevis_width, 0);
- pat_in := pat_in
- -- reverse pat_in yscaled -1
- shifted (0, 2 yoffs)
- -- cycle;
-
- unfill pat_in;
- unfill pat_in shifted (0, -shift);
- unfill pat_in shifted (0, -2 shift);
-
- penlabels (1, 2, 3, 7, 8, 9);
-enddef;
-
-
def draw_neomensural_c_clef (expr exact_center, reduction) =
save reduced_il, reduced_slt, stem_width;
fet_endchar;
-def draw_mensural_c_clef (expr exact_center, reduction) =
- % inspired by Ockeghem, "Missa Prolationum", in: MGG, volume
- % 9, table 94.
-
- save reduced_il;
+def draw_mensural_c_clef (expr exact_center, reduction, fill_char) =
+ save reduced_il, vert_thick, hor_thick, blot_rad;
reduced_il# = staff_space# * reduction;
+ vert_thick# = linethickness# * 1.4;
+ hor_thick# = staff_space# * reduction * 0.25;
+
+ blot_rad = blot_diameter / 2;
+
+ define_pixels (reduced_il, vert_thick, hor_thick);
+
+ pickup pencircle scaled blot_diameter;
+
+ penpos1 (vert_thick, 0);
+ penpos2 (vert_thick, 0);
+ penpos3 (hor_thick, 90);
+ penpos4 (hor_thick, 90);
+ penpos5 (hor_thick, 90);
+ penpos6 (hor_thick, 90);
+ penpos7 (vert_thick, 0);
+ penpos8 (hor_thick, 90);
+
+ z1l = (0, 0);
+ x2l = 0;
+ top y2 = 2.2 reduced_il;
+ z3 = (vert_thick, 0.75 reduced_il);
+ z4 = z3 + (reduced_il - vert_thick, 0);
+ z5 = z4 + (vert_thick, -0.5 reduced_il);
+ z6 = z5 - (reduced_il, 0);
+ z7 = z4 + (0.5 vert_thick, 0.5 reduced_il);
+ z8 = z5 - (vert_thick, 0);
+
+ save pat, pat_mid;
+ path pat, pat_mid;
+
+ pat = z1l
+ -- z2l{up}
+ .. z2 + (0, blot_rad)
+ .. {down}z2r
+ -- top z3r{down}
+ .. {right}rt z3r
+ -- lft z4r{right}
+ .. {up}top z4r
+ -- z7l{up}
+ .. z7 + (0, blot_rad)
+ .. {down}z7r
+ -- top z5l{down}
+ .. {left}lft z5l
+ -- rt z6l{left}
+ .. {down}bot z6l
+ --z1r;
+ pat := pat
+ -- reverse pat yscaled -1
+ -- cycle;
+ fill pat;
- define_pixels (reduced_il);
-
- draw_triple_brevis (exact_center + (0, 0.5 staff_space#),
- 2 reduced_il#, 0.8 staff_space#,
- 0.8 linethickness#, staff_space);
-
- save half_reduced_il;
-
- half_reduced_il# = staff_space# * sqrt (reduction);
-
- define_pixels (half_reduced_il);
-
- set_char_box (0 - xpart exact_center,
- 2 reduced_il# + xpart exact_center,
- 2.2 half_reduced_il# + staff_space# -
- 2 ypart exact_center,
- 2.2 half_reduced_il# + 2 ypart exact_center);
-
- save xoffs, yoffs;
-
- xoffs# = xpart exact_center;
- yoffs# = ypart exact_center;
-
- define_pixels (xoffs, yoffs);
-
- save ellipse, T;
- path ellipse;
- transform T;
+ if fill_char:
+ pat_mid = bot z3l{up}
+ .. {right}rt z3l
+ -- lft z4l{right}
+ .. {down}bot z4l
+ -- top z8r{down}
+ .. {left}lft z8r
+ -- rt z6r{left}
+ .. {up}top z6r
+ --cycle;
+ unfill pat_mid;
+
+ pat_mid := pat_mid shifted (0, -reduced_il);
+ unfill pat_mid;
+ fi;
- T := identity xscaled 1.4 linethickness
- yscaled blot_diameter;
- pickup pencircle transformed T;
- ellipse := fullcircle transformed T;
+ set_char_box (0, reduced_il# + vert_thick#,
+ 2.2 reduced_il#, 2.2 reduced_il#);
- lft x11 = lft x13 = xoffs;
- top y11 = yoffs + 2.2 half_reduced_il;
- bot y13 = yoffs - 2.2 half_reduced_il - staff_space;
- rt x15 = rt x17 = xoffs + brevis_width;
- y15 = yoffs + 1.4 half_reduced_il;
- y17 = yoffs - 1.4 half_reduced_il - staff_space;
+ penlabels (1, 2, 3, 4, 5, 6, 7, 8);
+enddef;
- z12 = z14 yscaled -1 shifted (0, -staff_space);
- z14 = z9;
- z16 = z18 yscaled -1 shifted (0, -staff_space);
- rt z18 = lft z14 shifted (brevis_width, 0);
- penpos12 (1.4 linethickness, 0);
- penpos14 (1.4 linethickness, 0);
- penpos16 (1.4 linethickness, 0);
- penpos18 (1.4 linethickness, 0);
+fet_beginchar ("mensural c clef", "mensural.c");
+ if test = 1:
+ draw_staff (-1, 3, 0.0);
+ fi;
+ draw_mensural_c_clef ((0, 0), 1.0, true);
+fet_endchar;
- fill get_subpath (ellipse, up, down, z11)
- -- z12l
- -- z12r
- -- cycle;
- fill get_subpath (ellipse, down, up, z13)
- -- z14r
- -- z14l
- -- cycle;
- fill get_subpath (ellipse, up, down, z15)
- -- z16l
- -- z16r
- -- cycle;
- fill get_subpath (ellipse, down, up, z17)
- -- z18r
- -- z18l
- -- cycle;
- labels (11, 13, 15, 17);
- penlabels (12, 14, 16, 18);
-enddef;
+fet_beginchar ("mensural c clef", "mensural.c_change");
+ draw_mensural_c_clef ((0, 0), .8, true);
+fet_endchar;
-fet_beginchar ("mensural c clef", "mensural.c");
+fet_beginchar ("black mensural c clef", "blackmensural.c");
if test = 1:
draw_staff (-1, 3, 0.0);
fi;
- draw_mensural_c_clef ((0, 0), 1.0);
+ draw_mensural_c_clef ((0, 0), 1.0, false);
fet_endchar;
-fet_beginchar ("mensural c clef", "mensural.c_change");
- draw_mensural_c_clef ((0, 0), .8);
+fet_beginchar ("black mensural c clef", "blackmensural.c_change");
+ draw_mensural_c_clef ((0, 0), 0.8, false);
fet_endchar;
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: lilypond 2.16.0\n"
+"Project-Id-Version: lilypond 2.17.5\n"
"Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
"lilypond.bugs\n"
-"POT-Creation-Date: 2012-08-24 11:03+0200\n"
+"POT-Creation-Date: 2012-10-20 17:08+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: book_base.py:26
#, python-format
"%s"
msgstr ""
-#: book_snippets.py:409
+#: book_snippets.py:406
#, python-format
msgid "deprecated ly-option used: %s=%s"
msgstr ""
-#: book_snippets.py:411
+#: book_snippets.py:408
#, python-format
msgid "compatibility mode translation: %s=%s"
msgstr ""
-#: book_snippets.py:414
+#: book_snippets.py:411
#, python-format
msgid "deprecated ly-option used: %s"
msgstr ""
-#: book_snippets.py:416
+#: book_snippets.py:413
#, python-format
msgid "compatibility mode translation: %s"
msgstr ""
-#: book_snippets.py:533
+#: book_snippets.py:530
#, python-format
msgid "ignoring unknown ly option: %s"
msgstr ""
-#: book_snippets.py:624
+#: book_snippets.py:621
#, python-format
msgid "Missing files: %s"
msgstr ""
-#: book_snippets.py:654
+#: book_snippets.py:651
#, python-format
msgid "Could not overwrite file %s"
msgstr ""
-#: book_snippets.py:741
+#: book_snippets.py:738
#, python-format
msgid "Running through filter `%s'"
msgstr ""
-#: book_snippets.py:761
+#: book_snippets.py:759
#, python-format
msgid "`%s' failed (%d)"
msgstr ""
-#: book_snippets.py:762
+#: book_snippets.py:760
msgid "The error log is as follows:"
msgstr ""
-#: book_snippets.py:882
+#: book_snippets.py:880
#, python-format
msgid "Converting MusicXML file `%s'...\n"
msgstr ""
-#: book_snippets.py:909
+#: book_snippets.py:907
#, python-format
msgid ""
"%s: duplicate filename but different contents of original file,\n"
"printing diff against existing file."
msgstr ""
-#: book_snippets.py:922
+#: book_snippets.py:920
#, python-format
msgid ""
"%s: duplicate filename but different contents of converted lilypond file,\n"
msgid "%s has been replaced by %s"
msgstr ""
-#: convertrules.py:24 lilylib.py:131 warn.cc:223
+#: convertrules.py:24 lilylib.py:136 warn.cc:223
#, c-format, python-format
msgid "warning: %s"
msgstr ""
msgid "Writing fonts to %s"
msgstr ""
-#: lilylib.py:96
+#: lilylib.py:101
#, python-format
msgid "Setting loglevel to %s"
msgstr ""
-#: lilylib.py:99
+#: lilylib.py:104
#, python-format
msgid "Unknown or invalid loglevel '%s'"
msgstr ""
-#: lilylib.py:128 warn.cc:211
+#: lilylib.py:133 warn.cc:211
#, c-format, python-format
msgid "error: %s"
msgstr ""
-#: lilylib.py:185
+#: lilylib.py:190
#, python-format
msgid "Processing %s.ly"
msgstr ""
-#: lilylib.py:189 lilylib.py:250
+#: lilylib.py:194 lilylib.py:255
#, python-format
msgid "Invoking `%s'"
msgstr ""
-#: lilylib.py:191 lilylib.py:252
+#: lilylib.py:196 lilylib.py:257
#, python-format
msgid "Running %s..."
msgstr ""
-#: lilylib.py:328
+#: lilylib.py:333
#, python-format
msgid "Usage: %s"
msgstr ""
msgid "Unable to find instrument for ID=%s\n"
msgstr ""
-#: abc2ly.py:1376 convert-ly.py:81 lilypond-book.py:122 midi2ly.py:1044
+#: abc2ly.py:1386 convert-ly.py:81 lilypond-book.py:122 midi2ly.py:1044
#, python-format
msgid "%s [OPTION]... FILE"
msgstr ""
-#: abc2ly.py:1377
+#: abc2ly.py:1387
#, python-format
msgid ""
"abc2ly converts ABC music files (see\n"
"%s) to LilyPond input.\n"
msgstr ""
-#: abc2ly.py:1385 convert-ly.py:88 etf2ly.py:1208 lilypond-book.py:231
-#: midi2ly.py:1095 musicxml2ly.py:2590 main.cc:174
+#: abc2ly.py:1395 convert-ly.py:88 etf2ly.py:1208 lilypond-book.py:231
+#: midi2ly.py:1095 musicxml2ly.py:2590 main.cc:138
msgid "show version number and exit"
msgstr ""
-#: abc2ly.py:1388 convert-ly.py:92 etf2ly.py:1204 lilypond-book.py:140
-#: midi2ly.py:1062 musicxml2ly.py:2572 main.cc:153
+#: abc2ly.py:1398 convert-ly.py:92 etf2ly.py:1204 lilypond-book.py:140
+#: midi2ly.py:1062 musicxml2ly.py:2572 main.cc:117
msgid "show this help and exit"
msgstr ""
-#: abc2ly.py:1391 etf2ly.py:1209 midi2ly.py:1071
+#: abc2ly.py:1401 etf2ly.py:1209 midi2ly.py:1071
msgid "write output to FILE"
msgstr ""
-#: abc2ly.py:1394
+#: abc2ly.py:1404
msgid "be strict about success"
msgstr ""
-#: abc2ly.py:1397
+#: abc2ly.py:1407
msgid "preserve ABC's notion of beams"
msgstr ""
-#: abc2ly.py:1400
+#: abc2ly.py:1410
msgid "suppress progress messages"
msgstr ""
#. "Report bugs in English via %s",
#. or if there is a LilyPond users list or forum in your language
#. "Report bugs in English via %s or in YOUR_LANG via URI"
-#: abc2ly.py:1403 convert-ly.py:146 etf2ly.py:1218 lilypond-book.py:258
-#: midi2ly.py:1107 musicxml2ly.py:2674 main.cc:285
+#: abc2ly.py:1413 convert-ly.py:146 etf2ly.py:1218 lilypond-book.py:258
+#: midi2ly.py:1107 musicxml2ly.py:2674 main.cc:249
#, c-format, python-format
msgid "Report bugs via %s"
msgstr ""
msgstr ""
#: convert-ly.py:107 lilypond-book.py:163 lilypond-book.py:181
-#: musicxml2ly.py:2629 main.cc:167
+#: musicxml2ly.py:2629 main.cc:131
msgid "LOGLEVEL"
msgstr ""
msgstr ""
#: convert-ly.py:141 etf2ly.py:1212 lilypond-book.py:234 midi2ly.py:1096
-#: main.cc:176
+#: main.cc:140
msgid "show warranty and copyright"
msgstr ""
msgid "Applying conversion: "
msgstr ""
-#: convert-ly.py:202
+#: convert-ly.py:201
msgid "Error while converting"
msgstr ""
-#: convert-ly.py:204
+#: convert-ly.py:203
msgid "Stopping at last successful rule"
msgstr ""
msgid "Processing `%s'... "
msgstr ""
-#: convert-ly.py:338
+#: convert-ly.py:341
#, python-format
msgid "%s: Unable to open file"
msgstr ""
-#: convert-ly.py:345
+#: convert-ly.py:347
#, python-format
msgid "%s: Unable to determine version. Skipping"
msgstr ""
-#: convert-ly.py:350
+#: convert-ly.py:353
#, python-format
msgid ""
"%s: Invalid version string `%s' \n"
"`2.8.12'"
msgstr ""
+#: convert-ly.py:359
+#, python-format
+msgid "There was %d error."
+msgid_plural "There were %d errors."
+msgstr[0] ""
+msgstr[1] ""
+
#: etf2ly.py:1197
#, python-format
msgid "%s [OPTION]... ETF-FILE"
msgstr ""
#: etf2ly.py:1210 midi2ly.py:1067 midi2ly.py:1072 musicxml2ly.py:2659
-#: main.cc:159 main.cc:171
+#: main.cc:123 main.cc:135
msgid "FILE"
msgstr ""
msgstr ""
#: lilypond-book.py:143 lilypond-book.py:150 lilypond-book.py:169
-#: lilypond-book.py:187 lilypond-book.py:208 lilypond-book.py:214 main.cc:158
+#: lilypond-book.py:187 lilypond-book.py:208 lilypond-book.py:214 main.cc:122
msgid "DIR"
msgstr ""
msgid "Unable to find input file %s"
msgstr ""
-#: website_post.py:123
+#: website_post.py:125
msgid "English"
msgstr ""
-#: website_post.py:126
+#: website_post.py:128
msgid "Other languages"
msgstr ""
-#: website_post.py:127
+#: website_post.py:129
#, python-format
msgid "About <a href=\"%s\">automatic language selection</a>."
msgstr ""
msgid "procedure or context-name expected for accidental rule, found %s"
msgstr ""
-#: accidental.cc:200
+#: accidental.cc:169
#, c-format
msgid "Could not find glyph-name for alteration %s"
msgstr ""
-#: accidental.cc:215
+#: accidental.cc:184
msgid "natural alteration glyph not found"
msgstr ""
msgid "removing this vertical group"
msgstr ""
-#: axis-group-interface.cc:668
+#: axis-group-interface.cc:686
+#, c-format
+msgid "\"%s\" is not a valid outside-staff-placement-directive"
+msgstr ""
+
+#: axis-group-interface.cc:756
msgid "an outside-staff object should have a direction, defaulting to up"
msgstr ""
msgid "no viable initial configuration found: may not find good beam slope"
msgstr ""
-#: beam.cc:181
+#: beam.cc:268
msgid "removing beam with no stems"
msgstr ""
msgid "unterminated extender"
msgstr ""
-#: flag.cc:113
+#: flag.cc:134
#, c-format
msgid "flag `%s' not found"
msgstr ""
-#: flag.cc:133
+#: flag.cc:154
#, c-format
msgid "flag stroke `%s' not found"
msgstr ""
msgid "%d: %s"
msgstr ""
+#: grob.cc:478
+#, c-format
+msgid "ignored infinite %s-offset"
+msgstr ""
+
#: hairpin.cc:60
msgid "Asking for broken bound padding at a non-broken bound."
msgstr ""
-#: hairpin.cc:254
+#: hairpin.cc:256
msgid "decrescendo too small"
msgstr ""
msgid "type check for `%s' failed; value `%s' must be of type `%s'"
msgstr ""
-#: lily-lexer.cc:255
+#: lily-lexer.cc:244
msgid "include files are not allowed in safe mode"
msgstr ""
-#: lily-lexer.cc:282
+#: lily-lexer.cc:271
#, c-format
msgid "identifier name is a keyword: `%s'"
msgstr ""
-#: lily-lexer.cc:303 lily-lexer.cc:316
+#: lily-lexer.cc:292 lily-lexer.cc:305
#, c-format
msgid "%s:EOF"
msgstr ""
"include-string instead."
msgstr ""
-#: lily-parser.cc:109
+#: lily-parser.cc:108
msgid "Parsing..."
msgstr ""
-#: line-spanner.cc:373
-msgid "Line spanner's left point is to the right of its right point."
+#: lookup.cc:181
+#, c-format
+msgid "Not drawing a box with negative dimension, %.2f by %.2f."
msgstr ""
#: lyric-combine-music-iterator.cc:199
msgid "Lyric syllable does not have note. Use \\lyricsto or associatedVoice."
msgstr ""
-#: main.cc:101
+#: main.cc:70
#, c-format
msgid ""
"This program is free software. It is covered by the GNU General Public\n"
"information.\n"
msgstr ""
-#: main.cc:107
+#: main.cc:76
msgid ""
" This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License as \n"
"Boston, MA 02111-1307, USA.\n"
msgstr ""
-#: main.cc:141
+#: main.cc:105
msgid "SYM[=VAL]"
msgstr ""
-#: main.cc:142
+#: main.cc:106
msgid ""
"set Scheme option SYM to VAL (default: #t).\n"
"Use -dhelp for help."
msgstr ""
-#: main.cc:146
+#: main.cc:110
msgid "EXPR"
msgstr ""
-#: main.cc:146
+#: main.cc:110
msgid "evaluate scheme code"
msgstr ""
#. Bug in option parser: --output =foe is taken as an abbreviation
#. for --output-format.
-#: main.cc:149
+#: main.cc:113
msgid "FORMATs"
msgstr ""
-#: main.cc:149
+#: main.cc:113
msgid "dump FORMAT,... Also as separate options:"
msgstr ""
-#: main.cc:150
+#: main.cc:114
msgid "generate PDF (default)"
msgstr ""
-#: main.cc:151
+#: main.cc:115
msgid "generate PNG"
msgstr ""
-#: main.cc:152
+#: main.cc:116
msgid "generate PostScript"
msgstr ""
-#: main.cc:155
+#: main.cc:119
msgid "FIELD"
msgstr ""
-#: main.cc:155
+#: main.cc:119
msgid ""
"dump header field FIELD to file\n"
"named BASENAME.FIELD"
msgstr ""
-#: main.cc:158
+#: main.cc:122
msgid "add DIR to search path"
msgstr ""
-#: main.cc:159
+#: main.cc:123
msgid "use FILE as init file"
msgstr ""
-#: main.cc:162
+#: main.cc:126
msgid "USER, GROUP, JAIL, DIR"
msgstr ""
-#: main.cc:162
+#: main.cc:126
msgid ""
"chroot to JAIL, become USER:GROUP\n"
"and cd into DIR"
msgstr ""
-#: main.cc:167
+#: main.cc:131
msgid ""
"print log messages according to LOGLEVEL. Possible values are:\n"
"NONE, ERROR, WARNING, BASIC, PROGRESS, INFO (default) and DEBUG."
msgstr ""
-#: main.cc:171
+#: main.cc:135
msgid "write output to FILE (suffix will be added)"
msgstr ""
-#: main.cc:172
+#: main.cc:136
msgid "relocate using directory of lilypond program"
msgstr ""
-#: main.cc:173
+#: main.cc:137
msgid "no progress, only error messages (equivalent to loglevel=ERROR)"
msgstr ""
-#: main.cc:175
+#: main.cc:139
msgid "be verbose (equivalent to loglevel=DEBUG)"
msgstr ""
#. Do not update the copyright years here, run `make grand-replace'
-#: main.cc:242
+#: main.cc:206
#, c-format
msgid ""
"Copyright (c) %s by\n"
msgstr ""
#. No version number or newline here. It confuses help2man.
-#: main.cc:269
+#: main.cc:233
#, c-format
msgid "Usage: %s [OPTION]... FILE..."
msgstr ""
-#: main.cc:271
+#: main.cc:235
msgid "Typeset music and/or produce MIDI from FILE."
msgstr ""
-#: main.cc:273
+#: main.cc:237
msgid "LilyPond produces beautiful music notation."
msgstr ""
-#: main.cc:275
+#: main.cc:239
#, c-format
msgid "For more information, see %s"
msgstr ""
-#: main.cc:277
+#: main.cc:241
msgid "Options:"
msgstr ""
-#: main.cc:331
+#: main.cc:295
#, c-format
msgid "expected %d arguments with jail, found: %u"
msgstr ""
-#: main.cc:345
+#: main.cc:309
#, c-format
msgid "no such user: %s"
msgstr ""
-#: main.cc:347
+#: main.cc:311
#, c-format
msgid "cannot get user id from user name: %s: %s"
msgstr ""
-#: main.cc:362
+#: main.cc:326
#, c-format
msgid "no such group: %s"
msgstr ""
-#: main.cc:364
+#: main.cc:328
#, c-format
msgid "cannot get group id from group name: %s: %s"
msgstr ""
-#: main.cc:372
+#: main.cc:336
#, c-format
msgid "cannot chroot to: %s: %s"
msgstr ""
-#: main.cc:379
+#: main.cc:343
#, c-format
msgid "cannot change group id to: %d: %s"
msgstr ""
-#: main.cc:385
+#: main.cc:349
#, c-format
msgid "cannot change user id to: %d: %s"
msgstr ""
-#: main.cc:391
+#: main.cc:355
#, c-format
msgid "cannot change working directory to: %s: %s"
msgstr ""
-#: main.cc:639
+#: main.cc:601
#, c-format
msgid "exception caught: %s"
msgstr ""
msgid "placing below"
msgstr ""
-#: note-collision.cc:496
+#: note-collision.cc:497
msgid "ignoring too many clashing note columns"
msgstr ""
-#: note-column.cc:147
+#: note-column.cc:172
msgid "cannot have note heads and rests together on a stem"
msgstr ""
msgid "NoteEvent without pitch"
msgstr ""
-#: open-type-font.cc:44
+#: open-type-font.cc:45
#, c-format
msgid "cannot allocate %lu bytes"
msgstr ""
-#: open-type-font.cc:48
+#: open-type-font.cc:49
#, c-format
msgid "cannot load font table: %s"
msgstr ""
-#: open-type-font.cc:53
+#: open-type-font.cc:54
#, c-format
msgid "FreeType error: %s"
msgstr ""
-#: open-type-font.cc:110
+#: open-type-font.cc:111
#, c-format
msgid "unsupported font format: %s"
msgstr ""
-#: open-type-font.cc:112
+#: open-type-font.cc:113
#, c-format
msgid "error reading font file %s: %s"
msgstr ""
-#: open-type-font.cc:187
+#: open-type-font.cc:188
#, c-format
msgid "FT_Get_Glyph_Name () Freetype error: %s"
msgstr ""
-#: open-type-font.cc:318 pango-font.cc:189
+#: open-type-font.cc:336 pango-font.cc:256
#, c-format
msgid "FT_Get_Glyph_Name () error: %s"
msgstr ""
msgid "\tprevious break: %d"
msgstr ""
-#: pango-font.cc:205
+#: pango-font.cc:245
+#, c-format
+msgid "no glyph for character U+%0X in font `%s'"
+msgstr ""
+
+#: pango-font.cc:272
#, c-format
msgid ""
"Glyph has no name, but font supports glyph naming.\n"
"Skipping glyph U+%0X, file %s"
msgstr ""
-#: pango-font.cc:242
+#: pango-font.cc:322
#, c-format
msgid "no PostScript font name for font `%s'"
msgstr ""
-#: pango-font.cc:291
+#: pango-font.cc:372
msgid "FreeType face has no PostScript font name"
msgstr ""
msgid "Relocation: framework_prefix=%s"
msgstr ""
-#: relocate.cc:186
+#: relocate.cc:172
#, c-format
msgid "Relocation: is absolute: argv0=%s\n"
msgstr ""
-#: relocate.cc:192
+#: relocate.cc:178
#, c-format
-msgid "Relocation: from cwd: argv0=%s\n"
+msgid "Relocation : from cwd: argv0=%s\n"
msgstr ""
-#: relocate.cc:208
+#: relocate.cc:194
#, c-format
msgid ""
"Relocation: from PATH=%s\n"
-"argv0=%s"
+"argv0=%s\n"
msgstr ""
-#: relocate.cc:235
+#: relocate.cc:220
msgid "LILYPONDPREFIX is obsolete, use LILYPOND_DATADIR"
msgstr ""
-#: relocate.cc:360
+#: relocate.cc:345
#, c-format
msgid "Relocation file: %s"
msgstr ""
-#: relocate.cc:364 source-file.cc:65
+#: relocate.cc:349 source-file.cc:65
#, c-format
msgid "cannot open file: `%s'"
msgstr ""
-#: relocate.cc:394
+#: relocate.cc:379
#, c-format
msgid "Unknown relocation command %s"
msgstr ""
msgstr ""
#. FIXME:
-#: script-engraver.cc:113
+#: script-engraver.cc:115
msgid "do not know how to interpret articulation:"
msgstr ""
-#: script-engraver.cc:114
+#: script-engraver.cc:116
msgid " scheme encoding: "
msgstr ""
-#: skyline-pair.cc:131
+#: skyline-pair.cc:160
msgid "direction must not be CENTER in ly:skyline-pair::skyline"
msgstr ""
msgid "weird stem size, check for narrow beams"
msgstr ""
-#: system.cc:200
+#: system.cc:201
#, c-format
msgid "Element count %d"
msgstr ""
-#: system.cc:480
+#: system.cc:512
#, c-format
msgid "Grob count %d"
msgstr ""
#. TODO: Also print the arguments of the markup!
-#: text-interface.cc:129
+#: text-interface.cc:131
#, c-format
msgid "Cyclic markup detected: %s"
msgstr ""
#. TODO: Also print the arguments of the markup!
-#: text-interface.cc:142
+#: text-interface.cc:144
#, c-format
msgid "Markup depth exceeds maximal value of %d; Markup: %s"
msgstr ""
msgid "unterminated text spanner"
msgstr ""
-#: tie-engraver.cc:117
+#: tie-engraver.cc:116
msgid "unterminated tie"
msgstr ""
-#: tie-engraver.cc:348
+#: tie-engraver.cc:350
msgid "lonely tie"
msgstr ""
#. If there is no such symbol, we default to the numbered style.
#. (Here really with a warning!)
-#: time-signature.cc:122
+#: time-signature.cc:89
#, c-format
msgid "time signature symbol `%s' not found; reverting to numbered style"
msgstr ""
msgid "giving up"
msgstr ""
-#: parser.yy:161 parser.yy:175
+#: parser.yy:174 parser.yy:188 /home/phil/lilypond-git/lily/parser.yy:174
+#: /home/phil/lilypond-git/lily/parser.yy:188
msgid "Too much lookahead"
msgstr ""
-#: parser.yy:835 parser.yy:1284
+#: parser.yy:464 parser.yy:730 parser.yy:797
+#: /home/phil/lilypond-git/lily/parser.yy:464
+#: /home/phil/lilypond-git/lily/parser.yy:730
+#: /home/phil/lilypond-git/lily/parser.yy:797
+msgid "bad expression type"
+msgstr ""
+
+#: parser.yy:627 parser.yy:1093 /home/phil/lilypond-git/lily/parser.yy:627
+#: /home/phil/lilypond-git/lily/parser.yy:1093
msgid "not a context mod"
msgstr ""
-#: parser.yy:1027
+#: parser.yy:840 /home/phil/lilypond-git/lily/parser.yy:840
msgid "\\paper cannot be used in \\score, use \\layout instead"
msgstr ""
-#: parser.yy:1051
+#: parser.yy:864 /home/phil/lilypond-git/lily/parser.yy:864
msgid "need \\paper for paper block"
msgstr ""
-#: parser.yy:1204
+#: parser.yy:1017 /home/phil/lilypond-git/lily/parser.yy:1017
msgid "Ignoring non-music expression"
msgstr ""
-#: parser.yy:2044
+#: parser.yy:1028 parser.yy:1971 /home/phil/lilypond-git/lily/parser.yy:1028
+#: /home/phil/lilypond-git/lily/parser.yy:1971
+msgid "music expected"
+msgstr ""
+
+#: parser.yy:1854 /home/phil/lilypond-git/lily/parser.yy:1854
msgid "only \\consists and \\remove take non-string argument."
msgstr ""
-#: parser.yy:2057
+#: parser.yy:1867 /home/phil/lilypond-git/lily/parser.yy:1867
msgid "Grob name should be alphanumeric"
msgstr ""
-#: parser.yy:2261
+#: parser.yy:1919 parser.yy:1923 parser.yy:1941
+#: /home/phil/lilypond-git/lily/parser.yy:1919
+#: /home/phil/lilypond-git/lily/parser.yy:1923
+#: /home/phil/lilypond-git/lily/parser.yy:1941
+msgid "simple string expected"
+msgstr ""
+
+#: parser.yy:2080 /home/phil/lilypond-git/lily/parser.yy:2080
msgid "not a rhythmic event"
msgstr ""
-#: parser.yy:2357 parser.yy:2362
+#: parser.yy:2176 parser.yy:2181 /home/phil/lilypond-git/lily/parser.yy:2176
+#: /home/phil/lilypond-git/lily/parser.yy:2181
msgid "have to be in Lyric mode for lyrics"
msgstr ""
-#: parser.yy:2477
+#: parser.yy:2296 /home/phil/lilypond-git/lily/parser.yy:2296
msgid "expecting string as script definition"
msgstr ""
-#: parser.yy:2637 parser.yy:2681
+#: parser.yy:2397 /home/phil/lilypond-git/lily/parser.yy:2397
+msgid "not an articulation"
+msgstr ""
+
+#: parser.yy:2469 parser.yy:2515 /home/phil/lilypond-git/lily/parser.yy:2469
+#: /home/phil/lilypond-git/lily/parser.yy:2515
#, c-format
msgid "not a duration: %d"
msgstr ""
-#: parser.yy:2800
+#: parser.yy:2532 /home/phil/lilypond-git/lily/parser.yy:2532
+msgid "bass number expected"
+msgstr ""
+
+#: parser.yy:2646 /home/phil/lilypond-git/lily/parser.yy:2646
msgid "have to be in Note mode for notes"
msgstr ""
-#: parser.yy:2855
+#: parser.yy:2705 /home/phil/lilypond-git/lily/parser.yy:2705
msgid "have to be in Chord mode for chords"
msgstr ""
-#: parser.yy:3115
+#: parser.yy:2962 /home/phil/lilypond-git/lily/parser.yy:2962
msgid "not a markup"
msgstr ""
-#: lexer.ll:218
+#: lexer.ll:215 /home/phil/lilypond-git/lily/lexer.ll:215
msgid "stray UTF-8 BOM encountered"
msgstr ""
-#: lexer.ll:221
+#: lexer.ll:218 /home/phil/lilypond-git/lily/lexer.ll:218
msgid "Skipping UTF-8 BOM"
msgstr ""
-#: lexer.ll:279
+#: lexer.ll:276 /home/phil/lilypond-git/lily/lexer.ll:276
#, c-format
msgid "Renaming input to: `%s'"
msgstr ""
-#: lexer.ll:296
+#: lexer.ll:293 /home/phil/lilypond-git/lily/lexer.ll:293
msgid "quoted string expected after \\version"
msgstr ""
-#: lexer.ll:300
+#: lexer.ll:297 /home/phil/lilypond-git/lily/lexer.ll:297
msgid "quoted string expected after \\sourcefilename"
msgstr ""
-#: lexer.ll:304
+#: lexer.ll:301 /home/phil/lilypond-git/lily/lexer.ll:301
msgid "integer expected after \\sourcefileline"
msgstr ""
-#: lexer.ll:327
+#: lexer.ll:324 /home/phil/lilypond-git/lily/lexer.ll:324
msgid "\\maininput not allowed outside init files"
msgstr ""
-#: lexer.ll:351
+#: lexer.ll:348 /home/phil/lilypond-git/lily/lexer.ll:348
#, c-format
msgid "wrong or undefined identifier: `%s'"
msgstr ""
-#: lexer.ll:377
+#: lexer.ll:374 /home/phil/lilypond-git/lily/lexer.ll:374
msgid "string expected after \\include"
msgstr ""
#. backup rule
-#: lexer.ll:387
+#: lexer.ll:384 /home/phil/lilypond-git/lily/lexer.ll:384
msgid "end quote missing"
msgstr ""
-#: lexer.ll:558
-msgid "Brace found at end of lyric. Did you forget a space?"
-msgstr ""
-
-#: lexer.ll:672
-msgid "Brace found at end of markup. Did you forget a space?"
-msgstr ""
-
-#: lexer.ll:684
+#: lexer.ll:696 /home/phil/lilypond-git/lily/lexer.ll:696
msgid "EOF found inside a comment"
msgstr ""
-#: lexer.ll:782
+#: lexer.ll:798 /home/phil/lilypond-git/lily/lexer.ll:798
#, c-format
msgid "invalid character: `%s'"
msgstr ""
-#: lexer.ll:903 lexer.ll:904
+#: lexer.ll:921 /home/phil/lilypond-git/lily/lexer.ll:922
#, c-format
msgid "unknown escaped string: `\\%s'"
msgstr ""
-#: lexer.ll:1186 lexer.ll:1187
+#: lexer.ll:1204 /home/phil/lilypond-git/lily/lexer.ll:1205
msgid "non-UTF-8 input"
msgstr ""
-#: lexer.ll:1230 lexer.ll:1231
+#: lexer.ll:1248 /home/phil/lilypond-git/lily/lexer.ll:1249
#, c-format
msgid "file too old: %s (oldest supported: %s)"
msgstr ""
-#: lexer.ll:1231 lexer.ll:1232
+#: lexer.ll:1249 /home/phil/lilypond-git/lily/lexer.ll:1250
msgid "consider updating the input with the convert-ly script"
msgstr ""
-#: lexer.ll:1237 lexer.ll:1238
+#: lexer.ll:1255 /home/phil/lilypond-git/lily/lexer.ll:1256
#, c-format
msgid "program too old: %s (file requires: %s)"
msgstr ""
msgid "missing stencil expression `~S'"
msgstr ""
+#: bar-line.scm:140
+#, scheme-format
+msgid "Bar glyph ~a not known. Ignoring."
+msgstr ""
+
+#: bar-line.scm:168
+#, scheme-format
+msgid ""
+"Annotation '~a' is allowed in the first argument of a bar line definition "
+"only."
+msgstr ""
+
+#: bar-line.scm:176
+#, scheme-format
+msgid ""
+"Replacement '~a' is allowed in the last argument of a bar line definition "
+"only."
+msgstr ""
+
+#: bar-line.scm:237
+#, scheme-format
+msgid ""
+"add-bar-glyph-print-procedure: glyph '~a' has to be a single ASCII character."
+msgstr ""
+
+#: bar-line.scm:808
+#, scheme-format
+msgid "No span bar glyph defined for bar glyph '~a'; ignoring."
+msgstr ""
+
#: chord-entry.scm:52
#, scheme-format
msgid "Spurious garbage following chord: ~A"
msgid "Error in beam quanting. Expected ~S 0, found ~S."
msgstr ""
-#: lily-library.scm:299
+#: lily-library.scm:305
msgid "Music unsuitable for context-mod"
msgstr ""
-#: lily-library.scm:349
+#: lily-library.scm:361
#, scheme-format
msgid "Cannot find context-def \\~a"
msgstr ""
-#: lily-library.scm:365
+#: lily-library.scm:377
msgid "Music unsuitable for output-def"
msgstr ""
-#: lily-library.scm:892
+#: lily-library.scm:904
msgid ""
"Find the index between @var{start} and @var{end} (an integer)\n"
"which produces the closest match to @var{target-val} if\n"
"applied to function @var{getter}."
msgstr ""
-#: lily-library.scm:966
+#: lily-library.scm:978
#, scheme-format
msgid "unknown unit: ~S"
msgstr ""
-#: lily-library.scm:991
+#: lily-library.scm:1003
#, scheme-format
msgid "no \\version statement found, please add~afor future compatibility"
msgstr ""
-#: lily-library.scm:997
+#: lily-library.scm:1009
msgid "old relative compatibility not used"
msgstr ""
-#: lily.scm:234
+#: lily.scm:63
+msgid "define-session used after session start"
+msgstr ""
+
+#: lily.scm:311
msgid "Using (ice-9 curried-definitions) module\n"
msgstr ""
-#: lily.scm:237
+#: lily.scm:314
msgid "Guile 1.8\n"
msgstr ""
-#: lily.scm:297
+#: lily.scm:373
#, scheme-format
msgid "cannot find: ~A"
msgstr ""
-#: lily.scm:708
+#: lily.scm:792
msgid "Success: compilation successfully completed"
msgstr ""
-#: lily.scm:709
+#: lily.scm:793
msgid "Compilation completed with warnings or errors"
msgstr ""
-#: lily.scm:771
+#: lily.scm:855
#, scheme-format
msgid "job ~a terminated with signal: ~a"
msgstr ""
-#: lily.scm:774
+#: lily.scm:858
#, scheme-format
msgid ""
"logfile ~a (exit ~a):\n"
"~a"
msgstr ""
-#: lily.scm:796 lily.scm:882
+#: lily.scm:880 lily.scm:969
#, scheme-format
msgid "failed files: ~S"
msgstr ""
-#: lily.scm:873
+#: lily.scm:960
#, scheme-format
msgid "Redirecting output to ~a..."
msgstr ""
-#: lily.scm:892 ps-to-png.scm:66
+#: lily.scm:979 ps-to-png.scm:66
#, scheme-format
msgid "Invoking `~a'...\n"
msgstr ""
msgid "Defaulting to 'any-octave."
msgstr ""
-#: music-functions.scm:1578
+#: music-functions.scm:1586
#, scheme-format
msgid "unknown accidental style: ~S"
msgstr ""
-#: output-ps.scm:277 output-svg.scm:524
+#: output-ps.scm:278 output-svg.scm:524
#, scheme-format
msgid "unknown line-cap-style: ~S"
msgstr ""
-#: output-ps.scm:282 output-svg.scm:530
+#: output-ps.scm:283 output-svg.scm:530
#, scheme-format
msgid "unknown line-join-style: ~S"
msgstr ""
msgid "set-global-staff-size: not in toplevel scope"
msgstr ""
-#: paper.scm:315
+#: paper.scm:321
#, scheme-format
msgid "This is not a \\layout {} object, ~S"
msgstr ""
-#: paper.scm:327
+#: paper.scm:332
#, scheme-format
msgid "Unknown paper size: ~a"
msgstr ""
#. TODO: should raise (generic) exception with throw, and catch
#. that in parse-scm.cc
-#: paper.scm:342
+#: paper.scm:347
msgid "Must use #(set-paper-size .. ) within \\paper { ... }"
msgstr ""
-#: parser-clef.scm:143 parser-clef.scm:183
+#: parser-clef.scm:151 parser-clef.scm:191
#, scheme-format
msgid "unknown clef type `~a'"
msgstr ""
-#: parser-clef.scm:144 parser-clef.scm:184
+#: parser-clef.scm:152 parser-clef.scm:192
#, scheme-format
msgid "supported clefs: ~a"
msgstr ""
depth=../..
-EXTRA_DIST_FILES = $(call src-wildcard,*.py)
-
include $(depth)/make/stepmake.make
default:
"""
import re
import os
+import sys
import time
import operator
'out-www/examples',
'Documentation/topdocs',
'Documentation/bibliography',
- 'Documentation/out-www/THANKS',
'Documentation/out-www/DEDICATION',
'input/']
footer = '''
<div class="footer">
+<!-- This footer was autogenerated by %s -->
<p class="footer_version">
-%(footer_name_version)s
+%%(footer_name_version)s
</p>
<p class="footer_report">
-%(footer_report_links)s
+%%(footer_report_links)s
</p>
</div>
-'''
+''' % sys.argv[0]
web_footer = '''
<div class="footer">
+<!-- This footer was autogenerated by %s -->
</div>
-'''
+''' % sys.argv[0]
footer_name_version = _doc ('This page is for %(package_name)s-%(package_version)s (%(branch_str)s).')
# ugh, must not have "_doc" in strings because it is naively replaced with "_" in hacked gettext process
LANGUAGES_TEMPLATE = '''
<p id="languages">
- %(language_available)s
+<!-- These links were autogenerated by %s -->
+ %%(language_available)s
<br>
- %(browser_language)s
+ %%(browser_language)s
</p>
-'''
+''' % sys.argv[0]
html_re = re.compile ('(.*?)(?:[.]([^/.]*))?[.]html$')
import os
import copy
import shutil
-# TODO: We are using os.popen3, which has been deprecated since python 2.6. The
-# suggested replacement is the Popen function of the subprocess module.
-# Unfortunately, on windows this needs the msvcrt module, which doesn't seem
-# to be available in GUB?!?!?!
-# from subprocess import Popen, PIPE
+import subprocess
+import sys
progress = ly.progress
warning = ly.warning
debug (_ ("Running through filter `%s'") % cmd, True)
- # TODO: Use Popen once we resolve the problem with msvcrt in Windows:
- (stdin, stdout, stderr) = os.popen3 (cmd)
- # p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
- # (stdin, stdout, stderr) = (p.stdin, p.stdout, p.stderr)
+ closefds = True
+ if (sys.platform == "mingw32"):
+ closefds = False
+ p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=closefds)
+ (stdin, stdout, stderr) = (p.stdin, p.stdout, p.stderr)
stdin.write (input)
status = stdin.close ()
def conv (str):
return str
+@rule ((2, 17, 0), r"blank-*-force -> blank-*-penalty")
+def conv (str):
+ str = re.sub ('blank-page-force', 'blank-page-penalty', str)
+ str = re.sub ('blank-last-page-force', 'blank-last-page-penalty', str)
+ str = re.sub ('blank-after-score-page-force', 'blank-after-score-page-penalty', str)
+ return str
+
+
+@rule ((2, 17, 4), r"\shape Grob #offsets -> \shape #offsets Grob")
+def conv (str):
+ str = re.sub (r"\\shape(\s+(?:[a-zA-Z]+|" + matchstring + "))(" +
+ matcharg + ")", r"\\shape\2\1", str)
+ return str
+
+barstring=r"(\\bar|whichBar|defaultBarType|segnoType|doubleRepeatType|startRepeatType|endRepeatType|doubleRepeatSegnoType|startRepeatSegnoType|endRepeatSegnoType)(\s*[=]?\s*[#]?)"
+
+@rule ((2, 17, 5), r"New bar line interface")
+def conv(str):
+ str = re.sub (barstring + r'"\|:"', '\\1\\2".|:"', str)
+ str = re.sub (barstring + r'":\|"', '\\1\\2":|."', str)
+ str = re.sub (barstring + r'"\|\|:"', '\\1\\2".|:-||"', str)
+ str = re.sub (barstring + r'":\|:"', '\\1\\2":..:"', str)
+ str = re.sub (barstring + r'"\.\|\."', '\\1\\2".."', str)
+ str = re.sub (barstring + r'"\|S"', '\\1\\2"S-|"', str)
+ str = re.sub (barstring + r'"S\|"', '\\1\\2"S-S"', str)
+ str = re.sub (barstring + r'":\|S"', '\\1\\2":|.S"', str)
+ str = re.sub (barstring + r'":\|S\."', '\\1\\2":|.S-S"', str)
+ str = re.sub (barstring + r'"S\|:"', '\\1\\2"S.|:-S"', str)
+ str = re.sub (barstring + r'"\.S\|:"', '\\1\\2"S.|:"', str)
+ str = re.sub (barstring + r'":\|S\|:"', '\\1\\2":|.S.|:"', str)
+ str = re.sub (barstring + r'":\|S\.\|:"', '\\1\\2":|.S.|:-S"', str)
+ str = re.sub (barstring + r'":"', '\\1\\2";"', str)
+ str = re.sub (barstring + r'"\|s"', '\\1\\2"|-s"', str)
+ str = re.sub (barstring + r'"dashed"', '\\1\\2"!"', str)
+ str = re.sub (barstring + r'"kievan"', '\\1\\2"k"', str)
+ str = re.sub (barstring + r'"empty"', '\\1\\2"-"', str)
+ return str
# Guidelines to write rules (please keep this at the end of this file)
#
import gettext
t = gettext.translation ('lilypond', localedir)
_ = t.ugettext
+ ungettext = t.ungettext
except:
def _ (s):
return s
+ def ungettext (s, p, n):
+ if n == 1:
+ return s
+ return p
underscore = _
# Urg, Python 2.4 does not define stderr/stdout encoding
;;;; You should have received a copy of the GNU General Public License
;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-;; helper functions
+
+
+;; TODO:
+;; (1) Dashed bar lines may stick out above and below the staff lines
+;;
+;; (2) Dashed and dotted lines look ugly in combination with span bars
+;;
+;; (This was the case in the c++-version of (span) bar stuff)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; helper functions for staff and layout properties
+
+(define (calc-blot thickness extent grob)
+ "Calculate the blot diameter by taking @code{'rounded}
+and the dimensions of the extent into account."
+ (let* ((rounded (ly:grob-property grob 'rounded #f))
+ (blot (if rounded
+ (let ((blot-diameter (layout-blot-diameter grob))
+ (height (interval-length extent)))
+
+ (cond ((< thickness blot-diameter) thickness)
+ ((< height blot-diameter) height)
+ (else blot-diameter)))
+ 0)))
+
+ blot))
+
+(define (get-span-glyph bar-glyph)
+ "Get the corresponding span glyph from the @code{span-glyph-bar-alist}.
+Pad the string with @code{annotation-char}s to the length of the
+@var{bar-glyph} string."
+ (let ((span-glyph (assoc-get bar-glyph span-bar-glyph-alist bar-glyph)))
+
+ (if (string? span-glyph)
+ (set! span-glyph (string-pad-right
+ span-glyph
+ (string-length bar-glyph)
+ replacement-char)))
+ span-glyph))
(define (get-staff-symbol grob)
+ "Return the staff symbol corresponding to Grob @var{grob}."
(if (grob::has-interface grob 'staff-symbol-interface)
grob
(ly:grob-object grob 'staff-symbol)))
(define (layout-blot-diameter grob)
+ "Get the blot diameter of the @var{grob}'s corresponding layout."
(let* ((layout (ly:grob-layout grob))
- (blot (ly:output-def-lookup layout 'blot-diameter)))
+ (blot-diameter (ly:output-def-lookup layout 'blot-diameter)))
- blot))
+ blot-diameter))
(define (layout-line-thickness grob)
+ "Get the line thickness of the @var{grob}'s corresponding layout."
(let* ((layout (ly:grob-layout grob))
(line-thickness (ly:output-def-lookup layout 'line-thickness)))
line-thickness))
-(define (staff-symbol-line-count grob)
+(define (staff-symbol-line-count staff)
+ "Get or compute the number of lines of staff @var{staff}."
(let ((line-count 0))
- (if (ly:grob? grob)
- (let ((line-pos (ly:grob-property grob 'line-positions '())))
+ (if (ly:grob? staff)
+ (let ((line-pos (ly:grob-property staff 'line-positions '())))
(set! line-count (if (pair? line-pos)
(length line-pos)
- (ly:grob-property grob 'line-count 0)))))
+ (ly:grob-property staff 'line-count 0)))))
line-count))
iv))
(define (staff-symbol-line-positions grob)
+ "Get or compute the @code{'line-positions} list from @var{grob}."
(let ((line-pos (ly:grob-property grob 'line-positions '())))
(if (not (pair? line-pos))
(iota line-count)))))
line-pos))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; internal helper functions
+
+(define annotation-char #\-)
+(define replacement-char #\ )
+
+(define dummy-extent (cons -1 1))
+
+
+(define (glyph->stencil glyph grob extent)
+ "Return a stencil computed by the procedure associated with
+glyph @var{glyph}. The arguments @var{grob} and @var{extent} are
+mandatory to the procedures stored in @code{bar-glyph-print-procedures}."
+ (let ((proc (assoc-get glyph bar-glyph-print-procedures))
+ (stencil empty-stencil))
+
+ (if (procedure? proc)
+ (set! stencil (proc grob extent))
+ (ly:warning (_ "Bar glyph ~a not known. Ignoring.") glyph))
+ stencil))
+
+(define (string->string-list str)
+ "Convert a string into a list of strings with length 1.
+@code{"aBc"} will be converted to @code{("a" "B" "c")}.
+An empty string will be converted to a list containing @code{""}."
+ (if (and (string? str)
+ (not (zero? (string-length str))))
+ (map (lambda (s)
+ (string s))
+ (string->list str))
+ (list "")))
+
+(define (strip-string-annotation str)
+ "Strip annotations starting with and including the
+annotation char from string @var{str}."
+ (let ((pos (string-index str annotation-char)))
+
+ (if pos
+ (substring str 0 pos)
+ str)))
+
+(define (check-for-annotation str)
+ "Check whether the annotation char is present in string @var{str}."
+ (if (string? str)
+ (if (string-index str annotation-char)
+ (ly:warning
+ (_ "Annotation '~a' is allowed in the first argument of a bar line definition only.")
+ str))))
+
+(define (check-for-replacement str)
+ "Check whether the replacement char is present in string @var{str}."
+ (if (string? str)
+ (if (string-index str replacement-char)
+ (ly:warning
+ (_ "Replacement '~a' is allowed in the last argument of a bar line definition only.")
+ str))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; functions used by external routines
(define-public (span-bar::notify-grobs-of-my-existence grob)
+ "Set the @code{'has-span-bar} property for all elements of Grob @var{grob}."
(let* ((elts (ly:grob-array->list (ly:grob-object grob 'elements)))
(sorted-elts (sort elts ly:grob-vertical<?))
(last-pos (1- (length sorted-elts)))
(set! idx (1+ idx)))
sorted-elts)))
-;; How should a bar line behave at a break?
-;; the following alist has the form
-;; ( unbroken-bar-glyph . ( bar-glyph-at-end-of-line . bar-glyph-at-begin-of-line ))
-
-(define bar-glyph-alist
- '((":|:" . (":|" . "|:"))
- (":|.|:" . (":|" . "|:"))
- (":|.:" . (":|" . "|:"))
- ("||:" . ("||" . "|:"))
- ("dashed" . ("dashed" . '()))
- ("|" . ("|" . ()))
- ("|s" . (() . "|"))
- ("|:" . ("|" . "|:"))
- ("|." . ("|." . ()))
-
- ;; hmm... should we end with a bar line here?
- (".|" . ("|" . ".|"))
- (":|" . (":|" . ()))
- ("||" . ("||" . ()))
- (".|." . (".|." . ()))
- ("|.|" . ("|.|" . ()))
- ("" . ("" . ""))
- (":" . (":" . ""))
- ("." . ("." . ()))
- ("'" . ("'" . ()))
- ("empty" . (() . ()))
- ("brace" . (() . "brace"))
- ("bracket" . (() . "bracket"))
-
- ;; segno bar lines
- ("S" . ("||" . "S"))
- ("|S" . ("|" . "S"))
- ("S|" . ("S" . ()))
- (":|S" . (":|" . "S"))
- (":|S." . (":|S" . ()))
- ("S|:" . ("S" . "|:"))
- (".S|:" . ("|" . "S|:"))
- (":|S|:" . (":|" . "S|:"))
- (":|S.|:" . (":|S" . "|:"))
-
- ;; ancient bar lines
- ("kievan" . ("kievan" . ""))))
-
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Line break decisions.
+
+(define-public (define-bar-line bar-glyph eol-glyph bol-glyph span-glyph)
+ "Define a bar glyph @var{bar-glyph} and its substitute at the end of a line
+(@var{eol-glyph}), at the beginning of a new line (@var{bol-glyph})
+and as a span bar (@var{span-glyph}) respectively."
+ ;; the last argument may not include annotations
+ (check-for-annotation span-glyph)
+ ;; only the last argument may call for replacements
+ (for-each (lambda (s)
+ (check-for-replacement s))
+ (list bar-glyph eol-glyph bol-glyph))
+ ;; the bar-glyph-alist has entries like
+ ;; (bar-glyph . ( eol-glyph . bol-glyph))
+ (set! bar-glyph-alist
+ (acons bar-glyph (cons eol-glyph bol-glyph) bar-glyph-alist))
+
+ ;; the span-bar-glyph-alist has entries like
+ ;; (bar-glyph . span-glyph)
+ (set! span-bar-glyph-alist
+ (acons bar-glyph span-glyph span-bar-glyph-alist)))
+
+(define-session-public bar-glyph-alist '())
+
+(define-session-public span-bar-glyph-alist '())
+
+(define-public (add-bar-glyph-print-procedure glyph proc)
+ "Specify the single glyph @var{glyph} that calls print procedure @var{proc}.
+The procedure @var{proc} has to be defined in the form
+@code{(make-...-bar-line grob extent)} even if the @var{extent}
+is not used within the routine."
+ (if (or (not (string? glyph))
+ (> (string-length glyph) 1))
+ (ly:warning
+ (_ "add-bar-glyph-print-procedure: glyph '~a' has to be a single ASCII character.")
+ glyph)
+ (set! bar-glyph-print-procedures
+ (acons glyph proc bar-glyph-print-procedures))))
+
+(define-session-public bar-glyph-print-procedures `())
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; drawing functions for various bar line types
+;; to include them and other user-defined functions,
+;; all of them have the form
+;; (make-...-bar-line grob extent)
+;; even if the extent is not used.
(define (make-empty-bar-line grob extent)
+ "Draw an empty bar line."
(ly:make-stencil "" (cons 0 0) extent))
-(define (make-simple-bar-line grob width extent rounded)
- (let ((blot (if rounded
- (layout-blot-diameter grob)
- 0)))
+(define (make-simple-bar-line grob extent)
+ "Draw a simple bar line."
+ (let* ((line-thickness (layout-line-thickness grob))
+ (thickness (* (ly:grob-property grob 'hair-thickness 1)
+ line-thickness))
+ (blot (calc-blot thickness extent grob))
+ (extent (bar-line::widen-bar-extent-on-span grob extent)))
+
+ (ly:round-filled-box (cons 0 thickness)
+ extent
+ blot)))
- (ly:round-filled-box (cons 0 width)
+(define (make-thick-bar-line grob extent)
+ "Draw a thick bar line."
+ (let* ((line-thickness (layout-line-thickness grob))
+ (thickness (* (ly:grob-property grob 'thick-thickness 1)
+ line-thickness))
+ (blot (calc-blot thickness extent grob))
+ (extent (bar-line::widen-bar-extent-on-span grob extent)))
+
+ (ly:round-filled-box (cons 0 thickness)
extent
blot)))
-(define (make-tick-bar-line grob height rounded)
- (let ((half-staff (* 1/2 (ly:staff-symbol-staff-space grob)))
- (staff-line-thickness (ly:staff-symbol-line-thickness grob))
- (blot (if rounded
- (layout-blot-diameter grob)
- 0)))
+(define (make-tick-bar-line grob extent)
+ "Draw a tick bar line."
+ (let* ((half-staff (* 1/2 (ly:staff-symbol-staff-space grob)))
+ (staff-line-thickness (ly:staff-symbol-line-thickness grob))
+ (height (interval-end extent))
+ (blot (calc-blot staff-line-thickness extent grob)))
- (ly:round-filled-box (cons 0 staff-line-thickness)
- (cons (- height half-staff) (+ height half-staff))
- blot)))
+ (ly:round-filled-box (cons 0 staff-line-thickness)
+ (cons (- height half-staff) (+ height half-staff))
+ blot)))
-(define (make-colon-bar-line grob)
+(define (make-colon-bar-line grob extent)
+ "Draw repeat dots."
(let* ((staff-space (ly:staff-symbol-staff-space grob))
(line-thickness (ly:staff-symbol-line-thickness grob))
(dot (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot"))
(/ staff-space 2)) Y)))
stencil)))
+
(define (make-dotted-bar-line grob extent)
+ "Draw a dotted bar line."
(let* ((position (round (* (interval-end extent) 2)))
(correction (if (even? position) 0.5 0.0))
(dot (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot"))
(add-stencils! empty-stencil stil-list)))
-(define (make-dashed-bar-line grob extent thickness)
+(define (make-dashed-bar-line grob extent)
+ "Draw a dashed bar line."
(let* ((height (interval-length extent))
(staff-symbol (get-staff-symbol grob))
(staff-space (ly:staff-symbol-staff-space grob))
(line-thickness (layout-line-thickness grob))
+ (thickness (* (ly:grob-property grob 'hair-thickness 1)
+ line-thickness))
(dash-size (- 1.0 (ly:grob-property grob 'gap 0.3)))
(line-count (staff-symbol-line-count staff-symbol)))
stencil)
(let* ((dashes (/ height staff-space))
(total-dash-size (/ height dashes))
- (factor (/ (- dash-size thickness) staff-space)))
-
- (ly:stencil-translate-axis
- (ly:make-stencil (list 'dashed-line
- thickness
- (* factor total-dash-size)
- (* (- 1 factor) total-dash-size)
- 0
- height
- (* factor total-dash-size 0.5))
- (cons 0 thickness)
- (cons 0 height))
- (interval-start extent)
- Y)))))
-
-(define (make-segno-bar-line grob glyph extent rounded)
+ (factor (/ (- dash-size thickness) staff-space))
+ (stencil (ly:stencil-translate-axis
+ (ly:make-stencil (list 'dashed-line
+ thickness
+ (* factor total-dash-size)
+ (* (- 1 factor) total-dash-size)
+ 0
+ height
+ (* factor total-dash-size 0.5))
+ (cons (/ thickness -2) (/ thickness 2))
+ (cons 0 height))
+ (interval-start extent)
+ Y)))
+
+ (ly:stencil-translate-axis stencil (/ thickness 2) X)))))
+
+
+(define ((make-segno-bar-line show-segno) grob extent)
+ "Draw a segno bar line. If @var{show-segno} is set to @code{#t},
+the segno sign is drawn over the double bar line; otherwise, it
+draws the span bar variant, i.e. without the segno sign."
(let* ((line-thickness (layout-line-thickness grob))
- (kern (* (ly:grob-property grob 'kern 1) line-thickness))
(thinkern (* (ly:grob-property grob 'thin-kern 1) line-thickness))
- (hair (* (ly:grob-property grob 'hair-thickness 1) line-thickness))
- (fatline (* (ly:grob-property grob 'thick-thickness 1) line-thickness))
- (thin-stil (make-simple-bar-line grob hair extent rounded))
- (thick-stil (make-simple-bar-line grob fatline extent rounded))
- (colon-stil (make-colon-bar-line grob))
- (segno-stil (ly:stencil-add
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- '() X LEFT thin-stil thinkern)
- X RIGHT thin-stil thinkern)
- (ly:font-get-glyph (ly:grob-default-font grob) "scripts.varsegno")))
- (glyph (cond
- ((string=? glyph "|S") "S")
- ((string=? glyph "S|") "S")
- (else glyph)))
- (stencil (cond
- ((or (string=? glyph "S|:")
- (string=? glyph ".S|:"))
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X RIGHT thin-stil kern)
- X RIGHT colon-stil kern)
- X LEFT segno-stil thinkern))
- ((or (string=? glyph ":|S")
- (string=? glyph ":|S."))
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern)
- X LEFT colon-stil kern)
- X RIGHT segno-stil thinkern))
- ((or (string=? glyph ":|S|:")
- (string=? glyph ":|S.|:"))
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern)
- X LEFT colon-stil kern)
- X RIGHT segno-stil thinkern)
- X RIGHT thick-stil thinkern)
- X RIGHT thin-stil kern)
- X RIGHT colon-stil kern))
- ((string=? glyph "|._.|")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern)
- X RIGHT thick-stil (+ (interval-length
- (ly:stencil-extent segno-stil X))
- (* 2 thinkern)))
- X RIGHT thin-stil kern))
- (else segno-stil))))
+ (thin-stil (make-simple-bar-line grob extent))
+ (double-line-stil (ly:stencil-combine-at-edge
+ thin-stil
+ X
+ LEFT
+ thin-stil
+ thinkern))
+ (segno (ly:font-get-glyph (ly:grob-default-font grob)
+ "scripts.varsegno"))
+ (stencil (ly:stencil-add
+ (if show-segno
+ segno
+ (ly:make-stencil
+ ""
+ (ly:stencil-extent segno X)
+ (cons 0 0)))
+ (ly:stencil-translate-axis
+ double-line-stil
+ (* 1/2 thinkern)
+ X))))
stencil))
-(define (make-kievan-bar-line grob)
+(define (make-kievan-bar-line grob extent)
+ "Draw a kievan bar line."
(let* ((font (ly:grob-default-font grob))
(stencil (stencil-whiteout
(ly:font-get-glyph font "scripts.barline.kievan"))))
- ;; the kievan bar line has mo staff lines underneath,
- ;; so we whiteout them and move ithe grob to a higher layer
+ ;; the kievan bar line has no staff lines underneath,
+ ;; so we whiteout them and move the grob to a higher layer
(ly:grob-set-property! grob 'layer 1)
stencil))
+(define ((make-bracket-bar-line dir) grob extent)
+ "Draw a bracket-style bar line. If @var{dir} is set to @code{LEFT}, the
+opening bracket will be drawn, for @code{RIGHT} we get the closing bracket."
+ (let* ((thick-stil (make-thick-bar-line grob extent))
+ (brackettips-up (ly:font-get-glyph (ly:grob-default-font grob)
+ "brackettips.up"))
+ (brackettips-down (ly:font-get-glyph (ly:grob-default-font grob)
+ "brackettips.down"))
+ ;; the x-extent of the brackettips must not be taken into account
+ ;; for bar line constructs like "[|:", so we set new bounds:
+ (tip-up-stil (ly:make-stencil (ly:stencil-expr brackettips-up)
+ (cons 0 0)
+ (ly:stencil-extent brackettips-up Y)))
+ (tip-down-stil (ly:make-stencil (ly:stencil-expr brackettips-down)
+ (cons 0 0)
+ (ly:stencil-extent brackettips-down Y)))
+ (stencil (ly:stencil-add
+ thick-stil
+ (ly:stencil-translate-axis tip-up-stil
+ (interval-end extent)
+ Y)
+ (ly:stencil-translate-axis tip-down-stil
+ (interval-start extent)
+ Y))))
+
+ (if (eq? dir LEFT)
+ stencil
+ (ly:stencil-scale stencil -1 1))))
+
+(define ((make-spacer-bar-line glyph) grob extent)
+ "Draw an invisible bar line which has the same dimensions as the one
+drawn by the procedure associated with glyph @var{glyph}."
+ (let* ((stil (glyph->stencil glyph grob extent))
+ (stil-x-extent (ly:stencil-extent stil X)))
+
+ (ly:make-stencil "" stil-x-extent extent)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; bar line callbacks
(define-public (ly:bar-line::calc-bar-extent grob)
(staff-extent (cons 0 0)))
(if (ly:grob? staff-symbol)
- (let* ((bar-line-color (ly:grob-property grob 'color))
- (staff-color (ly:grob-property staff-symbol 'color))
- (staff-line-thickness (ly:staff-symbol-line-thickness grob))
- (staff-space (ly:staff-symbol-staff-space grob)))
-
- (set! staff-extent (ly:staff-symbol::height staff-symbol))
-
- (if (zero? staff-space)
- (set! staff-space 1.0))
-
- (if (< (interval-length staff-extent) staff-space)
- ;; staff is too small (perhaps consists of a single line);
- ;; extend the bar line to make it visible
- (set! staff-extent
- (interval-widen staff-extent staff-space))
- ;; Due to rounding problems, bar lines extending to the outermost edges
- ;; of the staff lines appear wrongly in on-screen display
- ;; (and, to a lesser extent, in print) - they stick out a pixel.
- ;; The solution is to extend bar lines only to the middle
- ;; of the staff line - unless they have different colors,
- ;; when it would be undesirable.
- ;;
- ;; This reduction should not influence whether bar is to be
- ;; expanded later, so length is not updated on purpose.
- (if (eq? bar-line-color staff-color)
- (set! staff-extent
- (interval-widen staff-extent
- (* -1/2 staff-line-thickness)))))))
+ (let ((bar-line-color (ly:grob-property grob 'color))
+ (staff-color (ly:grob-property staff-symbol 'color))
+ (half-staff-line-thickness (/ (ly:staff-symbol-line-thickness grob) 2))
+ (staff-space (ly:staff-symbol-staff-space grob)))
+
+ (set! staff-extent (ly:staff-symbol::height staff-symbol))
+
+ (if (zero? staff-space)
+ (set! staff-space 1.0))
+
+ (if (< (interval-length staff-extent) staff-space)
+ ;; staff is too small (perhaps consists of a single line);
+ ;; extend the bar line to make it visible
+ (set! staff-extent
+ (interval-widen staff-extent staff-space))
+ ;; Due to rounding problems, bar lines extending to the outermost edges
+ ;; of the staff lines appear wrongly in on-screen display
+ ;; (and, to a lesser extent, in print) - they stick out a pixel.
+ ;; The solution is to extend bar lines only to the middle
+ ;; of the staff line - unless they have different colors,
+ ;; when it would be undesirable.
+ ;;
+ ;; This reduction should not influence whether the bar is to be
+ ;; expanded later, so length is not updated on purpose.
+ (if (eq? bar-line-color staff-color)
+ (set! staff-extent
+ (interval-widen staff-extent
+ (- half-staff-line-thickness)))))))
staff-extent))
+;; this function may come in handy when defining new bar line glyphs, so
+;; we make it public.
+;; This code should not be included in ly:bar-line::calc-bar-extent, because
+;; this may confuse the drawing functions for dashed and dotted bar lines.
+(define-public (bar-line::widen-bar-extent-on-span grob extent)
+ "Widens the bar line @var{extent} towards span bars adjacent to grob @var{grob}."
+ (let ((staff-symbol (get-staff-symbol grob))
+ (has-span-bar (ly:grob-property grob 'has-span-bar #f)))
+
+ (if (and (ly:grob? staff-symbol)
+ (pair? has-span-bar))
+ (let ((bar-line-color (ly:grob-property grob 'color))
+ (staff-color (ly:grob-property staff-symbol 'color))
+ (half-staff-line-thickness (/ (ly:staff-symbol-line-thickness grob) 2)))
+ (if (eq? bar-line-color staff-color)
+ ;; if the colors are equal, ly:bar-line::calc-bar-extent has
+ ;; shortened the bar line extent by a half-staff-line-thickness
+ ;; this is reverted on the interval bounds where span bars appear:
+ (begin
+ (and (ly:grob? (car has-span-bar))
+ (set! extent (cons (- (car extent) half-staff-line-thickness)
+ (cdr extent))))
+ (and (ly:grob? (cdr has-span-bar))
+ (set! extent (cons (car extent)
+ (+ (cdr extent) half-staff-line-thickness))))))))
+ extent))
+
(define (bar-line::bar-y-extent grob refpoint)
+ "Compute the y-extent of the bar line relative to @var{refpoint}."
(let* ((extent (ly:grob-property grob 'bar-extent '(0 . 0)))
(rel-y (ly:grob-relative-coordinate grob refpoint Y))
(y-extent (coord-translate extent rel-y)))
y-extent))
(define-public (ly:bar-line::print grob)
- (let ((glyph (ly:grob-property grob 'glyph-name))
+ "The print routine for bar lines."
+ (let ((glyph-name (ly:grob-property grob 'glyph-name))
(extent (ly:grob-property grob 'bar-extent '(0 . 0))))
- (if (and (not (eq? glyph '()))
+ (if (and glyph-name
(> (interval-length extent) 0))
- (bar-line::compound-bar-line grob glyph extent #f)
+ (bar-line::compound-bar-line grob glyph-name extent)
#f)))
-(define-public (bar-line::compound-bar-line grob glyph extent rounded)
+(define-public (bar-line::compound-bar-line grob bar-glyph extent)
+ "Build the bar line stencil."
(let* ((line-thickness (layout-line-thickness grob))
- (height (interval-length extent))
(kern (* (ly:grob-property grob 'kern 1) line-thickness))
- (thinkern (* (ly:grob-property grob 'thin-kern 1) line-thickness))
- (hair (* (ly:grob-property grob 'hair-thickness 1) line-thickness))
- (fatline (* (ly:grob-property grob 'thick-thickness 1) line-thickness))
- (thin-stil (make-simple-bar-line grob hair extent rounded))
- (thick-stil (make-simple-bar-line grob fatline extent rounded))
- (colon-stil (make-colon-bar-line grob))
- (glyph (cond
- ((not glyph) "")
- ((string=? glyph "||:") "|:")
- ;; bar-line::compound-bar-line is called only if
- ;; height > 0, but just in case ...
- ((and (string=? glyph ":|")
- (zero? height)) "|.")
- ((and (string=? glyph "|:")
- (zero? height)) ".|")
- (else glyph)))
- (stencil (cond
- ((string=? glyph "|") thin-stil)
- ((string=? glyph ".") thick-stil)
- ((string=? glyph "||")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- '() X LEFT thin-stil thinkern)
- X RIGHT thin-stil thinkern))
- ((string=? glyph "|.")
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern))
- ((string=? glyph ".|")
- (ly:stencil-combine-at-edge
- thick-stil X RIGHT thin-stil kern))
- ((string=? glyph "|:")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X RIGHT thin-stil kern)
- X RIGHT colon-stil kern))
- ((string=? glyph ":|")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern)
- X LEFT colon-stil kern))
- ((string=? glyph ":|:")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- '() X LEFT thick-stil thinkern)
- X LEFT colon-stil kern)
- X RIGHT thick-stil kern)
- X RIGHT colon-stil kern))
- ((string=? glyph ":|.|:")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern)
- X LEFT colon-stil kern)
- X RIGHT thin-stil kern)
- X RIGHT colon-stil kern))
- ((string=? glyph ":|.:")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern)
- X LEFT colon-stil kern)
- X RIGHT colon-stil kern))
- ((string=? glyph ".|.")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- '() X LEFT thick-stil thinkern)
- X RIGHT thick-stil kern))
- ((string=? glyph "|.|")
- (ly:stencil-combine-at-edge
- (ly:stencil-combine-at-edge
- thick-stil X LEFT thin-stil kern)
- X RIGHT thin-stil kern))
- ((string=? glyph ":")
- (make-dotted-bar-line grob extent))
- ((or (string=? glyph "|._.|")
- (string-contains glyph "S"))
- (make-segno-bar-line grob glyph extent rounded))
- ((string=? glyph "'")
- (make-tick-bar-line grob (interval-end extent) rounded))
- ((string=? glyph "dashed")
- (make-dashed-bar-line grob extent hair))
- ((string=? glyph "kievan")
- (make-kievan-bar-line grob))
- (else (make-empty-bar-line grob extent)))))
- stencil))
+ (bar-glyph-list (string->string-list
+ (strip-string-annotation bar-glyph)))
+ (span-glyph (get-span-glyph bar-glyph))
+ (span-glyph-list (string->string-list span-glyph))
+ (neg-stencil empty-stencil)
+ (stencil empty-stencil)
+ (is-first-neg-stencil #t)
+ (is-first-stencil #t))
+
+ ;; We build up two separate stencils first:
+ ;; (1) the neg-stencil is built from all glyphs that have
+ ;; a replacement-char in the span bar
+ ;; (2) the main stencil is built from all remaining glyphs
+ ;;
+ ;; Afterwards the neg-stencil is attached left to the
+ ;; stencil; this ensures that the main stencil starts
+ ;; at x = 0.
+ ;;
+ ;; For both routines holds:
+ ;; we stack the stencils obtained by the corresponding
+ ;; single glyphs with spacing 'kern' except for the
+ ;; first stencil
+ ;; (Thanks to Harm who came up with this idea!)
+ (for-each (lambda (bar span)
+ (if (and (string=? span (string replacement-char))
+ is-first-stencil)
+ (begin
+ (set! neg-stencil
+ (ly:stencil-combine-at-edge
+ neg-stencil
+ X
+ RIGHT
+ (glyph->stencil bar grob extent)
+ (if is-first-neg-stencil 0 kern)))
+ (set! is-first-neg-stencil #f))
+ (begin
+ (set! stencil
+ (ly:stencil-combine-at-edge
+ stencil
+ X
+ RIGHT
+ (glyph->stencil bar grob extent)
+ (if is-first-stencil 0 kern)))
+ (set! is-first-stencil #f))))
+ bar-glyph-list span-glyph-list)
+ ;; if we have a non-empty neg-stencil,
+ ;; we attach it to the left side of the stencil
+ (and (not is-first-neg-stencil)
+ (set! stencil
+ (ly:stencil-combine-at-edge
+ stencil
+ X
+ LEFT
+ neg-stencil
+ kern)))
+ stencil))
(define-public (ly:bar-line::calc-anchor grob)
- (let* ((line-thickness (layout-line-thickness grob))
- (kern (* (ly:grob-property grob 'kern 1) line-thickness))
- (glyph (ly:grob-property grob 'glyph-name ""))
+ "Calculate the anchor position of a bar line. The anchor is used for
+the correct placement of bar numbers etc."
+ (let* ((bar-glyph (ly:grob-property grob 'glyph-name ""))
+ (bar-glyph-list (string->string-list (strip-string-annotation bar-glyph)))
+ (span-glyph (assoc-get bar-glyph span-bar-glyph-alist bar-glyph))
(x-extent (ly:grob-extent grob grob X))
- (dot-width (+ (interval-length
- (ly:stencil-extent
- (ly:font-get-glyph
- (ly:grob-default-font grob)
- "dots.dot")
- X))
- kern))
(anchor 0.0))
- (if (> (interval-length x-extent) 0)
- (begin
- (set! anchor (interval-center x-extent))
- (cond ((string=? glyph "|:")
- (set! anchor (+ anchor (/ dot-width -2.0))))
- ((string=? glyph ":|")
- (set! anchor (+ anchor (/ dot-width 2.0)))))))
- anchor))
+ (and (> (interval-length x-extent) 0)
+ (if (or (= (length bar-glyph-list) 1)
+ (string=? bar-glyph span-glyph)
+ (string=? span-glyph ""))
+ ;; We use the x-extent of the stencil if either
+ ;; - we have a single bar-glyph
+ ;; - bar-glyph and span-glyph are identical
+ ;; - we have no span-glyph
+ (set! anchor (interval-center x-extent))
+ ;; If the conditions above do not hold,the anchor is the
+ ;; center of the corresponding span bar stencil extent
+ (set! anchor (interval-center
+ (ly:stencil-extent
+ (span-bar::compound-bar-line grob bar-glyph dummy-extent)
+ X)))))
+ anchor))
(define-public (bar-line::calc-glyph-name grob)
+ "Determine the @code{glyph-name} of the bar line depending on the
+line break status."
(let* ((glyph (ly:grob-property grob 'glyph))
(dir (ly:item-break-dir grob))
(result (assoc-get glyph bar-glyph-alist))
glyph-name))
(define-public (bar-line::calc-break-visibility grob)
+ "Calculate the visibility of a bar line at line breaks."
(let* ((glyph (ly:grob-property grob 'glyph))
(result (assoc-get glyph bar-glyph-alist)))
(vector (string? (car result)) #t (string? (cdr result)))
all-invisible)))
-;; which span bar belongs to a bar line?
-
-(define-public span-bar-glyph-alist
- '(("|:" . ".|")
- ("||:" . ".|")
- (":|" . "|.")
- (":|.:" . "|.")
- (":|:" . ".|.")
- (":|.|:" . "|.|")
- (":|.|" . "|.")
- ("S" . "||" )
- ("S|" . "||")
- ("|S" . "||")
- ("S|:" . ".|")
- (".S|:" . ".|")
- (":|S" . "|.")
- (":|S." . "|.")
- (":|S|:" . "|._.|")
- (":|S.|:" . "|._.|")
- ("kievan" . "")
- ("'" . "")))
-
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; span bar callbacks
(define-public (ly:span-bar::calc-glyph-name grob)
+ "Return the @code{'glyph-name} of the corresponding BarLine grob.
+The corresponding SpanBar glyph is computed within
+@code{span-bar::compound-bar-line}."
(let* ((elts (ly:grob-object grob 'elements))
(pos (1- (ly:grob-array-length elts)))
- (glyph '()))
+ (glyph-name '()))
- (while (and (eq? glyph '())
+ (while (and (eq? glyph-name '())
(> pos -1))
- (begin (set! glyph (ly:grob-property (ly:grob-array-ref elts pos)
- 'glyph-name))
+ (begin (set! glyph-name
+ (ly:grob-property (ly:grob-array-ref elts pos)
+ 'glyph-name))
(set! pos (1- pos))))
- (if (eq? glyph '())
+ (if (eq? glyph-name '())
(begin (ly:grob-suicide! grob)
- (set! glyph "")))
- (assoc-get glyph span-bar-glyph-alist glyph)))
+ (set! glyph-name "")))
+ glyph-name))
(define-public (ly:span-bar::width grob)
+ "Compute the width of the SpanBar stencil."
(let ((width (cons 0 0)))
(if (grob::is-live? grob)
- (let* ((glyph (ly:grob-property grob 'glyph-name))
- (stencil (bar-line::compound-bar-line grob glyph (cons -1 1) #f)))
+ (let* ((glyph-name (ly:grob-property grob 'glyph-name))
+ (stencil (span-bar::compound-bar-line grob
+ glyph-name
+ dummy-extent)))
(set! width (ly:stencil-extent stencil X))))
width))
(define-public (ly:span-bar::before-line-breaking grob)
+ "A dummy callback that kills the Grob @var{grob} if it contains
+no elements."
(let ((elts (ly:grob-object grob 'elements)))
(if (zero? (ly:grob-array-length elts))
(ly:grob-suicide! grob))))
+(define-public (span-bar::compound-bar-line grob bar-glyph extent)
+ "Build the stencil of the span bar."
+ (let* ((line-thickness (layout-line-thickness grob))
+ (kern (* (ly:grob-property grob 'kern 1) line-thickness))
+ (bar-glyph-list (string->string-list
+ (strip-string-annotation bar-glyph)))
+ (span-glyph (assoc-get bar-glyph span-bar-glyph-alist 'undefined))
+ (stencil empty-stencil))
+
+ (if (string? span-glyph)
+ (let ((span-glyph-list (string->string-list span-glyph))
+ (is-first-stencil #t))
+
+ (for-each (lambda (bar span)
+ ;; the stencil stack routine is similar to the one
+ ;; used in bar-line::compound-bar-line, but here,
+ ;; leading replacement-chars are discarded.
+ (if (not (and (string=? span (string replacement-char))
+ is-first-stencil))
+ (begin
+ (set! stencil
+ (ly:stencil-combine-at-edge
+ stencil
+ X
+ RIGHT
+ ;; if the current glyph is the replacement-char,
+ ;; we take the corresponding glyph from the
+ ;; bar-glyph-list and insert an empty stencil
+ ;; with the appropriate width.
+ ;; (this method would fail if the bar-glyph-list
+ ;; were shorter than the span-glyph-list,
+ ;; but this makes hardly any sense from a
+ ;; typographical point of view
+ (if (string=? span (string replacement-char))
+ ((make-spacer-bar-line bar) grob extent)
+ (glyph->stencil span grob extent))
+ (if is-first-stencil 0 kern)))
+ (set! is-first-stencil #f))))
+ bar-glyph-list span-glyph-list))
+ ;; if span-glyph is not a string, it may be #f or 'undefined;
+ ;; the latter signals that the span bar for the current bar-glyph
+ ;; is undefined, so we raise a warning.
+ (if (eq? span-glyph 'undefined)
+ (ly:warning
+ (_ "No span bar glyph defined for bar glyph '~a'; ignoring.")
+ bar-glyph)))
+ stencil))
+
;; The method used in the following routine depends on bar_engraver
;; not being removed from staff context. If bar_engraver is removed,
;; the size of the staff lines is evaluated as 0, which results in a
;; This routine was originally by Juergen Reuter, but it was a on the
;; bulky side. Rewritten by Han-Wen. Ported from c++ to Scheme by Marc Hohl.
(define-public (ly:span-bar::print grob)
+ "The print routine for span bars."
(let* ((elts-array (ly:grob-object grob 'elements))
(refp (ly:grob-common-refpoint-of-array grob elts-array Y))
(elts (reverse (sort (ly:grob-array->list elts-array)
;; Elements must be ordered according to their y coordinates
;; relative to their common axis group parent.
;; Otherwise, the computation goes mad.
- (glyph (ly:grob-property grob 'glyph-name))
+ (bar-glyph (ly:grob-property grob 'glyph-name))
(span-bar empty-stencil))
- (if (string? glyph)
- (let* ((extents '())
- (make-span-bars '())
- (model-bar #f))
-
- ;; we compute the extents of each system and store them
- ;; in a list; dito for the 'allow-span-bar property.
- ;; model-bar takes the bar grob, if given.
- (map (lambda (bar)
- (let* ((ext (bar-line::bar-y-extent bar refp))
- (staff-symbol (ly:grob-object bar 'staff-symbol)))
-
- (if (ly:grob? staff-symbol)
- (let ((refp-extent (ly:grob-extent staff-symbol refp Y)))
-
- (set! ext (interval-union ext refp-extent))
-
- (if (> (interval-length ext) 0)
+ (if (string? bar-glyph)
+ (let ((extents '())
+ (make-span-bars '())
+ (model-bar #f))
+
+ ;; we compute the extents of each system and store them
+ ;; in a list; dito for the 'allow-span-bar property.
+ ;; model-bar takes the bar grob, if given.
+ (map (lambda (bar)
+ (let ((ext (bar-line::bar-y-extent bar refp))
+ (staff-symbol (ly:grob-object bar 'staff-symbol)))
+
+ (if (ly:grob? staff-symbol)
+ (let ((refp-extent (ly:grob-extent staff-symbol refp Y)))
+
+ (set! ext (interval-union ext refp-extent))
+
+ (if (> (interval-length ext) 0)
+ (begin
+ (set! extents (append extents (list ext)))
+ (set! model-bar bar)
+ (set! make-span-bars
+ (append make-span-bars
+ (list (ly:grob-property
+ bar
+ 'allow-span-bar
+ #t))))))))))
+ elts)
+ ;; if there is no bar grob, we use the callback argument
+ (if (not model-bar)
+ (set! model-bar grob))
+ ;; we discard the first entry in make-span-bars,
+ ;; because its corresponding bar line is the
+ ;; uppermost and therefore not connected to
+ ;; another bar line
+ (if (pair? make-span-bars)
+ (set! make-span-bars (cdr make-span-bars)))
+ ;; the span bar reaches from the lower end of the upper staff
+ ;; to the upper end of the lower staff - when allow-span-bar is #t
+ (reduce (lambda (curr prev)
+ (let ((span-extent (cons 0 0))
+ (allow-span-bar (car make-span-bars)))
+
+ (set! make-span-bars (cdr make-span-bars))
+ (if (> (interval-length prev) 0)
(begin
- (set! extents (append extents (list ext)))
- (set! model-bar bar)
- (set! make-span-bars
- (append make-span-bars
- (list (ly:grob-property bar 'allow-span-bar #t))))))))))
- elts)
- ;; if there is no bar grob, we use the callback argument
- (if (not model-bar)
- (set! model-bar grob))
- ;; we discard the first entry in make-span-bars, because its corresponding
- ;; bar line is the uppermost and therefore not connected to another bar line
- (if (pair? make-span-bars)
- (set! make-span-bars (cdr make-span-bars)))
- ;; the span bar reaches from the lower end of the upper staff
- ;; to the upper end of the lower staff - when allow-span-bar is #t
- (reduce (lambda (curr prev)
- (let ((l (cons 0 0))
- (allow-span-bar (car make-span-bars)))
-
- (set! make-span-bars (cdr make-span-bars))
- (if (> (interval-length prev) 0)
- (begin
- (set! l (cons (cdr prev) (car curr)))
- (if (or (zero? (interval-length l))
- (not allow-span-bar))
- (begin
- ;; there is overlap between the bar lines
- ;; or 'allow-span-bar = #f.
- ;; Do nothing.
- )
+ (set! span-extent (cons (cdr prev)
+ (car curr)))
+ ;; draw the span bar only when the staff lines
+ ;; don't overlap and allow-span-bar is #t:
+ (and (> (interval-length span-extent) 0)
+ allow-span-bar
(set! span-bar
- (ly:stencil-add span-bar
- (bar-line::compound-bar-line
- model-bar
- glyph
- l
- #f))))))
- curr))
- "" extents)
- (set! span-bar (ly:stencil-translate-axis
- span-bar
- (- (ly:grob-relative-coordinate grob refp Y))
- Y))))
+ (ly:stencil-add
+ span-bar
+ (span-bar::compound-bar-line
+ model-bar
+ bar-glyph
+ span-extent))))))
+ curr))
+ "" extents)
+ (set! span-bar (ly:stencil-translate-axis
+ span-bar
+ (- (ly:grob-relative-coordinate grob refp Y))
+ Y))))
span-bar))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; volta bracket functions
+
+(define-public (allow-volta-hook bar-glyph)
+ "Allow the volta bracket hook being drawn over bar line @var{bar-glyph}."
+ (if (string? bar-glyph)
+ (set! volta-bracket-allow-volta-hook-list
+ (append volta-bracket-allow-volta-hook-list
+ (list bar-glyph)))
+ (ly:warning (_ ("Volta hook bar line must be a string; ignoring '~a'.")
+ bar-glyph))))
+
+(define-session-public volta-bracket-allow-volta-hook-list '())
+
+(define-public (volta-bracket::calc-hook-visibility bar-glyph)
+ "Determine the visibility of the volta bracket hook. It is called in
+@code{lily/volta-bracket.cc} and returns @code{#t} if @emph{no} hook
+should be drawn."
+ (not (member bar-glyph volta-bracket-allow-volta-hook-list)))
+
+(define-public (ly:volta-bracket::calc-shorten-pair grob)
+ "Calculate the @code{shorten-pair} values for an ideal placement
+of the volta brackets relative to the bar lines."
+ (let* ((line-thickness (layout-line-thickness grob))
+ (volta-half-line-thickness (* (ly:grob-property grob 'thickness 1.6)
+ line-thickness
+ 1/2))
+ (bar-array (ly:grob-object grob 'bars))
+ (bar-array-length (ly:grob-array-length bar-array))
+ ;; the bar-array starts with the uppermost bar line grob that is
+ ;; covered by the left edge of the volta bracket; more (span)
+ ;; bar line grobs from other staves may follow
+ (left-bar-line (if (> bar-array-length 0)
+ (ly:grob-array-ref bar-array 0)
+ '()))
+ ;; we need the vertical-axis-group-index of the left-bar-line
+ ;; to find the corresponding right-bar-line
+ (vag-index (if (null? left-bar-line)
+ -1
+ (ly:grob-get-vertical-axis-group-index left-bar-line)))
+ ;; the bar line corresponding to the right edge of the volta bracket
+ ;; is the last entry with the same vag-index, so we transform the array to a list,
+ ;; reverse it and search for suitable entries:
+ (filtered-grobs (filter (lambda (e)
+ (eq? (ly:grob-get-vertical-axis-group-index e)
+ vag-index))
+ (reverse (ly:grob-array->list bar-array))))
+ ;; we need the first one (if any)
+ (right-bar-line (if (pair? filtered-grobs)
+ (car filtered-grobs)
+ '()))
+ ;; the left-bar-line may be a #'<Grob Item >,
+ ;; so we add "" as a fallback return value
+ (left-bar-glyph-name (if (null? left-bar-line)
+ (string annotation-char)
+ (ly:grob-property left-bar-line 'glyph-name "")))
+ (right-bar-glyph-name (if (null? right-bar-line)
+ (string annotation-char)
+ (ly:grob-property right-bar-line 'glyph-name "")))
+ (left-bar-broken (or (null? left-bar-line)
+ (not (zero? (ly:item-break-dir left-bar-line)))))
+ (right-bar-broken (or (null? right-bar-line)
+ (not (zero? (ly:item-break-dir right-bar-line)))))
+ (left-span-stencil-extent (ly:stencil-extent
+ (span-bar::compound-bar-line
+ left-bar-line
+ left-bar-glyph-name
+ dummy-extent)
+ X))
+ (right-span-stencil-extent (ly:stencil-extent
+ (span-bar::compound-bar-line
+ right-bar-line
+ right-bar-glyph-name
+ dummy-extent)
+ X))
+ (left-shorten 0.0)
+ (right-shorten 0.0))
+
+ ;; since "empty" intervals may look like (1.0 . -1.0), we use the
+ ;; min/max functions to make sure that the placement is not corrupted
+ ;; in case of empty bar lines
+ (set! left-shorten
+ (if left-bar-broken
+ (- (max 0 (interval-end left-span-stencil-extent))
+ (max 0 (interval-end (ly:stencil-extent
+ (bar-line::compound-bar-line
+ left-bar-line
+ left-bar-glyph-name
+ dummy-extent)
+ X)))
+ volta-half-line-thickness)
+ (- (max 0 (interval-end left-span-stencil-extent))
+ volta-half-line-thickness)))
+
+ (set! right-shorten
+ (if right-bar-broken
+ (+ (- (max 0 (interval-end right-span-stencil-extent)))
+ volta-half-line-thickness)
+ (- (min 0 (interval-start right-span-stencil-extent))
+ volta-half-line-thickness)))
+
+ (cons left-shorten right-shorten)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; predefined bar glyph print procedures
+
+(add-bar-glyph-print-procedure "" make-empty-bar-line)
+(add-bar-glyph-print-procedure "|" make-simple-bar-line)
+(add-bar-glyph-print-procedure "." make-thick-bar-line)
+(add-bar-glyph-print-procedure "!" make-dashed-bar-line)
+(add-bar-glyph-print-procedure "'" make-tick-bar-line)
+(add-bar-glyph-print-procedure ":" make-colon-bar-line)
+(add-bar-glyph-print-procedure ";" make-dotted-bar-line)
+(add-bar-glyph-print-procedure "k" make-kievan-bar-line)
+(add-bar-glyph-print-procedure "S" (make-segno-bar-line #t))
+(add-bar-glyph-print-procedure "=" (make-segno-bar-line #f))
+(add-bar-glyph-print-procedure "[" (make-bracket-bar-line LEFT))
+(add-bar-glyph-print-procedure "]" (make-bracket-bar-line RIGHT))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; predefined bar lines
+;;
+;; definition of bar lines goes as follows:
+;;
+;; (define-bar-line "normal bar[-annotation]" "end of line" "start of line" "span bar")
+;;
+;; each entry has to be a string or #f.
+;; The empty string "" is allowed and yields in an invisible bar line,
+;; whereas #f reads 'no stencil'.
+;;
+;; Convention: if two bar lines would be identical in their
+;; unbroken bar glyph, we use annotations to make them distinct;
+;; as a general rule of thumb the main difference in their
+;; behavior at the end of a line is used as annotation, cf.
+;;
+;; (define-bar-line ".|:" "|" ".|:" ".|")
+;; (define-bar-line ".|:-||" "||" ".|:" ".|")
+;;
+;; or
+;;
+;; (define-bar-line "S-|" "|" "S" "=")
+;; (define-bar-line "S-S" "S" "" "=")
+
+;; common bar lines
+(define-bar-line "" "" "" #f)
+(define-bar-line "-" #f #f #f)
+(define-bar-line "|" "|" #f "|")
+(define-bar-line "|-s" #f "|" "|")
+(define-bar-line "." "." #f ".")
+(define-bar-line ".|" "|" ".|" ".|")
+(define-bar-line "|." "|." #f "|.")
+(define-bar-line "||" "||" #f "||")
+(define-bar-line ".." ".." #f "..")
+(define-bar-line "|.|" "|.|" #f "|.|")
+(define-bar-line "!" "!" #f "!")
+(define-bar-line ";" ";" #f ";")
+(define-bar-line "'" "'" #f #f)
+
+;; repeats
+(define-bar-line ":|.:" ":|." ".|:" " |.")
+(define-bar-line ":..:" ":|." ".|:" " ..")
+(define-bar-line ":|.|:" ":|." ".|:" " |.|")
+(define-bar-line ":.|.:" ":|." ".|:" " .|.")
+(define-bar-line ":|." ":|." #f " |.")
+(define-bar-line ".|:" "|" ".|:" ".|")
+(define-bar-line "[|:" "|" "[|:" " |")
+(define-bar-line ":|]" ":|]" #f " |")
+(define-bar-line ":|][|:" ":|]" "[|:" " | |")
+(define-bar-line ".|:-||" "||" ".|:" ".|")
+
+;; segno bar lines
+(define-bar-line "S" "||" "S" "=")
+(define-bar-line "S-|" "|" "S" "=")
+(define-bar-line "S-S" "S" #f "=")
+(define-bar-line ":|.S" ":|." "S" " |.")
+(define-bar-line ":|.S-S" ":|.S" "" " |.")
+(define-bar-line "S.|:" "|" "S.|:" " .|")
+(define-bar-line "S.|:-S" "S" ".|:" " .|")
+(define-bar-line ":|.S.|:" ":|." "S.|:" " |. .|")
+(define-bar-line ":|.S.|:-S" ":|.S" ".|:" " |. .|")
+
+;; ancient bar lines
+(define-bar-line "k" "k" #f #f) ;; kievan style
+
+;; volta hook settings
+(allow-volta-hook ":|.")
+(allow-volta-hook ".|:")
+(allow-volta-hook "|.")
+(allow-volta-hook ":..:")
+(allow-volta-hook ":|.|:")
+(allow-volta-hook ":|.:")
+(allow-volta-hook ".|")
+(allow-volta-hook ":|.S")
+(allow-volta-hook ":|.S-S")
+(allow-volta-hook ":|.S.|:")
+(allow-volta-hook ":|.S.|:-S")
+(allow-volta-hook ":|]")
+(allow-volta-hook ":|][|:")
(define-public (string-or-pair? x)
(or (string? x) (pair? x)))
+(define-public (string-or-music? x)
+ (or (string? x) (ly:music? x)))
+
(define-public (number-or-pair? x)
(or (number? x) (pair? x)))
frets for tablatures and fretboards if no strings are provided in
the notes for the current moment.")
(doubleRepeatSegnoType ,string? "Set the default bar line for
-the combinations double repeat with segno. Default is @samp{:|S|:}.")
+the combinations double repeat with segno. Default is @samp{:|.S.|:}.")
(doubleRepeatType ,string? "Set the default bar line for double
repeats.")
(doubleSlurs ,boolean? "If set, two slurs are created for every
values.")
(endRepeatSegnoType ,string? "Set the default bar line for the
-combinations ending of repeat with segno. Default is @samp{:|S}.")
+combinations ending of repeat with segno. Default is @samp{:|.S}.")
(endRepeatType ,string? "Set the default bar line for the ending
of repeats.")
(explicitClefVisibility ,vector? "@samp{break-visibility}
(stanza ,markup? "Stanza @q{number} to print before the start of a
verse. Use in @code{Lyrics} context.")
(startRepeatSegnoType ,string? "Set the default bar line for the
-combinations beginning of repeat with segno. Default is @samp{.S|:}.")
+combinations beginning of repeat with segno. Default is @samp{S.|:}.")
(startRepeatType ,string? "Set the default bar line for the beginning
of repeats.")
(stemLeftBeamCount ,integer? "Specify the number of beams to draw
Example:
@example
-\\set Staff.whichBar = \"|:\"
+\\set Staff.whichBar = \".|:\"
@end example
@noindent
"Print a special bar symbol. It replaces the regular bar
symbol with a special symbol. The argument @var{bartype}
is a string which specifies the kind of bar line to print.
-Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{:|.|:},
-@code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.|.},
-@code{|.|}, @code{:}, @code{dashed}, @code{'} and @code{S}.
-
-These produce, respectively, a normal bar line, a right repeat, a left repeat,
-a thick double repeat, a thin-thick-thin double repeat,
-a thin-thick double repeat, a thick bar, a double bar, a start bar,
-an end bar, a thick double bar, a thin-thick-thin bar,
-a dotted bar, a dashed bar, a tick as bar line and a segno bar.
-
-In addition, there is an option
-@code{||:} which is equivalent to @code{|:} except at line
-breaks, where it produces a double bar (@code{||}) at the
-end of the line and a repeat sign (@code{|:}) at the
-beginning of the new line.
-
-For segno, @code{S} produces a segno sign except at line breaks,
-where it produces a double bar (@code{||}) at the
-end of the line and a segno sign at the beginning of the new line.
-@code{|S} is equivalent to @code{S} but produces a simple bar line
-(@code{|}) instead of a double bar line (@code{||}) at line breaks.
-@code{S|} produces the segno sign at line breaks and starts the following
-line without special bar lines.
-
-@code{S|:} and @code{:|S} are used for repeat/segno combinations that are
-separated at line breaks. Alternatively, @code{.S|:} and @code{:|S.}
-may be used which combine repeat signs and segno at the same line in
-case of a line break. @code{:|S|:} is a combination of a left repeat
-(@code{:|}), a segno (@code{S}) and a right repeat @code{|:} which
-splits before the segno at line breaks; @code{:|S.|:} splits after
-the segno sign.
-
-If @var{bartype} is set to @code{empty} then nothing is
-printed, but a line break is allowed at that spot.
+
+The list of allowed glyphs and predefined bar lines can be
+found in @file{scm/bar-line.scm}.
@code{gap} is used for the gaps in dashed bar lines."
'(allow-span-bar bar-extent gap glyph glyph-name has-span-bar
- hair-thickness kern thin-kern thick-thickness))
+ hair-thickness kern rounded thin-kern thick-thickness))
(ly:add-interface
'bass-figure-interface
"Note names."
'())
+(ly:add-interface
+ 'octavate-eight-interface
+ "Interface that permits the nominal identification of the octavian
+annotation that multiplies by two the freqency of the pitches present
+in a given staff were they played on a clef that lacked said octavian
+annotation."
+ '())
+
(ly:add-interface
'only-prebreak-interface
"Kill this grob after the line breaking process."
beamlet is determined by taking either the default length or the
length specified by @code{beamlet-max-length-proportion}, whichever is
smaller.")
+ (beam-gap ,number-pair? "Size of a gap in a @code{Beam}.")
(beamlet-max-length-proportion ,pair? "The maximum length of a
beamlet, as a proportion of the distance between two adjacent stems.")
(before-line-breaking ,boolean? "Dummy property, used to trigger
left side of the item and adding the @q{cdr} on the right side of the
item). In order to make a grob take up no horizontal space at all,
set this to @code{(+inf.0 . -inf.0)}.")
- (extra-X-extent ,number-pair? "A grob is enlarged in
-X@tie{}dimension by this much.")
- (extra-Y-extent ,number-pair? "A grob is enlarged in
-Y@tie{}dimension by this much.")
;;
;; f
;;
(flag-count ,number? "The number of tremolo beams.")
+ (flat-positions ,list? "Flats in key signatures are placed
+within the specified ranges of staff-positions. The general form
+is a list of pairs, with one pair for each type of clef, in order
+of the staff-position at which each clef places C:
+@code{(alto treble tenor soprano baritone mezzosoprano bass)}.
+If the list contains a single element it applies for all clefs.
+A single number in place of a pair sets accidentals within the octave
+ending at that staff-position.")
(font-encoding ,symbol? "The font encoding is the broadest
category for selecting a font. Currently, only lilypond's system
fonts (Emmentaler) are using this property. Available
by glissandi?")
(glyph ,string? "A string determining what @q{style} of glyph is
typeset. Valid choices depend on the function that is reading this
-property.")
- (glyph-name ,string? "The glyph name within the font.")
+property.
+
+In combination with (span) bar lines, it is a string resembling the
+bar line appearance in ASCII form.")
+ (glyph-name ,string? "The glyph name within the font.
+
+In the context of (span) bar lines, @var{glyph-name} represents
+a processed form of @code{glyph}, where decisions about line breaking
+etc. are already taken.")
(glyph-name-alist ,list? "An alist of key-string pairs.")
(graphical ,boolean? "Display in graphical (vs. text) form.")
(grow-direction ,ly:dir? "Crescendo or decrescendo?")
(outside-staff-padding ,number? "The padding to place between
this grob and the staff when spacing according to
@code{outside-staff-priority}.")
+ (outside-staff-placement-directive ,symbol? "One of four directives
+telling how outside staff objects should be placed.
+@itemize @bullet
+@item
+@code{left-to-right-greedy} -- Place each successive grob from left to
+right.
+@item
+@code{left-to-right-polite} -- Place a grob from left to right only if
+it does not potentially overlap with another grob that has been placed
+on a pass through a grob array. If there is overlap, do another pass to
+determine placement.
+@item
+@code{right-to-left-greedy} -- Same as @code{left-to-right-greedy}, but
+from right to left.
+@item
+@code{right-to-left-polite} -- Same as @code{left-to-right-polite}, but
+from right to left.
+@end itemize")
(outside-staff-priority ,number? "If set, the grob is positioned
outside the staff in such a way as to avoid all collisions. In case
of a potential collision, the grob with the smaller
(rotation ,list? "Number of degrees to rotate this object, and
what point to rotate around. For example, @code{'(45 0 0)} rotates
by 45 degrees around the center of this object.")
+ (rounded ,boolean? "Decide whether lines should be drawn rounded or not.")
(round-up-to-longer-rest ,boolean? "Displays the longer multi-measure
rest when the length of a measure is between two values of
@code{usable-duration-logs}. For example, displays a breve instead of a whole
for stems that are placed in tight configurations. This amount is
used for stems with the same direction to compensate for note head to
stem distance.")
- (script-priority ,number? "A sorting key that determines in what
-order a script is within a stack of scripts.")
+ (script-priority ,number? "A key for determining the order of
+scripts in a stack, by being added to the position of the script in
+the user input, the sum being the overall priority. Smaller means
+closer to the head.")
(self-alignment-X ,number? "Specify alignment of an object. The
value @w{@code{-1}} means left aligned, @code{0}@tie{}centered, and
@code{1}@tie{}right-aligned in X@tie{}direction. Other numerical
values may also be specified.")
(self-alignment-Y ,number? "Like @code{self-alignment-X} but for
the Y@tie{}axis.")
+ (sharp-positions ,list? "Sharps in key signatures are placed
+within the specified ranges of staff-positions. The general form
+is a list of pairs, with one pair for each type of clef, in order
+of the staff-position at which each clef places C:
+@code{(alto treble tenor soprano baritone mezzosoprano bass)}.
+If the list contains a single element it applies for all clefs.
+A single number in place of a pair sets accidentals within the octave
+ending at that staff-position.")
(shorten-pair ,number-pair? "The lengths to shorten a
text-spanner on both sides, for example a pedal bracket. Positive
values shorten the text-spanner, while negative values lengthen it.")
(vertical-skylines ,ly:skyline-pair? "Two skylines, one above and
one below this grob.")
-
;;
;; w
;;
a whole system.")
(footnotes-after-line-breaking ,ly:grob-array? "Footnote grobs of
a broken system.")
- (full-score-pure-minimum-translations ,list? "A list of translations
-for a full score's worth of grobs.")
(glissando-index ,integer? "The index of a glissando in its note
column.")
for this column.")
(melody-spanner ,ly:grob? "The @code{MelodyItem} object for a stem.")
+ (minimum-translations-alist ,list? "An list of translations for a given
+start and end point.")
(neighbors ,ly:grob-array? "The X-axis neighbors of a grob. Used by the
pure-from-neighbor-interface to determine various grob heights.")
(side-support-elements ,ly:grob-array? "The side support, an array of
grobs.")
- (skyline-quantizing ,index? "The number of boxes to break a
-slur into when calculating its skyline.")
(slur ,ly:grob? "A pointer to a @code{Slur} object.")
(spacing ,ly:grob? "The spacing spanner governing this section.")
(spacing-wishes ,ly:grob-array? "An array of note spacing or staff spacing
(tuplet-number ,ly:grob? "The number for a bracket.")
(tuplet-start ,boolean? "Is stem at the start of a tuplet?")
(tuplets ,ly:grob-array? "An array of smaller tuplet brackets.")
+
+ (vertical-alignment ,ly:grob? "The VerticalAlignment in a System.")
+ (vertical-skyline-elements ,ly:grob-array? "An array of grobs
+used to create vertical skylines.")
+
(X-colliding-grobs ,ly:grob-array? "Grobs that can collide
with a self-aligned grob on the X-axis.")
(Y-colliding-grobs ,ly:grob-array? "Grobs that can collide
. (
(alteration . ,accidental-interface::calc-alteration)
(avoid-slur . inside)
+ (glyph-name . ,accidental-interface::glyph-name)
(glyph-name-alist . ,standard-alteration-glyph-name-alist)
(stencil . ,ly:accidental-interface::print)
+ (horizontal-skylines . ,ly:accidental-interface::horizontal-skylines)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-extent . ,ly:accidental-interface::width)
(Y-extent . ,ly:accidental-interface::height)
(meta . ((class . Item)
(layer . 0)
(non-musical . #t)
+ (rounded . #f)
(space-alist . (
(time-signature . (extra-space . 0.75))
(custos . (minimum-space . 2.0))
(stacking-dir . ,DOWN)
(Y-extent . ,ly:axis-group-interface::height)
(meta . ((class . Spanner)
- (object-callbacks . ((full-score-pure-minimum-translations . ,ly:align-interface::full-score-pure-minimum-translations)
- (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
+ (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
(pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
(interfaces . (align-interface
axis-group-interface
inline-accidental-interface
key-signature-interface
note-head-interface
+ octavate-eight-interface
stem-interface
time-signature-interface))
(cross-staff . ,ly:beam::calc-cross-staff)
;; only for debugging.
(font-family . roman)
- (gap . 0.8)
+ (beam-gap . ,ly:beam::calc-beam-gap)
+ (minimum-length . ,ly:beam::calc-minimum-length)
(neutral-direction . ,DOWN)
- (positions . ,beam::place-broken-parts-individually)
+ (positions . ,beam::get-positions)
+ (springs-and-rods . ,ly:beam::calc-springs-and-rods)
(X-positions . ,ly:beam::calc-x-positions)
;; this is a hack to set stem lengths, if positions is set.
- (quantized-positions . ,ly:beam::set-stem-lengths)
+ (quantized-positions . ,beam::get-quantized-positions)
(shorten . ,ly:beam::calc-stem-shorten)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(stencil . ,ly:beam::print)
(meta . ((class . Spanner)
(next-note . (extra-space . 1.0))
(right-edge . (extra-space . 0.5))))
(stencil . ,ly:clef::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(Y-offset . ,ly:staff-symbol-referencer::callback)
(meta . ((class . Item)
(object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
(side-axis . ,Y)
(slur-padding . 0.3)
(staff-padding . 0.1)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
+ (use-skylines . #t)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(font-encoding . fetaText)
(font-series . bold)
(font-shape . italic)
- (outside-staff-priority . 250)
(positioning-done . ,ly:script-interface::calc-positioning-done)
(right-padding . 0.5)
(self-alignment-X . ,CENTER)
(self-alignment-Y . ,CENTER)
(stencil . ,ly:text-interface::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
(Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
(meta . ((class . Item)
(springs-and-rods . ,ly:spanner::set-spacing-rods)
(stencil . ,ly:line-spanner::print)
(style . dashed-line)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(meta . ((class . Spanner)
(interfaces . (dynamic-interface
dynamic-text-spanner-interface
text-interface
text-script-interface))))))
+ (FingeringColumn
+ . (
+ (padding . 0.2)
+ (positioning-done . ,ly:fingering-column::calc-positioning-done)
+ (meta . ((class . Item)
+ (interfaces . (fingering-column-interface))))))
+
(Flag
. (
+ (glyph-name . ,ly:flag::glyph-name)
(stencil . ,ly:flag::print)
(X-extent . ,ly:flag::width)
(X-offset . ,ly:flag::calc-x-offset)
(Y-offset . ,ly:flag::calc-y-offset)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(meta . ((class . Item)
(interfaces . (flag-interface
font-interface))))))
(simple-Y . #t)
(stencil . ,ly:line-spanner::print)
(style . line)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-extent . #f)
(Y-extent . #f)
(zigzag-width . 0.75)
(stencil . ,ly:hairpin::print)
(thickness . 1.0)
(to-barline . #t)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
(meta . ((class . Spanner)
(interfaces . (dynamic-interface
(break-visibility . ,begin-of-line-invisible)
(glyph-name-alist . ,cancellation-glyph-name-alist)
(non-musical . #t)
+ (flat-positions . (2 3 4 2 1 2 1))
+ (sharp-positions . (4 5 4 2 3 2 3))
(space-alist . (
(time-signature . (extra-space . 1.25))
(staff-bar . (extra-space . 0.6))
(right-edge . (extra-space . 0.5))
(first-note . (fixed-space . 2.5))))
(stencil . ,ly:key-signature-interface::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(extra-spacing-width . (0.0 . 1.0))
(extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-including-staff)
(Y-offset . ,ly:staff-symbol-referencer::callback)
(break-visibility . ,begin-of-line-visible)
(glyph-name-alist . ,standard-alteration-glyph-name-alist)
(non-musical . #t)
+ (flat-positions . (2 3 4 2 1 2 1))
+ (sharp-positions . (4 5 4 2 3 2 3))
(space-alist . (
(time-signature . (extra-space . 1.15))
(staff-bar . (extra-space . 1.1))
(stencil . ,ly:key-signature-interface::print)
(extra-spacing-width . (0.0 . 1.0))
(extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-including-staff)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(Y-offset . ,ly:staff-symbol-referencer::callback)
(meta . ((class . Item)
(object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
(stencil . ,laissez-vibrer::print)
(thickness . 1.0)
(extra-spacing-height . (-0.5 . 0.5))
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(meta . ((class . Item)
(interfaces . (semi-tie-interface))))))
(minimum-length-fraction . 0.25)
(springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
(stencil . ,ly:ledger-line-spanner::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-extent . #f)
(Y-extent . #f)
(meta . ((class . Spanner)
(padding . 0.07)
(springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
(stencil . ,ly:lyric-hyphen::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(thickness . 1.3)
(Y-extent . (0 . 0))
(meta . ((class . Spanner)
(stencil . ,lyric-text::print)
(text . ,(grob::calc-property-by-copy 'text))
(word-space . 0.6)
+ (skyline-horizontal-padding . 0.1)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
(meta . ((class . Item)
(interfaces . (font-interface
self-alignment-interface
text-interface))))))
-
(MeasureGrouping
. (
(direction . ,UP)
(break-visibility . ,end-of-line-invisible)
(direction . ,UP)
(extra-spacing-width . (+inf.0 . -inf.0))
+ (outside-staff-horizontal-padding . 0.12)
(outside-staff-priority . 1000)
(padding . 0.8)
(side-axis . ,Y)
(stencil . ,ly:text-interface::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(X-offset . ,(ly:make-simple-closure
`(,+
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(meta . ((class . Item)
(interfaces . (font-interface
+ octavate-eight-interface
self-alignment-interface
side-position-interface
text-interface))))))
(staff-padding . 1.0)
(stencil . ,ly:ottava-bracket::print)
(style . dashed-line)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(meta . ((class . Spanner)
(interfaces . (font-interface
(bound-alignment-interfaces . (note-column-interface))
(horizontal-skylines . ,ly:separation-item::calc-skylines)
(keep-inside-line . #t)
+ ; 0.08 comes from spacing-horizontal-skyline.ly
+ ; allows double flat of F to be nestled over dots of C
+ (skyline-vertical-padding . 0.08)
;; (stencil . ,ly:paper-column::print)
(X-extent . ,ly:axis-group-interface::width)
(stencil . ,ly:piano-pedal-bracket::print)
(style . line)
(thickness . 1.0)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(meta . ((class . Spanner)
(interfaces . (line-interface
piano-pedal-bracket-interface
(extra-spacing-width . (+inf.0 . -inf.0))
(font-size . 2)
(non-musical . #t)
+ (outside-staff-horizontal-padding . 0.12)
(outside-staff-priority . 1500)
(padding . 0.8)
(self-alignment-X . ,CENTER)
(stencil . ,ly:text-interface::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-offset . ,(ly:make-simple-closure
`(,+
,(ly:make-simple-closure
(stencil . ,ly:tie::print)
(thickness . 1.0)
(extra-spacing-height . (-0.5 . 0.5))
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(meta . ((class . Item)
(interfaces . (semi-tie-interface))))))
(stencil . ,ly:script-interface::print)
(use-skylines . #t)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-offset . ,script-interface::calc-x-offset)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(meta . ((class . Item)
(padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
(self-alignment-X . ,CENTER)
(stencil . ,ly:text-interface::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
(meta . ((class . Item)
(interfaces . (font-interface
(padding . 1.2)
(side-axis . ,Y)
(staff-padding . 1.0)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(break-align-symbol . staff-bar)
(cross-staff . #t)
(glyph-name . ,ly:span-bar::calc-glyph-name)
-
- ;; ugh duplication! (these 4 properties were copied from Barline)
- ;;
- ;; Ross. page 151 lists other values, we opt for a leaner look
- ;;
- (kern . 3.0)
- (thin-kern . 3.0)
- (hair-thickness . 1.6)
- (thick-thickness . 6.0)
-
(layer . 0)
(non-musical . #t)
(stencil . ,ly:span-bar::print)
. (
(beam-thickness . 0.48) ; staff-space
(beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
+ (direction . ,ly:stem-tremolo::calc-direction)
(slope . ,ly:stem-tremolo::calc-slope)
(stencil . ,ly:stem-tremolo::print)
(style . ,ly:stem-tremolo::calc-style)
(padding . 0.0) ;; padding relative to SustainPedalLineSpanner
(self-alignment-X . ,CENTER)
(stencil . ,ly:sustain-pedal::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
(meta . ((class . Item)
(interfaces . (font-interface
(padding . 1.2)
(side-axis . ,Y)
(staff-padding . 1.2)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
. (
(adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
(axes . (,X ,Y))
- (skyline-horizontal-padding . 0.5)
+ (outside-staff-placement-directive . left-to-right-polite)
+ (skyline-horizontal-padding . 1.0)
(vertical-skylines . ,ly:axis-group-interface::calc-skylines)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:system::height)
(object-callbacks . ((footnotes-before-line-breaking . ,ly:system::footnotes-before-line-breaking)
(footnotes-after-line-breaking . ,ly:system::footnotes-after-line-breaking)
(pure-relevant-grobs . ,ly:system::calc-pure-relevant-grobs)
- (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
+ (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
+ (vertical-skyline-elements . ,ly:system::vertical-skyline-elements)
+ (vertical-alignment . ,ly:system::get-vertical-alignment)))
(interfaces . (axis-group-interface
system-interface))))))
(cross-staff . ,script-or-side-position-cross-staff)
(direction . ,DOWN)
(extra-spacing-width . (+inf.0 . -inf.0))
+ (outside-staff-horizontal-padding . 0.12)
(outside-staff-priority . 450)
;; sync with Fingering ?
(slur-padding . 0.5)
(staff-padding . 0.5)
(stencil . ,ly:text-interface::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
;; todo: add X self alignment?
(X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(neutral-direction . ,UP)
(springs-and-rods . ,ly:spanner::set-spacing-rods)
(stencil . ,ly:tie::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(thickness . 1.2)
(meta . ((class . Spanner)
(interfaces . (tie-interface))))))
(staff-padding . 0.25)
(stencil . ,ly:tuplet-bracket::print)
(thickness . 1.6)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-positions . ,ly:tuplet-bracket::calc-x-positions)
(meta . ((class . Spanner)
(padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
(self-alignment-X . ,CENTER)
(stencil . ,ly:text-interface::print)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
(meta . ((class . Item)
(interfaces . (font-interface
(padding . 1.2)
(side-axis . ,Y)
(staff-padding . 1.2)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(meta . ((class . Spanner)
- (object-callbacks . ((full-score-pure-minimum-translations . ,ly:align-interface::full-score-pure-minimum-translations)
- (Y-common . ,ly:axis-group-interface::calc-y-common)
+ (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
(pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
(pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
(interfaces . (align-interface
(minimum-distance . 8)
(padding . 1)))
(nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
+ (outside-staff-placement-directive . left-to-right-polite)
(staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing)
(stencil . ,ly:axis-group-interface::print)
+ (skyline-horizontal-padding . 0.1)
(vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
(padding . 1.5)
))
))
+ (cross-staff . #t)
(gap . 0.5)
(left-bound-info . ,ly:line-spanner::calc-left-bound-info)
(non-musical . #t)
(edge-height . (2.0 . 2.0)) ;; staff-space;
(font-encoding . fetaText)
(font-size . -4)
+ (shorten-pair . ,ly:volta-bracket::calc-shorten-pair)
(stencil . ,ly:volta-bracket-interface::print)
(thickness . 1.6) ;; line-thickness
(word-space . 0.6)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(meta . ((class . Spanner)
(interfaces . (font-interface
horizontal-bracket-interface
(outside-staff-priority . 600)
(padding . 1)
(side-axis . ,Y)
+ (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
- (Y-offset . ,ly:side-position-interface::y-aligned-side)
+ (Y-offset . ,ly:side-position-interface::y-aligned-side)
(meta . ((class . Spanner)
(object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
(pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
(stencil-coordinates
end-fret-coordinate end-string-coordinate)))
(ly:round-filled-box
- (cons (car lower-left) (car upper-right))
- (cons (cdr lower-left) (cdr upper-right))
+ ;; Put limits in order, or else the intervals are considered empty
+ (ordered-cons (car lower-left) (car upper-right))
+ (ordered-cons (cdr lower-left) (cdr upper-right))
sth)))
(define (draw-xo xo-list)
(final-x (car result))
(stencils (cdr result)))
; Add the horizontal line and combine all stencils:
- (apply ly:stencil-add
- (cons
- (make-line-stencil line-width 0 0 final-x 0)
- stencils))))
+ (box-stencil
+ (apply ly:stencil-add
+ (cons
+ (make-line-stencil line-width 0 0 final-x 0)
+ stencils))
+ 0.0
+ 0.0)))
;; Parse the harp pedal definition string into list of directions (-1/0/1), #\o and #\|
(define (harp-pedals-parse-string definition-string)
(string-downcase
(car (string-tokenize (utsname:sysname (uname)))))))
+(define lilypond-declarations '())
+
+(defmacro-public define-session (name value)
+ "This defines a variable @var{name} with the starting value
+@var{value} that is reinitialized at the start of each session.
+A@tie{}session basically corresponds to one LilyPond file on the
+command line. The value is recorded at the start of the first session
+after loading all initialization files and before loading the user
+file and is reinstated for all of the following sessions. This
+happens just by replacing the value, not by copying structures, so you
+should not destructively modify them. For example, lists defined in
+this manner should be changed within a session only be adding material
+to their front or replacing them altogether, not by modifying parts of
+them. It is an error to call @code{define-session} after the first
+session has started."
+ (define (add-session-variable name value)
+ (if (ly:undead? lilypond-declarations)
+ (ly:error (_ "define-session used after session start")))
+ (let ((var (make-variable value)))
+ (module-add! (current-module) name var)
+ (set! lilypond-declarations (cons var lilypond-declarations))))
+ `(,add-session-variable ',name ,value))
+
+(defmacro-public define-session-public (name value)
+ "Like @code{define-session}, but also exports @var{name}."
+ `(begin
+ (define-session ,name ,value)
+ (export ,name)))
+
+(define (session-terminate)
+ (if (ly:undead? lilypond-declarations)
+ (for-each
+ (lambda (p) (variable-set! (cadr p) (cddr p)))
+ (ly:get-undead lilypond-declarations))))
+
+(define-public (session-initialize thunk)
+ "Initialize this session. The first session in a LilyPond run is
+initialized by calling @var{thunk}, then recording the values of all
+variables in the current module as well as those defined with
+@code{define-session}. Subsequent calls of @code{session-initialize}
+ignore @var{thunk} and instead just reinitialize all recorded
+variables to their value after the initial call of @var{thunk}."
+
+;; We need to save the variables of the current module along with
+;; their values: functions defined in the module might refer to the
+;; variables.
+
+;; The entries in lilypond-declarations consist of a cons* consisting
+;; of symbol, variable, and value. Variables defined with
+;; define-session have the symbol set to #f.
+
+ (if (ly:undead? lilypond-declarations)
+ (begin
+ (for-each
+ (lambda (p)
+ (let ((var (cadr p))
+ (val (cddr p)))
+ (variable-set! var val)
+ (if (car p)
+ (module-add! (current-module) (car p) var))))
+ (ly:get-undead lilypond-declarations)))
+ (begin
+ (thunk)
+ (let ((decl (map! (lambda (v)
+ (cons* #f v (variable-ref v)))
+ lilypond-declarations)))
+ (module-for-each
+ (lambda (s v)
+ (let ((val (variable-ref v)))
+ (if (not (ly:lily-parser? val))
+ (set! decl
+ (cons
+ (cons* s v val)
+ decl)))))
+ (current-module))
+ (set! lilypond-declarations (ly:make-undead decl))))))
+
(define scheme-options-definitions
`(
;; NAMING: either
(if (memq (ly:get-option 'backend) music-string-to-path-backends)
(ly:set-option 'music-strings-to-paths #t))
-
(define-public (ly:load x)
(let* ((file-name (%search-load-path x)))
(ly:debug "[~A" file-name)
(,rhythmic-location? . "rhythmic location")
(,scheme? . "any type")
(,string-or-pair? . "string or pair")
+ (,string-or-music? . "string or music")
(,string-or-symbol? . "string or symbol")
(,void? . "void")
))
(define gc-protect-stat-count
0)
+;; Undead objects that should be ignored after the first time round
+(define gc-zombies
+ (make-weak-key-hash-table 0))
+
(define-public (dump-live-object-stats outfile)
(for-each (lambda (x)
(format outfile "~a: ~a\n" (car x) (cdr x)))
(ly:set-option 'debug-gc-assert-parsed-dead #f)
(for-each
(lambda (x)
- (ly:programming-error "Parsed object should be dead: ~a" x))
+ (if (not (hashq-ref gc-zombies x))
+ (begin
+ (ly:programming-error "Parsed object should be dead: ~a" x)
+ (hashq-set! gc-zombies x #t))))
(ly:parsed-undead-list!))
(set! stats (gc-live-object-stats))
(ly:progress "Dumping live object statistics.\n")
(mtrace:start-trace (ly:get-option 'trace-memory-frequency)))
(lilypond-file handler x)
(ly:check-expected-warnings)
+ (session-terminate)
(if start-measurements
(dump-profile x start-measurements (profile-measurements)))
(if (ly:get-option 'trace-memory-frequency)
(ly:set-option 'debug-gc-assert-parsed-dead #t)
(gc)
(ly:set-option 'debug-gc-assert-parsed-dead #f)
- (for-each
- (lambda (x)
- (ly:programming-error "Parsed object should be dead: ~a" x))
- (ly:parsed-undead-list!))
+ (for-each
+ (lambda (x)
+ (if (not (hashq-ref gc-zombies x))
+ (begin
+ (ly:programming-error "Parsed object should be dead: ~a" x)
+ (hashq-set! gc-zombies x #t))))
+ (ly:parsed-undead-list!))
(if (ly:get-option 'debug-gc)
(dump-gc-protects)
(ly:reset-all-fonts))
(dump-profile "lily-run-total" '(0 0) (profile-measurements)))
failed))
-(define-public lilypond-declarations '())
-
(define (lilypond-file handler file-name)
(catch 'ly-file-failed
(lambda () (ly:parse-file file-name))
(check-pitch-against-signature context pitch barnum laziness octaveness))
(define (key-entry-notename entry)
- "Return the pitch of an entry in localKeySignature. The entry is either of the form
- '(notename . alter) or '((octave . notename) . (alter barnum . measurepos))."
- (if (number? (car entry))
- (car entry)
- (cdar entry)))
+ "Return the pitch of an @var{entry} in @code{localKeySignature}.
+The @samp{car} of the entry is either of the form @code{notename} or
+of the form @code{(octave . notename)}. The latter form is used for special
+key signatures or to indicate an explicit accidental.
+
+The @samp{cdr} of the entry is either a rational @code{alter} indicating
+a key signature alteration, or of the form
+@code{(alter . (barnum . measurepos))} indicating an alteration caused by
+an accidental in music."
+ (if (pair? (car entry))
+ (cdar entry)
+ (car entry)))
(define (key-entry-octave entry)
- "Return the octave of an entry in localKeySignature (or #f if the entry does not have
- an octave)."
+ "Return the octave of an entry in @code{localKeySignature}
+or @code{#f} if the entry does not have an octave.
+See @code{key-entry-notename} for details."
(and (pair? (car entry)) (caar entry)))
(define (key-entry-bar-number entry)
- "Return the bar number of an entry in localKeySignature (or #f if the entry does not
- have a bar number)."
- (and (pair? (car entry)) (caddr entry)))
+ "Return the bar number of an entry in @code{localKeySignature}
+or @code {#f} if the entry does not have a bar number.
+See @code{key-entry-notename} for details."
+ (and (pair? (cdr entry)) (caddr entry)))
(define (key-entry-measure-position entry)
- "Return the measure position of an entry in localKeySignature (or #f if the entry does
- not have a measure position)."
- (and (pair? (car entry)) (cdddr entry)))
+ "Return the measure position of an entry in @code{localKeySignature}
+or @code {#f} if the entry does not have a measure position.
+See @code{key-entry-notename} for details."
+ (and (pair? (cdr entry)) (cdddr entry)))
(define (key-entry-alteration entry)
"Return the alteration of an entry in localKeySignature.
For convenience, returns @code{0} if entry is @code{#f}."
(if entry
- (if (number? (car entry))
+ (if (number? (cdr entry))
(cdr entry)
(cadr entry))
0))
(set! (ly:context-property context 'localKeySignature)
(map-in-order
(lambda (entry)
- (let* ((localalt (key-entry-alteration entry))
- (localoct (key-entry-octave entry)))
+ (let* ((localalt (key-entry-alteration entry)))
(if (or (accidental-invalid? localalt)
- (not localoct)
+ (not (key-entry-bar-number entry))
(= localalt
(key-entry-alteration
(find-pitch-entry
keysig
- (ly:make-pitch localoct
+ (ly:make-pitch (key-entry-octave entry)
(key-entry-notename entry)
0)
#t #t))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; beam slope
+;; sets position of beams for Kievan notation
+(define-public (beam::get-positions grob)
+ (let* ((stems (ly:grob-object grob 'stems))
+ (stems-grobs (if (not (null? stems))
+ (ly:grob-array->list stems)
+ '()))
+ (first-stem (if (not (null? stems-grobs))
+ (car stems-grobs)
+ '()))
+ (note-heads (if (not (null? first-stem))
+ (ly:grob-object first-stem 'note-heads)
+ '()))
+ (note-heads-grobs (if (not (null? note-heads))
+ (ly:grob-array->list note-heads)
+ '()))
+ (first-note-head (if (not (null? note-heads-grobs))
+ (car note-heads-grobs)
+ '()))
+ (style (if (not (null? first-note-head))
+ (ly:grob-property first-note-head 'style)
+ '())))
+ (if (and (symbol? style) (string-match "kievan*" (symbol->string style)))
+ (let* ((next-stem (cadr stems-grobs))
+ (next-note-heads (if (not (null? next-stem))
+ (ly:grob-object next-stem 'note-heads)
+ '()))
+ (next-note-heads-grobs (if (not (null? next-note-heads))
+ (ly:grob-array->list next-note-heads)
+ '()))
+ (next-note-head (if (not (null? next-note-heads-grobs))
+ (car next-note-heads-grobs)
+ '()))
+ (left-pos (ly:grob-property first-note-head 'Y-offset))
+ (right-pos (ly:grob-property next-note-head 'Y-offset))
+ (direction (ly:grob-property grob 'direction))
+ (left-height (if (= direction DOWN)
+ (+ (car (ly:grob::stencil-height first-note-head)) 0.75)
+ (- (cdr (ly:grob::stencil-height first-note-head)) 0.75)))
+ (right-height (if (= direction DOWN)
+ (+ (car (ly:grob::stencil-height next-note-head)) 0.75)
+ (- (cdr (ly:grob::stencil-height next-note-head)) 0.75))))
+ (cons (+ left-pos left-height) (+ right-pos right-height)))
+ (beam::place-broken-parts-individually grob))))
+
+(define-public (beam::get-quantized-positions grob)
+ (let* ((stems (ly:grob-object grob 'stems))
+ (stems-grobs (if (not (null? stems))
+ (ly:grob-array->list stems)
+ '()))
+ (first-stem (if (not (null? stems-grobs))
+ (car stems-grobs)
+ '()))
+ (note-heads (if (not (null? first-stem))
+ (ly:grob-object first-stem 'note-heads)
+ '()))
+ (note-heads-grobs (if (not (null? note-heads))
+ (ly:grob-array->list note-heads)
+ '()))
+ (first-note-head (if (not (null? note-heads-grobs))
+ (car note-heads-grobs)
+ '()))
+ (style (if (not (null? first-note-head))
+ (ly:grob-property first-note-head 'style)
+ '())))
+ (if (and (symbol? style) (string-match "kievan*" (symbol->string style)))
+ (let* ((next-stem (cadr stems-grobs))
+ (next-note-heads (if (not (null? next-stem))
+ (ly:grob-object next-stem 'note-heads)
+ '()))
+ (next-note-heads-grobs (if (not (null? next-note-heads))
+ (ly:grob-array->list next-note-heads)
+ '()))
+ (next-note-head (if (not (null? next-note-heads-grobs))
+ (car next-note-heads-grobs)
+ '()))
+ (left-pos (ly:grob-property first-note-head 'Y-offset))
+ (right-pos (ly:grob-property next-note-head 'Y-offset))
+ (direction (ly:grob-property grob 'direction))
+ (left-height (if (= direction DOWN)
+ (+ (car (ly:grob::stencil-height first-note-head)) 0.75)
+ (- (cdr (ly:grob::stencil-height first-note-head)) 0.75)))
+ (right-height (if (= direction DOWN)
+ (+ (car (ly:grob::stencil-height next-note-head)) 0.75)
+ (- (cdr (ly:grob::stencil-height next-note-head)) 0.75))))
+ (cons (+ left-pos left-height) (+ right-pos right-height)))
+ (ly:beam::set-stem-lengths grob))))
+
;; calculates each slope of a broken beam individually
(define-public (beam::place-broken-parts-individually grob)
(ly:beam::quanting grob '(+inf.0 . -inf.0) #f))
(define-public (stem::length grob)
(let* ((ss (ly:staff-symbol-staff-space grob))
(beg (ly:grob-property grob 'stem-begin-position))
- (beam (ly:grob-object grob 'beam)))
- (if (null? beam)
- (abs (- (ly:stem::calc-stem-end-position grob) beg))
+ (beam (ly:grob-object grob 'beam))
+ (note-heads (ly:grob-object grob 'note-heads))
+ (note-heads-grobs (if (not (null? note-heads))
+ (ly:grob-array->list note-heads)
+ '()))
+ (first-note-head (if (not (null? note-heads-grobs))
+ (car note-heads-grobs)
+ '()))
+ (style (if (not (null? first-note-head))
+ (ly:grob-property first-note-head 'style)
+ '())))
+ (cond
+ ((and (symbol? style) (string-match "kievan*" (symbol->string style))) 0.0)
+ ((null? beam) (abs (- (ly:stem::calc-stem-end-position grob) beg)))
+ (else
(begin
(ly:programming-error
"stem::length called but will not be used for beamed stem.")
- 0.0))))
+ 0.0)))))
(define-public (stem::pure-length grob beg end)
(let* ((ss (ly:staff-symbol-staff-space grob))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; key signature
-(define-public (key-signature-interface::alteration-position step alter
- c0-position)
- ;; TODO: memoize - this is mostly constant.
-
- ;; fes, ges, as and bes typeset in lower octave
- (define FLAT_TOP_PITCH 2)
-
- ;; ais and bis typeset in lower octave
- (define SHARP_TOP_PITCH 4)
-
- (if (pair? step)
- (+ (cdr step) (* (car step) 7) c0-position)
- (let* ((from-bottom-pos (modulo (+ 4 49 c0-position) 7))
- (p step)
- (c0 (- from-bottom-pos 4)))
-
- (if
- (or (and (< alter 0)
- (or (> p FLAT_TOP_PITCH) (> (+ p c0) 4)) (> (+ p c0) 1))
- (and (> alter 0)
- (or (> p SHARP_TOP_PITCH) (> (+ p c0) 5)) (> (+ p c0) 2)))
-
- ;; Typeset below c_position
- (set! p (- p 7)))
-
- ;; Provide for the four cases in which there's a glitch
- ;; it's a hack, but probably not worth
- ;; the effort of finding a nicer solution.
- ;; --dl.
- (cond
- ((and (= c0 2) (= p 3) (> alter 0))
- (set! p (- p 7)))
- ((and (= c0 -3) (= p -1) (> alter 0))
- (set! p (+ p 7)))
- ((and (= c0 -4) (= p -1) (< alter 0))
- (set! p (+ p 7)))
- ((and (= c0 -2) (= p -3) (< alter 0))
- (set! p (+ p 7))))
-
- (+ c0 p))))
-
+(define-public (key-signature-interface::alteration-positions
+ entry c0-position grob)
+ (let ((step (car entry))
+ (alter (cdr entry)))
+ (if (pair? step)
+ (list (+ (cdr step) (* (car step) 7) c0-position))
+ (let* ((c-position (modulo c0-position 7))
+ (positions
+ (if (< alter 0)
+ ;; See (flat|sharp)-positions in define-grob-properties.scm
+ (ly:grob-property grob 'flat-positions '(3))
+ (ly:grob-property grob 'sharp-positions '(3))))
+ (p (list-ref positions
+ (if (< c-position (length positions))
+ c-position 0)))
+ (max-position (if (pair? p) (cdr p) p))
+ (min-position (if (pair? p) (car p) (- max-position 6)))
+ (first-position (+ (modulo (- (+ c-position step)
+ min-position)
+ 7)
+ min-position)))
+ (define (prepend x l) (if (> x max-position)
+ l
+ (prepend (+ x 7) (cons x l))))
+ (prepend first-position '())))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; annotations
(define-public (accidental-interface::calc-alteration grob)
(ly:pitch-alteration (ly:event-property (event-cause grob) 'pitch)))
+(define-public (accidental-interface::glyph-name grob)
+ (assoc-get (ly:grob-property grob 'alteration)
+ standard-alteration-glyph-name-alist))
+
(define-public cancellation-glyph-name-alist
'((0 . "accidentals.natural")))
(define (embedded-ps string)
string)
-(define (glyph-string postscript-font-name
+(define (glyph-string pango-font
+ postscript-font-name
size
cid?
w-x-y-named-glyphs)
- (define (glyph-spec w x y g)
+ (define (glyph-spec w h x y g) ; h not used
(let ((prefix (if (string? g) "/" "")))
(ly:format "~4f ~4f ~4f ~a~a"
w x y
(begin
(set! path (apply dump-path d-attr-value
font-scale
- (list (cadr rest) (caddr rest))))
+ (list (caddr rest) (cadddr rest))))
(set! next-horiz-adv (+ next-horiz-adv
(car rest)))
path))
""))))
(define (extract-glyph-info all-glyphs glyph size)
- (let* ((offsets (list-head glyph 3))
+ (let* ((offsets (list-head glyph 4))
(glyph-name (car (reverse glyph))))
(apply extract-glyph all-glyphs glyph-name size offsets)))
(define (embedded-svg string)
string)
-(define (embedded-glyph-string font size cid glyphs)
+(define (embedded-glyph-string pango-font font size cid glyphs)
(define path "")
(if (= 1 (length glyphs))
(set! path (music-string-to-path font size (car glyphs)))
(set! next-horiz-adv 0.0)
path)
-(define (woff-glyph-string font-name size cid? w-x-y-named-glyphs)
+(define (woff-glyph-string pango-font font-name size cid? w-h-x-y-named-glyphs)
(let* ((name-style (font-name-style font-name))
(family-designsize (regexp-exec (make-regexp "(.*)-([0-9]*)")
font-name))
(font (ly:paper-get-font paper `(((font-family . ,family)
,(if design-size
`(design-size . design-size)))))))
- (define (glyph-spec w x y g)
+ (define (glyph-spec w h x y g) ; h not used
(let* ((charcode (ly:font-glyph-name-to-charcode font g))
(char-lookup (format #f "&#~S;" charcode))
(glyph-by-name (eoc 'altglyph `(glyphname . ,g)))
(string-append glyph-by-name apparently-broken char-lookup)))))
(string-join (map (lambda (x) (apply glyph-spec x))
- (reverse w-x-y-named-glyphs)) "\n")))
+ (reverse w-h-x-y-named-glyphs)) "\n")))
(define glyph-string
(if (not (ly:get-option 'svg-woff)) embedded-glyph-string woff-glyph-string))
("hufnagel-fa1" . ("clefs.hufnagel.fa" -1 0))
("hufnagel-fa2" . ("clefs.hufnagel.fa" 1 0))
("hufnagel-do-fa" . ("clefs.hufnagel.do.fa" 4 0))
- ("mensural-c1" . ("clefs.mensural.c" -2 0))
- ("mensural-c2" . ("clefs.mensural.c" 0 0))
- ("mensural-c3" . ("clefs.mensural.c" 2 0))
- ("mensural-c4" . ("clefs.mensural.c" 4 0))
+ ("mensural-c1" . ("clefs.mensural.c" -4 0))
+ ("mensural-c2" . ("clefs.mensural.c" -2 0))
+ ("mensural-c3" . ("clefs.mensural.c" 0 0))
+ ("mensural-c4" . ("clefs.mensural.c" 2 0))
+ ("mensural-c5" . ("clefs.mensural.c" 4 0))
+ ("blackmensural-c1" . ("clefs.blackmensural.c" -4 0))
+ ("blackmensural-c2" . ("clefs.blackmensural.c" -2 0))
+ ("blackmensural-c3" . ("clefs.blackmensural.c" 0 0))
+ ("blackmensural-c4" . ("clefs.blackmensural.c" 2 0))
+ ("blackmensural-c5" . ("clefs.blackmensural.c" 4 0))
("mensural-f" . ("clefs.mensural.f" 2 0))
("mensural-g" . ("clefs.mensural.g" -2 0))
("neomensural-c1" . ("clefs.neomensural.c" -4 0))
("neomensural-c2" . ("clefs.neomensural.c" -2 0))
("neomensural-c3" . ("clefs.neomensural.c" 0 0))
("neomensural-c4" . ("clefs.neomensural.c" 2 0))
+ ("neomensural-c5" . ("clefs.neomensural.c" 4 0))
("petrucci-c1" . ("clefs.petrucci.c1" -4 0))
("petrucci-c2" . ("clefs.petrucci.c2" -2 0))
("petrucci-c3" . ("clefs.petrucci.c3" 0 0))
("clefs.mensural.c" . 0)
("clefs.mensural.f" . 4)
("clefs.mensural.g" . -4)
+ ("clefs.blackmensural.c" . 0)
("clefs.neomensural.c" . 0)
("clefs.petrucci.c1" . 0)
("clefs.petrucci.c2" . 0)
(define-class <Voice-state> ()
(event-list #:init-value '() #:accessor events #:init-keyword #:events)
- (when-moment #:accessor when #:init-keyword #:when)
+ (when-moment #:accessor moment #:init-keyword #:moment)
(tuning #:accessor tuning #:init-keyword #:tuning)
(split-index #:accessor split-index)
(vector-index)
(spanner-state #:init-value '() #:accessor span-state))
(define-method (write (x <Voice-state> ) file)
- (display (when x) file)
+ (display (moment x) file)
(display " evs = " file)
(display (events x) file)
(display " active = " file)
(configuration #:init-value '() #:accessor configuration)
;; Allow overriding split configuration, takes precedence over configuration
(forced-configuration #:init-value #f #:accessor forced-configuration)
- (when-moment #:accessor when #:init-keyword #:when)
+ (when-moment #:accessor moment #:init-keyword #:moment)
;; voice-states are states starting with the Split-state or later
;;
(is #:init-keyword #:voice-states #:accessor voice-states)
(define-method (write (x <Split-state> ) f)
- (display (when x) f)
+ (display (moment x) f)
(display " = " f)
(display (configuration x) f)
(if (synced? x)
(define (make-voice-states evl)
(let ((vec (list->vector (map (lambda (v)
(make <Voice-state>
- #:when (caar v)
+ #:moment (caar v)
#:tuning (cdar v)
#:events (map car (cdr v))))
evl))))
(define (helper ss-idx ss-list idx1 idx2)
(let* ((state1 (if (< idx1 (vector-length vs1)) (vector-ref vs1 idx1) #f))
(state2 (if (< idx2 (vector-length vs2)) (vector-ref vs2 idx2) #f))
- (min (cond ((and state1 state2) (moment-min (when state1) (when state2)))
- (state1 (when state1))
- (state2 (when state2))
+ (min (cond ((and state1 state2) (moment-min (moment state1) (moment state2)))
+ (state1 (moment state1))
+ (state2 (moment state2))
(else #f)))
- (inc1 (if (and state1 (equal? min (when state1))) 1 0))
- (inc2 (if (and state2 (equal? min (when state2))) 1 0))
+ (inc1 (if (and state1 (equal? min (moment state1))) 1 0))
+ (inc2 (if (and state2 (equal? min (moment state2))) 1 0))
(ss-object (if min
(make <Split-state>
- #:when min
+ #:moment min
#:voice-states (cons state1 state2)
#:synced (= inc1 inc2))
#f)))
(new-active1 (span-state vs1))
(new-active2 (span-state vs2)))
(if #f ; debug
- (display (list (when now-state) result-idx
+ (display (list (moment now-state) result-idx
active1 "->" new-active1
active2 "->" new-active2
"\n")))
(define (current-voice-state now-state voice-num)
(define vs ((if (= 1 voice-num) car cdr)
(voice-states now-state)))
- (if (or (not vs) (equal? (when now-state) (when vs)))
+ (if (or (not vs) (equal? (moment now-state) (moment vs)))
vs
(previous-voice-state vs)))
(silent-state (current-voice-state now-state (if (equal? type 'solo1) 2 1)))
(silent-notes (if silent-state (note-events silent-state) '()))
(solo-notes (if solo-state (note-events solo-state) '())))
- ;; (display (list "trying " type " at " (when now-state) solo-state silent-state "\n"))
+ ;; (display (list "trying " type " at " (moment now-state) solo-state silent-state "\n"))
(cond ((not (equal? (configuration now-state) 'apart))
current-idx)
((> (length silent-notes) 0) start-idx)
(notes2 (if vs2 (note-events vs2) '()))
(n1 (length notes1))
(n2 (length notes2)))
- ;; (display (list "analyzing step " result-idx " moment " (when now-state) vs1 vs2 "\n"))
+ ;; (display (list "analyzing step " result-idx " moment " (moment now-state) vs1 vs2 "\n"))
(max
;; we should always increase.
(cond ((and (= n1 0) (= n2 0))
(put 'apart-silence)
(1+ result-idx))
((and (= n2 0)
- (equal? (when vs1) (when now-state))
+ (equal? (moment vs1) (moment now-state))
(null? (previous-span-state vs1)))
(try-solo 'solo1 result-idx result-idx))
((and (= n1 0)
- (equal? (when vs2) (when now-state))
+ (equal? (moment vs2) (moment now-state))
(null? (previous-span-state vs2)))
(try-solo 'solo2 result-idx result-idx))
;; (display result)
(set! result (map
;; forced-configuration overrides, if it is set
- (lambda (x) (cons (when x) (or (forced-configuration x) (configuration x))))
+ (lambda (x) (cons (moment x) (or (forced-configuration x) (configuration x))))
(vector->list result)))
(if #f ;; pc-debug
(display result))
(cons (min-max-crawler min cddr possible-extrema)
(min-max-crawler max cddr possible-extrema)))))
-(define (path-min-max origin pointlist)
-
- (define (line-part-min-max x1 x2)
- (list (min x1 x2) (max x1 x2)))
-
- (define (bezier-part-min-max x1 x2 x3 x4)
- ((lambda (x) (list (reduce min 10000 x) (reduce max -10000 x)))
- (map
- (lambda (x)
- (+ (* x1 (expt (- 1 x) 3))
- (+ (* 3 (* x2 (* (expt (- 1 x) 2) x)))
- (+ (* 3 (* x3 (* (- 1 x) (expt x 2))))
- (* x4 (expt x 3))))))
- (if (< (+ (expt x2 2) (+ (expt x3 2) (* x1 x4)))
- (+ (* x1 x3) (+ (* x2 x4) (* x2 x3))))
- (list 0.0 1.0)
- (filter
- (lambda (x) (and (>= x 0) (<= x 1)))
- (append
- (list 0.0 1.0)
- (map (lambda (op)
- (if (not (eqv? 0.0
- (- (+ x1 (* 3 x3)) (+ x4 (* 3 x2)))))
- ;; Zeros of the bezier curve
- (/ (+ (- x1 (* 2 x2))
- (op x3
- (sqrt (- (+ (expt x2 2)
- (+ (expt x3 2) (* x1 x4)))
- (+ (* x1 x3)
- (+ (* x2 x4) (* x2 x3)))))))
- (- (+ x1 (* 3 x3)) (+ x4 (* 3 x2))))
- ;; Apply L'hopital's rule to get the zeros if 0/0
- (* (op 0 1)
- (/ (/ (- x4 x3) 2)
- (sqrt (- (+ (* x2 x2)
- (+ (* x3 x3) (* x1 x4)))
- (+ (* x1 x3)
- (+ (* x2 x4) (* x2 x3)))))))))
- (list + -))))))))
-
- (define (bezier-min-max x1 y1 x2 y2 x3 y3 x4 y4)
- (map (lambda (x)
- (apply bezier-part-min-max x))
- `((,x1 ,x2 ,x3 ,x4) (,y1 ,y2 ,y3 ,y4))))
+(define (line-part-min-max x1 x2)
+ (list (min x1 x2) (max x1 x2)))
+
+(define (bezier-part-min-max x1 x2 x3 x4)
+ ((lambda (x) (list (reduce min 10000 x) (reduce max -10000 x)))
+ (map
+ (lambda (x)
+ (+ (* x1 (expt (- 1 x) 3))
+ (+ (* 3 (* x2 (* (expt (- 1 x) 2) x)))
+ (+ (* 3 (* x3 (* (- 1 x) (expt x 2))))
+ (* x4 (expt x 3))))))
+ (if (< (+ (expt x2 2) (+ (expt x3 2) (* x1 x4)))
+ (+ (* x1 x3) (+ (* x2 x4) (* x2 x3))))
+ (list 0.0 1.0)
+ (filter
+ (lambda (x) (and (>= x 0) (<= x 1)))
+ (append
+ (list 0.0 1.0)
+ (map (lambda (op)
+ (if (not (eqv? 0.0
+ (exact->inexact (- (+ x1 (* 3 x3)) (+ x4 (* 3 x2))))))
+ ;; Zeros of the bezier curve
+ (/ (+ (- x1 (* 2 x2))
+ (op x3
+ (sqrt (- (+ (expt x2 2)
+ (+ (expt x3 2) (* x1 x4)))
+ (+ (* x1 x3)
+ (+ (* x2 x4) (* x2 x3)))))))
+ (- (+ x1 (* 3 x3)) (+ x4 (* 3 x2))))
+ ;; Apply L'hopital's rule to get the zeros if 0/0
+ (* (op 0 1)
+ (/ (/ (- x4 x3) 2)
+ (sqrt (- (+ (* x2 x2)
+ (+ (* x3 x3) (* x1 x4)))
+ (+ (* x1 x3)
+ (+ (* x2 x4) (* x2 x3)))))))))
+ (list + -))))))))
+
+(define (bezier-min-max x1 y1 x2 y2 x3 y3 x4 y4)
+ (map (lambda (x)
+ (apply bezier-part-min-max x))
+ `((,x1 ,x2 ,x3 ,x4) (,y1 ,y2 ,y3 ,y4))))
+
+(define (line-min-max x1 y1 x2 y2)
+ (map (lambda (x)
+ (apply line-part-min-max x))
+ `((,x1 ,x2) (,y1 ,y2))))
- (define (line-min-max x1 y1 x2 y2)
- (map (lambda (x)
- (apply line-part-min-max x))
- `((,x1 ,x2) (,y1 ,y2))))
+(define (path-min-max origin pointlist)
((lambda (x)
(list
depth = ..
-SUBDIRS=auxiliar build
+SUBDIRS=build
SEXECUTABLES=convert-ly lilypond-book abc2ly etf2ly midi2ly lilypond-invoke-editor musicxml2ly lilysong lilymidi
Nowadays abc2ly outputs explicits barlines (?)
"""
## < 2.2
- outf.write ("\n\\set Score.defaultBarType = \"empty\"\n")
+ outf.write ("\n\\set Score.defaultBarType = \"\"\n")
def dump_slyrics (outf):
'|]' : '|.',
'||' : '||',
'[|' : '||',
-':|' : ':|',
+':|' : ':|.',
'|:' : '|:',
-'::' : ':|:',
+'::' : ':|.|:',
'|1' : '|',
'|2' : '|',
-':|2' : ':|',
+':|2' : ':|.',
'|' : '|'
}
bar_dict = {
+++ /dev/null
-depth=../..
-
-EXTRA_DIST_FILES = $(call src-wildcard,*.sh) $(call src-wildcard,*.py)
-EXTRA_DIST_FILES += pfx2ttf.fontforge
-EXTRA_DIST_FILES += lily-git.tcl
-EXTRA_DIST_FILES += ref_check.tely
-
-include $(depth)/make/stepmake.make
-
-default:
--- /dev/null
+#!/bin/sh
+#
+# Indent and untabify source files (given by their
+# filenames in the command line), according to
+# LilyPond source style standards.
+
+elisp_expression='(progn
+ (delete-trailing-whitespace)
+ (indent-region (point-min) (point-max) nil)
+ (untabify (point-min) (point-max))
+ (save-buffer))'
+for f in "$@"; do
+ emacs -batch "$f" --eval "${elisp_expression}"
+done
--- /dev/null
+# This file is part of LilyPond, the GNU music typesetter.
+#
+# Copyright (C) 2012 Joe Neeman <joeneeman@gmail.com>
+#
+# LilyPond is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# LilyPond is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+
+# A gdb plugin debugging skylines. To use the plugin, make sure that
+# skyline_viewer.py is in your PATH, then add
+# source /path/to/show_skyline_command.py
+# to your .gdbinit file. The 'vsky' and 'hsky' commands for
+# drawing skylines will then be available in gdb.
+
+import gdb
+from subprocess import Popen, PIPE
+from math import isinf
+
+SKYLINE_VIEWER = 'skyline_viewer.py'
+
+# Function taken from GCC
+def find_type(orig, name):
+ typ = orig.strip_typedefs()
+ while True:
+ search = str(typ) + '::' + name
+ try:
+ return gdb.lookup_type(search)
+ except RuntimeError:
+ pass
+ # The type was not found, so try the superclass. We only need
+ # to check the first superclass, so we don't bother with
+ # anything fancier here.
+ field = typ.fields()[0]
+ if not field.is_base_class:
+ raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
+ typ = field.type
+
+# Class adapted from GCC
+class ListIterator:
+ def __init__ (self, val):
+ self.val = val
+ self.nodetype = find_type (val.type, '_Node')
+ self.nodetype = self.nodetype.strip_typedefs ().pointer ()
+
+ head = val['_M_impl']['_M_node']
+ self.base = head['_M_next']
+ self.head = head.address
+
+ def __iter__ (self):
+ return self
+
+ def next (self):
+ if self.base == self.head:
+ raise StopIteration
+ elt = self.base.cast (self.nodetype).dereference ()
+ self.base = elt['_M_next']
+ return elt['_M_data']
+
+def to_list (list_val):
+ return list (ListIterator (list_val))
+
+def skyline_to_lines (sky_value):
+ """Turns a gdb.Value into a list of line segments."""
+ sky_d = int (sky_value['sky_'])
+ buildings = to_list (sky_value['buildings_'])
+
+ def bld_to_line (bld):
+ y_intercept = float (bld['y_intercept_']) * sky_d
+ slope = float (bld['slope_']) * sky_d
+ x1 = float (bld['start_'])
+ x2 = float (bld['end_'])
+
+ if isinf (y_intercept) or isinf (x1) or isinf (x2):
+ return None
+ return (x1, y_intercept + slope * x1, x2, y_intercept + slope * x2)
+
+ ret = map (bld_to_line, buildings)
+ return [r for r in ret if r is not None]
+
+viewer = Popen(SKYLINE_VIEWER, stdin=PIPE)
+def add_skyline(lines):
+ global viewer
+ try:
+ for line in lines:
+ x1, y1, x2, y2 = line
+ viewer.stdin.write('(%f,%f) (%f,%f)\n' % (x1, y1, x2, y2))
+ viewer.stdin.write('\n')
+ except IOError:
+ # If the pipe is broken, it probably means that someone closed
+ # the viewer window. Open another one.
+ viewer = Popen(SKYLINE_VIEWER, stdin=PIPE)
+ add_skyline(lines)
+
+class ShowSkylineCommand (gdb.Command):
+ "Show a skyline graphically."
+
+ def __init__ (self, command_name):
+ super (ShowSkylineCommand, self).__init__ (command_name,
+ gdb.COMMAND_DATA,
+ gdb.COMPLETE_SYMBOL, False)
+
+ def to_lines (self, skyline):
+ pass
+
+ def invoke (self, arg, from_tty):
+ global plot
+
+ val = gdb.parse_and_eval (arg)
+ typ = val.type
+
+ # If they passed in a reference or pointer to a skyline,
+ # dereference it.
+ if typ.code == gdb.TYPE_CODE_PTR or typ.code == gdb.TYPE_CODE_REF:
+ val = val.referenced_value ()
+ typ = val.type
+
+ if typ.tag == 'Skyline_pair':
+ sky = val['skylines_']
+ arr = sky['array_']
+ add_skyline (self.to_lines (arr[0]))
+ add_skyline (self.to_lines (arr[1]))
+
+ elif typ.tag == 'Skyline':
+ add_skyline (self.to_lines (val))
+
+class ShowVSkylineCommand (ShowSkylineCommand):
+ "Show a vertical skyline."
+
+ def __init__ (self):
+ super (ShowVSkylineCommand, self).__init__ ("vsky")
+
+ def to_lines (self, skyline):
+ return skyline_to_lines (skyline)
+
+class ShowHSkylineCommand (ShowSkylineCommand):
+ "Show a horizontal skyline."
+
+ def __init__ (self):
+ super (ShowHSkylineCommand, self).__init__ ("hsky")
+
+ def to_lines (self, skyline):
+ lines = skyline_to_lines (skyline)
+ # Because it is a horizontal skyline, reflect around the line y=x.
+ return [(y1, x1, y2, x2) for (x1, y1, x2, y2) in lines]
+
+ShowHSkylineCommand()
+ShowVSkylineCommand()
--- /dev/null
+#!/usr/bin/env python
+
+# This file is part of LilyPond, the GNU music typesetter.
+#
+# Copyright (C) 2012 Joe Neeman <joeneeman@gmail.com>
+#
+# LilyPond is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# LilyPond is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+
+# A GTK+ program for debugging skylines. The program reads a sequence
+# of line segments from stdin (one line segment per line of stdin, in the format
+# '(x1, y1) (x2, y2)'). A skyline is terminated by an empty line, which
+# causes the skyline to be displayed on the screen.
+
+from threading import Thread
+from math import isinf
+import gtk
+import gobject
+import goocanvas
+import sys
+import re
+
+class GtkSkylineCanvas (goocanvas.Canvas):
+ """A Canvas for displaying skylines."""
+ def __init__ (self):
+ super (GtkSkylineCanvas, self).__init__ ()
+ self.connect ('size-allocate', GtkSkylineCanvas.rescale)
+ self.x_min = float ('inf')
+ self.x_max = float ('-inf')
+ self.y_min = float ('inf')
+ self.y_max = float ('-inf')
+
+ self.colors = ('black', 'red', 'green', 'blue', 'maroon', 'olive', 'teal')
+ self.cur_color_index = 0
+
+ def rescale (self, allocation):
+ width = (self.x_max - self.x_min + 1) * 1.1
+ height = (self.y_max - self.y_min + 1) * 1.1
+ if width <= 0 or height <= 0:
+ return
+
+ scale_x = allocation.width / width
+ scale_y = allocation.height / height
+ scale = min (scale_x, scale_y)
+ self.set_scale (scale)
+
+ center_x = (self.x_max + self.x_min) / 2
+ center_y = (self.y_max + self.y_min) / 2
+ actual_width = allocation.width / scale
+ actual_height = allocation.height / scale
+ actual_min_x = center_x - actual_width / 2
+ actual_max_x = center_x + actual_width / 2
+ actual_min_y = center_y - actual_height / 2
+ actual_max_y = center_y + actual_height / 2
+
+ self.set_bounds (actual_min_x, actual_min_y, actual_max_x, actual_max_y)
+ self.scroll_to (actual_min_x, actual_min_y)
+
+ def add_skyline (self, lines):
+ """Adds a skyline to the current canvas, in a new color.
+
+ The canvas will be rescaled, if necessary, to make room for the
+ new skyline."""
+ # Flip vertically, because goocanvas thinks higher numbers are
+ # further down, while lilypond thinks they're further up.
+ lines = [(x1, -y1, x2, -y2) for (x1, y1, x2, y2) in lines]
+
+ color = self.colors[self.cur_color_index]
+ self.cur_color_index = (self.cur_color_index + 1) % len (self.colors)
+
+ # Update the bounding box of the skylines.
+ x_vals = [s[0] for s in lines] + [s[2] for s in lines]
+ y_vals = [s[1] for s in lines] + [s[3] for s in lines]
+ self.x_min = min ([self.x_min] + x_vals)
+ self.x_max = max ([self.x_max] + x_vals)
+ self.y_min = min ([self.y_min] + y_vals)
+ self.y_max = max ([self.y_max] + y_vals)
+
+ # Add the lines to the canvas.
+ root = self.get_root_item ()
+ for (x1, y1, x2, y2) in lines:
+ goocanvas.polyline_new_line (root, x1, y1, x2, y2,
+ stroke_color=color,
+ line_width=0.05)
+ self.rescale (self.get_allocation ())
+
+# We want to run the gtk main loop in a separate thread so that
+# the main thread can be responsible for reading stdin.
+class SkylineWindowThread (Thread):
+ """A thread that runs a Gtk.Window displaying a skyline."""
+
+ def run (self):
+ gtk.gdk.threads_init ()
+ self.window = None
+ self.canvas = None
+ gtk.main ()
+
+ # This should only be called from the Gtk main loop.
+ def _destroy_window (self, window):
+ sys.exit (0)
+
+ # This should only be called from the Gtk main loop.
+ def _setup_window (self):
+ if self.window is None:
+ self.window = gtk.Window ()
+ self.canvas = GtkSkylineCanvas ()
+ self.window.add (self.canvas)
+ self.window.connect ("destroy", self._destroy_window)
+ self.window.show_all ()
+
+ # This should only be called from the Gtk main loop.
+ def _add_skyline (self, lines):
+ self._setup_window ()
+ self.canvas.add_skyline (lines)
+
+ def add_skyline (self, lines):
+ # Copy the lines, just in case someone modifies them.
+ gobject.idle_add (self._add_skyline, list (lines))
+
+thread = SkylineWindowThread ()
+thread.setDaemon (True)
+thread.start ()
+
+def lines(infile):
+ line = infile.readline()
+ while len(line) > 0:
+ yield line[:-1]
+ line = infile.readline()
+
+point_re_str = r'\(([a-z.0-9-]*) *,([a-z0-9.-]*)\)'
+line_re_str = point_re_str + r' +' + point_re_str
+line_re = re.compile (line_re_str)
+
+# The main loop just reads lines from stdin and feeds them to the
+# display.
+current_skyline = []
+for line in lines(sys.stdin):
+ if not line:
+ thread.add_skyline(current_skyline)
+ current_skyline = []
+ continue
+
+ m = re.search (line_re, line)
+ if m is None:
+ print('line did not match')
+ else:
+ pts = map(float, m.groups())
+ if not any(map(isinf, pts)):
+ current_skyline.append(pts)
STEPMAKE_TEMPLATES=script install po
-EXTRA_DIST_FILES = website-known-missing-files.txt
-
include $(depth)/make/stepmake.make
# Should we install these? This should be handled by sysadmin or
# usage:
def usage ():
- print 'usage: %s [-s style] [-o <outfile>] [-q] BIBFILES...'
+ print 'usage: bib2texi.py [-s style] [-o <outfile>] [-q] BIBFILES...'
print '-q suppresses most output'
(options, files) = getopt.getopt (sys.argv[1:], 's:o:hq', [])
usage ()
sys.exit (2)
+marker = """@c This file was autogenerated
+@c from: %s
+@c by: %s
+
+""" % (", ".join(files), sys.argv[0])
def strip_extension (f, ext):
(p, e) = os.path.splitext (f)
sys.stderr.write ("Bibtex generated an empty file!")
sys.exit (1)
-open (output, 'w').write (bbl)
+fout = open (output, 'w')
+fout.write (marker)
+fout.write (bbl)
+fout.close ()
def cleanup (tmpfile):
for a in ['aux','bbl', 'blg']:
print "@end macro"
print ""
+print "@c This file was autogenerated"
+print "@c from: VERSION"
+print "@c by: %s" % sys.argv[0]
+print ""
print "@c ************************ Version numbers ************"
+print ""
+
make_macro("version", VERSION)
make_macro("versionStable", VERSION_STABLE)
make_macro("versionDevel", VERSION_DEVEL)
-
+print "@c *****************************************************"
#!@PYTHON@
# -*- coding: utf-8 -*-
-# create-version-itexi.py
+# create-weblinks-itexi.py
""" when being called on lilypond.org, pass it the location of the
top source dir on the command-line. """
'Regression tests for ': 'Regressionstests für ',
'PDF of regtests for ': 'PDF der Regressionstests für ',
+ 'abc2ly Regression tests for ': 'abc2ly Regressionstests für ',
+ 'PDF of abc2ly regtests for ': 'PDF der abc2ly Regressionstests für ',
+ 'lilypond-book Regression tests for ': 'lilypond-book Regressionstests für ',
+ 'PDF of lilypond-book regtests for ': 'PDF der lilypond-book Regressionstests für ',
'MusicXML Regression tests for ': 'MusicXML Regressionstests für ',
'PDF of MusicXML regtests for ': 'PDF der MusicXML Regressionstests für ',
'Regression tests for ': 'Pruebas de regresión para ',
'PDF of regtests for ': 'Pruebas en PDF para ',
+ 'abc2ly Regression tests for ': 'Pruebas de regresión de abc2ly para ',
+ 'PDF of abc2ly regtests for ': 'Pruebas de abc2ly en PDF para ',
+ 'lilypond-book Regression tests for ': 'Pruebas de regresión de lilypond-book para ',
+ 'PDF of lilypond-book regtests for ': 'Pruebas de lilypond-book en PDF para ',
'MusicXML Regression tests for ': 'Pruebas de regresión de MusicXML para ',
'PDF of MusicXML regtests for ': 'Pruebas de MusicXML en PDF para ',
'Regression tests for ': 'Tests de régression pour ',
'PDF of regtests for ': 'PDF des tests de régression pour ',
+ 'abc2ly Regression tests for ': 'Tests de régression de abc2ly pour ',
+ 'PDF of abc2ly regtests for ': 'PDF des tests de régression de abc2ly pour ',
+ 'lilypond-book Regression tests for ': 'Tests de régression de lilypond-book pour ',
+ 'PDF of lilypond-book regtests for ': 'PDF des tests de régression de lilypond-book pour ',
'MusicXML Regression tests for ': 'Tests de régression de MusicXML pour ',
'PDF of MusicXML regtests for ': 'PDF des tests de régression de MusicXML pour ',
'Regression tests for ': 'Regressziós tesztek - verzió: ',
'PDF of regtests for ': 'PDF formátumban - verzió: ',
+ 'abc2ly Regression tests for ': 'abc2ly regressziós tesztek - verzió: ',
+ 'PDF of abc2ly regtests for ': 'PDF formátumban - verzió: ',
+ 'lilypond-book Regression tests for ': 'lilypond-book regressziós tesztek - verzió: ',
+ 'PDF of lilypond-book regtests for ': 'PDF formátumban - verzió: ',
'MusicXML Regression tests for ': 'MusicXML regressziós tesztek - verzió: ',
'PDF of MusicXML regtests for ': 'PDF formátumban - verzió: ',
'Regression tests for ': '回帰テスト バージョン ',
'PDF of regtests for ': '回帰テスト (PDF 版) バージョン ',
+ 'abc2ly Regression tests for ': 'abc2ly 回帰テスト バージョン ',
+ 'PDF of abc2ly regtests for ': 'abc2ly 回帰テスト (PDF 版) バージョン ',
+ 'lilypond-book Regression tests for ': 'lilypond-book 回帰テスト バージョン ',
+ 'PDF of lilypond-book regtests for ': 'lilypond-book 回帰テスト (PDF 版) バージョン ',
'MusicXML Regression tests for ': 'MusicXML 回帰テスト バージョン ',
'PDF of MusicXML regtests for ': 'MusicXML 回帰テスト (PDF 版) バージョン ',
'Regression tests for ': 'Regressietesten voor ',
'PDF of regtests for ': 'PDF van regressietesten voor ',
+ 'abc2ly Regression tests for ': 'abc2ly regressietesten voor ',
+ 'PDF of abc2ly regtests for ': 'abc2ly regressietesten voor ',
+ 'lilypond-book Regression tests for ': 'lilypond-book regressietesten voor ',
+ 'PDF of lilypond-book regtests for ': 'lilypond-book regressietesten voor ',
'MusicXML Regression tests for ': 'MusicXML regressietesten voor ',
'PDF of MusicXML regtests for ': 'MusicXML regressietesten voor ',
'Regression tests for ': '回归测试 ',
'PDF of regtests for ': '回归测试的 PDF ',
+ 'abc2ly Regression tests for ': 'abc2ly 回归测试 ',
+ 'PDF of abc2ly regtests for ': 'abc2ly 的 PDF 回归测试 ',
+ 'lilypond-book Regression tests for ': 'lilypond-book 回归测试 ',
+ 'PDF of lilypond-book regtests for ': 'lilypond-book 的 PDF 回归测试 ',
'MusicXML Regression tests for ': 'MusicXML 回归测试 ',
'PDF of MusicXML regtests for ': 'MusicXML 的 PDF 回归测试 ',
VERSION = str(major)+'.'+str(minor)+'.'+str(patch)
def _ (string, lang):
- return translations.get (lang.split ('_')[0], {}).get (string, string)
+ return translations.get (lang.split ('_')[0], {}).get (string, None)
getTrans = _
# let's not barf, but print a warning when something's missing
def getTrans(text, lang):
+ if not lang:
+ return text
trans = _ (text, lang)
if not trans:
trans = text
return trans
def macroLang(name, lang):
- if (lang != ''):
+ if lang:
return name + '-' + lang
return name
string += "}"
make_macro(name, string)
-def make_download_source(name, vstring, version, lang):
+def make_download_source(name, version, lang):
+ assert "." in version
+ vstring = "v%s.%s" % tuple(version.split(".", 2)[0:2])
string = "@uref{http://download.linuxaudio.org/lilypond/sources/"
string += vstring + "/"
string += "lilypond-" + version + ".tar.gz"
make_ver_link(macroLang("doctarball"+name, lang),
url, getTrans("Doc tarball for ", lang)+version)
+print "@c This file was autogenerated"
+print "@c from: VERSION"
+print "@c by: %s" % sys.argv[0]
+print ""
print "@c ************************ Download binaries ************"
+print ""
+
make_all_downloads("Stable", VERSION_STABLE)
make_all_downloads("Devel", VERSION_DEVEL)
print "@c ************************ Download source ************"
-# FIXME: icky hard-coding! -gp
+print ""
+
for lang in langs:
- print "@c *********", lang, "***"
- make_download_source("downloadStableSource","v2.14",VERSION_STABLE,lang)
- make_download_source("downloadDevelSource","v2.15",VERSION_DEVEL,lang)
+ print "@c *********", lang or "en", "***"
+ make_download_source("downloadStableSource", VERSION_STABLE, lang)
+ make_download_source("downloadDevelSource", VERSION_DEVEL, lang)
print "@c ************************ Manual links ************"
+print ""
+
for lang in langs:
- print "@c *********", lang, "***"
- make_manual_links("Stable", VERSION_STABLE,lang)
- make_manual_links("Devel", VERSION_DEVEL,lang)
+ print "@c *********", lang or "en", "***"
+ make_manual_links("Stable", VERSION_STABLE, lang)
+ make_manual_links("Devel", VERSION_DEVEL, lang)
- make_doctarball_links("Stable", VERSION_STABLE,lang)
- make_doctarball_links("Devel", VERSION_DEVEL,lang)
+ make_doctarball_links("Stable", VERSION_STABLE, lang)
+ make_doctarball_links("Devel", VERSION_DEVEL, lang)
print "@c ************************ Regtest links ************"
-for lang in langs:
- print "@c *********", lang, "***"
- make_regtest_links("Stable", VERSION_STABLE,lang)
- make_regtest_links("Devel", VERSION_DEVEL,lang)
-
+print ""
+for lang in langs:
+ print "@c *********", lang or "en", "***"
+ make_regtest_links("Stable", VERSION_STABLE, lang)
+ make_regtest_links("Devel", VERSION_DEVEL, lang)
+print "@c ***************************************************"
--- /dev/null
+#!@PYTHON@
+import string
+import getopt
+import sys
+import os
+import shutil
+(opts, args) = getopt.getopt (sys.argv[1:], 'b:cdg:m:o:st:', [])
+transform_base = None
+group = None
+owner = None
+transform = None
+mode = None
+copy = False
+create_dir = False
+
+for (o,a) in opts:
+ if o == '-b':
+ transform_base = a
+ elif o == '-c':
+ copy = True
+ elif o == '-d':
+ create_dir = True
+ elif o == '-g':
+ group = a
+ elif o == '-m':
+ mode = string.atoi (a, 8)
+ elif o == '-o':
+ owner = a
+ elif o == '-s':
+ strip = True
+ elif o == '-t':
+ transform = a
+ elif o == '-h':
+ print ''' Usage: $0 [OPTION]... SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 -d DIRECTORIES...
+
+In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
+In the second, create the directory path DIR.
+
+Options:
+-b=TRANSFORMBASENAME
+-c copy source (using $cpprog) instead of moving (using $mvprog).
+-d create directories instead of installing files.
+-g GROUP $chgrp installed files to GROUP.
+-m MODE $chmod installed files to MODE.
+-o USER $chown installed files to USER.
+-s strip installed files (using $stripprog).
+-t=TRANSFORM
+--help display this help and exit.
+--version display version info and exit.'''
+ sys.exit (0)
+
+if not mode:
+ if create_dir:
+ mode = 0755
+ else:
+ mode = 0644
+
+
+chown_me = []
+
+dest = None
+if not create_dir:
+ dest = args.pop()
+
+for f in args:
+ if create_dir:
+ if os.path.isdir (f):
+ continue
+
+ os.makedirs (f, mode=mode)
+ chown_me.append (f)
+ else:
+ if copy:
+ if os.path.exists (dest) and not os.path.isdir (dest):
+ os.remove (dest)
+ shutil.copy2 (f, dest)
+ else:
+ shutil.move (f, dest)
+
+ if os.path.isdir (dest):
+ chown_me.append (os.path.join (dest, os.path.basename (f)))
+ else:
+ chown_me.append (dest)
+
+for f in chown_me:
+ os.chmod (f, mode)
+ if group <> None or owner <> None:
+ os.chown (f, group, owner)
+
+
+
+
+
input_filename = ""
glob_input = ""
template = '''\input texinfo
+
+@c This file was autogenerated
+@c from: %s
+@c by: %s
+
@setfilename %%(name)s.info
@settitle %%(title)s
%s
@bye
-''' % include_snippets
+''' % (", ".join(files), sys.argv[0], include_snippets)
for opt in options:
o = opt[0]
else:
# not Unix philosophy, but hey, at least we notice when
# we don't distribute any .ly files.
- sys.stderr.write ("No files specified. Doing nothing")
+ sys.stderr.write ("No files specified. Doing nothing. Use -h to display usage.")
--- /dev/null
+#!@PYTHON@
+import re
+import sys
+
+PROGRAM = sys.argv[0]
+VERSION = sys.argv[1]
+defs = []
+for i in open (VERSION).readlines ():
+ i = re.sub ('#.*','', i)
+ m = re.search ('([^ =]*)[\t ]*=[ \t]*([^ \t]*)[ \t]*\n', i)
+ if m:
+ defs.append ((m.group (1), m.group (2)))
+
+sys.stdout.write (r'''
+/*
+ Automatically generated from %(VERSION)s
+ by %(PROGRAM)s.
+*/
+#ifndef VERSION_HH
+#define VERSION_HH
+''' % vars ())
+
+for name, expansion in defs:
+ # GUILE leaks autoconf data into userspace.
+ sys.stdout.write (r'''
+#ifdef %(name)s
+#undef %(name)s
+#endif /* %(name)s */
+#define %(name)s "%(expansion)s"
+''' % vars ())
+
+if ('MY_PATCH_LEVEL', '') in defs:
+ sys.stdout.write (r'''
+#define NO_MY_PATCHLEVEL
+#define TOPLEVEL_VERSION MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL
+''')
+else:
+ sys.stdout.write (r'''
+#define TOPLEVEL_VERSION MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL "." MY_PATCH_LEVEL
+''')
+
+sys.stdout.write(r'''
+#endif /* VERSION_HH */
+''')
+
#
# create hard or symbolic links to SOURCEDIR/FILES in DESTDIR
#
-# If --prepend-suffix is specified, link to foo.bar will be called fooSUFFIX.bar.
-# Shell wildcards expansion is performed on FILES.
+# If symbolic or hard links are not provided by the operating system,
+# copies will be made instead. However, if the operating system
+# support symbolic or hard links, then this program expects to
+# operate on a filesystem which supports them too.
+#
+# If --prepend-suffix is specified, link to foo.bar will be called
+# fooSUFFIX.bar. Shell wildcards expansion is performed on FILES.
+#
+# No check is performed on FILES type; in particular, if FILES
+# expansions contain a directory and hard links are requested,
+# this program may fail non-gracefully.
+#
+# Attempts to make hard links across different filesystems are
+# caught and replaced by copies.
import sys
import os
import glob
import getopt
+import shutil
optlist, args = getopt.getopt (sys.argv[1:], '', ['prepend-suffix='])
link_type, source_dir, dest_dir = args[0:3]
insert_suffix = lambda p: p
if link_type == 'symbolic':
- link = os.symlink
+ if hasattr (os, 'symlink'):
+ link = os.symlink
+ else:
+ link = shutil.copy
elif link_type == 'hard':
- link = os.link
+ if hasattr (os, 'link'):
+ link = os.link
+ else:
+ link = shutil.copy
else:
sys.stderr.write(sys.argv[0] + ': ' + link_type + ": wrong argument, expected 'symbolic' or 'hard'\n")
sys.exit (1)
def force_link (src,dest):
if os.path.exists (dest):
- os.system ('rm -f ' + dest)
- link (src, dest)
+ os.remove (dest)
+ try:
+ link (src, dest)
+ except OSError, e: # can't use "as" because GUB has python 2.4.5.
+ if e.errno == 18:
+ shutil.copy (src, dest)
+ else:
+ raise
os.utime (dest, None)
map (force_link, sourcefiles, destfiles)
summary += '<p>%d unchanged</p>' % len (unchanged)
+ me = sys.argv[0]
+
html = '''<html>
<head>
<title>LilyPond regression test results</title>
+<meta name="author" content="This file was autogenerated by %(me)s">
<script language="javascript" type="text/javascript">
// <![CDATA[
var rows = document.getElementsByTagName("tr");
--- /dev/null
+#!@PYTHON@
+import os
+import re
+import string
+import sys
+
+
+entities = {
+ "&" : 'amp',
+ "`" : 'apos',
+ '>' : 'gt',
+ '<' : 'lt',
+ '"' : 'quot',
+ }
+
+def txt2html (s):
+ for i in entities.keys ():
+ s = re.sub (i, '\001' + entities[i] + ';', s);
+ s = re.sub ('\001', '&', s);
+ return s
+
+for a in sys.argv[1:]:
+ # hmm, we need: text2html out/foe.txt -> out/foe.html,
+ # -o is a bit overkill?
+ # outfile = os.path.basename (os.path.splitext(a)[0]) + '.html'
+ outfile = os.path.splitext(a)[0] + '.html'
+
+ try:
+ os.unlink(outfile)
+ except:
+ pass
+
+ s = r"""
+
+<html>
+<head>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
+</head>
+
+<body><pre>
+%s
+</pre></body></html>
+""" % txt2html (open (a).read ())
+ open (outfile, 'w').write (s)
+
+
#!@PYTHON@
#-*- coding: utf-8 -*-
-##### This is web_post.py. This script deals with translations
+##### This is website_post.py. This script deals with translations
##### in the "make website" target.
import sys
###### Actual program
+me = sys.argv[0]
dir = sys.argv[1]
os.chdir(dir)
def makeFooter (filename, currentLang):
footer = '''<p id="languages">
+<!-- These links were autogenerated by %(me)s -->
%(other)s: %(lst)s.
<br>
%(browser_language)s
#### add google tracker goals
if (line.find("href=\"http://download.linuxaudio.org") >= 0):
# TODO: more ugly hardcoding to make releases hard. :(
- if (line.find('2.14') >= 0):
- line = line.replace('a href=', 'a onClick=\"javascript:urchinTracker(\'/download/v2.14\');\" href=')
- elif (line.find('2.15') >= 0):
- line = line.replace('a href=', 'a onClick=\"javascript:urchinTracker(\'/download/v2.15\');\" href=')
+ if (line.find('2.16') >= 0):
+ line = line.replace('a href=', 'a onClick=\"javascript:urchinTracker(\'/download/v2.16\');\" href=')
+ elif (line.find('2.17') >= 0):
+ line = line.replace('a href=', 'a onClick=\"javascript:urchinTracker(\'/download/v2.17\');\" href=')
### add language selection footer
if (line.find("<div id=\"verifier_texinfo\">") >= 0):
outfile.write("<div id=\"footer\">\n")
static_files = {
os.path.join (outdir, 'index.html'):
'''<META HTTP-EQUIV="refresh" content="0;URL=Documentation/web/index.html">
-<html><body>Redirecting to the documentation index...</body></html>\n''',
+<html>
+<head>
+<title>Redirecting...</title>
+<meta name="author" content="This file was autogenerated by %s">
+</head>
+<body>Redirecting to the documentation index...</body>
+</html>
+''' % sys.argv[0],
os.path.join (outdir, 'VERSION'):
package_version + '\n',
}
in_name = sys.argv[1]
out_name = sys.argv[2]
- print "input file name",in_name
- print "output file name",out_name
in_file = open(in_name,'r')
out_file= open(out_name, 'w')
ly.progress (_ ("Applying conversion: "), newline = False)
- last_conversion = ()
+ last_conversion = None
+ errors = 0
try:
- if not conv_list:
- last_conversion = to_version
for x in conv_list:
if x != conv_list[-1]:
ly.progress (tup_to_str (x[0]), newline = False)
ly.error (_ ("Error while converting")
+ '\n'
+ _ ("Stopping at last successful rule"))
+ errors += 1
- return (last_conversion, str)
+ return (last_conversion, str, errors)
self.version = version
def do_one_file (infile_name):
- ly.progress (_ ("Processing `%s\'... ") % infile_name, True)
+ ly.progress (_ (u"Processing `%s\'... ") % infile_name, True)
if infile_name:
infile = open (infile_name, 'r')
raise InvalidVersion (".".join ([str(n) for n in from_version]))
- (last, result) = do_conversion (input, from_version, to_version)
+ (last, result, errors) = do_conversion (input, from_version, to_version)
+ if global_options.force_current_version and \
+ (last is None or last == to_version):
+ last = str_to_tuple (program_version)
if last:
- if global_options.force_current_version and last == to_version:
- last = str_to_tuple (program_version)
-
if global_options.diff_version_update:
if result == input:
# check the y in x.y.z (minor version number)
elif not global_options.skip_version_add:
result = newversion + '\n' + result
- ly.progress ('\n')
-
- if global_options.edit:
- try:
- os.remove(infile_name + '~')
- except:
- pass
- os.rename (infile_name, infile_name + '~')
- outfile = open (infile_name, 'w')
- else:
- outfile = sys.stdout
-
+ ly.progress ('\n')
- outfile.write (result)
+ if global_options.edit:
+ try:
+ os.remove (infile_name + '~')
+ except:
+ pass
+ os.rename (infile_name, infile_name + '~')
+ outfile = open (infile_name, 'w')
+ else:
+ outfile = sys.stdout
+ outfile.write (result)
+
sys.stderr.flush ()
+ return errors
+
def do_options ():
opt_parser = get_option_parser()
(options, args) = opt_parser.parse_args ()
identify ()
+ errors = 0
for f in files:
if f == '-':
- f = ''
- elif not os.path.isfile (f):
- ly.error (_ ("%s: Unable to open file") % f)
- if len (files) == 1:
- sys.exit (1)
+ continue
+ f = f.decode (sys.stdin.encoding or "utf-8")
+ if not os.path.isfile (f):
+ ly.error (_ (u"%s: Unable to open file") % f)
+ errors += 1
continue
try:
- do_one_file (f)
+ errors += do_one_file (f)
except UnknownVersion:
- ly.error (_ ("%s: Unable to determine version. Skipping") % f)
+ ly.error (_ (u"%s: Unable to determine version. Skipping") % f)
+ errors += 1
except InvalidVersion:
# Compat code for 2.x and 3.0 syntax ("except .. as v" doesn't
# work in python 2.4!):
t, v, b = sys.exc_info ()
- ly.error (_ ("%s: Invalid version string `%s' \n"
+ ly.error (_ (u"%s: Invalid version string `%s' \n"
"Valid version strings consist of three numbers, "
"separated by dots, e.g. `2.8.12'") % (f, v.version) )
+ errors += 1
+
+ if errors:
+ ly.warning (ly.ungettext ("There was %d error.",
+ "There were %d errors.", errors) % errors)
+ sys.exit (1)
main ()
last_time = g.timesig
if 'start' in g.repeats:
- e = e + ' \\bar "|:" '
+ e = e + ' \\bar ".|:" '
# we don't attempt voltas since they fail easily.
if g:
gap = rat_add (gap, g.length ())
if 'stop' in g.repeats:
- k = k + ' \\bar ":|" '
+ k = k + ' \\bar ":|." '
k = '%sglobal = { %s }\n\n ' % (self.staffid (), k)
return k
nr = 0
for i in global_options.custom_packages:
nr += 1
- print imp.load_source ("book_custom_package%s" % nr, i)
+ progress (str(imp.load_source ("book_custom_package%s" % nr, i)))
if global_options.warranty:
srcdir=${srcdir:-.}
set -ux
-AUTOGEN_INPUT_CHECKSUM=`cat $srcdir/configure.in $srcdir/stepmake/aclocal.m4 | md5sum | cut -b 1-32`
+AUTOGEN_INPUT_CHECKSUM=`cat $srcdir/configure.in $srcdir/aclocal.m4 | md5sum | cut -b 1-32`
CHECKSUM_FILE=autogen.checksum
+++ /dev/null
-# -*-Makefile-*-
-# title specific top level makefile for StepMake
-
-# subdir level:
-#
-depth = ..
-
-# descent order into subdirectories:
-#
-SUBDIRS = bin stepmake
-
-# list of distribution files:
-#
-SCRIPTS = aclocal.m4 autogen.sh
-README_FILES = README
-README_TXT_FILES =
-EXTRA_DIST_FILES = $(README_FILES) $(SCRIPTS)
-NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
-#
-
-# bootstrap stepmake:
-#
-STEPMAKE_TEMPLATES= texinfo
-include $(depth)/make/stepmake.make
-
-# don't install stepmake
-install: local-install
- @echo Not installing stepmake
-
-localclean:
- rm -f bin/*.pyc
+++ /dev/null
-\input texinfo @c -*-texinfo-*-
-@setfilename INSTALL.info
-@settitle INSTALL
-
-@node Top, , , (dir)
-@top
-
-
-@unnumberedsec Name
-
-
-INSTALL - installing StepMake
-
-@unnumberedsec Description
-
-
-This page documents installation and usage of StepMake
-
-@unnumberedsec Abstract
-
-
-StepMake is a drop-in package that takes care of generic Makefile and
-packaging/distribution issues. It enables you to write only the simplest of
-Makefile snippets, while providing a series powerful make targets. Features
-include speed, wildcarding, out/ dir build, stateless Makefiles and package
-clustering. It includes some handy scripts for making (package-)diffs and
-patches, making binary distributions etc.
-
-To use StepMake with your package, you do something remotely like:
-@example
-
- tar xzf releases/stepmake-0.1.23
- cd package-x.x.x/ # package to be StepMake-ised
- ./../stepmake-0.1.23/bin/stepmakeise.sh
-
-@end example
-
-You'll have to customize at least the files:
-@example
-
- ./VERSION .
- ./configure.in
-
-@end example
-
-to your package's needs. You might want to take a look at:
-@example
-
- ./make/Toplevel.make.in
- ./config.hh.in
- ./config.make.in
-
-@end example
-
-Also, you should put a Makefile in every subdirectory of your
-package. These makefiles generally are quite simple, e.g. this
-is a the makefile for an include directory of LilyPond:
-@example
-
- # lily/include/Makefile
-
- depth = ../..
- include $(depth)/make/Stepmake.make
-
-@end example
-
-it will identify all @code{.h, .hh, ...} files and take care of distributing
-them.
-
-There's a @file{make/Template.make} that you can use as an example.
-See also the Makefiles in the LilyPond or Yodl package.
-
-Once included in your package, StepMake (or in fact, any
-StepMake-ised package) behaves as a normal subdirectory;
-make commands such as 'make dist' recurse into the stepmake tree
-(For a list of available targets, type @code{make help} after
-configuring).
-Stepmake (and any changes made) will be distributed with the main
-pacakage. However, StepMake doesn't lose its independency, change
-to the stepmake directory, and it'll behave as a main package.
-You shouldn't version directory names of subpackages, otherwise
-you'll see that package twice in each patch when you upgrade.
-
-@unnumberedsec Prerequisites
-
-
-To use StepMake with a package you need:
-
-@itemize @bullet
-@item A GNU system: StepMake is known to work on these GNU systems: Linux
- (PPC, intel), FreeBSD, AIX, NeXTStep, IRIX, Digital Unix and Solaris.
- If you have the Cygnus WINDOWS32 port of the GNU utils, it will even
- work in Windows NT/95, but we don't promise to support it.
-@item GNU make
-@item GNU autoconf
-@end itemize
-
-@unnumberedsec Recommended
-
-
-Although not strictly necessary, these are recommended to have.
-
-@itemize @bullet
-@item Python
-@item Yodl. All documentation will be in Yodl. (1.22.jcn3)
-@item GNU find
-@end itemize
-
-@unnumberedsec Internals
-
-
-Over time, we put a lot of effort in the configure, make, distribute
-system (CMDS) for LilyPond. Some months ago, we realised it was not
-standard GNU --- we require GNU make for building, and Python for extra
-scripting. In an effort to be more GNU, we tried automake, but after two
-weeks we realised the costs were too high for us and we reverted to our
-own system (see @file{automake.urgh}). Not long after that i was confronted
-with two other packages that lacked a decent CMDS. I realised that Lily's
-would be perfect, it's modular and easy. The only problem was to make a
-clean cut between generic and Lily specific stuff. The result was
-StepMake: a bunch of generic makefiles, found in:
-@example
-
- stepmake/stepmake/*.make
-
-@end example
-
-eneric helper scripts:
-@example
-
- stepmake/bin/*.sh
- stepmake/bin/*.py
-
-@end example
-
-and modular configure functions:
-@example
-
- stepmake/configure.in
- stepmake/aclocal.m4
- stepmake/config.hh.in
- stepmake/config.make.in
-
-@end example
-
-Of course, every package has its own configure- and make peculiarities.
-The best way to create the configure scripts is to copy them from
-stepmake@footnote{Actually, stepmake/bin/stepmakeise.sh will do
-that for you.} into you package's toplevel directory. For most
-packages, you'll only have to comment in/out some functions in
-@file{configure.in}.
-
-Package specific makefiles go in:
-@example
-
- make/Targets.make
- make/Rulese.make
- make/Substitute.make
-
-@end example
-
-and are included by the generic StepMake makefiles.
-
-@unnumberedsec Maintaining
-
-
-If you want to make and manage (binary) distributions, create and apply
-patches, you'll need some framework that's outside of the package's
-sourcetree.
-For a number of simple maintenance tasks, StepMake will therefore assume
-the following directory structure:
-
-Check and update the layout with the command:
-@example
-
- ./stepmake/bin/stepdirs.sh
-
-@end example
-
-@unnumberedsec See also
-
-
-@code{../PATCHES.txt}
-
-@unnumberedsec Configuring
-
-
-Stepmake comes with a number of precooked configure functions for
-general needs, such as AC_STEPMAKE_COMPILE for simple C development
-and AC_STEPMAKE_CXX for C++.
-
-See configure.in and comment in/out the functions that your package
-needs. For specific needs, you can write your own autoconf code,
-see @code{info autoconf}.
-
-@example
-
- doos/ # gnu/windows32 build and binary releases
- harmonia -> harmonia-x.y.z
- harmonia-x.y.z/
- lilypond -> lilypond-x.y.z # symlink to development directory
- lilypond-x.y.z/ # current development
- patches/ # patches between different releases
- RedHat/BUILD # RedHat build and binary releases
- RedHat/RPMS
- RedHat/SPECS
- releases/ # .tar.gz releases
- test/ # tarballs and diffs from current version
- yodl -> yodl-1.30.17
- yodl-1.30.17
-
-@end example
-
-with prefix @file{$HOME/usr/src}
-and (for building rpms only) in @file{$HOME/.rpmrc}:
-@example
-
- topdir: /home/fred/usr/src/RedHat
-
-@end example
-
-
-@unnumberedsec Authors
-
-@itemize @bullet
-@item @email{hanwen@@cs.uu.nl, Han-Wen Nienhuys},
- @uref{http://www.cs.uu.nl/people/hanwen}
- @*
- Main author.
-
-@item @email{janneke@@gnu.org, Jan Nieuwenhuizen},
- @uref{http://www.xs4all.nl/~jantien}
- @*
- Main author.
-@item @email{daboys@@austin.rr.com, Jeffrey B. Reed},
- Windows-nt fixes.
-@end itemize
-
-
-@bye
+++ /dev/null
-StepMake
-
-This is a simple generic make package.
-It is being used by LilyPond and Harmonia
-(and StepMake itself, of course)
-
-You're looking at her embryonal state -- things are *supposed*
-to be broken.
-
-Fixes/patches/suggestions appreciated.
-
-StepMake is Free Software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Jan Nieuwenhuizen <janneke@gnu.org>
-ftp://pcnov095.win.tue.nl/pub/lilypond/development
-
+++ /dev/null
-dnl aclocal.m4 -*-shell-script-*-
-dnl StepMake subroutines for configure.in
-
-
-### mostly interal macros
-
-# Get full path of executable ($1)
-AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [
- ## which doesn't work in ash, if /usr/bin/which isn't installed
- ## type -p doesn't work in ash
- ## command -v doesn't work in zsh
- ## command -v "$1" 2>&1
- ## this test should work in ash, bash, pdksh (ksh), zsh
- type -p $1 2>/dev/null | tail -n 1 | awk '{print $NF}'
-])
-
-
-# Get version string from executable ($1)
-AC_DEFUN(STEPMAKE_GET_VERSION, [
- ## "$1" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
- ##
- ## ARG.
- ## Workaround for broken Debian gcc version string:
- ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
- ##
- ## -V: Workaround for python
-
- changequote(<<, >>)#dnl
-
- ## Assume and hunt for dotted version multiplet.
- ## use eval trickery, because we cannot use multi-level $() instead of ``
- ## for compatibility reasons.
-
- ## grab the first version number in --version output.
- eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 |
- grep -E '(^| )[0-9][0-9]*\.[0-9]' |
- head -n 1 |
- tr ' ' '\n' |
- sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' |
- grep -E '(^| )[0-9][0-9]*\.[0-9]' |
- head -n 1\`\"
-
- if test -z "$_ver"; then
- ## If empty, try date [fontforge]
- eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\{6,8\}' \
- | head -n 1 \
- | sed -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
- fi
- echo "$_ver"
- changequote([, ])#dnl
-])
-
-# Calculate simplistic numeric version from version string ($1)
-# As yet, we have no need for something more elaborate.
-AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
- echo "$1" | awk -F. '
- {
- if ([$]3) {three = [$]3}
- else {three = 0}
- }
- {printf "%.0f\n", [$]1*1000000 + [$]2*1000 + three}'
-])
-
-
-# Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED')
-AC_DEFUN(STEPMAKE_ADD_ENTRY, [
- eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\"
-])
-
-# Check if tested program ($2) was found ($1).
-# If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
-# We could abort here if a 'REQUIRED' program is not found
-AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
- STEPMAKE_CHECK_SEARCH_RESULT($1)
- if test $? -ne 0; then
- STEPMAKE_ADD_ENTRY($3, $2)
- if test "$3" = "REQUIRED"; then
- command="echo ERROR: $2 not found"
- # abort configure process here?
- else
- command="- echo $2 not found"
- fi
- eval "$1"='$command'
- false
- else
- true
- fi
-])
-
-
-# Return if tested proram ($1) was found (true) or not (false).
-AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
- r="`eval echo '$'"$1"`"
- if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
- true
- else
- ##STEPMAKE_WARN(cannot find $2. $3)
- false
- fi
-])
-
-
-# Check version of program ($1)
-# If version ($4: optional argument, supply if version cannot be
-# parsed using --version or -V ) is smaller than requested ($3), add
-# entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
-AC_DEFUN(STEPMAKE_CHECK_VERSION, [
- r="`eval echo '$'"$1"`"
- AC_MSG_CHECKING([$r version])
- exe=`STEPMAKE_GET_EXECUTABLE($r)`
- if test -n "$4"; then
- ver="$4"
- else
- ver=`STEPMAKE_GET_VERSION($exe)`
- fi
- num=`STEPMAKE_NUMERIC_VERSION($ver)`
- req=`STEPMAKE_NUMERIC_VERSION($3)`
- AC_MSG_RESULT([$ver])
- if test "$num" -lt "$req"; then
- STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
- fi
- vervar="`echo $1 | tr '[a-z]' '[A-Z]'`_VERSION"
- eval `echo $vervar=$num`
-## AC_SUBST(`eval echo $vervar`)
-])
-
-# Check version of program ($1)
-# If version is greater than or equals unsupported ($3),
-# add entry to unsupported list ($2, 'UNSUPPORTED')
-AC_DEFUN(STEPMAKE_CHECK_VERSION_UNSUPPORTED, [
- r="`eval echo '$'"$1"`"
- AC_MSG_CHECKING([$r version])
- exe=`STEPMAKE_GET_EXECUTABLE($r)`
- ver=`STEPMAKE_GET_VERSION($exe)`
- num=`STEPMAKE_NUMERIC_VERSION($ver)`
- sup=`STEPMAKE_NUMERIC_VERSION($3)`
- AC_MSG_RESULT([$ver])
- if test "$num" -ge "$sup"; then
- STEPMAKE_ADD_ENTRY($2, ["$r < $3 (installed: $ver)"])
- fi
-])
-
-### Macros to build configure.in
-
-
-AC_DEFUN(STEPMAKE_BIBTEX2HTML, [
- STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1)
- if test "$BIBTEX2HTML" = "bib2html"; then
- BIBTEX2HTML_FLAGS='$< $(@)'
- else
- BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
- fi
- AC_SUBST(BIBTEX2HTML)
- AC_SUBST(BIBTEX2HTML_FLAGS)
-])
-
-
-AC_DEFUN(STEPMAKE_BISON, [
- # ugh, automake: we want (and check for) bison
- AC_PROG_YACC
-
- STEPMAKE_PROGS(BISON, bison, $1)
-
- # urg. should test functionality rather than version.
- if test "$BISON" = "bison" -a -n "$2"; then
- STEPMAKE_CHECK_VERSION(BISON, $1, $2)
- fi
-])
-
-AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [
- # -O is necessary to get inlining
- CFLAGS=${CFLAGS-""}
- CXXFLAGS=${CXXFLAGS-$CFLAGS}
- LDFLAGS=${LDFLAGS-""}
- optimise_b=yes
- profile_b=no
- debug_b=yes
- pipe_b=yes
-
- AC_ARG_ENABLE(debugging,
- [AS_HELP_STRING([--enable-debugging],
- [compile with debugging info. Default: on])],
- [debug_b=$enableval])
-
- AC_ARG_ENABLE(optimising,
- [AS_HELP_STRING([--enable-optimising],
- [compile with optimising. Default: on])],
- [optimise_b=$enableval])
-
- AC_ARG_ENABLE(profiling,
- [AS_HELP_STRING([--enable-profiling],
- [compile with gprof support. Default: off])],
- [profile_b=$enableval])
-
- AC_ARG_ENABLE(pipe,
- [AS_HELP_STRING([--enable-pipe],
- [compile with -pipe. Default: on])],
- [pipe_b=$enableval])
-
- if test "$optimise_b" = yes; then
- AC_DEFINE(NDEBUG)
- DEFINES="$DEFINES -DNDEBUG"
- OPTIMIZE=" -O2 -finline-functions"
- fi
-
- if test $profile_b = yes; then
- EXTRA_LIBS="-pg"
- OPTIMIZE="$OPTIMIZE -pg"
- fi
-
- if test $debug_b = yes; then
- OPTIMIZE="$OPTIMIZE -g"
- fi
-])
-
-AC_DEFUN(STEPMAKE_COMPILE, [
-
- AC_REQUIRE([STEPMAKE_COMPILE_BEFORE])
- AC_REQUIRE([AC_PROG_CC])
-
- STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
- LD='$(CC)'
- AC_SUBST(LD)
-
- # If -pipe requested, test if it works and add to CFLAGS.
- if test "$pipe_b" = yes; then
- save_cflags="$CFLAGS"
- CFLAGS=" -pipe $CFLAGS";
- AC_CACHE_CHECK([whether compiler understands -pipe],
- [stepmake_cv_cflags_pipe],
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[/* -pipe test */]])],
- [stepmake_cv_cflags_pipe=yes],
- [stepmake_cv_cflags_pipe=no]))
- CFLAGS=$save_cflags
- if test $stepmake_cv_cflags_pipe = yes; then
- OPTIMIZE="$OPTIMIZE -pipe"
- fi
- fi
-
- CFLAGS="$CFLAGS $OPTIMIZE"
- CPPFLAGS=${CPPFLAGS-""}
-
- AC_MSG_CHECKING([for IEEE-conformance compiler flags])
- save_cflags="$CFLAGS"
- case "$host" in
- alpha*-*-*)
- dnl should do compile test?
- AC_MSG_RESULT(-mieee)
- CFLAGS=" -mieee $CFLAGS"
- ;;
- *)
- AC_MSG_RESULT([none])
- ;;
- esac
-
- AC_SUBST(cross_compiling)
- AC_SUBST(CFLAGS)
- AC_SUBST(CPPFLAGS)
- AC_SUBST(LDFLAGS)
- AC_SUBST(DEFINES)
- AC_SUBST(EXTRA_LIBS)
-])
-
-AC_DEFUN(STEPMAKE_CXX, [
- AC_PROG_CXX
- STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
-
- CXXFLAGS="$CXXFLAGS $OPTIMIZE"
- LD='$(CXX)'
-
- AC_SUBST(CXX)
- AC_SUBST(CXXFLAGS)
- AC_SUBST(LD)
-])
-
-
-AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
- AC_CACHE_CHECK([whether explicit instantiation is needed],
- stepmake_cv_need_explicit_instantiation,
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- template <class T> struct foo { static int baz; };
- template <class T> int foo<T>::baz = 1;
- ]], [[ return foo<int>::baz; ]])],[stepmake_cv_need_explicit_instantiation=no],[stepmake_cv_need_explicit_instantiation=yes]))
- if test x"$stepmake_cv_need_explicit_instantiation"x = x"yes"x; then
- AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
- fi
-])
-
-AC_DEFUN(STEPMAKE_GXXCODEGENBUG, [
- AC_MSG_CHECKING([options for known g++ bugs])
- case "$GXX:$CXX_VERSION" in
- yes:400600[[0-2]])
- AC_MSG_RESULT([-fno-optimize-sibling-calls (tail call bug)])
- CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls"
- ;;
- yes:400700?)
- AC_MSG_RESULT([-fno-tree-vrp (comparison bug)])
- CXXFLAGS="$CXXFLAGS -fno-tree-vrp"
- ;;
- *) AC_MSG_RESULT([none])
- esac
- AC_SUBST(CXXFLAGS)
-])
-
-
-AC_DEFUN(STEPMAKE_DATADIR, [
- if test "$datadir" = "\${prefix}/share"; then
- datadir='${prefix}/share'
- fi
- presome=${prefix}
- if test "$prefix" = "NONE"; then
- presome=${ac_default_prefix}
- fi
-
- build_package_datadir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/share/$package
-
- DATADIR=`echo ${datadir} | sed "s!\\\${datarootdir}!${prefix}/share!"`
- DATADIR=`echo ${DATADIR} | sed "s!\\\${prefix}!$presome!"`
- BUILD_PACKAGE_DATADIR=`echo ${build_package_datadir} | sed "s!\\\${prefix}!$presome!"`
-
- AC_SUBST(datadir)
- AC_SUBST(datarootdir)
- AC_SUBST(build_package_datadir)
- AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"])
- AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"])
-])
-
-## ugh: cut & paste programming from datadir.
-AC_DEFUN(STEPMAKE_LIBDIR, [
-
- if test "$libdir" = "\${exec_prefix}/lib"; then
- libdir='${exec_prefix}/lib'
- fi
- presome=$exec_prefix
- build_package_libdir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/lib/$package
-
- LIBDIR=`echo ${libdir} | sed "s!\\\${exec_prefix}!$presome!"`
- BUILD_PACKAGE_LIBDIR=`echo ${build_package_libdir} | sed "s!\\\${exec_prefix}!$presome!"`
-
- AC_SUBST(libdir)
- AC_SUBST(build_package_libdir)
- AC_DEFINE_UNQUOTED(LIBDIR, ["${LIBDIR}"])
- AC_DEFINE_UNQUOTED(BUILD_PACKAGE_LIBDIR, ["${BUILD_PACKAGE_LIBDIR}"])
-])
-
-
-AC_DEFUN(STEPMAKE_PREFIX_EXPAND_FIXUP, [
- # undo expanding of explicit --infodir=/usr/share
- # to ease install-time override with prefix=...
- strip=`echo $includedir | eval sed s@^$prefix@@`
- if test "$includedir" = "`eval echo $prefix$strip`"; then
- includedir='${prefix}'$strip''
- fi
- strip=`echo $libdir | eval sed s@^$exec_prefix@@`
- if test "$libdir" = "`eval echo $exec_prefix$strip`"; then
- libdir='${exec_prefix}'$strip''
- fi
- strip=`echo $infodir | eval sed s@^$datarootdir@@`
- if test "$infodir" = "`eval echo $datarootdir$strip`"; then
- infodir='${datarootdir}'$strip''
- fi
- strip=`echo $mandir | eval sed s@^$datarootdir@@`
- if test "$mandir" = "`eval echo $datarootdir$strip`"; then
- mandir='${datarootdir}'$strip''
- fi
-])
-
-
-AC_DEFUN(STEPMAKE_END, [
- STEPMAKE_PREFIX_EXPAND_FIXUP
-
- AC_SUBST(OPTIONAL)
- AC_SUBST(REQUIRED)
-
- AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
- AC_OUTPUT
-
- if test -n "$OPTIONAL"; then
- echo
- echo "WARNING: Please consider installing optional programs: $OPTIONAL"
- fi
-
- if test -n "$REQUIRED"; then
- echo
- echo "ERROR: Please install required programs: $REQUIRED"
- fi
-
- if test -n "$UNSUPPORTED"; then
- echo
- echo "ERROR: Please use older version of programs: $UNSUPPORTED"
- fi
-
- if test -n "$OPTIONAL$REQUIRED$UNSUPPORTED"; then
- echo
- echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
- if test -f config.cache ; then
- echo "Remove config.cache before rerunning ./configure"
- fi
- fi
-
- if test -n "$REQUIRED$UNSUPPORTED"; then
- rm -f $srcdir/GNUmakefile
- exit 1
- fi
-
- # regular in-place build
- # test for srcdir_build = yes ?
- if test "$srcdir_build" = "yes"; then
- rm -f $srcdir/GNUmakefile
- cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
- chmod 444 $srcdir/GNUmakefile
- else
- if test -f $srcdir/GNUmakefile; then
- cat <<EOF
-Source directory already configured. Please clean the source directory
-
- make -C $srcdir distclean
-
-and rerun configure.
-EOF
- exit 2
- fi
-
- abssrcdir="`cd $srcdir; pwd`"
- absbuilddir="`pwd`"
- for d in 2 3 4 5 ; do
- for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name GNUmakefile`; do
- case "$abssrcdir" in
- "$absbuilddir"/*)
-# source is below build directory, always copy
- ;;
- *)
- case "$abssrcdir/${mf#./}" in
- "$absbuilddir"/*)
-# find descended into build directory, don't copy
- continue
- esac
- esac
- mkdir -p ${mf%/*}
- cat <<EOF | $PYTHON - > $mf
-print 'depth=' + ('../' * ( $d-1 ) )
-print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
-print 'include \$(configure-srcdir)/$mf'
-print 'MODULE_INCLUDES += \$(src-dir)/\$(outbase)'
-EOF
- done
- for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name '*.make' | grep -v config.make `; do
- case "$abssrcdir" in
- "$absbuilddir"/*)
-# source is below build directory, always copy
- ;;
- *)
- case "$abssrcdir/${mf#./}" in
- "$absbuilddir"/*)
-# find descended into build directory, don't copy
- continue
- esac
- esac
- mkdir -p ${mf%/*}
- cat <<EOF | $PYTHON - > $mf
-print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
-print 'include \$(configure-srcdir)/$mf'
-EOF
- done
- done
-
- rm -f GNUmakefile
- cat <<EOF > GNUmakefile
-depth = .
-include config\$(if \$(conf),-\$(conf),).make
-include \$(configure-srcdir)/GNUmakefile.in
-EOF
- chmod 444 GNUmakefile
- AC_SUBST(VPATH)
- fi
-])
-
-
-AC_DEFUN(STEPMAKE_FLEX, [
- # ugh, automake: we want (and check for) flex
- # AC_PROG_LEX
- # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
-
- # AC_PROG_LEX()
- # ugh, ugh
- ac_cv_prog_lex_root=lex.yy
- STEPMAKE_PROGS(FLEX, flex, $1)
-])
-
-
-AC_DEFUN(STEPMAKE_FLEXLEXER, [
- AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
- if test $? -ne 0; then
- warn='FlexLexer.h (flex package)'
- STEPMAKE_ADD_ENTRY($1, $warn)
- fi
- # check for yyFlexLexer.yy_current_buffer,
- # in 2.5.4 <= flex < 2.5.29
- AC_CACHE_CHECK([for yyFlexLexer.yy_current_buffer],
- [stepmake_cv_flexlexer_yy_current_buffer],
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-using namespace std;
-#include <FlexLexer.h>
-class yy_flex_lexer: public yyFlexLexer
-{
- public:
- yy_flex_lexer ()
- {
- yy_current_buffer = 0;
- }
-};
-]])],
- [stepmake_cv_flexlexer_yy_current_buffer=yes],
- [stepmake_cv_flexlexer_yy_current_buffer=no]))
- if test $stepmake_cv_flexlexer_yy_current_buffer = yes; then
- AC_DEFINE(HAVE_FLEXLEXER_YY_CURRENT_BUFFER, 1, [Define to 1 if yyFlexLexer has yy_current_buffer.])
- fi
-])
-
-
-
-AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [
- AC_MSG_CHECKING([FlexLexer.h location])
-
- # ugh.
- cat <<EOF > conftest.cc
-using namespace std;
-#include <FlexLexer.h>
-EOF
- FLEXLEXER_FILE=`eval $ac_cpp conftest.cc | \
- sed 's!# 1 "\(.*FlexLexer.h\)"!@FLEXLEXER@\1@@!g' | grep '@@' | \
- sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` 1> /dev/null 2> /dev/null
- rm conftest.cc
- AC_SUBST(FLEXLEXER_FILE)
- AC_MSG_RESULT($FLEXLEXER_FILE)
-])
-
-AC_DEFUN(STEPMAKE_GCC_OR_CLANG, [
- STEPMAKE_HAS_CLANG()
- if test "$HAS_CLANG" = "no"; then
- if test "$GCC" = "yes"; then
- STEPMAKE_CHECK_VERSION(CC, $1, $2)
- else
- warn="$CC (Please install *GNU* cc)"
- STEPMAKE_ADD_ENTRY($1, $warn)
- fi
- fi
- # no else, we're fine with any clang
-])
-
-AC_DEFUN(STEPMAKE_GETTEXT, [
- presome=${prefix}
- if test "$prefix" = "NONE"; then
- presome=${ac_default_prefix}
- fi
- LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"`
-
- AC_SUBST(localedir)
- AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"])
- AC_CHECK_LIB(intl, gettext)
- AC_CHECK_FUNCS(gettext)
-])
-
-
-AC_DEFUN(STEPMAKE_GUILE, [
- STEPMAKE_PATH_PROG(GUILE, guile guile1, $1)
-])
-
-
-# STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
-#
-# This macro runs the guile-config script, installed with Guile,
-# to find out where Guile's header files and libraries are
-# installed. It sets two variables, marked for substitution, as
-# by AC_SUBST.
-#
-# GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
-# code that uses Guile header files. This is almost
-# always just a -I flag.
-#
-# GUILE_LDFLAGS --- flags to pass to the linker to link a
-# program against Guile. This includes -lguile for
-# the Guile library itself, any libraries that Guile
-# itself requires (like -lqthreads), and so on. It may
-# also include a -L flag to tell the compiler where to
-# find the libraries.
-
-AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
- exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
- if test -x $exe; then
- AC_MSG_CHECKING([guile compile flags])
- GUILE_CFLAGS="`$guile_config compile`"
- AC_MSG_RESULT($GUILE_CFLAGS)
- AC_MSG_CHECKING([guile link flags])
- GUILE_LDFLAGS="`$guile_config link`"
- AC_MSG_RESULT($GUILE_LDFLAGS)
- fi
- AC_SUBST(GUILE_CFLAGS)
- AC_SUBST(GUILE_LDFLAGS)
-])
-
-
-AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
- ## First, let's just see if we can find Guile at all.
- test -n "$target_alias" && target_guile_config=$target_alias-guile-config
- test -n "$host_alias" && host_guile_config=$host_alias-guile-config
- AC_MSG_CHECKING([for guile-config])
- for guile_config in $GUILE_CONFIG $target_guile_config $host_guile_config $build_guile_config guile-config guile1-config; do
- AC_MSG_RESULT([$guile_config])
- if ! $guile_config --version > /dev/null 2>&1 ; then
- AC_MSG_WARN([cannot execute $guile_config])
- AC_MSG_CHECKING([if we are cross compiling])
- GUILE_CONFIG='echo no guile-config'
- else
- GUILE_CONFIG=$guile_config
- break
- fi
- done
- STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1)
- if test $? -ne 0; then
- STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package) or guile1-config (guile1-devel package)')
- fi
-
- STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
- # urg. should test functionality rather than version.
- if test $? -eq 0 -a -n "$2"; then
- STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2)
- fi
-
- AC_SUBST(GUILE_CONFIG)
-
- guile_version="$ver"
- changequote(<<, >>)#dnl
- GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
- GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
- GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
- changequote([, ])#dnl
- STEPMAKE_GUILE_FLAGS
- save_CPPFLAGS="$CPPFLAGS"
- save_LIBS="$LIBS"
- CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
- LIBS="$GUILE_LDFLAGS $LIBS"
- AC_CHECK_HEADERS([libguile.h])
- AC_CHECK_LIB(guile, scm_boot_guile)
- AC_CHECK_FUNCS(scm_boot_guile,,libguile_b=no)
- if test "$libguile_b" = "no"; then
- warn='libguile (libguile-dev, guile-devel or guile-dev
- package).'
- STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
- fi
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
- AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
- AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
- AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
-])
-
-
-AC_DEFUN(STEPMAKE_DLOPEN, [
- AC_CHECK_LIB(dl, dlopen)
- AC_CHECK_FUNCS(dlopen)
-])
-
-AC_DEFUN(STEPMAKE_HAS_CLANG, [
- AC_EGREP_CPP(yes,
- [#ifdef __clang__
- yes
- #endif
- ], HAS_CLANG=yes, HAS_CLANG=no)
-])
-
-AC_DEFUN(STEPMAKE_GXX_OR_CLANG, [
- STEPMAKE_HAS_CLANG()
- if test "$HAS_CLANG" = "no"; then
- if test "$GXX" = "yes"; then
- STEPMAKE_CHECK_VERSION(CXX, $1, $2)
- else
- warn="$CXX (Please install *GNU* c++)"
- STEPMAKE_ADD_ENTRY($1, $warn)
- fi
- fi
- # no else, we're fine with any clang
-])
-
-
-AC_DEFUN(STEPMAKE_INIT, [
-
- . $srcdir/VERSION
- FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
- MICRO_VERSION=$PATCH_LEVEL
- TOPLEVEL_VERSION=$FULL_VERSION
- if test x$MY_PATCH_LEVEL != x; then
- FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
- fi
- VERSION=$FULL_VERSION
- export MAJOR_VERSION MINOR_VERSION PATCH_LEVEL
- # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
- changequote(<<, >>)#dnl
- PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
- package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
- changequote([, ])#dnl
-
- # No versioning on directory names of sub-packages
- # urg, urg
- stepmake=${datadir}/stepmake
- presome=${prefix}
- if test "$prefix" = "NONE"; then
- presome=${ac_default_prefix}
- fi
- stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
-
- # urg, how is this supposed to work?
- if test "$program_prefix" = "NONE"; then
- program_prefix=
- fi
- if test "$program_suffix" = "NONE"; then
- program_suffix=
- fi
-
- AC_MSG_CHECKING(Package)
- if test "$PACKAGE" = "STEPMAKE"; then
- AC_MSG_RESULT(Stepmake package!)
-
- AC_MSG_CHECKING(builddir)
-
- ugh_ugh_autoconf250_builddir="`pwd`"
-
- if test "$srcdir" = "."; then
- srcdir_build=yes
- else
- srcdir_build=no
- package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
- package_srcdir="`dirname $srcdir`"
- fi
- AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
-
- (cd stepmake 2>/dev/null || mkdir stepmake)
- (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
- stepmake=stepmake
- else
- AC_MSG_RESULT($PACKAGE)
-
- AC_MSG_CHECKING(builddir)
- ugh_ugh_autoconf250_builddir="`pwd`"
-
- here_dir=$(cd . && pwd)
- full_src_dir=$(cd $srcdir && pwd)
-
- if test "$full_src_dir" = "$here_dir"; then
- srcdir_build=yes
- else
- srcdir_build=no
- fi
- AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
-
- AC_MSG_CHECKING(for stepmake)
- # Check for installed stepmake
- if test -d $stepmake; then
- AC_MSG_RESULT($stepmake)
- else
- stepmake="`cd $srcdir/stepmake; pwd`"
- AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
- fi
- fi
-
- AC_SUBST(ugh_ugh_autoconf250_builddir)
-
- # Use absolute directory for non-srcdir builds, so that build
- # dir can be moved.
- if test "$srcdir_build" = "no" ; then
- srcdir="`cd $srcdir; pwd`"
- fi
-
- AC_SUBST(srcdir)
- AC_SUBST(stepmake)
- AC_SUBST(package)
- AC_SUBST(PACKAGE)
- AC_SUBST(PACKAGE_NAME)
- AC_SUBST(VERSION)
- AC_SUBST(MAJOR_VERSION)
- AC_SUBST(MINOR_VERSION)
- AC_SUBST(MICRO_VERSION)
-
- # stepmake nonstandard names
- AC_SUBST(PATCH_LEVEL)
- AC_SUBST(TOPLEVEL_VERSION)
-
- # We don't need the upper case variant,
- # so stick to macros are uppercase convention.
- # AC_DEFINE_UNQUOTED(package, ["${package}"])
- # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
- AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
- AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
- AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
-
- if test -z "$package_depth"; then
- package_depth="."
- else
- package_depth="../$package_depth"
- fi
- export package_depth
- AC_SUBST(package_depth)
-
- AUTOGENERATE="This file was automatically generated by configure"
- AC_SUBST(AUTOGENERATE)
-
- CONFIGSUFFIX=
- AC_ARG_ENABLE(config,
- [AS_HELP_STRING([--enable-config=CONF],
- [put settings in config-CONF.make and config-CONF.h;
- do `make conf=CONF' to get output in ./out-CONF])],
- [CONFIGURATION=$enableval])
-
- ##'`#
-
- test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
- CONFIGFILE=config$CONFIGSUFFIX
- AC_SUBST(CONFIGSUFFIX)
-
- AC_CANONICAL_HOST
- STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
- STEPMAKE_PROGS(FIND, find, REQUIRED)
-
- STEPMAKE_PROGS(TAR, tar, REQUIRED)
-
- if test "$(echo 2)" != "2" ||
- test "x`uname`" = "xHP-UX"; then
- AC_PATH_PROG(KSH, ksh, /bin/ksh)
- AC_PATH_PROG(BASH, bash, $KSH)
- STEPMAKE_WARN(avoiding buggy /bin/sh)
- AC_PATH_PROG(SHELL, bash, $KSH)
- else
- SHELL=/bin/sh
- AC_PATH_PROG(BASH, bash, $SHELL)
- fi
- AC_SUBST(SHELL)
-
- STEPMAKE_PYTHON(REQUIRED, 1.5)
-
- if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
- $MAKE -v 2> /dev/null | grep GNU > /dev/null
- if test "$?" = 1; then
- warn='make (Please install *GNU* make)'
- # STEPMAKE_WARN($warn)
- STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
- fi
- fi
-
- ROOTSEP=':'
- DIRSEP='/'
- PATHSEP=':'
- LN=ln
- LN_S='ln -s'
- ZIP="zip -r -9"
-
- AC_SUBST(program_prefix)
- AC_SUBST(program_suffix)
- AC_SUBST(ZIP)
- AC_SUBST(LN)
- AC_SUBST(LN_S)
- AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
- AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
- AC_SUBST(DIRSEP)
- AC_SUBST(PATHSEP)
- AC_SUBST(ROOTSEP)
-
- STEPMAKE_DATADIR
- STEPMAKE_LIBDIR
-])
-
-
-AC_DEFUN(STEPMAKE_LIB, [
- STEPMAKE_PROGS(AR, ar, $1)
- AC_PROG_RANLIB
- STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
-])
-
-
-AC_DEFUN(STEPMAKE_LIBTOOL, [
- # libtool.info ...
- # **Never** try to set library version numbers so that they correspond
- # to the release number of your package. This is an abuse that only
- # fosters misunderstanding of the purpose of library versions.
-
- REVISION=$PATCH_LEVEL
- # CURRENT=$MINOR_VERSION
- CURRENT=`expr $MINOR_VERSION + 1`
- # AGE=`expr $MAJOR_VERSION + 1`
- AGE=$MAJOR_VERSION
- AC_SUBST(CURRENT)
- AC_SUBST(REVISION)
- AC_SUBST(AGE)
-])
-
-
-AC_DEFUN(STEPMAKE_LOCALE, [
- lang=English
- ALL_LINGUAS="en nl"
-
- # with/enable ??
- AC_ARG_WITH(localedir,
- [AS_HELP_STRING([--with-localedir=DIR],
- [location of locales. Default: PREFIX/share/locale])],
- localedir=$with_localedir,
- localedir='${prefix}/share/locale')
-
- AC_ARG_WITH(lang,
- [AS_HELP_STRING([--with-lang=LANG],
- [use LANG as language to emit messages])],
- language=$with_lang,
- language=English)
-
- AC_MSG_CHECKING(language)
- case "$language" in
- En* | en* | Am* | am* | US* | us*)
- lang=English;;
- NL | nl | Du* | du* | Ned* | ned*)
- lang=Dutch;;
- "")
- lang=English;;
- *)
- lang=unknown;;
- esac
- AC_MSG_RESULT($lang)
-
- if test "$lang" = "unknown" ; then
- STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
- fi
-
-])
-
-
-AC_DEFUN(STEPMAKE_MAKEINFO, [
- STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
-])
-
-
-AC_DEFUN(STEPMAKE_MAN, [
- STEPMAKE_PROGS(GROFF, groff ditroff, $1)
- AC_SUBST(GROFF)
- STEPMAKE_PROGS(TROFF, troff, $1)
- AC_SUBST(TROFF)
- STEPMAKE_PROGS(TBL, tbl, $1)
- AC_SUBST(TBL)
-])
-
-
-AC_DEFUN(STEPMAKE_MSGFMT, [
- STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
-])
-
-
-# Check for program ($2), set full path result to ($1).
-# If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
-AC_DEFUN(STEPMAKE_PATH_PROG, [
- AC_CHECK_PROGS($1, $2, no)
- STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
- if test $? -eq 0; then
- AC_PATH_PROGS($1, $2)
- if test -n "$4"; then
- STEPMAKE_CHECK_VERSION($1, $3, $4)
- fi
- fi
-])
-
-
-# Check for program in set of names ($2), set result to ($1) .
-# If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
-# If exists, and a minimal version ($4) is required
-AC_DEFUN(STEPMAKE_PROGS, [
- AC_CHECK_PROGS($1, $2, no)
- STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
- if test $? -eq 0 -a -n "$4"; then
- STEPMAKE_CHECK_VERSION($1, $3, $4)
- fi
-])
-
-
-AC_DEFUN(STEPMAKE_PERL, [
- STEPMAKE_PATH_PROG(PERL, perl, $1)
-])
-
-
-AC_DEFUN(STEPMAKE_PYTHON, [
- unset pv
- AC_MSG_CHECKING([for python])
- for python in $PYTHON python python2 python2.4 python2.3 python2.2 python2.1 python2.0; do
- AC_MSG_RESULT([$python])
- if ! $python -V > /dev/null 2>&1 ; then
- #AC_MSG_WARN([cannot execute $python])
- PYTHON='echo no python'
- else
- unset pv
- STEPMAKE_CHECK_VERSION(python, pv, $2)
- if test -z "$pv"; then
- PYTHON=$python
- break
- fi
- fi
- done
- if test -n "$pv"; then
- STEPMAKE_ADD_ENTRY($1, $pv)
- fi
- # clear cached value since arg 2 might point us to a new binary
- unset ac_cv_path_PYTHON
-
- AC_PATH_PROG(PYTHON, $PYTHON)
- AC_SUBST(PYTHON)
-])
-
-AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
- AC_ARG_WITH(python-include,
- [AS_HELP_STRING([--with-python-include=DIR],
- [location of the python include dir])],[
- if test "$withval" = "yes" -o "$withval" = "no"; then
- AC_MSG_WARN(Usage: --with-python-include=includedir)
- else
- PYTHON_CFLAGS="-I${withval}"
- fi
- ])
-
- AC_ARG_WITH(python-lib,
- [AS_HELP_STRING([--with-python-lib=NAME],
- [name of the python lib])],[
- if test "$withval" = "yes" -o "$withval" = "no"; then
- AC_MSG_WARN(Usage: --with-python-lib=name)
- else
- LDFLAGS="$LDFLAGS -l${withval}"
- fi
- ])
-
- AC_CHECK_PROGS(PYTHON_CONFIG, python-config, no)
-
- if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
- # Clean out junk: http://bugs.python.org/issue3290
- # Python headers may need some -f* flags, leave them in.
- # We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
- #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
- # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
- # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
- # Tentative fix to require a non alphanumeric character before the initial hyphen of the BRE or the hyphen being the first character in the string.
- PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
- PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
- fi
-
- if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then
- changequote(<<, >>)#dnl
- # alternatively, for python >= 2.0
- # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
- PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
- PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
- changequote([, ])#dnl
- fi
-
- if test -z "$PYTHON_HEADER"; then
- CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
- AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
- fi
-
- if test -z "$PYTHON_HEADER"; then
- warn="Python.h (python-devel, python-dev or libpython-dev package)"
- STEPMAKE_ADD_ENTRY($1, $warn)
- fi
-])
-
-
-
-AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [
- AC_CACHE_CHECK([for stl.data () method],
- [stepmake_cv_stl_data_method],
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <vector>
-using namespace std;
-vector <int> v;
-void *p = v.data ();
-]])],
- [stepmake_cv_stl_data_method=yes],
- [stepmake_cv_stl_data_method=no]))
- if test $stepmake_cv_stl_data_method = yes; then
- AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method])
- fi
-])
-
-
-AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
- # ugh
- STEPMAKE_PROGS(KPSEWHICH, kpsewhich, OPTIONAL)
-])
-
-AC_DEFUN(STEPMAKE_TEXMF, [
- STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1)
- STEPMAKE_PROGS(METAPOST, mpost, $1)
-
- AC_MSG_CHECKING(for working metafont mode)
- modelist='ljfour lj4 lj3 lj2 ljet laserjet'
- for MFMODE in $modelist; do
- $METAFONT -progname=mf "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
- if test -f mfput.tfm; then
- break;
- fi
- done
- AC_MSG_RESULT($MFMODE)
-
- rm -f mfput.*
-
- AC_SUBST(MFMODE)
-])
-
-
-AC_DEFUN(STEPMAKE_WARN, [
- AC_MSG_WARN($1)
- warn_b=yes
-])
-
-
-dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
-dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
-dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN(PKG_CHECK_MODULES, [
- succeeded=no
-
- if test -z "$PKG_CONFIG"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- fi
-
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- PKG_CONFIG_MIN_VERSION=0.9.0
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- AC_MSG_CHECKING(for $2)
-
- if $PKG_CONFIG --exists "$2" ; then
- AC_MSG_RESULT(yes)
- succeeded=yes
-
- AC_MSG_CHECKING($1_CFLAGS)
- $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
- AC_MSG_RESULT($$1_CFLAGS)
-
- AC_MSG_CHECKING($1_LIBS)
- $1_LIBS=`$PKG_CONFIG --libs "$2"`
- AC_MSG_RESULT($$1_LIBS)
- else
- $1_CFLAGS=""
- $1_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
- ifelse([$4], ,echo $$1_PKG_ERRORS,)
- fi
-
- AC_SUBST($1_CFLAGS)
- AC_SUBST($1_LIBS)
- fi
- fi
-
- if test $succeeded = yes; then
- ifelse([$3], , :, [$3])
- else
- ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
- fi
-])
-
-AC_DEFUN(STEPMAKE_FREETYPE2, [
- PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
- if test "$have_freetype2" = yes; then
- AC_DEFINE(HAVE_FREETYPE2)
- save_CPPFLAGS="$CPPFLAGS"
- save_LIBS="$LIBS"
- CPPFLAGS="$FREETYPE2_CFLAGS $CPPFLAGS"
- LIBS="$FREETYPE2_LIBS $LIBS"
- AC_SUBST(FREETYPE2_CFLAGS)
- AC_SUBST(FREETYPE2_LIBS)
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
- else
- # UGR
- #r="lib$1-dev or $1-devel"
- r="libfreetype6-dev or freetype?-devel"
- ver="`pkg-config --modversion $1`"
- STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
- fi
-])
-
-AC_DEFUN(STEPMAKE_PANGO, [
- PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
- if test "$have_pango16" = yes ; then
- AC_DEFINE(HAVE_PANGO16)
- # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
- save_CPPFLAGS="$CPPFLAGS"
- save_LIBS="$LIBS"
- CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
- LIBS="$PANGO_LIBS $LIBS"
- AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
- AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
- AC_SUBST(PANGO_CFLAGS)
- AC_SUBST(PANGO_LIBS)
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
- else
- # UGR
- #r="lib$1-dev or $1-devel"
- r="libpango1.0-dev or pango1.0-devel"
- ver="`pkg-config --modversion $1`"
- STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
- fi
-])
-
-AC_DEFUN(STEPMAKE_PANGO_FT2, [
- PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3, have_pangoft2=yes, true)
- if test "$have_pangoft2" = yes ; then
- AC_DEFINE(HAVE_PANGO16)
- AC_DEFINE(HAVE_PANGO_FT2)
- # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
- save_CPPFLAGS="$CPPFLAGS"
- save_LIBS="$LIBS"
- CPPFLAGS="$CPPFLAGS $PANGO_FT2_CFLAGS"
- LIBS="$PANGO_FT2_LIBS $LIBS"
- AC_CHECK_HEADERS([pango/pangoft2.h])
- AC_CHECK_FUNCS([pango_ft2_font_map_create_context])
- AC_SUBST(PANGO_FT2_CFLAGS)
- AC_SUBST(PANGO_FT2_LIBS)
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
- else
- # UGR
- #r="lib$1-dev or $1-devel"e
- r="libpango1.0-dev or pango?-devel"
- ver="`pkg-config --modversion $1`"
- STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
- fi
-])
-
-AC_DEFUN(STEPMAKE_FONTCONFIG, [
- PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
- if test "$have_fontconfig" = yes ; then
- AC_DEFINE(HAVE_FONTCONFIG)
- # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
- save_CPPFLAGS="$CPPFLAGS"
- save_LIBS="$LIBS"
- CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
- LIBS="$FONTCONFIG_LIBS $LIBS"
- AC_SUBST(FONTCONFIG_CFLAGS)
- AC_SUBST(FONTCONFIG_LIBS)
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
- else
- r="lib$1-dev or $1-devel"
- ver="`pkg-config --modversion $1`"
- STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
- fi
-])
-
-AC_DEFUN(STEPMAKE_WINDOWS, [
- AC_CYGWIN
- AC_MINGW32
-
- if test "$CYGWIN" = "yes"; then
- LN_S='cp -r' # Cygwin symbolic links do not work for native apps.
- program_suffix=.exe
- INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
- elif test "$MINGW32" = "yes"; then
- LN='cp -r'
- LN_S='cp -r'
- program_suffix=.exe
- INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
- PATHSEP=';'
- fi
-
- AC_SUBST(LN)
- AC_SUBST(LN_S)
- AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
- AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
- AC_SUBST(DIRSEP)
- AC_SUBST(PATHSEP)
- AC_SUBST(program_suffix)
-
- AC_MSG_CHECKING([for some flavor of Windows])
- if test "$CYGWIN$MINGW32" = "nono"; then
- PLATFORM_WINDOWS=no
- else
- PLATFORM_WINDOWS=yes
- fi
- AC_MSG_RESULT([$PLATFORM_WINDOWS])
- AC_SUBST(PLATFORM_WINDOWS)
- STEPMAKE_PROGS(WINDRES, $target-windres windres, x)
- AC_SUBST(WINDRES)
-])
+++ /dev/null
-#!/bin/sh
-# Run this to generate configure and initial GNUmakefiles
-
-srcdir=`dirname $0`
-
-case $1 in
- --noconf*) NOCONFIGURE=true;;
-esac
-
-if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then
- echo "stepmake/aclocal.m4 is newer. Copying file."
- cp -f stepmake/aclocal.m4 aclocal.m4
-fi
-
-if [ ! -f autogen.sh -o stepmake/autogen.sh -nt autogen.sh ]; then
- echo "stepmake/autogen.sh is newer. Copying file."
- cp -f stepmake/autogen.sh autogen.sh
- exec ./autogen.sh "$@"
-fi
-
-for i in $srcdir/configure.in #`find $srcdir -name configure.in -print`
-do
- dir=`dirname $i`
- echo processing $dir
- (
- cd $dir
- echo "Running autoconf ..."
- autoconf || exit 1
- )
- # Autoconf automatically checks its own minimum required
- # version, and it aborts when the check fails.
- test "$?" -eq 1 && exit 1
-done
-
-#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
-if test -n "$NOCONFIGURE"; then
- echo Skipping configure process.
- exit 0
-fi
-
-if test -z "$*"; then
- cat <<EOF
- Warning: about to run \`configure' without arguments.
- arguments on the \`$0' command line
- will be passed to \`configure'.
-
- Invoke with --noconfigure to skip configure step.
-EOF
-fi
-
-echo Running $srcdir/configure $conf_flags "$@" ...
-$srcdir/configure $conf_flags "$@"
+++ /dev/null
-# bin/Makefile
-
-depth = ../..
-EXTRA_DIST_FILES = install-sh config.sub config.guess
-STEPMAKE_TEMPLATES=script install
-
-include $(depth)/make/stepmake.make
-
-POST_INSTALL=chmod 755 $(datadir)/bin/*
-INSTALLATION_DIR=$(datadir)/bin
-INSTALLATION_FILES=$(DIST_FILES)
+++ /dev/null
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
-
-timestamp='2010-04-03'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' HUP INT TERM
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[456])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
+++ /dev/null
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
-
-timestamp='2010-05-21'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze)
- basic_machine=microblaze-xilinx
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
- ;;
- tile*)
- basic_machine=tile-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -nacl*)
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- tic54x-*)
- os=-coff
- ;;
- tic55x-*)
- os=-coff
- ;;
- tic6x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
+++ /dev/null
-#!/bin/sh
-
-IDENTIFICATION=fake-msgfmt.sh
-
-OUTPUT='/dev/null'
-
-while getopts ':d:o:' OPT;
-do
-case $OPT in
-o)
- OUTPUT=$OPTARG
- ;;
-*)
- ;;
- esac
-done
-
-
-
-shift `expr $OPTIND - 1`
-#
-# Input file name
-#
-if [ "$1" = "" ]
-then
- echo "$IDENTIFICATION: No input file name given"
- exit 1
-fi
-
-echo Faking msgfmt: copying $1 to $OUTPUT
-
-
-cp $1 $OUTPUT
+++ /dev/null
-#!@PYTHON@
-import string
-import getopt
-import sys
-import os
-import shutil
-(opts, args) = getopt.getopt (sys.argv[1:], 'b:cdg:m:o:st:', [])
-transform_base = None
-group = None
-owner = None
-transform = None
-mode = None
-copy = False
-create_dir = False
-
-for (o,a) in opts:
- if o == '-b':
- transform_base = a
- elif o == '-c':
- copy = True
- elif o == '-d':
- create_dir = True
- elif o == '-g':
- group = a
- elif o == '-m':
- mode = string.atoi (a, 8)
- elif o == '-o':
- owner = a
- elif o == '-s':
- strip = True
- elif o == '-t':
- transform = a
- elif o == '-h':
- print ''' Usage: $0 [OPTION]... SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 -d DIRECTORIES...
-
-In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
-In the second, create the directory path DIR.
-
-Options:
--b=TRANSFORMBASENAME
--c copy source (using $cpprog) instead of moving (using $mvprog).
--d create directories instead of installing files.
--g GROUP $chgrp installed files to GROUP.
--m MODE $chmod installed files to MODE.
--o USER $chown installed files to USER.
--s strip installed files (using $stripprog).
--t=TRANSFORM
---help display this help and exit.
---version display version info and exit.'''
- sys.exit (0)
-
-if not mode:
- if create_dir:
- mode = 0755
- else:
- mode = 0644
-
-
-chown_me = []
-
-dest = None
-if not create_dir:
- dest = args.pop()
-
-for f in args:
- if create_dir:
- if os.path.isdir (f):
- continue
-
- os.makedirs (f, mode=mode)
- chown_me.append (f)
- else:
- if copy:
- if os.path.exists (dest) and not os.path.isdir (dest):
- os.remove (dest)
- shutil.copy2 (f, dest)
- else:
- shutil.move (f, dest)
-
- if os.path.isdir (dest):
- chown_me.append (os.path.join (dest, os.path.basename (f)))
- else:
- chown_me.append (dest)
-
-for f in chown_me:
- os.chmod (f, mode)
- if group <> None or owner <> None:
- os.chown (f, group, owner)
-
-
-
-
-
+++ /dev/null
-
-import re
-import sys
-
-PROGRAM = sys.argv[0]
-VERSION = sys.argv[1]
-defs = []
-for i in open (VERSION).readlines ():
- i = re.sub ('#.*','', i)
- m = re.search ('([^ =]*)[\t ]*=[ \t]*([^ \t]*)[ \t]*\n', i)
- if m:
- defs.append ((m.group (1), m.group (2)))
-
-sys.stdout.write (r'''
-/*
- Automatically generated from %(VERSION)s
- by %(PROGRAM)s.
-*/
-#ifndef VERSION_HH
-#define VERSION_HH
-''' % vars ())
-
-for name, expansion in defs:
- # GUILE leaks autoconf data into userspace.
- sys.stdout.write (r'''
-#ifdef %(name)s
-#undef %(name)s
-#endif /* %(name)s */
-#define %(name)s "%(expansion)s"
-''' % vars ())
-
-if ('MY_PATCH_LEVEL', '') in defs:
- sys.stdout.write (r'''
-#define NO_MY_PATCHLEVEL
-#define TOPLEVEL_VERSION MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL
-''')
-else:
- sys.stdout.write (r'''
-#define TOPLEVEL_VERSION MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL "." MY_PATCH_LEVEL
-''')
-
-sys.stdout.write(r'''
-#endif /* VERSION_HH */
-''')
-
+++ /dev/null
-"""Winnt access into /etc/passwd via account name"""
-
-import sys
-import string
-
-def getpwname( name, pwfile='/etc/passwd' ):
- "Get password record that matches the specified name"
- try:
- _fd = open( pwfile, 'r' )
- except:
- sys.stderr.write("Error unable to locate" + pwfile + "\n")
- sys.stderr.write("Consult gnu-win32 command mkpasswd\n")
- sys.exit(1)
-
- _data = _fd.read()
- _fd.close()
-
- for _line in string.split(_data, '\n'):
- _record=string.split( _line, ':' );
- if _record[0] == name:
- return _record
- return ()
-
-def _test():
- pw = getpwname( 'jeff' )
- print pw[4]
-
-if __name__ == '__main__':
- _test()
+++ /dev/null
-#!/bin/sh
-# stepmakeise.sh
-
-help () {
- cat <<EOF
-Usage: ../stepmake-x.x.x/bin/stepmakeise.sh
-Include or update package's StepMake.
-EOF
-}
-
-name=`basename $0`
-reldir=../releases
-stepbin=`dirname $0`
-
-if [ $# -ne 0 ]; then
- help
- exit 2
-fi
-
-value ()
-{
- expression=`echo $1 | sed 's/\./ \\\\\* 100 + /g'`
- # urg? $1=`expr $expression`
- urg=/tmp/stepmakeise.$$
- echo expr $expression > $urg
- echo `. $urg`
- rm -f $urg
-}
-
-if [ -r stepmake ]; then
- . ./stepmake/VERSION
- if [ "x$PACKAGE_NAME" != "xStepMake" ]; then
- echo "$name: huh 1?"
- exit 1
- fi
- echo "Stepmake found"
- printf "Checking version..."
- VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
- # urg
- version=$VERSION
- if [ "$MY_PATCH_LEVEL" != "" ]; then
- VERSION=$VERSION.$MY_PATCH_LEVEL
- fi
- echo " $version"
-else
- VERSION="0.0.0"
- version=$VERSION
-fi
-
-if [ true ]; then
- # urg
- printf "Checking latest..."
- if [ ! -r $reldir ]; then
- echo "$name: huh 2?"
- exit 1
- fi
- LATEST=`cd $reldir; ls -t1 stepmake-*.tar.gz | head -n 1 | sed 's!stepmake-!!' | sed 's!.tar.gz!!'`
- # urg
- latest=`echo $LATEST | sed 's/\.[a-zA-Z][a-zA-Z]*[0-9]*$//'`
- latest_val=`value $latest`
- echo " $latest"
- version_val=`value $version`
- if [ $latest_val -le $version_val ]; then
- echo "relax, StepMake is up to date"
- exit 0
- fi
- printf "Updating StepMake..."
- (set +x; rm -rf stepmake; tar xzf $reldir/stepmake-$LATEST.tar.gz; mv stepmake-$LATEST stepmake)
- echo "ok"
-fi
-
-if [ -r VERSION ]; then
- echo "$name: warning: VERSION found: not stepmakeising"
- echo "You should rerun configure"
- rm -f Makefile
- exit 0
-fi
-
-files="VERSION make aclocal.in configure.in config.hh.in config.make.in"
-for i in $files; do
- if [ -r $i ]; then
- echo "$name: can't stepmakise: $i already present"
- exit 1
- fi
-done
-
-printf "Stepmakeising..."
-for i in $files; do
- cp -prv stepmake/$i .
-done
-
-cat <<EOF
-ok
-Please edit the folowing files to your package's needs:
-
- VERSION
- configure.in
-
-and look at:
-
- make/Toplevel.make.in
- config.hh.in
- config.make.in
-EOF
-
+++ /dev/null
-#@PYTHON@
-import os
-import re
-import string
-import sys
-
-
-entities = {
- "&" : 'amp',
- "`" : 'apos',
- '>' : 'gt',
- '<' : 'lt',
- '"' : 'quot',
- }
-
-def txt2html (s):
- for i in entities.keys ():
- s = re.sub (i, '\001' + entities[i] + ';', s);
- s = re.sub ('\001', '&', s);
- return s
-
-for a in sys.argv[1:]:
- # hmm, we need: text2html out/foe.txt -> out/foe.html,
- # -o is a bit overkill?
- # outfile = os.path.basename (os.path.splitext(a)[0]) + '.html'
- outfile = os.path.splitext(a)[0] + '.html'
-
- try:
- os.unlink(outfile)
- except:
- pass
-
- s = r"""
-
-<html>
-<head>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-</head>
-
-<body><pre>
-%s
-</pre></body></html>
-""" % txt2html (open (a).read ())
- open (outfile, 'w').write (s)
-
-
+++ /dev/null
-/* @configure_input@ */
-
-/* Hmm */
-#define PACKAGE "@package@"
-
-/* Toplevel version */
-#define TOPLEVEL_VERSION "@TOPLEVEL_VERSION@"
-
-/* default init and input dir */
-#define DATADIR "@DATADIR@"
-
-/* default locale dir */
-#define LOCALEDIR "@LOCALEDIR@"
-
+++ /dev/null
-dnl configure.in -*-shell-script-*-
-dnl Process this file with autoconf to produce a configure script.
-
-# Bootstrap the init proces.
-AC_INIT
-
-# Bootstrap StepMake configure
-# For user package:
-# AC_CONFIG_AUX_DIR(stepmake/bin)
-# For stepmake package:
-AC_CONFIG_AUX_DIR(bin)
-STEPMAKE_INIT
-
-# List a file that identifies your package.
-AC_CONFIG_SRCDIR([make/stepmake.lsm.in])
-# Move to aclocal.m4?
-AC_CONFIG_HEADER([$CONFIGFILE.h:config.hh.in])
-
-# For all packages except the StepMake package itself
-# AC_CONFIG_SUBDIRS(stepmake)
-
-CC=echo
-AC_SUBST(CC)
-# Uncomment the configuration options your package needs.
-# STEPMAKE_COMPILE
-# AC_CHECK_HEADERS([limits.h malloc.h string.h unistd.h values.h])
-# STEPMAKE_CXX
-# STEPMAKE_GXX
-# STEPMAKE_CXXTEMPLATE
-# STEPMAKE_LEXYACC
-# STEPMAKE_LIB
-# STEPMAKE_LIBTOOL
-STEPMAKE_LOCALE
-# STEPMAKE_GETTEXT
-# STEPMAKE_MAN
-# STEPMAKE_MSGFMT
-# STEPMAKE_TEXMF
-# STEPMAKE_TEXMF_DIRS
-
-# AM_PATH_GTK(1.0.0,,AC_MSG_ERROR([please install proper version of gtk]))
-# AM_PATH_GTK__(0.9.4,,AC_MSG_ERROR([please install proper version of gtk--]))
-
-AC_CHECK_PROGS(MAKEINFO, makeinfo, error)
-
-STEPMAKE_END
+++ /dev/null
-# title makefile for stepmake
-
-# subdir level:
-#
-depth = ../..
-#
-
-# descent order into subdirectories:
-#
-SUBDIRS =
-#
-
-STEPMAKE_TEMPLATES=makedir install
-
-# bootstrap stepmake:
-#
--include $(depth)/make/stepmake.make
-
-ifeq ($(PACKAGE),STEPMAKE)
-INSTALLATION_DIR=$(datadir)/stepmake
-else
-INSTALLATION_DIR=$(dir $(patsubst %/, %, $(dir $(datadir))))$(package)/stepmake/stepmake
-endif
-INSTALLATION_FILES=GNUmakefile $(MAKE_FILES)
-
at-dir = $(doc-dir)
at-ext = .in
-
-EXTRA_DIST_FILES += $(call src-wildcard,*.ihtml)
-.PHONY : all clean bin-clean config default dist exe help html lib TAGS\
+.PHONY : all clean bin-clean default dist exe help html lib TAGS\
po doc doc-stage-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2\
log-clean
all: default
$(LOOP)
-bin:
- $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C lily
-
man:
$(LOOP)
$(MAKE) -C $(depth) dist
endif
-distclean: clean
- $(MAKE) local-distclean
-
-cvs-clean:
- $(MAKE) local-distclean
- rm -rf out
- rm -rf out-www
- rm -f aclocal.m4 configure
-
-maintainerclean:
- $(LOOP)
- $(MAKE) local-maintainerclean
- $(MAKE) local-distclean
-
-
-# This doesn't allow command-line options, is it really useful? -jm
-config:
- ./$(src-depth)/configure
-
-
generic-help:
@echo "Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)"
@echo "Usage: make ["VARIABLE=value"]... [TARGET]"
@echo " doc-clean clean \`out-www' directory"
@echo " install install programs and data (prefix=$(prefix))"
@echo " uninstall uninstall programs and data"
+ @echo " test build regression tests for the program and scripts"
@echo
@echo " *Note: Prepend \`local-' (eg. \`local-clean') to restrict"
@echo " any of the above commands to the current directory."
@echo
@echo "Other generic targets:"
@echo " default same as the empty target"
- @echo " bin check the lily directory and rebuild lilypond.exe if needed"
@echo " exe update all executables"
@echo " help this help"
@echo " lib update all libraries"
+ @echo " log-clean remove .log files"
@echo " TAGS generate tagfiles"
@echo
- @echo "\`make' may be invoked from any subdirectory."
+ @echo "\`make' may be invoked from any subdirectory that contains a GNUmakefile."
local-help:
-local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
- mkdir -p $(distdir)/$(localdir)
- $(LN) $(DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir)
-
- case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
- $(LN) $(NON_ESSENTIAL_DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir);; \
- esac
- case "$(OUT_DIST_FILES)x" in x) ;; *) \
- mkdir -p $(distdir)/$(localdir)/$(outdir); \
- $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
+local-dist: $(OUT_DIST_FILES)
+ case "$(OUT_DIST_FILES)x" in x) ;; \
+ *) mkdir -p $(distdir)/$(localdir)/$(outdir) && \
+ $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
esac
$(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
$(ERROR_LOG) ; \
fi
-$(outdir)/version.hh: $(depth)/VERSION $(config_make) $(step-bindir)/make-version.py
- $(PYTHON) $(step-bindir)/make-version.py $< > $@
+# Don't use $(buildscript-dir)/make-version, because it is not known whether
+# build process has visited scripts/build
+$(outdir)/version.hh: $(depth)/VERSION $(config_make) $(top-src-dir)/scripts/build/make-version.py
+ $(PYTHON) $(top-src-dir)/scripts/build/make-version.py $< > $@
$(outdir)/config.hh: $(config_h)
cp -p $< $@
local-distclean:
-local-maintainerclean:
-
install-strip:
$(MAKE) INSTALLPY="$(INSTALLPY) -s" install
$(MAKE) out=www WWW-post
doc-stage-1:
+ $(MAKE) -C $(top-build-dir)/Documentation/po out=www messages
$(MAKE) -C $(depth)/scripts/build out=
$(MAKE) out=www WWW-1
doc-dir = $(src-depth)/Documentation
po-srcdir = $(src-depth)/po
po-outdir = $(depth)/po/$(outdir)
-step-bindir = $(stepmake)/bin
# stepmake package support.
DEPTH = $(depth)/$(package-depth)
-INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c
+INSTALLPY=$(buildscript-dir)/install -c
INSTALL=$(INSTALLPY)
group-dir = $(shell cd $(DEPTH);pwd)/..
M4 = m4
-DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(call src-wildcard,SConscript)
DOCDIR=$(depth)/$(outdir)
#?
OUTSPEC_FILES=$(addprefix $(outdir)/,$(basename $(SPEC_FILES)))
OUT_DIST_FILES= $(strip $(OUTLSM_FILES) $(OUTSPEC_FILES))
-EXTRA_DIST_FILES += $(MAKE_FILES)
-
# these two outdir FILES are distributed, since they make sense to have
# without running configure and make.
at-dir = $(doc-dir)
at-ext = .in
-
-
-
MF_FILES := $(call src-wildcard,*.mf)
-EXTRA_DIST_FILES += $(MF_FILES)
MF_TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
MF_DVI_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.dvi))
MF_LOG_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.log))
HELP_CATALOGS = $(PO_FILES:%.po=%)
CATALOGS = $(HELP_CATALOGS:$(DOMAIN)=)
-
-DIST_FILES += $(POT_FILES) $(PO_FILES)
-
SHARED_FLAGS = -bundle -flat_namespace -undefined suppress
endif
OUT_SO_MODULES = $(addprefix $(outdir)/, $(C_FILES:.c=$(SHARED_MODULE_SUFFIX)))
-EXTRA_DIST_FILES += $(PY_MODULES_IN)
-
-.PHONY: install-doc uninstall-doc
+.PHONY: install-doc uninstall-doc distclean top-doc
install-doc:
uninstall-doc:
-local-dist: configure
+distclean: clean doc-clean test-clean log-clean
+ $(MAKE) local-distclean
local-distclean:
- rm -f config.hh config.make Makefile GNUmakefile \
- config.cache config.status config.log index.html \
- stepmake/stepmake/stepmake stepmake/stepmake/bin
+ rm -f config.hh config.make GNUmakefile \
+ config.cache config.status config.log
rm -rf autom4te.cache
rm -rf $(outdir)
-local-maintainerclean:
-
GNUmakefile: GNUmakefile.in
$(MAKE) INFILE=$< OUTFILE=$@ -f $(stepdir)/automatically-generated.sub.make
-ifneq ($(PACKAGE),STEPMAKE)
-aclocal.m4: $(stepmake)/aclocal.m4
- $(MAKE) INFILE=$< OUTFILE=$@ LINECOMMENT=dnl -f $(stepdir)/automatically-generated.sub.make
-
-autogen.sh: $(stepmake)/autogen.sh
- $(MAKE) INFILE=$< OUTFILE=$@ LINECOMMENT=\# -f $(stepdir)/automatically-generated.sub.make
- chmod +x autogen.sh
-endif
-
-
$(package-icon):
$(MAKE) -C Documentation/logo icon
$(MAKE) final-install
endif
-local-dist: top-doc
-
-dist:
- rm -rf $(distdir)
- $(MAKE) local-dist $(distdir)
- chmod -R a+r $(distdir)
- chmod a+x `find $(distdir) -type d -print`
- (cd ./$(depth)/$(outdir); $(TAR) -cf - --owner=0 --group=0 $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
- rm -rf $(distdir)
-
local-help:
@echo " config rerun configure"
@echo " dist roll tarball: $(depth)/$(outdir)/$(distname).tar.gz"
- @echo " distclean also remove configure output"
- @echo " cvs-clean also remove out directories and generated files"
- @echo " maintainerclean also remove distributed generated files"
+ @echo " distclean make clean, doc-clean, test-clean, log-clean and"
+ @echo " also remove configure output"
@echo " po make new translation Portable Object database"
@echo " po-replace do po-update and replace catalogs with msgmerged versions"
@echo " po-update update translation Portable Object database"
@echo " test-clean"
@echo
@echo " For more information on these targets, see"
- @echo " \`Testing LilyPond' in the Contributor's Guide."
+ @echo " \`Verify regression tests' in the Contributor's Guide."
@echo
-
-# override Generic_vars.make:
-DIST_FILES := $(EXTRA_DIST_FILES)
-
# urg?
include $(stepdir)/documentation-vars.make