GNUmakefile
TAGS
+autom4te.cache
configure
config.cache
config.h
+1.4.14.hwjc1
+============
+
+* Documentation/topdocs/INSTALL.texi (Top): Remove generic Guile
+threads warning.
+
+* backport small stack fixes from 1.5
+
+* backport lilypond-book.py from 1.5
+
+1.4.14.jcn3
+===========
+* backport Documentation/topdocs/FAQ.texi (Installation): Add
+ lilypond-devel list. Add faq about font removal. Fix faq about
+ generating and running ./configure. Typo fixes. Fix wiki url.
+
+* backport cvs/lilypond-1.4/ly/engraver.ly (RhythmicStaffContext): Resurrect
+ bar lines.
+
+* backport Documentation/topdocs/INSTALL.texi (Top): Add some warnings
+ about guile --with-threads. Hopefully this issue can be resolved
+ rsn, but maybe we should even add warnings for the standard Debian
+ and Red Hat packages?
+
+* backport configure.in: Warn if guile is configured to use threads. Maybe
+ we should make this an error (ie, add to REQUIRED list?)
+
+* backport lily/music.cc (Music): fix very subtle and nasty memory
+ corruption bug. Typical symptom: "programming_error: Rhythmic_req
+ has no duration"
+
+* backport lily/part-combine-music-iterator.cc (get_state): Bugfix: use
+ ly_symbol2scm to get a scm symbol (rather than ly_str02scm).
+
+* Documentation/windows/zlily-profile.sh:
+* Documentation/windows/post-lilypond.sh: Assume normal
+ prefix=/usr for lilypond.
+
+* aclocal.m4:
+* autogen.sh: Regenerate.
+
+* Documentation/topdocs/INSTALL.texi:
+* configure.in:
+* stepmake/configure.in:
+* stepmake/aclocal.m4: Revert autoconf upgrade. Autoconf 2.53 has
+ a serious bug wrt AC_CONFIG_AUX_DIR (reported). Creating
+ ./configure once again requires autoconf == 2.13.
+
+* stepmake/autogen.sh: Check for autoconf == 2.13.
+
+* backport GNUmakefile.in (short-examples):
+ (long-examples): Bugfix for --srcdir build.
+
+* backport stepmake/bin/config.sub:
+ stepmake/bin/config.guess: Update from latest autotools.
+
+* aclocal.m4:
+ autogen.sh: Regenerate.
+
+* configure.in:
+ stepmake/configure.in:
+ stepmake/aclocal.m4: Run autoupdate. Creating ./configure now
+ requires autoconf >= 2.50.
+
+* backport stepmake/autogen.sh: Check for autoconf >= 2.50.
+
+* backport stepmake/stepmake/GNUmakefile (INSTALLATION_DIR): Bugfix: Adapt
+ to new $datadir convention (<package>/<version>).
+
+* backport stepmake/GNUmakefile.in: Don't install stepmake. This breaks
+ the use of make/ly.make for use as an external makefile. Probably
+ noone except for myself ever used this anyway.
+
+* scm/chord-name.scm: Remove debug printing.
+
+* backport stepmake/stepmake/generic-vars.make:
+ make/lilypond-vars.make:
+ GNUmakefile.in (builddir-setup): New setup for builddir run.
+ Fixes LilyPond run from builddir for --srcdir builds.
+
+* backport Documentation/windows/GNUmakefile (OUT_PROFILES): Bugfix for
+ --srcdir build.
+
+* Bugfix: backport .enc file generation.
+
+* Bugfix: Include $(builddir)/mf/out (was $(srcdir)/mf/out.
+
+* Add toplevel target install-html-doc.
+
+* Bugfixes for --srcdir html-doc build.
+
+* Documentation/windows/lilypond.hint: Renamed (previously setup.hint).
+
+* Documentation/windows/lilypond-doc.hint: New file.
+
+1.4.14
+======
+* backport stepmake/aclocal.m4: Fix for ash as /bin/sh.
* backport stepmake/aclocal.m4: Fix for ash as /bin/sh.
* backport stepmake/aclocal.m4: Append $FULL_VERSION to datadir.
@setfilename FAQ.info
@settitle FAQ - GNU LilyPond Frequently Asked Questions
+@html
+<!--- @@WEB-TITLE@@=Frequently Asked Questions --->
+@end html
@node Top
@chapter FAQ - GNU LilyPond Frequently Asked Questions
@subsection I'm stuck, HELP!
Please read the
-@uref{http://appel.lilypond.org/wiki?LilyPondFaqs, full online
+@uref{http://lilypond.org/wiki?LilyPondFaqs, full online
FAQs}. Also, please look in the searchable mailinglist archives:
@itemize @bullet
@uref{http://www.mail-archive.com/bug-lilypond@@gnu.org,bug-lilypond}
@item
@uref{http://www.mail-archive.com/lilypond-devel@@gnu.org,lilypond-devel}
+@item
+@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org,gnu-music-discuss}
+(this is the archive of the `old' mailing list.)
@end itemize
+Or try the various @uref{http://lilypond.org/search, searching facilities}.
+
If you are still at loss, send your questions to the @strong{mailing
list}, and not to authors directly.
@subsection Where is guile, libguileX, guile-config?
-RedHat users need to install guile-1.4 and guile-devel-1.4, Debian
+Red Hat users need to install guile-1.4 and guile-devel-1.4, Debian
users need to get guile1.4, libguile9 and libguile9-dev.
-If you're building from source, you need guile 1.3.4 or newer. Verify
-that the correct guile, guile-config, and libguile* in your PATH and
-LD_LIBRARY_PATH (or @file{/etc/ld.so.conf}).
+If you're building from source, you need guile 1.4 or newer (1.3.4 may
+work but is no longer supported. Verify that the correct guile,
+guile-config, and libguile* in your PATH and LD_LIBRARY_PATH (or
+@file{/etc/ld.so.conf}).
@subsection I upgraded by applying a patch, and now my configure/build breaks.
Patches don't include automatically generated files, i.e.
@file{configure} and files generated by @file{configure}. Regenerate them
yourself:
+@quotation
@example
- autoconf
- configure
+ ./autogen.sh
+ ./configure
@end example
+@end quotation
-i@subsection I downloaded the windows32 port, and it doesn't match the website!
+@subsection I downloaded the windows32 port, and it doesn't match the website!
The website is usually made from the latest snapshots. Binary releases,
in particular the windows32 binaries, are only made every once in a while.
Windows), check if it will display embedded PostScript. Don't worry,
the symbols should appear on the printout.
+@subsection I upgraded, and now my symbols are all messed up
+
+We obviously mucked with the fonts in the upgrade. Remove all
+previous fonts, including the .pk and .tfm fonts in /var/lib/texmf. A
+script automating this has been included, see
+@file{buildscripts/clean-fonts.sh}.
@bye
@item if you have an unpacked source tree of a previous version, you
may the patches.
-@emph{If you upgrade by patching do remember to rerun autoconf after
+@emph{If you upgrade by patching do remember to rerun ./autogen.sh after
applying the patch}.
@item if you have the @code{.tar.gz} file of a previous release, you can
@item Python 1.5 or 2.1
Check out @uref{http://www.python.org/, the python website}.
-@item GUILE 1.4 or newer
+@item GUILE 1.4 or newer.
GUILE-1.3.4 may work but is no longer supported. Check out
@uref{http://www.gnu.org/software/guile/guile.html,the GUILE webpage}.
@itemize @bullet
@item @TeX{}.
@item Xdvi and Ghostscript
-@item GUILE 1.4, or newer. Check out
+@item GUILE 1.4, or newer.
+Check out
@uref{http://www.gnu.org/software/guile.html,the GUILE webpage}
@end itemize
depth=../..
-EXTRA_DIST_FILES = LilyPond.ico $(wildcard *.sh *.patch) setup.hint
+EXTRA_DIST_FILES = LilyPond.ico $(wildcard *.sh *.patch *.hint)
STEPMAKE_TEMPLATES=documentation texinfo install install-out
chmod 755 $@
# Urg
-$(outdir)/lilypond-profile.sh: $(outdir)/../$(depth)/buildscripts/out/lilypond-profile
+$(outdir)/lilypond-profile.sh: $(outdir)/../$(depth)/buildscripts/$(outconfbase)/lilypond-profile
cp $< $@
chmod 755 $@
--- /dev/null
+sdesc: "LilyPond documentation."
+category: Publishing
+ldesc: "LilyPond Documentation in HTML, PS and DVI formats.
+This package contains the HTML, PostScript and DVI documentation for the
+LilyPond music typesetting software."
--- /dev/null
+sdesc: "A program for printing sheet music"
+category: Publishing
+requires: ash bash guile gsview python tetex-beta texmf-tiny
+#suggests: rxvt xdvi texmf-base
+ldesc: "A program for printing sheet music.
+LilyPond is a music typesetter. It produces beautiful sheet music
+using a high level description file as input. LilyPond is part of
+the GNU Project."
\ No newline at end of file
#!@SHELL@
# /etc/profile.d/post-lily.sh -- Setup LilyPond
-rm -f /usr/lilypond
-lily=@prefix@
-ln -s $lily /usr/lilypond
+# touch /tmp/.lilypond-install -- from redhat.spec, why?
+rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print'`
+# rm /tmp/.lilypond-install
+
+# needed for prefix=lilypond-x.y.z
+#rm -f /usr/lilypond
+#lily=@prefix@
+#ln -s $lily /usr/lilypond
+++ /dev/null
-sdesc: "A program for printing sheet music"
-category: Publishing
-requires: ash bash guile gsview python tetex-beta texmf-tiny
-#suggests: rxvt xdvi texmf-base
-ldesc: "A program for printing sheet music.
-LilyPond is a music typesetter. It produces beautiful sheet music
-using a high level description file as input. LilyPond is part of
-the GNU Project."
\ No newline at end of file
GS_FONTPATH="$WINDOWS_GS_FONTPATH"
GS_LIB="$WINDOWS_GS_LIB"
-PATH="/usr/lilypond/bin:$PATH"
-PATH="@prefix@/bin:$PATH"
+# needed for prefix=lilypond-x.y.z
+# PATH="/usr/lilypond/bin:$PATH"
+# PATH="@prefix@/bin:$PATH"
cat <<EOF
Congratulations and welcome to GNU LilyPond.
----------------
Please read the full online FAQs
-(http://appel.lilypond.org/wiki?LilyPondFaqs). Also, please look in
-the searchable mailinglist archives:
+(http://lilypond.org/wiki?LilyPondFaqs). Also, please look in the
+searchable mailinglist archives:
* lilypond-user (http://www.mail-archive.com/lilypond-user@gnu.org)
* lilypond-devel (http://www.mail-archive.com/lilypond-devel@gnu.org)
+ * gnu-music-discuss
+ (http://www.mail-archive.com/gnu-music-discuss@gnu.org) (this is
+ the archive of the `old' mailing list.)
+
+ Or try the various searching facilities (http://lilypond.org/search).
+
If you are still at loss, send your questions to the *mailing list*,
and not to authors directly.
Where is guile, libguileX, guile-config?
----------------------------------------
- RedHat users need to install guile-1.4 and guile-devel-1.4, Debian
+ Red Hat users need to install guile-1.4 and guile-devel-1.4, Debian
users need to get guile1.4, libguile9 and libguile9-dev.
- If you're building from source, you need guile 1.3.4 or newer.
-Verify that the correct guile, guile-config, and libguile* in your PATH
-and LD_LIBRARY_PATH (or `/etc/ld.so.conf').
+ If you're building from source, you need guile 1.4 or newer (1.3.4
+may work but is no longer supported. Verify that the correct guile,
+guile-config, and libguile* in your PATH and LD_LIBRARY_PATH (or
+`/etc/ld.so.conf').
I upgraded by applying a patch, and now my configure/build breaks.
------------------------------------------------------------------
`configure' and files generated by `configure'. Regenerate them
yourself:
- autoconf
- configure
-
- i
+ ./autogen.sh
+ ./configure
I downloaded the windows32 port, and it doesn't match the website!
------------------------------------------------------------------
Windows), check if it will display embedded PostScript. Don't worry,
the symbols should appear on the printout.
+I upgraded, and now my symbols are all messed up
+------------------------------------------------
+
+ We obviously mucked with the fonts in the upgrade. Remove all
+previous fonts, including the .pk and .tfm fonts in /var/lib/texmf. A
+script automating this has been included, see
+`buildscripts/clean-fonts.sh'.
+
fonts:
$(MAKE) -C $(depth)/mf
-doc: lily fonts
+run-reqs: builddir-setup fonts lily
+web-reqs: run-reqs pfa-fonts
+
+doc: run-reqs
$(MAKE) -C Documentation
-web-doc: pfa-fonts
+web-doc: web-reqs
$(MAKE) out=www -C Documentation WWW
$(MAKE) footify
pfa-fonts:
$(MAKE) MAKE_PFA_FILES=1 -C mf
+docdir = $(prefix)/share/doc/lilypond-$(TOPLEVEL_VERSION)
+install-html-doc: html-doc
+ $(INSTALL) -d $(docdir)/html
+ tar -C $(docdir)/html -zxf $(outdir)/web.tar.gz
+
# KPATHSEA=0: Hack for compiling without kpathsea -- not recommended
my_tfm_path = $(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp
local-install:
- mkdir -p $(datadir)
+ $(INSTALL) -d $(datadir)
ifeq ($(KPATHSEA),0)
$(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; )
endif
TOP_HTMLS = index.html short-examples.html long-examples.html
-index: web-doc
-
-short-examples: pfa-fonts
+short-examples: web-reqs
$(MAKE) out=www -C input WWW
- $(PYTHON) $(buildscript-dir)/mutopia-index.py -o short-examples.html input/
-
+ $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
-long-examples: pfa-fonts
+long-examples: web-reqs
$(MAKE) out=www -C mutopia WWW
- $(PYTHON) $(buildscript-dir)/mutopia-index.py -o long-examples.html mutopia/
+ $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html mutopia/
lily: lily/$(outdir)/lilypond
lily/$(outdir)/lilypond:
$(MAKE) -C lily
-local-web: fonts lily $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
+local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
top-web:
- rm -f `find . -name \*.html~ -print`
- find `find Documentation input mutopia *.png index.html -type d -name 'out-www'` \
+ cd $(builddir) && rm -f `find . -name \*.html~ -print`
+ cd $(builddir) && find `find Documentation input mutopia -type d -name 'out-www' -print` \
-not -name '*.dvi' -not -name '*ly' -not -name '*.tex' \
-not -name '*.ps' -not -name '*.eps' -not -name '*pk' \
-not -name '*.aux' -not -name '*.cp' -not -name '*.fn' \
-not -name '*.texi' -not -name '*.texidoc' -not -name '*.tp' \
-not -name '*.pdfps' -not -name '*.eps.bbox' \
-not -name '*.log' -not -name 'out-www' -not -name '*.dep' \
+ -print \
> $(outdir)/weblist
- ls *.png *.html >> $(outdir)/weblist
- cat $(outdir)/weblist | GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -
+ cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
+ cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
#WWW: local-WWW
web: local-web
+html-doc: web
+index: web
local-WWW-clean: top-WWW-clean
$(MAKE) -C mutopia WWW-clean
top-WWW-clean:
- rm -f $(TOP_HTMLS) lily-[0-9]*.png
+ cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
$(SHELL) $(buildscript-dir)/clean-fonts.sh
-
-
WWW:
+
+default: builddir-setup
+
+builddir-setup: $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force
+
+$(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force:
+ # Preparing LilyPond tree for builddir exec
+ @cd $(depth)/$(builddir) && rm -rf share
+ @cd $(depth)/$(builddir) && mkdir -p share/lilypond
+ @cd $(depth)/$(builddir)/share/lilypond && mkdir -p $(TOPLEVEL_VERSION)
+ @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
+ ln -s ../../../$(srcdir)/ly ly && \
+ ln -s ../../../mf/$(outconfbase) dvips && \
+ ln -s ../../../mf/$(outconfbase) afm && \
+ ln -s ../../../mf/$(outconfbase) tfm && \
+ ln -s ../../../$(srcdir)/mf && \
+ ln -s ../../../$(srcdir)/ps && \
+ ln -s ../../../$(srcdir)/scm && \
+ ln -s ../../../$(srcdir)/tex
+ @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
+ mkdir fonts
+# only for TEXMF setup, 1.5
+# @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/fonts && \
+# ln -s ../../../../$(srcdir)/mf source && \
+# ln -s ../../../../mf/$(outconfbase) afm && \
+# ln -s ../../../../mf/$(outconfbase) tfm && \
+# ln -s ../../../../mf/$(outconfbase) type1
* if you have an unpacked source tree of a previous version, you may
the patches.
- _If you upgrade by patching do remember to rerun autoconf after
+ _If you upgrade by patching do remember to rerun ./autogen.sh after
applying the patch_.
* if you have the `.tar.gz' file of a previous release, you can use
* Python 1.5 or 2.1 Check out the python website
(http://www.python.org/).
- * GUILE 1.4 or newer GUILE-1.3.4 may work but is no longer
+ * GUILE 1.4 or newer. GUILE-1.3.4 may work but is no longer
supported. Check out the GUILE webpage
(http://www.gnu.org/software/guile/guile.html).
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=4
-PATCH_LEVEL=14
+PATCH_LEVEL=15
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# Run this to generate configure and initial GNUmakefiles
srcdir=`dirname $0`
-DIE=0
-# autoconf > 2.50 is not very common yet,
-# and disappointingly incompatible with the widely available 2.13
-version=`autoconf --version 2>/dev/null | awk '{print $3}'`
-if test "$version" != "2.13"; then
- echo "ERROR: Please install autoconf 2.13"
- exit 1
+# Be paranoid: check for autoconf == 2.13
+# Some setups have both autoconf 2.13 and 2.50 available through
+# a wrapper script: /usr/bin/autoconf.
+# This wrapper may incorrectly autoselect autoconf 2.50, but it
+# advertises itself as autoconf 2.13.
+# If you have such a setup, invoke this script as:
+# autoconf=autoconf2.13 ./autogen.sh
+for i in autoconf autoconf2.13 false; do
+ version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
+ if test "0$version" -eq 213; then
+ autoconf=$i
+ break
+ fi
+done
+
+if test -z "$autoconf"; then
+ echo "ERROR: Please install autoconf 2.13"
+ exit 1
fi
if test -z "$*"; then
(
cd $dr
echo "Running autoconf ..."
- autoconf
+ $autoconf
)
done
elif tags[0] == 'font':
global_info['FontName'] = string.join (tags[1:])
global_info['FontFamily']=tags[1]
+ global_info['FontBBox'] = '0 0 1000 1000'
+ global_info['Ascender'] = '0'
+ global_info['Descender'] = '0'
return (global_info, charmetrics, deps)
for m in charmetrics:
file.write (r'''\def\%s%s{\char%d}%s''' % (nm, m['tex'], m['code'],'\n'))
+def write_ps_encoding (file, global_info, charmetrics):
+ encs = ['.notdef'] * 256
+ for m in charmetrics:
+ encs[m['code']] = m['tex']
+
+ file.write ('/FetaEncoding [\n')
+ for m in range(0,256):
+ file.write (' /%s %% %d\n' % (encs[m], m))
+ file.write ('] def\n')
+
def write_fontlist (file, global_info, charmetrics):
nm = global_info['FontFamily']
file.write (r"""
}
""")
-
def write_deps (file, deps, targets):
for t in targets:
file.write ('%s '% t)
(options, files) = getopt.getopt(
sys.argv[1:], 'a:d:hl:o:p:t:',
- ['afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
+ ['enc=', 'afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
-texfile_nm = '';
+enc_nm = ''
+texfile_nm = ''
depfile_nm = ''
afmfile_nm = ''
lyfile_nm = ''
outdir_prefix = a
elif o == '--tex' or o == '-t':
texfile_nm = a
+ elif o == '--enc':
+ enc_nm = a
elif o == '--ly' or o == '-':
lyfile_nm = a
elif o== '--help' or o == '-h':
print o
raise getopt.error
+base = re.sub ('.tex$', '', texfile_nm)
+
for filenm in files:
(g,m, deps) = parse_logfile (filenm)
cs = tfm_checksum (re.sub ('.log$', '.tfm', filenm))
write_afm_metric (afm, g,m)
write_tex_defs (open (texfile_nm, 'w'), g, m)
- write_deps (open (depfile_nm, 'wb'), deps, [texfile_nm, afmfile_nm])
+ write_ps_encoding (open (enc_nm, 'w'), g, m)
+
+ write_deps (open (depfile_nm, 'wb'), deps, [base + '.dvi', texfile_nm, afmfile_nm])
if lyfile_nm != '':
write_fontlist(open (lyfile_nm, 'w'), g, m)
+
the postscript files.
"""
+headertext_nopics= r"""
+<p>Nothing to be seen here, move along.
+"""
#
# FIXME breaks on multiple strings.
--- /dev/null
+#include "grob.hh"
+#include "item.hh"
+#include "spanner.hh"
+#include "line-of-score.hh"
+
+static SCM break_criterion;
+void
+set_break_subsititution (SCM criterion)
+{
+ break_criterion = criterion;
+}
+
+/*
+ Perform the substitution for a single grob.
+ */
+SCM
+substitute_grob (Grob *sc)
+{
+ if (SCM_INUMP (break_criterion))
+ {
+ Item * i = dynamic_cast<Item*> (sc);
+ Direction d = to_dir (break_criterion);
+ if (i && i->break_status_dir () != d)
+ {
+ Item *br = i->find_prebroken_piece (d);
+ return (br) ? br->self_scm () : SCM_UNDEFINED;
+ }
+ }
+ else
+ {
+ Line_of_score * line
+ = dynamic_cast<Line_of_score*> (unsmob_grob (break_criterion));
+ if (sc->line_l () != line)
+ {
+ sc = sc->find_broken_piece (line);
+
+ }
+
+ /* now: !sc || (sc && sc->line_l () == line) */
+ if (!sc)
+ return SCM_UNDEFINED;
+
+ /* now: sc && sc->line_l () == line */
+ if (!line)
+ return sc->self_scm();
+
+ /*
+ We don't return SCM_UNDEFINED for
+ suicided grobs, for two reasons
+
+ - it doesn't work (strange disappearing objects)
+
+ - it forces us to mark the parents of a grob, leading to
+ a huge recursion in the GC routine.
+ */
+
+ /*
+ This was introduced in 1.3.49 as a measure to prevent
+ programming errors. It looks rather expensive (?).
+
+ TODO:
+
+ benchmark , document when (what kind of programming
+ errors) this happens.
+ */
+ if (sc->common_refpoint (line, X_AXIS)
+ && sc->common_refpoint (line, Y_AXIS))
+ {
+ return sc->self_scm ();
+ }
+ return SCM_UNDEFINED;
+ }
+
+ return sc->self_scm();
+}
+
+
+
+/*
+ Do break substitution in S, using CRITERION. Return new value.
+ CRITERION is either a SMOB pointer to the desired line, or a number
+ representing the break direction. Do not modify SRC.
+
+ It is rather tightly coded, since it takes a lot of time; it is
+ one of the top functions in the profile.
+
+ We don't pass break_criterion as a parameter, since it is
+ `constant', but takes up stack space.
+
+ It would be nice if we could do this in-place partially. We now
+ generate a lot of garbage.
+ */
+
+SCM
+do_break_substitution (SCM src)
+{
+ again:
+
+ if (unsmob_grob (src))
+ {
+ return substitute_grob (unsmob_grob (src));
+ }
+ else if (gh_pair_p (src))
+ {
+ /*
+ UGH! breaks on circular lists.
+ */
+ SCM newcar = do_break_substitution (gh_car (src));
+ SCM oldcdr = gh_cdr (src);
+
+ if (newcar == SCM_UNDEFINED
+ && (gh_pair_p (oldcdr) || oldcdr == SCM_EOL))
+ {
+ /*
+ This is tail-recursion, ie.
+
+ return do_break_substution (cdr);
+
+ We don't want to rely on the compiler to do this. Without
+ tail-recursion, this easily crashes with a stack overflow. */
+ src = oldcdr;
+ goto again;
+ }
+
+ return scm_cons (newcar, do_break_substitution (oldcdr));
+ }
+ else
+ return src;
+
+ return src;
+}
+
+
+/*
+ Perform substitution on GROB_LIST using a constant amount of stack.
+ */
+SCM
+substitute_grob_list (SCM grob_list)
+{
+ SCM l = SCM_EOL;
+ SCM * tail = &l;
+
+ for (SCM s = grob_list; gh_pair_p (s); s = gh_cdr (s))
+ {
+ SCM n= substitute_grob (unsmob_grob (gh_car (s)));
+
+ if (n != SCM_UNDEFINED)
+ {
+ *tail = gh_cons (n, SCM_EOL);
+ tail = SCM_CDRLOC(*tail);
+ }
+ }
+
+ return l;
+}
+
+
+SCM grob_list_p;
+
+/*
+ Although the substitution can be written as
+
+ mutable_property_alist_ = do_substitution (mutable_property_alist_),
+
+ we have a special function here: we want to invoke a special
+ function for lists of grobs. These can be very long for large
+ orchestral scores (eg. 1M elements). do_break_substitution() can
+ recurse many levels, taking lots of stack space.
+
+ This becomes a problem if lily is linked against guile with
+ pthreads. pthreads impose small limits on the stack size.
+ */
+SCM
+substitute_mutable_properties (SCM alist)
+{
+ if (!grob_list_p)
+ grob_list_p = scm_c_eval_string ("grob-list?");
+
+ SCM l = SCM_EOL;
+ SCM *tail = &l;
+ for (SCM s = alist; gh_pair_p (s); s = gh_cdr (s))
+ {
+ SCM sym = gh_caar(s);
+ SCM val = gh_cdar(s);
+ SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?"));
+
+ if (type == grob_list_p)
+ val = substitute_grob_list (val);
+ else
+ val = do_break_substitution (val);
+
+ *tail = gh_cons (gh_cons (sym, val), SCM_EOL);
+ tail = SCM_CDRLOC (*tail);
+ }
+
+ return l;
+}
programming_error ("Null dependency added");
}
-
-
-
-/**
- Do break substitution in S, using CRITERION. Return new value.
- CRITERION is either a SMOB pointer to the desired line, or a number
- representing the break direction. Do not modify SRC.
-*/
-SCM
-Grob::handle_broken_grobs (SCM src, SCM criterion)
-{
- again:
- Grob *sc = unsmob_grob (src);
- if (sc)
- {
- if (gh_number_p (criterion))
- {
- Item * i = dynamic_cast<Item*> (sc);
- Direction d = to_dir (criterion);
- if (i && i->break_status_dir () != d)
- {
- Item *br = i->find_prebroken_piece (d);
- return (br) ? br->self_scm () : SCM_UNDEFINED;
- }
- }
- else
- {
- Line_of_score * line
- = dynamic_cast<Line_of_score*> (unsmob_grob (criterion));
- if (sc->line_l () != line)
- {
- sc = sc->find_broken_piece (line);
-
- }
-
- /* now: !sc || (sc && sc->line_l () == line) */
- if (!sc)
- return SCM_UNDEFINED;
-
- /* now: sc && sc->line_l () == line */
- if (!line
- || (sc->common_refpoint (line, X_AXIS)
- && sc->common_refpoint (line, Y_AXIS)))
- {
- return sc->self_scm ();
- }
- return SCM_UNDEFINED;
- }
- }
- else if (gh_pair_p (src))
- {
- SCM oldcar =gh_car (src);
- /*
- UGH! breaks on circular lists.
- */
- SCM newcar = handle_broken_grobs (oldcar, criterion);
- SCM oldcdr = gh_cdr (src);
-
- if (newcar == SCM_UNDEFINED
- && (gh_pair_p (oldcdr) || oldcdr == SCM_EOL))
- {
- /*
- This is tail-recursion, ie.
-
- return handle_broken_grobs (cdr, criterion);
-
- We don't want to rely on the compiler to do this. Without
- tail-recursion, this easily crashes with a stack overflow. */
- src = oldcdr;
- goto again;
- }
-
- SCM newcdr = handle_broken_grobs (oldcdr, criterion);
- return gh_cons (newcar, newcdr);
- }
- else
- return src;
-
- return src;
-}
-
void
Grob::handle_broken_dependencies ()
{
{
Grob * sc = s->broken_into_l_arr_[i];
Line_of_score * l = sc->line_l ();
+ set_break_subsititution(l ? l->self_scm () : SCM_UNDEFINED);
sc->mutable_property_alist_ =
- handle_broken_grobs (mutable_property_alist_,
- l ? l->self_scm () : SCM_UNDEFINED);
+ substitute_mutable_properties (mutable_property_alist_);
}
}
if (line && common_refpoint (line, X_AXIS) && common_refpoint (line, Y_AXIS))
{
+ set_break_subsititution(line ? line->self_scm () : SCM_UNDEFINED);
mutable_property_alist_
- = handle_broken_grobs (mutable_property_alist_,
- line ? line->self_scm () : SCM_UNDEFINED);
+ = substitute_mutable_properties (mutable_property_alist_);
}
else if (dynamic_cast <Line_of_score*> (this))
{
- mutable_property_alist_ = handle_broken_grobs (mutable_property_alist_,
- SCM_UNDEFINED);
+ set_break_subsititution (SCM_UNDEFINED);
+ mutable_property_alist_ = substitute_mutable_properties (mutable_property_alist_);
}
else
{
scm_gc_mark (s->dim_cache_[a].offset_callbacks_);
scm_gc_mark (s->dim_cache_[a].dimension_);
}
-
+
+ /*
+ don't mark parents -- this causes nasty deep recursion.
+ */
+#if 0
if (s->parent_l (Y_AXIS))
scm_gc_mark (s->parent_l (Y_AXIS)->self_scm ());
if (s->parent_l (X_AXIS))
scm_gc_mark (s->parent_l (X_AXIS)->self_scm ());
-
+#endif
+
if (s->original_l_)
scm_gc_mark (s->original_l_->self_scm ());
return s->do_derived_mark ();
#funcptr# is the function to call to update this element.
*/
void calculate_dependencies (int final, int busy, SCM funcname);
- static SCM handle_broken_grobs(SCM, SCM criterion);
virtual void do_break_processing ();
virtual Grob *find_broken_piece (Line_of_score*) const;
};
Grob * unsmob_grob (SCM);
+void set_break_subsititution (SCM criterion);
+SCM substitute_mutable_properties (SCM alist);
#endif // STAFFELEM_HH
{
if (original_l_)
{
+ set_break_subsititution(gh_int2scm (break_status_dir ()));
+
mutable_property_alist_
- = handle_broken_grobs(original_l_->mutable_property_alist_,
- gh_int2scm (break_status_dir ()));
+ = substitute_mutable_properties(original_l_->mutable_property_alist_);
}
/*
Music::Music (Music const &m)
{
immutable_property_alist_ = m.immutable_property_alist_;
- SCM c =ly_deep_mus_copy (m.mutable_property_alist_);
- mutable_property_alist_ = c;
+ mutable_property_alist_ = SCM_EOL;
+ /*
+ First we smobify_self, then we copy over the stuff. If we don't,
+ stack vars that hold the copy might be optimized away, meaning
+ that they won't be protected from GC.
+ */
smobify_self ();
-
+ mutable_property_alist_ = ly_deep_mus_copy (m.mutable_property_alist_);
set_spot (*m.origin ());
}
set_mus_property (s, v);
}
+void paranoia_check (Music*);
+
void
Music::set_immutable_mus_property (const char*k, SCM v)
{
}
ADD_SCM_INIT_FUNC (musicscm,init_functions);
ADD_MUSIC(Music);
+
if (first_pitches != SCM_EOL && second_pitches != SCM_EOL)
{
scm_sort_list_x (first_pitches,
- scm_primitive_eval (ly_str02scm ("Pitch::less_p")));
+ scm_primitive_eval (ly_symbol2scm ("Pitch::less_p")));
scm_sort_list_x (second_pitches,
- scm_primitive_eval (ly_str02scm ("Pitch::less_p")));
+ scm_primitive_eval (ly_symbol2scm ("Pitch::less_p")));
interval = gh_int2scm (unsmob_pitch (gh_car (first_pitches))->steps ()
- unsmob_pitch (gh_car (scm_last_pair (second_pitches)))->steps ());
if (first_durations != SCM_EOL)
{
scm_sort_list_x (first_durations,
- scm_primitive_eval (ly_str02scm ("Duration::less_p")));
+ scm_primitive_eval (ly_symbol2scm ("Duration::less_p")));
first_mom += unsmob_duration (gh_car (first_durations))->length_mom ();
}
if (second_durations != SCM_EOL)
{
scm_sort_list_x (second_durations,
- scm_primitive_eval (ly_str02scm ("Duration::less_p")));
+ scm_primitive_eval (ly_symbol2scm ("Duration::less_p")));
second_mom += unsmob_duration (gh_car (second_durations))->length_mom ();
}
\version "1.3.146"
-%
-% setup for Request->Element conversion. Guru-only
-%
+%%%
+%%% setup for Request->Element conversion. Guru-only
+%%%
StaffContext=\translator {
\type "Engraver_group_engraver"
Generic_property_list = #generic-staff-properties
\consists "Property_engraver"
+ %% Bar_engraver must be first so default bars aren't overwritten
+ %% with empty ones.
\consists "Bar_engraver"
- % Bar_engraver must be first so default bars aren't overwritten
-% with empty ones.
-% \consists "Repeat_engraver"
+%% \consists "Repeat_engraver"
\consists "Volta_engraver"
\consists "Separating_line_group_engraver"
\name RhythmicStaff
\alias "Staff"
- Bar \override #'bar-size = #4
+ BarLine \override #'bar-size = #4
VoltaBracket \override #'minimum-space = #15 % urg, in \pt
VoltaBracket \override #'padding = #5 % urg, in \pt
StaffSymbol \override #'line-count = #1
-% \consists "Repeat_engraver"
+%% \consists "Repeat_engraver"
\consists "Volta_engraver"
\consists "Bar_engraver"
\consists "Time_signature_engraver"
-export PATH:=$(topdir)/lily/out:$(topdir)/buildscripts/out:$(PATH)
-export TEXCONFIG:=$(topdir)/mf/out:$(TEXCONFIG)
-export TEXPSHEADERS:=$(topdir)/mf/out::$(TEXPSHEADERS)
-export MFINPUTS:=$(topdir)/mf/:$(MFINPUTS)::
-export TEXINPUTS:=$(topdir)/mf/out/:$(topdir)/tex/:$(topdir)/ps/:$(TEXINPUTS):$(pwd)::
-export LILYINCLUDE:=$(topdir)/ps:$(topdir)/scm:$(topdir)/ly:$(topdir)/mf/out::$(TEX_TFMDIR):$(LILYINCLUDE)
-export TFMFONTS:=$(topdir)/mf/out:
+export PATH:=$(abs-builddir)/lily/$(outconfbase):$(abs-builddir)/buildscripts/$(outconfbase):$(PATH)
+
+# LilyPond is often run from within $(outdir), making a relative
+# PREFIX incorrect.
+export LILYPONDPREFIX:=$(shell cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION); pwd)
+export PYTHONPATH:=$(topdir)/$(outdir):$(PYTHONPATH)
+
+
+lilypondprefix = $(abs-builddir)/share/lilypond/$(TOPLEVEL_VERSION)
+
+export TEXCONFIG:=$(abs-builddir)/mf/$(outconfbase):$(TEXCONFIG)
+export TEXPSHEADERS:=$(abs-builddir)/mf/$(outconfbase)::$(TEXPSHEADERS)
+export MFINPUTS:=$(abs-srcdir)/mf/:$(MFINPUTS)::
+export TEXINPUTS:=$(abs-builddir)/mf/$(outconfbase)/:$(abs-srcdir)/tex/:$(abs-srcdir)/ps/:$(TEXINPUTS):$(pwd)::
+export TFMFONTS:=$(abs-builddir)/mf/$(outconfbase):
+# most taken care of by LILYPONDPREFIX and builddir-setup
+#export LILYINCLUDE:=$(abs-srcdir)/ps:$(abs-srcdir)/scm:$(abs-srcdir)/ly:$(abs-builddir)/mf/$(outconfbase)::$(TEX_TFMDIR):$(LILYINCLUDE)
+export LILYINCLUDE:=::$(TEX_TFMDIR):$(LILYINCLUDE)
export extra_mem_top=1000000
export extra_mem_bottom=1000000
-export pool_size=250000
+export pool_size=300000
ifdef DEB_BUILD
export DVIPSMAKEPK := mktexpk --destdir $(topdir)/mf/out
endif
-# LilyPond is often run from within $(outdir), making a relative
-# PREFIX incorrect.
-export LILYPONDPREFIX:=$(shell cd $(depth)/ ; pwd)
-export PYTHONPATH:=$(buildscript-dir)/$(outdir):$(PYTHONPATH)
-
# guile load path?
the-script-dir=$(wildcard $(script-dir))
ABC2LY = $(script-dir)/abc2ly.py
CONVERT_LY = $(script-dir)/convert-ly.py
-LILYPOND = $(depth)/$(builddir)/lily/$(outconfbase)/lilypond
+LILYPOND = $(abs-builddir)/lily/$(outconfbase)/lilypond
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(topdir)/mf/$(outdir)/ -I $(topdir)/mf/out/
+LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(abs-builddir)/mf/$(outconfbase)/ -I $(abs-builddir)/mf/out/
LY2DVI = $(script-dir)/ly2dvi.py
PS_TO_GIFS = $(buildscript-dir)/ps-to-gifs.sh
PS_TO_PNGS = $(buildscript-dir)/ps-to-pngs.sh
/sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir
%endif
-/usr/X11R6/bin/mkfontdir /usr/share/lilypond/pfa/
-/usr/sbin/chkfontpath --add=/usr/share/lilypond/pfa/
-
+/usr/X11R6/bin/mkfontdir /usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
+chkfontpath --add=/usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
echo 'Please logout first before using LilyPond.'
/sbin/install-info --delete %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir
fi
%endif
-rm -f /usr/share/lilypond/pfa/fonts.dir
-/usr/sbin/chkfontpath --remove=/usr/share/lilypond/pfa/
+
+rm -f /usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/fonts.dir
+chkfontpath --remove=/usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
+
+
psbook $< $<.tmp
pstops '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' $<.tmp $@
+$(outdir)/%.pdf: $(outdir)/%.dvi
+## -G0? not in 1.5...
+## dvips -Ppdf -G0 -u$(topdir)/mf/out/lilypond.map -o $@.pdfps $<
+## 1.5 rule:
+## dvips -u lilypond.map -o $@.pdfps -Ppdf $<
+ dvips -u$(abs-builddir)/mf/$(outconfbase)/lilypond.map -o $@.pdfps -Ppdf $<
+ ps2pdf $@.pdfps $@
+
$(outdir)/%.pdf: $(outdir)/%.dvi
- dvips -Ppdf -G0 -u$(topdir)/mf/out/lilypond.map -o $@.pdfps $<
+ dvips -u lilypond.map -o $@.pdfps -Ppdf $<
ps2pdf $@.pdfps $@
+
Begin3
Title: LilyPond
-Version: 1.4.14
-Entered-date: 10JUN02
+Version: 1.4.15
+Entered-date: 01JUL02
Description: @BLURB@
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.4.14.tar.gz
+ 1000k lilypond-1.4.15.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.4.14.tar.gz
+ 1000k lilypond-1.4.15.tar.gz
Copying-policy: GPL
End
%define info yes
Name: lilypond
-Version: 1.4.14
+Version: 1.4.15
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.14.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.15.tar.gz
Summary: Create and print music notation
URL: http://www.cs.uu.nl/~hanwen/lilypond
BuildRoot: /tmp/lilypond-install
/sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir
%endif
-/usr/X11R6/bin/mkfontdir /usr/share/lilypond/pfa/
-/usr/sbin/chkfontpath --add=/usr/share/lilypond/pfa/
-
+/usr/X11R6/bin/mkfontdir /usr/share/lilypond/1.4.15/fonts/type1/
+chkfontpath --add=/usr/share/lilypond/1.4.15/fonts/type1/
echo 'Please logout first before using LilyPond.'
/sbin/install-info --delete %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir
fi
%endif
-rm -f /usr/share/lilypond/pfa/fonts.dir
-/usr/sbin/chkfontpath --remove=/usr/share/lilypond/pfa/
+
+rm -f /usr/share/lilypond/1.4.15/fonts/type1/fonts.dir
+chkfontpath --remove=/usr/share/lilypond/1.4.15/fonts/type1/
+
+
Distribution: SuSE Linux 7.0 (i386)
Name: lilypond
-Version: 1.4.14
+Version: 1.4.15
Release: 2
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.14.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.15.tar.gz
# music notation software for.. ?
Summary: A program for printing sheet music.
URL: http://www.lilypond.org/
LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log))
TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex))
AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm) $(addsuffix .afm, $(CM_AFM_FILES)))
+ENC_FILES=$(TEXTABLES:.tex=.enc)
TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
# Make tfm files first, log files last,
# so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES)
+ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES)
#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
INSTALLATION_DIR=$(datadir)/fonts/source/
INSTALLATION_OUT_DIR5=$(datadir)/dvips/
INSTALLATION_OUT_FILES5=$(outdir)/lilypond.map
-pfa: $(PFA_FILES) $(outdir)/fonts.scale
-
-
endif
$(outdir)/lilypond.map:
##
## todo: this also depends on .tfm, FIXME.
-$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
- $(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --afm $(outdir)/$(<F:.log=.afm) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
-
-
+$(outdir)/%.afm $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
+ $(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --afm $(outdir)/$(<F:.log=.afm) --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
local-clean:
rm -f mfplain.mem mfplain.log mpout.log
rm -f *.tfm *.log
-
+pfa: $(PFA_FILES) $(outdir)/fonts.scale
out/feta-test16.dvi: feta-eindelijk.mf
(and (pair? x)
(number? (car x)) (number? (cdr x))))
+(define (grob-list? x) (list? x))
+
(define (moment-pair? x)
(and (pair? x)
(moment? (car x)) (moment? (cdr x))))
(,integer? . "integer")
(,list? . "list")
(,symbol? . "symbol")
+ (,grob-list? . "list of grobs")
(,string? . "string")
(,boolean? . "boolean")
(,moment? . "moment")
* TODO: any uneven step that's lower than an uneven step which is
chromatically altered
"
- (write-me "adds: "
(let ((evens (filter-list (lambda (x) (!= 0 (modulo (cadr x) 2))) steps))
(altered-unevens
(filter-list (lambda (x)
'()))))
;; Hmm, what if we have a step twice, can we ignore that?
(uniq-list (sort (apply append evens altered-unevens highest)
- pitch::<)))))
+ pitch::<))))
;; FIXME: unLOOP, see ::additions
;; find the pitches that are missing from `normal' chord
(define (chord::subtractions chord-pitches)
- (write-me "subs: " (let ((tonic (car chord-pitches)))
+ (let ((tonic (car chord-pitches)))
(let loop ((step 1) (pitches chord-pitches) (subtractions '()))
(if (pair? pitches)
(let* ((pitch (car pitches))
(if (= p-step step)
(loop (+ step 2) (cdr pitches) subtractions)
(loop step (cdr pitches) subtractions)))))
- (reverse subtractions))))))
+ (reverse subtractions)))))
(define (chord::additions->text-banter additions subtractions)
(if (pair? additions)
;; return (MATCHED-EXCEPTION . BASE-CHORD-WITH-UNMATCHED-STEPS)
;; BASE-CHORD-WITH-UNMATCHED-STEPS always includes (tonic 3 5)
(define (chord::exceptions-lookup style steps)
- (write-me "xl: " (let* ((result (chord::exceptions-lookup-helper
+ (let* ((result (chord::exceptions-lookup-helper
(chord::restyle 'chord::names-alist- style)
steps '() #f))
(exception-part (car result))
((= i 0) base)
())
unmatched-steps)))
- (list exception-part unmatched-with-1-3-5))))
+ (list exception-part unmatched-with-1-3-5)))
(define (chord::name->text style tonic steps bass-and-inversion)
(grob-property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical.")
(grob-property-description 'align-dir dir? "Which side to align? -1: left side, 0: around center of width, 1: right side.")
(grob-property-description 'alignment-done boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once).")
-(grob-property-description 'all-elements list? "list of all grobs in this line. Needed for protecting grobs from GC.")
+(grob-property-description 'all-elements grob-list? "list of all grobs in this line. Needed for protecting grobs from GC.")
(grob-property-description 'arch-angle number? "turning angle of the hook of a system brace" )
(grob-property-description 'arch-height number? "height of the hook of a system brace.")
(grob-property-description 'arch-thick number? "thickness of the hook of system brace.")
(grob-property-description 'axes list? "list of axis numbers.
In the case of alignment grobs, this should contain only one number.")
(grob-property-description 'bar-size number? "size of a bar line.")
-(grob-property-description 'bars list? "list of barline pointers.")
+(grob-property-description 'bars grob-list? "list of barline pointers.")
(grob-property-description 'bar-size-procedure procedure? "Procedure that computes the size of a bar line.")
(grob-property-description 'baseline-skip number? "Baseline skip to use for multiple lines of text.")
(grob-property-description 'bass list? " musical-pitch, optional.")
(grob-property-description 'beamed-minimum-lengths list? "list of minimum stem lengths given beam multiplicity.")
(grob-property-description 'beamed-stem-shorten number? "shorten beamed stems in forced direction.")
(grob-property-description 'beaming number-pair? "number of beams extending to left and right.")
-(grob-property-description 'beams list? "list of beam ptrs.")
+(grob-property-description 'beams grob-list? "list of beam ptrs.")
(grob-property-description 'beautiful number? "number that dictates when a slur should be de-uglyfied. It correlates with the enclosed area between noteheads and slurs. A value of 0.1 yields only undisturbed slurs, a value of 5 will tolerate quite high blown slurs.")
(grob-property-description 'before-grace-spacing-factor number? " stretch space this much if there are grace notes before the column.")
(grob-property-description 'before-line-breaking-callback procedure? "Procedure taking grob as argument.
notes. 0.0 means no extra space (accidentals are ignored).")
(grob-property-description 'between-system-string string? "string
to dump between two systems. Useful for forcing pagebreaks.")
-(grob-property-description 'bounded-by-me list? "list of spanners that have this
+(grob-property-description 'bounded-by-me grob-list? "list of spanners that have this
column as start/begin point. Only columns that have grobs or act as bounds are spaced.")
(grob-property-description 'bracket-thick number? "width of a system start bracket. .")
(grob-property-description 'break-align-symbol symbol? "the index in the spacing table (symbol) of the to be aligned item.")
(grob-property-description 'brace-collapse-height number? "Minimum height of system start delimiter brace glyphs. If equal or smaller, the brace is removed.")
(grob-property-description 'bracket-collapse-height number? "Minimum height of system start delimiter bracket glyphs. If equal or smaller, the bracket is removed.")
(grob-property-description 'column-space-strength number? "relative strength of space following breakable columns (eg. prefatory matter).")
-(grob-property-description 'columns list? "list of grobs, typically containing paper-columns, list of note-columns.")
+(grob-property-description 'columns grob-list? "list of grobs, typically containing paper-columns, list of note-columns.")
(grob-property-description 'contains-grace boolean? "Used to widen entries for grace notes.")
(grob-property-description 'control-points list? "List of 4 offsets (number-pairs) that form control points for the tie/slur shape.")
(grob-property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams .")
(grob-property-description 'de-uglify-parameters list? "list of 3 real constants. They define the valid areas for the middle control points. Used in de_uglyfy. They are a bit empirical.")
(grob-property-description 'neutral-direction dir? "Where to go if we're in the middle of the staff.")
(grob-property-description 'delta-y number? "amount of ascension.")
-(grob-property-description 'dependencies list? "list of score-grob pointers that indicate who to compute first for certain global passes.")
+(grob-property-description 'dependencies grob-list? "list of score-grob pointers that indicate who to compute first for certain global passes.")
(grob-property-description 'details list? "alist of parameters for detailed grob behavior.")
(grob-property-description 'dir-forced boolean? "set if direction has been forced; read by Beam.")
(grob-property-description 'dir-function procedure? "function of type (count total)->direction. Default value: beam-dir-majority, also available: beam-dir-mean, beam-dir-median.
(grob-property-description 'dy number? "set by beam: vertical travel height")
(grob-property-description 'edge-height pair? "a cons that specifies the heights of the vertical egdes '(LEFT-height . RIGHT-height).")
(grob-property-description 'edge-text pair? "a cons that specifies the texts to be set at the edges '(LEFT-text . RIGHT-text).")
-(grob-property-description 'elements list? "list of grobs, type depending on the Grob where this is set in.")
+(grob-property-description 'elements grob-list? "list of grobs, type depending on the Grob where this is set in.")
(grob-property-description 'expand-limit integer? "maximum number of measures expanded in church rests.")
(grob-property-description 'extra-extent-X number-pair? "enlarge in X dimension by this much, measured in staff space.")
(grob-property-description 'extra-extent-Y number-pair? "see @code{extra-extent-Y}.")
(grob-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
(grob-property-description 'inversion list? " musical-pitch, optional.")
(grob-property-description 'invisible-staff boolean? "is staff invisible?")
-(grob-property-description 'items-worth-living list? "list of interesting items. If empty in a particular system, clear that system.")
+(grob-property-description 'items-worth-living grob-list? "list of interesting items. If empty in a particular system, clear that system.")
(grob-property-description 'kern number? "amount of extra white space to add.
For text, this is `relative'(?) to the current alignment.
(grob-property-description 'shortest-playing-duration moment? "duration of the shortest playing in that column.")
(grob-property-description 'shortest-starter-duration moment? "duration of the shortest notes that starts exactly in this column.")
(grob-property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.")
-(grob-property-description 'side-support list? "the support, a list of grobs.")
+(grob-property-description 'side-support grob-list? "the support, a list of grobs.")
(grob-property-description 'slope number? "some kind of slope")
(grob-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
(grob-property-description 'space-alist list? "Alist of break align spacing tuples. See basic-property.scm")
(grob-property-description 'stem-length number? "length of stem.")
(grob-property-description 'stem-shorten list? "shorten stems in forced directions given flag multiplicity.")
(grob-property-description 'stem-spacing-correction number? "optical correction amount.")
-(grob-property-description 'stems list? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")
+(grob-property-description 'stems grob-list? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")
(grob-property-description 'stretch-distance number-pair? "pair of distances.")
(grob-property-description 'style symbol? "a string determining what style of glyph is typeset. Valid choices depend on the function that is reading this property. .")
(grob-property-description 'support-head ly-grob? "the note head at
(string-append (number->string line) " " file)
)
+
;; cpp hack to get useful error message
(define ifdef "First run this through cpp.")
(define ifndef "First run this through cpp.")
import os
import stat
import string
-
-
import getopt
import sys
import __main__
# fix this by importing the 1.5.2 implementation pre instead. Fix by Mats.
if float (sys.version[0:3]) < 2.2:
- try:
- import pre
- re = pre
- del pre
- except ImportError:
- import re
+ try:
+ import pre
+ re = pre
+ del pre
+ except ImportError:
+ import re
else:
- import re
+ import re
# Attempt to fix problems with limited stack size set by Python!
# Sets unlimited stack size. Note that the resource module only
except:
pass
+errorport = sys.stderr
+verbose_p = 0
+
+
+
+try:
+ import gettext
+ gettext.bindtextdomain ('lilypond', localedir)
+ gettext.textdomain ('lilypond')
+ _ = gettext.gettext
+except:
+ def _ (s):
+ return s
+
+def progress (s):
+ errorport.write (s + '\n')
program_version = '@TOPLEVEL_VERSION@'
if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
- program_version = '1.4.12'
+ program_version = '1.5.53'
# if set, LILYPONDPREFIX must take prevalence
# if datadir is not set, we're doing a build and LILYPONDPREFIX
while datadir[-1] == os.sep:
datadir= datadir[:-1]
-# Try to cater for bad installations of LilyPond, that have
-# broken TeX setup. Just hope this doesn't hurt good TeX
-# setups. Maybe we should check if kpsewhich can find
-# feta16.{afm,mf,tex,tfm}, and only set env upon failure.
+kpse = os.popen ('kpsexpand \$TEXMF').read()
+kpse = re.sub('[ \t\n]+$','', kpse)
+type1_paths = os.popen ('kpsewhich -expand-path=\$T1FONTS').read ()
+
environment = {
- 'MFINPUTS' : datadir + '/mf:',
- 'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:.:',
- 'TFMFONTS' : datadir + '/tfm:',
- 'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa',
+ # TODO: * prevent multiple addition.
+ # * clean TEXINPUTS, MFINPUTS, TFMFONTS,
+ # as these take prevalence over $TEXMF
+ # and thus may break tex run?
+ 'TEXMF' : "{%s,%s}" % (datadir, kpse) ,
+ 'GS_FONTPATH' : type1_paths,
'GS_LIB' : datadir + '/ps',
}
}
def setup_environment ():
+ # $TEXMF is special, previous value is already taken care of
+ if os.environ.has_key ('TEXMF'):
+ del os.environ['TEXMF']
+
for key in environment.keys ():
val = environment[key]
if os.environ.has_key (key):
for key in non_path_environment.keys ():
val = non_path_environment[key]
- print '%s=%s' % (key,val)
os.environ[key] = val
include_path = [os.getcwd()]
g_read_lys = 0
g_do_pictures = 1
g_num_cols = 1
+g_do_music = 1
format = ''
g_run_lilypond = 1
return 0
return tmp
+class HtmlPaper:
+ def __init__(self):
+ self.m_papersize = 'letterpaper'
+ self.m_fontsize = 12
+ def get_linewidth(self):
+ return html_linewidths[self.m_papersize][self.m_fontsize]
+
class TexiPaper:
def __init__(self):
self.m_papersize = 'letterpaper'
'smallbook': {12: in2pt(5)},
'letterpaper': {12: in2pt(6)}}
+html_linewidths = {
+ 'afourpaper': {12: mm2pt(160)},
+ 'afourwide': {12: in2pt(6.5)},
+ 'afourlatex': {12: mm2pt(150)},
+ 'smallbook': {12: in2pt(5)},
+ 'letterpaper': {12: in2pt(6)}}
+
option_definitions = [
- ('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'),
- ('DIM', '', 'default-music-fontsize', 'default fontsize for music. DIM is assumed to be in points'),
- ('DIM', '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'),
- ('OPT', '', 'extra-options' , 'Pass OPT quoted to the lilypond command line'),
- ('DIM', '', 'force-music-fontsize', 'force fontsize for all inline lilypond. DIM is assumed be to in points'),
- ('DIM', '', 'force-lilypond-fontsize', 'deprecated, use --force-music-fontsize'),
- ('DIR', 'I', 'include', 'include path'),
- ('', 'M', 'dependencies', 'write dependencies'),
- ('PREF', '', 'dep-prefix', 'prepend PREF before each -M dependency'),
- ('', 'n', 'no-lily', 'don\'t run lilypond'),
- ('', '', 'no-pictures', "don\'t generate pictures"),
- ('', '', 'read-lys', "don't write ly files."),
- ('FILE', 'o', 'outname', 'filename main output file'),
- ('FILE', '', 'outdir', "where to place generated files"),
- ('', 'v', 'version', 'print version information' ),
- ('', 'h', 'help', 'print help'),
- ]
+ ('EXT', 'f', 'format', 'use output format EXT (texi [default], latex, html)'),
+ ('DIM', '', 'default-music-fontsize', 'default fontsize for music. DIM is assumed to be in points'),
+ ('DIM', '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'),
+ ('OPT', '', 'extra-options' , 'Pass OPT quoted to the lilypond command line'),
+ ('DIM', '', 'force-music-fontsize', 'force fontsize for all inline lilypond. DIM is assumed be to in points'),
+ ('DIM', '', 'force-lilypond-fontsize', 'deprecated, use --force-music-fontsize'),
+ ('', 'h', 'help', 'this help'),
+ ('DIR', 'I', 'include', 'include path'),
+ ('', 'M', 'dependencies', 'write dependencies'),
+ ('PREF', '', 'dep-prefix', 'prepend PREF before each -M dependency'),
+ ('', 'n', 'no-lily', 'don\'t run lilypond'),
+ ('', '', 'no-pictures', "don\'t generate pictures"),
+ ('', '', 'no-music', "strip all lilypond blocks from output"),
+ ('', '', 'read-lys', "don't write ly files."),
+ ('FILE', 'o', 'outname', 'filename main output file'),
+ ('FILE', '', 'outdir', "where to place generated files"),
+ ('', 'V', 'verbose', 'verbose' ),
+ ('', 'v', 'version', 'print version information' ),
+ ]
# format specific strings, ie. regex-es for input, and % strings for output
output_dict= {
+ 'html' : {'output-lilypond': '''<lilypond%s>
+%s
+</lilypond>''',
+ 'output-filename' : r'''
+
+<pre>%s</pre>:''',
+ 'output-lilypond-fragment': '''<lilypond%s>
+\context Staff\context Voice{ %s }
+</lilypond>''',
+ 'output-noinline': r'''
+<!-- generated: %(fn)s.png !-->
+''',
+ ## maybe <hr> ?
+ 'pagebreak': None,
+ 'output-verbatim': r'''<pre>
+%s
+</pre>''',
+ ## Ugh we need to differentiate on origin:
+ ## lilypond-block origin wants an extra <p>, but
+ ## inline music doesn't.
+ ## possibly other center options?
+ 'output-all': r'''
+<a href="%(fn)s.png">
+<img align="center" valign="center" border="0" src="%(fn)s.png" alt="[picture of music]"></a>
+''',
+ },
'latex': {
- 'output-lilypond-fragment' : r"""\begin[eps,singleline,%s]{lilypond}
+ 'output-lilypond-fragment' : r'''\begin[eps,singleline,%s]{lilypond}
\context Staff <
\context Voice{
%s
}
>
-\end{lilypond}""",
+\end{lilypond}''',
'output-filename' : r'''
\verb+%s+:''',
- 'output-lilypond': r"""\begin[%s]{lilypond}
+ 'output-lilypond': r'''\begin[%s]{lilypond}
%s
\end{lilypond}
-""",
+''',
'output-verbatim': r'''\begin{verbatim}%s\end{verbatim}%%
''',
'output-default-post': "\\def\postLilypondExample{}\n",
'pagebreak': r'\pagebreak',
},
- 'texi' : {'output-lilypond': """@lilypond[%s]
+ 'texi' : {'output-lilypond': '''@lilypond[%s]
%s
@end lilypond
-""",
+''',
'output-filename' : r'''
@file{%s}:''',
- 'output-lilypond-fragment': """@lilypond[%s]
+ 'output-lilypond-fragment': '''@lilypond[%s]
\context Staff\context Voice{ %s }
-@end lilypond """,
+@end lilypond ''',
'output-noinline': r'''
@c generated: %(fn)s.png
''',
'pagebreak': None,
- 'output-verbatim': r"""@example
+ 'output-verbatim': r'''@example
%s
@end example
-""",
+''',
# do some tweaking: @ is needed in some ps stuff.
# override EndLilyPondOutput, since @tex is done
# top of the document.
# should also support fragment in
+
+# ugh, the <p> below breaks inline images...
- 'output-all': r"""
+ 'output-all': r'''
@tex
\catcode`\@=12
\input lilyponddefs
<img border=0 src="%(fn)s.png" alt="[picture of music]">
</a>
@end html
-""",
+''',
}
+
}
def output_verbatim (body):
- if __main__.format == 'texi':
+ if __main__.format == 'html':
+ body = re.sub ('&', '&', body)
+ body = re.sub ('>', '>', body)
+ body = re.sub ('<', '<', body)
+ elif __main__.format == 'texi':
body = re.sub ('([@{}])', '@\\1', body)
return get_output ('output-verbatim') % body
#warning: this uses extended regular expressions. Tread with care.
-# legenda (?P name parameter
-# *? match non-greedily.
+# legenda
+# (?P -- name parameter
+# *? -- match non-greedily.
+# (?m) -- ?
re_dict = {
+ 'html': {
+ 'include': no_match,
+ 'input': no_match,
+ 'header': no_match,
+ 'preamble-end': no_match,
+ 'landscape': no_match,
+ 'verbatim': r'''(?s)(?P<code><pre>\s.*?</pre>\s)''',
+ 'verb': r'''(?P<code><pre>.*?</pre>)''',
+ 'lilypond-file': r'(?m)(?P<match><lilypondfile(?P<options>[^>]+)?>\s*(?P<filename>[^<]+)\s*</lilypondfile>)',
+ 'lilypond' : '(?m)(?P<match><lilypond((?P<options>[^:]*):)(?P<code>.*?)/>)',
+ 'lilypond-block': r'''(?ms)(?P<match><lilypond(?P<options>[^>]+)?>(?P<code>.*?)</lilypond>)''',
+ 'option-sep' : '\s*',
+ 'intertext': r',?\s*intertext=\".*?\"',
+ 'multiline-comment': r"(?sm)\s*(?!@c\s+)(?P<code><!--\s.*?!-->)\s",
+ 'singleline-comment': no_match,
+ 'numcols': no_match,
+ },
+
'latex': {'input': r'(?m)^[^%\n]*?(?P<match>\\mbinput{?([^}\t \n}]*))',
'include': r'(?m)^[^%\n]*?(?P<match>\\mbinclude{(?P<filename>[^}]+)})',
'option-sep' : ',\s*',
'header': no_match,
'preamble-end': no_match,
'landscape': no_match,
- 'verbatim': r"""(?s)(?P<code>@example\s.*?@end example\s)""",
- 'verb': r"""(?P<code>@code{.*?})""",
+ 'verbatim': r'''(?s)(?P<code>@example\s.*?@end example\s)''',
+ 'verb': r'''(?P<code>@code{.*?})''',
'lilypond-file': '(?m)^(?P<match>@lilypondfile(\[(?P<options>[^]]*)\])?{(?P<filename>[^}]+)})',
- 'lilypond' : '(?m)^(?P<match>@lilypond(\[(?P<options>[^]]*)\])?{(?P<code>.*?)})',
- 'lilypond-block': r"""(?ms)^(?P<match>@lilypond(\[(?P<options>[^]]*)\])?\s(?P<code>.*?)@end lilypond)\s""",
- 'option-sep' : ',\s*',
- 'intertext': r',?\s*intertext=\".*?\"',
- 'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
- 'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>@c.*$\n+))",
- 'numcols': no_match,
+ 'lilypond' : '(?m)^(?P<match>@lilypond(\[(?P<options>[^]]+)\])?{(?P<code>.*?)})',
+ 'lilypond-block': r'''(?ms)^(?P<match>@lilypond(\[(?P<options>.*?)\])?\n(?P<code>.*?)@end +lilypond)\s''',
+ 'option-sep' : ',\s*',
+ 'intertext': r',?\s*intertext=\".*?\"',
+ 'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
+ 'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>@c.*$\n+))",
+ 'numcols': no_match,
}
}
def compose_full_body (body, opts):
- """Construct the lilypond code to send to Lilypond.
- Add stuff to BODY using OPTS as options."""
+ '''Construct the lilypond code to send to Lilypond.
+ Add stuff to BODY using OPTS as options.'''
music_size = default_music_fontsize
latex_size = default_text_fontsize
indent = ''
error ("format of option string invalid (was `%')" % s)
return d
+def scan_html_preamble (chunks):
+ return
+
def scan_latex_preamble(chunks):
# first we want to scan the \documentclass line
# it should be the first non-comment line
paperguru.m_fontsize = int(m.group(1))
break
- while chunks[idx][0] != 'preamble-end':
+ while idx < len(chunks) and chunks[idx][0] != 'preamble-end':
if chunks[idx] == 'ignore':
idx = idx + 1
continue
if string.find(c[1], "@%s" % s) != -1:
paperguru.m_papersize = s
+
def scan_preamble (chunks):
- if __main__.format == 'texi':
- scan_texi_preamble(chunks)
- else:
- assert __main__.format == 'latex'
- scan_latex_preamble(chunks)
+ if __main__.format == 'html':
+ scan_html_preamble (chunks)
+ elif __main__.format == 'latex':
+ scan_latex_preamble (chunks)
+ elif __main__.format == 'texi':
+ scan_texi_preamble (chunks)
def completize_preamble (chunks):
- if __main__.format == 'texi':
+ if __main__.format != 'latex':
return chunks
pre_b = post_b = graphics_b = None
for chunk in chunks:
m = get_re('def-post-re').search(chunk[1])
if m:
post_b = 1
+
if chunk[0] == 'input':
m = get_re('usepackage-graphics').search(chunk[1])
if m:
graphics_b = 1
x = 0
- while chunks[x][0] != 'preamble-end':
+ while x < len (chunks) and chunks[x][0] != 'preamble-end':
x = x + 1
+
+ if x == len(chunks):
+ return chunks
+
if not pre_b:
chunks.insert(x, ('input', get_output ('output-default-pre')))
if not post_b:
chunks.insert(x, ('input', get_output ('output-default-post')))
if not graphics_b:
chunks.insert(x, ('input', get_output ('usepackage-graphics')))
+
return chunks
read_files = []
def find_file (name):
- """
+ '''
Search the include path for NAME. If found, return the (CONTENTS, PATH) of the file.
- """
-
+ '''
+
+ if name == '-':
+ return (sys.stdin.read (), '<stdin>')
f = None
nm = ''
for a in include_path:
(options, m.group('code')))]
def make_lilypond_file(m):
- """
+ '''
Find @lilypondfile{bla.ly} occurences and substitute bla.ly
into a @lilypond .. @end lilypond block.
- """
+ '''
if m.group('options'):
options = m.group('options')
(options, content))]
def make_lilypond_block(m):
+ if not g_do_music:
+ return []
+
if m.group('options'):
options = get_re('option-sep').split (m.group('options'))
else:
return [('numcols', m.group('code'), 2)]
def chop_chunks(chunks, re_name, func, use_match=0):
- newchunks = []
- for c in chunks:
- if c[0] == 'input':
- str = c[1]
- while str:
- m = get_re (re_name).search (str)
- if m == None:
- newchunks.append (('input', str))
- str = ''
- else:
- if use_match:
- newchunks.append (('input', str[:m.start ('match')]))
- else:
- newchunks.append (('input', str[:m.start (0)]))
- #newchunks.extend(func(m))
- # python 1.5 compatible:
- newchunks = newchunks + func(m)
- str = str [m.end(0):]
- else:
- newchunks.append(c)
- return newchunks
+ newchunks = []
+ for c in chunks:
+ if c[0] == 'input':
+ str = c[1]
+ while str:
+# print re_name, str[0:150] +'...'+ str[-50:]
+
+ m = get_re (re_name).search (str)
+ if m == None:
+ newchunks.append (('input', str))
+ str = ''
+ else:
+ if use_match:
+ newchunks.append (('input', str[:m.start ('match')]))
+ else:
+ newchunks.append (('input', str[:m.start (0)]))
+ #newchunks.extend(func(m))
+ # python 1.5 compatible:
+ newchunks = newchunks + func(m)
+ str = str [m.end(0):]
+ else:
+ newchunks.append(c)
+ return newchunks
def determine_format (str):
if __main__.format == '':
- latex = re.search ('\\\\document', str[:200])
- texinfo = re.search ('@node|@setfilename', str[:200])
+ html = re.search ('(?i)<[dh]tml', str[:200])
+ latex = re.search (r'''\\document''', str[:200])
+ texi = re.search ('@node|@setfilename', str[:200])
f = ''
g = None
- if texinfo and latex == None:
- f = 'texi'
- elif latex and texinfo == None:
+ if html and not latex and not texi:
+ f = 'html'
+ elif latex and not html and not texi:
f = 'latex'
+ elif texi and not html and not latex:
+ f = 'texi'
else:
- error("error: can't determine format, please specify")
+ error ("can't determine format, please specify")
__main__.format = f
if __main__.paperguru == None:
- if __main__.format == 'texi':
- g = TexiPaper()
- else:
- g = LatexPaper()
+ if __main__.format == 'html':
+ g = HtmlPaper ()
+ elif __main__.format == 'latex':
+ g = LatexPaper ()
+ elif __main__.format == 'texi':
+ g = TexiPaper ()
__main__.paperguru = g
def read_doc_file (filename):
- """Read the input file, find verbatim chunks and do \input and \include
- """
+ '''Read the input file, find verbatim chunks and do \input and \include
+ '''
(str, path) = find_file(filename)
determine_format (str)
taken_file_names = {}
def schedule_lilypond_block (chunk):
- """Take the body and options from CHUNK, figure out how the
+ '''Take the body and options from CHUNK, figure out how the
real .ly should look, and what should be left MAIN_STR (meant
for the main file). The .ly is written, and scheduled in
TODO.
TODO has format [basename, extension, extension, ... ]
- """
+ '''
(type, body, opts) = chunk
assert type == 'lilypond'
file_body = compose_full_body (body, opts)
+ ## Hmm, we should hash only lilypond source, and skip the
+ ## %options are ...
+ ## comment line
basename = 'lily-' + `abs(hash (file_body))`
for o in opts:
m = re.search ('filename="(.*?)"', o)
if m:
basename = m.group (1)
if not taken_file_names.has_key(basename):
- taken_file_names[basename] = 0
+ taken_file_names[basename] = 0
else:
- taken_file_names[basename] = taken_file_names[basename] + 1
- basename = basename + "-%i" % taken_file_names[basename]
+ taken_file_names[basename] = taken_file_names[basename] + 1
+ basename = basename + "-%i" % taken_file_names[basename]
if not g_read_lys:
update_file(file_body, os.path.join(g_outdir, basename) + '.ly')
needed_filetypes = ['tex']
- if format == 'texi':
- needed_filetypes.append('eps')
- needed_filetypes.append('png')
+ if format == 'html' or format == 'texi':
+ needed_filetypes.append ('eps')
+ needed_filetypes.append ('png')
if 'eps' in opts and not ('eps' in needed_filetypes):
needed_filetypes.append('eps')
pathbase = os.path.join (g_outdir, basename)
- def f(base, ext1, ext2):
+ def f (base, ext1, ext2):
a = os.path.isfile(base + ext2)
if (os.path.isfile(base + ext1) and
os.path.isfile(base + ext2) and
s = 'output-eps'
else:
s = 'output-tex'
- else: # format == 'texi'
+ else: # format == 'html' or format == 'texi':
s = 'output-all'
newbody = newbody + get_output (s) % {'fn': basename }
return ('lilypond', newbody, opts, todo, basename)
-def process_lilypond_blocks(outname, chunks):#ugh rename
+def process_lilypond_blocks(chunks):#ugh rename
newchunks = []
# Count sections/chapters.
for c in chunks:
error ('Error command exited with value %d\n' % st)
return st
+def quiet_system (cmd, name):
+ if not verbose_p:
+ progress ( _("Running %s...") % name)
+ cmd = cmd + ' 1> /dev/null 2> /dev/null'
+
+ return system (cmd)
def get_bbox (filename):
system ('gs -sDEVICE=bbox -q -sOutputFile=- -dNOPAUSE %s -c quit > %s.bbox 2>&1 ' % (filename, filename))
x = (2* margin + bbox[2] - bbox[0]) * res / 72.
y = (2* margin + bbox[3] - bbox[1]) * res / 72.
- cmd = r"""gs -g%dx%d -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit > %s"""
+ cmd = r'''gs -g%dx%d -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit > %s'''
cmd = cmd % (x, y, res, name + '.trans.eps', name + '.eps',name + '.png')
+ quiet_system (cmd, 'gs')
+
try:
status = system (cmd)
except:
if g_outdir:
lilyopts = lilyopts + '--dep-prefix=' + g_outdir + '/'
texfiles = string.join (tex, ' ')
- system ('lilypond --header=texidoc %s %s %s' % (lilyopts, g_extra_opts, texfiles))
+ cmd = 'lilypond --header=texidoc %s %s %s' \
+ % (lilyopts, g_extra_opts, texfiles)
+
+ system (cmd)
#
# Ugh, fixing up dependencies for .tex generation
f.close ()
for e in eps:
- system(r"tex '\nonstopmode \input %s'" % e)
- system(r"dvips -E -o %s %s" % (e + '.eps', e))
+ cmd = r"echo $TEXMF; tex '\nonstopmode \input %s'" % e
+ quiet_system (cmd, 'TeX')
+
+ cmd = r"dvips -E -o %s %s" % (e + '.eps', e)
+ quiet_system (cmd, 'dvips')
for g in png:
make_pixmap (g)
def update_file (body, name):
- """
+ '''
write the body if it has changed
- """
+ '''
same = 0
try:
f = open (name)
return str
def help():
- sys.stdout.write("""Usage: lilypond-book [options] FILE\n
+ sys.stdout.write('''Usage: lilypond-book [options] FILE\n
Generate hybrid LaTeX input from Latex + lilypond
Options:
-""")
+''')
sys.stdout.write (options_help_str (option_definitions))
- sys.stdout.write (r"""Warning all output is written in the CURRENT directory
+ sys.stdout.write (r'''Warning all output is written in the CURRENT directory
Written by Tom Cato Amundsen <tca@gnu.org> and
Han-Wen Nienhuys <hanwen@cs.uu.nl>
-""")
+''')
sys.exit (0)
def write_deps (fn, target, chunks):
global read_files
- sys.stdout.write('Writing `%s\'\n' % os.path.join(g_outdir, fn))
+ sys.stderr.write('Writing `%s\'\n' % os.path.join(g_outdir, fn))
f = open (os.path.join(g_outdir, fn), 'w')
f.write ('%s%s: ' % (g_dep_prefix, target))
for d in read_files:
f.close ()
read_files = []
-def identify():
- sys.stdout.write ('lilypond-book (GNU LilyPond) %s\n' % program_version)
+def identify (stream):
+ stream.write ('lilypond-book (GNU LilyPond) %s\n' % program_version)
def print_version ():
- identify()
- sys.stdout.write (r"""Copyright 1998--1999
+ identify (sys.stdout)
+ sys.stdout.write (r'''Copyright 1998--1999
Distributed under terms of the GNU General Public License. It comes with
NO WARRANTY.
-""")
+''')
def check_texidoc (chunks):
return '%fpt' % (dims[0] *lmag)
- body = re.sub (r"""\\lilypondepswidth{(.*?)}""", replace_eps_dim, c[1])
+ body = re.sub (r'''\\lilypondepswidth{(.*?)}''', replace_eps_dim, c[1])
newchunks.append(('lilypond', body, c[2], c[3], c[4]))
return newchunks
+##docme: why global?
foutn=""
def do_file(input_filename):
- global foutn
- file_settings = {}
- if outname:
- my_outname = outname
- else:
- my_outname = os.path.basename(os.path.splitext(input_filename)[0])
- my_depname = my_outname + '.dep'
chunks = read_doc_file(input_filename)
chunks = chop_chunks(chunks, 'lilypond', make_lilypond, 1)
#for c in chunks: print "c:", c;
#sys.exit()
scan_preamble(chunks)
- chunks = process_lilypond_blocks(my_outname, chunks)
-
- foutn = os.path.join (g_outdir, my_outname + '.' + format)
+ chunks = process_lilypond_blocks(chunks)
# Do It.
if __main__.g_run_lilypond:
x = 0
chunks = completize_preamble (chunks)
- sys.stderr.write ("Writing `%s'\n" % foutn)
- fout = open (foutn, 'w')
+
+
+ global foutn
+
+ if outname:
+ my_outname = outname
+ elif input_filename == '-' or input_filename == "/dev/stdin":
+ my_outname = '-'
+ else:
+ my_outname = os.path.basename (os.path.splitext(input_filename)[0]) + '.' + format
+ my_depname = my_outname + '.dep'
+
+ if my_outname == '-' or my_outname == '/dev/stdout':
+ fout = sys.stdout
+ foutn = "<stdout>"
+ __main__.do_deps = 0
+ else:
+ foutn = os.path.join (g_outdir, my_outname)
+ sys.stderr.write ("Writing `%s'\n" % foutn)
+ fout = open (foutn, 'w')
for c in chunks:
fout.write (c[1])
fout.close ()
elif o == '--version' or o == '-v':
print_version ()
sys.exit (0)
+ elif o == '--verbose' or o == '-V':
+ __main__.verbose_p = 1
elif o == '--format' or o == '-f':
__main__.format = a
elif o == '--outname' or o == '-o':
g_dep_prefix = a
elif o == '--no-pictures':
g_do_pictures = 0
+ elif o == '--no-music':
+ g_do_music = 0
elif o == '--read-lys':
g_read_lys = 1
elif o == '--outdir':
g_outdir = a
-identify()
+identify (sys.stderr)
if g_outdir:
if os.path.isfile(g_outdir):
error ("outdir is a file: %s" % g_outdir)
SUBDIRS = bin make stepmake
else
SUBDIRS = stepmake
+# don't install stepmake
+install: local-install
+ @echo Not installing stepmake
endif
#
# Run this to generate configure and initial GNUmakefiles
srcdir=`dirname $0`
-DIE=0
-# autoconf > 2.50 is not very common yet,
-# and disappointingly incompatible with the widely available 2.13
-version=`autoconf --version 2>/dev/null | awk '{print $3}'`
-if test "$version" != "2.13"; then
- echo "ERROR: Please install autoconf 2.13"
- exit 1
+# Be paranoid: check for autoconf == 2.13
+# Some setups have both autoconf 2.13 and 2.50 available through
+# a wrapper script: /usr/bin/autoconf.
+# This wrapper may incorrectly autoselect autoconf 2.50, but it
+# advertises itself as autoconf 2.13.
+# If you have such a setup, invoke this script as:
+# autoconf=autoconf2.13 ./autogen.sh
+for i in autoconf autoconf2.13 false; do
+ version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
+ if test "0$version" -eq 213; then
+ autoconf=$i
+ break
+ fi
+done
+
+if test -z "$autoconf"; then
+ echo "ERROR: Please install autoconf 2.13"
+ exit 1
fi
if test -z "$*"; then
(
cd $dr
echo "Running autoconf ..."
- autoconf
+ $autoconf
)
done
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
-timestamp='2001-07-19'
+timestamp='2002-03-20'
# 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
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted 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
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c ;
- for c in cc gcc c89 ; do
+ for c in cc gcc c89 c99 ; do
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
if test $? = 0 ; then
CC_FOR_BUILD="$c"; break ;
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
- # Netbsd (nbsd) targets should (where applicable) match one or
+ # 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.
- # Determine the machine/vendor (is the vendor relevant).
- case "${UNAME_MACHINE}" in
- amiga) machine=m68k-unknown ;;
- arm32) machine=arm-unknown ;;
- atari*) machine=m68k-atari ;;
- sun3*) machine=m68k-sun ;;
- mac68k) machine=m68k-apple ;;
- macppc) machine=powerpc-apple ;;
- hp3[0-9][05]) machine=m68k-hp ;;
- ibmrt|romp-ibm) machine=romp-ibm ;;
- *) machine=${UNAME_MACHINE}-unknown ;;
+ #
+ # 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
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-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}" in
- i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+ 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 __ELF__ >/dev/null
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2-307)
UNAME_MACHINE="alphaev67"
;;
+ 2-1307)
+ UNAME_MACHINE="alphaev68"
+ ;;
esac
fi
rm -f $dummy.s $dummy
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit 0;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
- arc64:OpenBSD:*:*)
- echo mips64el-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hkmips:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ 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)
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
- atari*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
# 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
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
- sun3*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
exit (-1);
}
EOF
- eval $set_cc_for_build
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm -f $dummy.c $dummy && exit 0
exit 0 ;;
*: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>
exit(0);
}
EOF
- eval $set_cc_for_build
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5
fi
exit 0 ;;
*:AIX:*:[45])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ 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
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- case "${HPUX_REV}" in
- 11.[0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ 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
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 ;;
- esac
- if [ "${HP_ARCH}" = "" ]; then
- sed 's/^ //' << EOF >$dummy.c
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
exit (0);
}
EOF
- eval $set_cc_for_build
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy
- fi ;;
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+ rm -f $dummy.c $dummy
+ fi ;;
esac
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
echo ia64-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
exit (0);
}
EOF
- eval $set_cc_for_build
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
- hppa*:OpenBSD:*:*)
- echo hppa-unknown-openbsd
- exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
- CRAY*X-MP:*:*:*)
- echo xmp-cray-unicos
- exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY-2:*:*:*)
- echo cray2-cray-unicos
- exit 0 ;;
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 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
+ x86:Interix*:3*)
+ echo i386-pc-interix3
+ exit 0 ;;
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
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
- case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
- big) echo mips-unknown-linux-gnu && exit 0 ;;
- little) echo mipsel-unknown-linux-gnu && exit 0 ;;
- esac
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ rm -f $dummy.c
+ test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
- ld_supported_targets=`cd /; ld --help 2>&1 \
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
- cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-# if __GLIBC__ >= 2
- printf ("%s-pc-linux-gnu\n", argv[1]);
-# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-#else
- printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
- return 0;
-}
-EOF
eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ rm -f $dummy.c
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
echo ns32k-sni-sysv
fi
exit 0 ;;
- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
echo `uname -p`-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
- if test "${UNAME_MACHINE}" = "x86pc"; then
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[KW]:NONSTOP_KERNEL:*:*)
+ NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
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>
}
EOF
-eval $set_cc_for_build
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
-timestamp='2001-06-08'
+timestamp='2002-03-07'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# 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>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# 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* | storm-chaos* | os2-emx* | windows32-*)
+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
- | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
- | pyramid | mn10200 | mn10300 | tron | a29k \
- | 580 | i960 | h8300 \
- | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
- | hppa64 \
- | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
- | alphaev6[78] \
- | we32k | ns16k | clipper | i370 | sh | sh[34] \
- | powerpc | powerpcle \
- | 1750a | dsp16xx | pdp10 | pdp11 \
- | mips16 | mips64 | mipsel | mips64el \
- | mips64orion | mips64orionel | mipstx39 | mipstx39el \
- | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
- | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \
- | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
- | v850 | c4x \
- | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
- | pj | pjl | h8500 | z8k)
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dsp16xx \
+ | fr30 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el | mips64vr4300 \
+ | mips64vr4300el | mips64vr5000 | mips64vr5000el \
+ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+ | mipsisa32 | mipsisa64 \
+ | mn10200 | mn10300 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
exit 1
;;
# Recognize the basic CPU types with company name.
- # FIXME: clean up the formatting here.
- vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
- | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
- | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
- | xmp-* | ymp-* \
- | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
- | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
- | hppa2.0n-* | hppa64-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
- | alphaev6[78]-* \
- | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
- | clipper-* | orion-* \
- | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \
- | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
- | mips16-* | mips64-* | mipsel-* \
- | mips64el-* | mips64orion-* | mips64orionel-* \
- | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
- | mipstx39-* | mipstx39el-* | mcore-* \
- | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
- | [cjt]90-* \
- | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
- | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
- | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | m32r-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
basic_machine=ns32k-sequent
os=-dynix
;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
basic_machine=c38-convex
os=-bsd
;;
- cray | ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- cray2)
- basic_machine=cray2-cray
- os=-unicos
- ;;
- [cjt]90)
- basic_machine=${basic_machine}-cray
+ cray | j90)
+ basic_machine=j90-cray
os=-unicos
;;
crds | unos)
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
basic_machine=m68k-atari
os=-mint
;;
- mipsel*-linux*)
- basic_machine=mipsel-unknown
- os=-linux-gnu
- ;;
- mips*-linux*)
- basic_machine=mips-unknown
- os=-linux-gnu
- ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
basic_machine=m68k-rom68k
os=-coff
;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
basic_machine=hppa1.1-oki
os=-proelf
;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | k6 | nexgen)
+ pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
pentiumii | pentium2)
basic_machine=i686-pc
;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
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
;;
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
basic_machine=sh-hitachi
os=-hms
;;
- sparclite-wrs)
+ sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
+ sv1)
basic_machine=sv1-cray
os=-unicos
;;
basic_machine=i386-sequent
os=-dynix
;;
+ t3d)
+ basic_machine=alpha-cray
+ os=-unicos
+ ;;
t3e)
- basic_machine=t3e-cray
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
tx39el)
basic_machine=mipstx39el-unknown
;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
basic_machine=i386-pc
os=-windows32-msvcrt
;;
- xmp)
- basic_machine=xmp-cray
- os=-unicos
- ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
op60c)
basic_machine=hppa1.1-oki
;;
- mips)
- if [ x$os = x-linux-gnu ]; then
- basic_machine=mips-unknown
- else
- basic_machine=mips-mips
- fi
- ;;
romp)
basic_machine=romp-ibm
;;
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4)
+ sh3 | sh4 | sh3eb | sh4eb)
basic_machine=sh-unknown
;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
-acis*)
os=-aos
;;
+ -atheos*)
+ os=-atheos
+ ;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
-ns2 )
os=-nextstep2
;;
arm*-semi)
os=-aout
;;
+ # This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
mips*-*)
os=-elf
;;
+ or32-*)
+ os=-coff
+ ;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
+ -vos*)
+ vendor=stratus
+ ;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
Begin3
Title: StepMake
Version: 0.1.81
-Entered-date: 13MEI02
+Entered-date: 01JUL02
Description:
Keywords: music notation typesetting midi fonts engraving
Author: janneke@gnu.org (Jan Nieuwenhuizen)
ifeq ($(PACKAGE),STEPMAKE)
INSTALLATION_DIR=$(datadir)/stepmake
else
-INSTALLATION_DIR=$(dir $(datadir))/$(package)/stepmake/stepmake
+INSTALLATION_DIR=$(dir $(patsubst %/, %, $(dir $(datadir))))$(package)/stepmake/stepmake
endif
INSTALLATION_FILES=GNUmakefile $(MAKE_FILES)
# internal, not normally used
DEPTH = $(depth)/$(package-depth)
-ifeq ($(topdir),)
-topdir := $(shell cd $(depth); pwd)
+ifeq ($(abs-srcdir),)
+abs-srcdir := $(shell cd $(depth); pwd)
+#deprecated
+topdir := $(abs-srcdir)
+abs-builddir := $(shell cd $(depth)/$(builddir); pwd)
endif
pwd := $(shell pwd)
-# $(depth) is deprecated, for most cases you'll want $(src-depth)
-#
-# Well, on second thought.
-# It can do no harm, but using src-depth iso depth is only necessary
-# for broken rules that do
+# src-depth is for broken rules that do
# cd $(outdir) && foo $(depth) ...
src-depth = $(depth)/$(srcdir)
# Don't remove $(outdir)/.log's. Logs are a target!
+# we want to see botched results as well.
$(outdir)/%.dvi: %.mf
- $(METAFONT) "\nonstopmode; input $<;"
+ -$(METAFONT) "\nonstopmode; input $<;"
gftodvi $(basename $<)
mv $(basename $<).dvi $(outdir)
rm $(basename $<).*gf
gftopk $< $@
-
$(outdir)/%.pfa: %.mf
- pktrace --simplify --keep-trying $(basename $(@F))
+ pktrace -I $(outdir)/ --pfa --simplify --keep-trying $(basename $(@F))
mv $(basename $(@F)).pfa $(outdir)
$(outdir)/%.pfb: %.mf
- pktrace --simplify --keep-trying $(basename $(@F))
+ pktrace -I $(outdir)/ --pfb --simplify --keep-trying $(basename $(@F))
mv $(basename $(@F)).pfb $(outdir)
-
#%.afm:
# $(SHELL) $(depth)/buildscripts/tfmtoafm.sh $(shell basename $@ .afm)
# mv $@ $@.in
copy-to-top: $(TO_TOP_FILES)
$(foreach i, $(TO_TOP_FILES), \
- cp $(i) $(depth)/ && ) true
- -cp $(outdir)/*png $(outdir)/index.html $(depth) # don't fail if not making website
+ cp $(i) $(depth)/$(builddir) && ) true
+ -cp $(outroot)/out-www/*png $(outroot)/out-www/index.html $(depth)/$(builddir)
+ -cp $(outdir)/*png $(outdir)/index.html $(depth)/$(builddir) # don't fail when not making website
local-WWW: $(HTML_FILES) copy-to-top
# we want footers even if website builds (or is built) partly