From e69dca2d76216125be7e735d05049c5d7263186e Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 21 Oct 1999 01:57:50 +0200 Subject: [PATCH] release: 1.2.17 --- Documentation/GNUmakefile | 2 +- Documentation/misc/GNUmakefile | 2 +- Documentation/ntweb/GNUmakefile | 2 +- Documentation/programmer/hacking.texi | 7 +- Documentation/programs.texi | 67 ++----- Documentation/topdocs/INSTALL.texi | 3 +- Documentation/topdocs/README.texi | 16 +- Documentation/topdocs/index.tely | 13 +- INSTALL.txt | 3 +- README.txt | 12 +- VERSION | 2 +- buildscripts/genheader.py | 193 +++++++++++-------- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- po/GNUmakefile | 1 - scripts/convert-mudela.py | 145 +++++++------- stepmake/stepmake/documentation-targets.make | 5 - stepmake/stepmake/documentation-vars.make | 17 -- stepmake/stepmake/generic-targets.make | 6 +- stepmake/stepmake/pod-vars.make | 3 + stepmake/stepmake/texinfo-rules.make | 1 + stepmake/stepmake/texinfo-targets.make | 2 + stepmake/stepmake/texinfo-vars.make | 4 +- stepmake/stepmake/yodl-vars.make | 6 + stepmake/stepmake/yolily-topdoc-targets.make | 2 +- tex/titledefs.tex | 2 +- 26 files changed, 261 insertions(+), 267 deletions(-) create mode 100644 stepmake/stepmake/pod-vars.make create mode 100644 stepmake/stepmake/yodl-vars.make diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index b3fda3a821..dd49ab04a3 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -9,7 +9,7 @@ EXTRA_DIST_FILES = include $(depth)/make/stepmake.make -default: do-doc +default: local-doc local-WWW: copy-for-me diff --git a/Documentation/misc/GNUmakefile b/Documentation/misc/GNUmakefile index d9b79c0e6e..003590955b 100644 --- a/Documentation/misc/GNUmakefile +++ b/Documentation/misc/GNUmakefile @@ -9,7 +9,7 @@ EXTRA_DIST_FILES = $(TEXTS) include $(depth)/make/stepmake.make -default: do-doc +default: local-doc local-WWW: $(addprefix $(outdir)/, $(addsuffix .txt, $(TEXTS))) diff --git a/Documentation/ntweb/GNUmakefile b/Documentation/ntweb/GNUmakefile index 2fbe79809f..c6d91915f5 100644 --- a/Documentation/ntweb/GNUmakefile +++ b/Documentation/ntweb/GNUmakefile @@ -9,7 +9,7 @@ EXTRA_DIST_FILES = $(PLAIN_FILES) include $(depth)/make/stepmake.make -default: do-doc dist-plain +default: local-doc dist-plain $(outdir)/%.texi: %.texi m4 -DTOPLEVEL_VERSION=$(TOPLEVEL_VERSION) < $< > $@ diff --git a/Documentation/programmer/hacking.texi b/Documentation/programmer/hacking.texi index 233c800216..da36f2f0ef 100644 --- a/Documentation/programmer/hacking.texi +++ b/Documentation/programmer/hacking.texi @@ -59,13 +59,18 @@ are only three translations so far. @unnumberedsubsec Hackers - There are lots of possibilities of improving the program itself. There are both small projects and big ones. Most of them are listed in the TODO file. A interesting and very big project is writing a GUI frontend to LilyPond. +@unnumberedsubsec Website designers + +The current website for LilyPond is neat and simple, but it is not very +pretty. We would like to have a website with pretty pictures, one that +looks appealing to new users. + @chapter LilyPond internals diff --git a/Documentation/programs.texi b/Documentation/programs.texi index 6bd3b069c4..6fecb0ea43 100644 --- a/Documentation/programs.texi +++ b/Documentation/programs.texi @@ -2,11 +2,10 @@ @setfilename programs.info @settitle Programs -@node Top, , midi2ly Authors, (dir) +@node Top, , , (dir) @top @menu * Programs:: Your Softs- -* convert-mudela:: convert-mudela to newer versions * Ly2dvi:: Python utility to convert mudela to DVI * midi2ly:: convert MIDI to -mudela- @end menu @@ -14,7 +13,7 @@ -@node Programs, convert-mudela, , Top +@node Programs, , , Top @chapter Programs @@ -23,7 +22,7 @@ -@node Ly2dvi, Ly2dvi DESCRIPTION, LilyPond Authors, Top +@node Ly2dvi, , , Top @menu * Ly2dvi DESCRIPTION:: Ly2dvi DESCRIPTION * Ly2dvi SYNOPSIS:: Ly2dvi SYNOPSIS @@ -39,7 +38,7 @@ @end menu @chapter Ly2dvi -@node Ly2dvi DESCRIPTION, Ly2dvi SYNOPSIS, Ly2dvi, Ly2dvi +@node Ly2dvi DESCRIPTION, , , Ly2dvi @section DESCRIPTION ly2dvi is a Python script which creates input file for LaTeX, based on information from the output files from LilyPond. @@ -53,12 +52,12 @@ one or more DVI files. The majority of this utility came from a bourne script written by Jan Arne Fagertun name @file{ly2dvi}. -@node Ly2dvi SYNOPSIS, Ly2dvi OPTIONS, Ly2dvi DESCRIPTION, Ly2dvi +@node Ly2dvi SYNOPSIS, , , Ly2dvi @section SYNOPSIS ly2dvi [options] inputfile[.ly] [....] -@node Ly2dvi OPTIONS, Ly2dvi Features, Ly2dvi SYNOPSIS, Ly2dvi +@node Ly2dvi OPTIONS, , , Ly2dvi @section OPTIONS @table @samp @@ -106,7 +105,7 @@ Arne Fagertun name @file{ly2dvi}. DVI file for each. @end table -@node Ly2dvi Features, Ly2dvi Environment, Ly2dvi OPTIONS, Ly2dvi +@node Ly2dvi Features, , , Ly2dvi @section Features ly2dvi responds to several parameters specified in the mudela @@ -125,7 +124,7 @@ file. They are overridden by corresponding command line options. Specify name of papersize. @end table -@node Ly2dvi Environment, Ly2dvi Files, Ly2dvi Features, Ly2dvi +@node Ly2dvi Environment, , , Ly2dvi @section Environment @table @samp @@ -137,7 +136,7 @@ file. They are overridden by corresponding command line options. Temporary directory name. Default is /tmp @end table -@node Ly2dvi Files, Ly2dvi Initialization Sequence, Ly2dvi Environment, Ly2dvi +@node Ly2dvi Files, , , Ly2dvi @section Files @file{titledefs.tex} is inspected for definitions used to extract @@ -239,7 +238,7 @@ present. Possible value is a valid directory specification that is writable to the user. @end table -@node Ly2dvi Initialization Sequence, Ly2dvi See Also, Ly2dvi Files, Ly2dvi +@node Ly2dvi Initialization Sequence, , , Ly2dvi @section Initialization Sequence The initialization process reads inputs for several sources. Below is a list of priorities for lowest to hightest proirity. @@ -257,12 +256,12 @@ a list of priorities for lowest to hightest proirity. Note that this differs slightly from the original bourne shell version. -@node Ly2dvi See Also, Ly2dvi Bugs, Ly2dvi Initialization Sequence, Ly2dvi +@node Ly2dvi See Also, , , Ly2dvi @section See Also lilypond(1), tex(1), latex(1) -@node Ly2dvi Bugs, Ly2dvi Remarks, Ly2dvi See Also, Ly2dvi +@node Ly2dvi Bugs, , , Ly2dvi @section Bugs If you have found a bug, you should send a bugreport. @@ -276,7 +275,7 @@ If you have found a bug, you should send a bugreport. to this mailinglist). @end itemize -@node Ly2dvi Remarks, Ly2dvi Authors, Ly2dvi Bugs, Ly2dvi +@node Ly2dvi Remarks, , , Ly2dvi @section Remarks Many papersizes are now supported. Information on other sizes @@ -289,7 +288,7 @@ a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, archA, archB, archC, archD, archE, b0, b1, b2, b3, b4, b5, flsa, flse, halfletter, ledger, legal, letter, note -@node Ly2dvi Authors, midi2ly, Ly2dvi Remarks, Ly2dvi +@node Ly2dvi Authors, , , Ly2dvi @section Authors Python Version author: @email{daboys@@austin.rr.com, Jeffrey B. Reed}, @@ -305,24 +304,21 @@ Original bourne shell version author: -@node midi2ly, midi2ly DESCRIPTION, Ly2dvi Authors, Top +@node midi2ly, , , Top @menu * midi2ly DESCRIPTION:: midi2ly DESCRIPTION * midi2ly OPTIONS:: midi2ly OPTIONS -* midi2ly DISCLAIMER:: midi2ly DISCLAIMER -* midi2ly SEE ALSO:: midi2ly SEE ALSO -* midi2ly Authors:: midi2ly Authors @end menu @chapter midi2ly -@node midi2ly DESCRIPTION, midi2ly OPTIONS, midi2ly, midi2ly +@node midi2ly DESCRIPTION, , , midi2ly @section DESCRIPTION midi2ly translates a MIDI input file to Mudela (GNU LilyPond source format). midi2ly is part of the GNU LilyPond music typesetting package. midi2ly [options] midi-file -@node midi2ly OPTIONS, midi2ly DISCLAIMER, midi2ly DESCRIPTION, midi2ly +@node midi2ly OPTIONS, , , midi2ly @section OPTIONS @table @samp @@ -355,33 +351,4 @@ format). midi2ly is part of the GNU LilyPond music typesetting package. Assume no double dotted notes. @end table -@node midi2ly DISCLAIMER, midi2ly SEE ALSO, midi2ly OPTIONS, midi2ly -@section DISCLAIMER - -midi2ly is copyright 1996, 1997 by its authors. midi2ly is distributed -as part of GNU LilyPond, under the terms of the GNU General Public -License. midi2ly is provided without any warranty what so ever. -midi2ly may be freely distributed. For further information consult -the GNU General Public License, from the file @file{COPYING}. - -@node midi2ly SEE ALSO, midi2ly Authors, midi2ly DISCLAIMER, midi2ly -@section SEE ALSO - -@table @samp -@item @strong{lilypond}(1) - The GNU LilyPond music typesetter. -@end table - -@node midi2ly Authors, Top, midi2ly SEE ALSO, midi2ly -@section Authors - -Please consult the documentation file @file{AUTHORS} for more detailed -information, and small contributions. - -@email{janneke@@gnu.org, Jan Nieuwenhuizen}, @uref{http://www.xs4all.nl/~jantien} - - - - - @bye diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index c2884623cc..df25dc856d 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -126,7 +126,8 @@ documentation on-line documentation. It is made by entering @example make website @end example -This does require a fully functioning +This does require a functioning LilyPond. The binary doesn't have to +be installed. If you want to auto-generate Lily's website, you'll need some additional conversion tools. diff --git a/Documentation/topdocs/README.texi b/Documentation/topdocs/README.texi index afaf35fb75..beb59a32f4 100644 --- a/Documentation/topdocs/README.texi +++ b/Documentation/topdocs/README.texi @@ -38,20 +38,22 @@ The real documentation is the directory Documentation/ If you want to read the documentation online, these are options: @itemize @bullet -@item use @file{.html}. Refer to INSTALL.txt for info on how to make the -.html documentation. -@item use @file{.html}. Point your browser to +@item use HTML. Refer to INSTALL.txt for information +on how to make the HTML documentation. + +@item use HTML. Point your browser to @uref{http://www.cs.uu.nl/~hanwen/lilypond/index.html}. @item use @file{.dvi}, for the tutorial and reference manual. Do @example - make -C Documentation/tex/ dvi + make -C Documentation/user/ dvi @end example - +You need a working LilyPond binary to create the @file{dvi} sources . + @item use ASCII. Do using @example - make -C Documentation/ + make -C Documentation/ @end example @end itemize @@ -60,7 +62,7 @@ using @example @section Comments LilyPond is a long way from finished and polished. We do appreciate -criticism, comments, bugreports, patches, etc. +criticism, comments, bugreports, patches, etc., but please, @example Please send your e-mail to one of the MAILING LISTS diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely index 6078fa1349..e0044f3284 100644 --- a/Documentation/topdocs/index.tely +++ b/Documentation/topdocs/index.tely @@ -6,7 +6,7 @@ @top -@unnumbered LilyPond -- The @uref{http://www.fsf.org/gnu/gnu-history.html,GNU Project} Music Typesetter +@unnumbered LilyPond -- The GNU Project Music Typesetter @html @@ -22,17 +22,16 @@ using a high level description file as input. LilyPond is part of the GNU Project. -@c @center + +@unnumberedsec Sheet music + + + @quotation @mudela[fragment] \relative c'' { \key es; r8 [c16 b] [c8 g] [as c16 b] [c8 d] | g,4 } @end mudela @end quotation -@c @end center - - -@unnumberedsec Sheet music - @itemize @bullet diff --git a/INSTALL.txt b/INSTALL.txt index 5c5754ea88..de5d76face 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -118,7 +118,8 @@ Website documentation on-line documentation. It is made by entering make website - This does require a fully functioning + This does require a functioning LilyPond. The binary doesn't have +to be installed. If you want to auto-generate Lily's website, you'll need some additional conversion tools. diff --git a/README.txt b/README.txt index 33f5b31671..c243f30f04 100644 --- a/README.txt +++ b/README.txt @@ -37,15 +37,17 @@ Documentation The real documentation is the directory Documentation/ If you want to read the documentation online, these are options: - * use `.html'. Refer to INSTALL.txt for info on how to make the - .html documentation. + * use HTML. Refer to INSTALL.txt for information on how to make the + HTML documentation. - * use `.html'. Point your browser to + * use HTML. Point your browser to `http://www.cs.uu.nl/~hanwen/lilypond/index.html'. * use `.dvi', for the tutorial and reference manual. Do - make -C Documentation/tex/ dvi + make -C Documentation/user/ dvi + + You need a working LilyPond binary to create the `dvi' sources . * use ASCII. Do using make -C Documentation/ @@ -55,7 +57,7 @@ Comments ======== LilyPond is a long way from finished and polished. We do appreciate -criticism, comments, bugreports, patches, etc. +criticism, comments, bugreports, patches, etc., but please, Please send your e-mail to one of the MAILING LISTS diff --git a/VERSION b/VERSION index 406f84b12f..ece6a4e077 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=2 -PATCH_LEVEL=16 +PATCH_LEVEL=17 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/buildscripts/genheader.py b/buildscripts/genheader.py index 2f57d1a958..bfe64c9be6 100755 --- a/buildscripts/genheader.py +++ b/buildscripts/genheader.py @@ -15,134 +15,159 @@ import getopt import time class My_options: - def __init__(self): - self.commentify = None - self.add_hdr_def = 0 - self.classname = '' + def __init__(self): + self.commentify = None + self.add_hdr_def = 0 + self.classname = '' my_options = My_options() def name(): - return os.environ['USERNAME'] + return os.environ['USERNAME'] # field 4 of passwd is also used for finger info (phone no., office etc) # return pwd.getpwuid(os.getuid())[4] def c_commentify(str): - return '/* ' + re.sub('^',' ', str) + '\n */'; + return '/* ' + re.sub('^',' ', str) + '\n */'; def sh_commentify(str): - return re.sub('^', '# ', str) + return re.sub('^', '# ', str) def tex_commentify(str): - return re.sub('^', '% ', str) + return re.sub('^', '% ', str) def project_str(): - cwd = os.getcwd() - if re.search('flower', cwd): - PROJECT = "the Flower Library" - elif re.search('mf$', cwd): - PROJECT = "the Feta (defintively not an abbreviation for Font-En-Tja) music font" - else: - PROJECT = "the GNU LilyPond music typesetter" - return PROJECT + cwd = os.getcwd() + if re.search('flower', cwd): + PROJECT = "the Flower Library" + elif re.search('mf$', cwd): + PROJECT = "the Feta (defintively not an abbreviation for Font-En-Tja) music font" + else: + PROJECT = "the GNU LilyPond music typesetter" + return PROJECT def head_str(filename): - if my_options.add_hdr_def: - what = "declare " - else: - what=" implement " - - - mailaddres = '' - try: - mailaddres = '<%s>' % os.environ['MAILADDRESS'] - except KeyError: - pass - headstr = '\n%s -- %s\n\nsource file of %s\n\n(c) %d %s %s\n' \ - %(filename, what, project_str(), - time.localtime (time.time ())[0], name(), mailaddres) - return headstr + if my_options.add_hdr_def: + what = "declare " + else: + what=" implement " + + + mailaddres = '' + try: + mailaddres = '<%s>' % os.environ['MAILADDRESS'] + except KeyError: + pass + headstr = '\n%s -- %s\n\nsource file of %s\n\n(c) %d %s %s\n' \ + %(filename, what, project_str(), + time.localtime (time.time ())[0], name(), mailaddres) + return headstr def c_include(filename): - startdef= filename; - trans = string.maketrans( string.lowercase + '-.', string.uppercase + '__') - startdef = string.translate(filename, trans) + startdef= filename; + trans = string.maketrans( string.lowercase + '-.', string.uppercase + '__') + startdef = string.translate(filename, trans) + + + headstr = "\n\n#ifndef %s\n#define %s\n" % (startdef, startdef) + terminatestr = "#endif /* %s */\n" % (startdef); + + return headstr+ '\n\n'+ terminatestr; + + +def icc_include (filename): + startdef= filename; + trans = string.maketrans( string.lowercase + '-.', string.uppercase + '__') + startdef = string.translate(filename, trans) - headstr = "\n\n#ifndef %s\n#define %s\n" % (startdef, startdef) - terminatestr = "#endif /* %s */\n" % (startdef); + headstr = "\n\n#ifndef %s\n#define %s\n" % (startdef, startdef) + headstr = headstr + r""" +#ifndef INLINE +#define INLINE inline +#define LOCAL_INLINE_DEF +#endif +""" + terminatestr = "#endif /* %s */\n" % (startdef); + + terminatestr = r""" +#ifdef LOCAL_INLINE_DEF +#undef LOCAL_INLINE_DEF +#undef INLINE +#endif +""" + terminatestr + return headstr+ '\n\n'+ terminatestr; - return headstr+ '\n\n'+ terminatestr; def help (): - sys.stdout.write ("Usage: genheader [options] FILENAME\n" - + "Generate file with header FILENAME\n\n" - + "Options:\n" - + " -h, --header generate header\n" - + " --help print this help\n" - + " -p, --package=DIR specify package\n" - ) - - sys.exit (0) + sys.stdout.write ("Usage: genheader [options] FILENAME\n" + + "Generate file with header FILENAME\n\n" + + "Options:\n" + + " -h, --header generate header\n" + + " --help print this help\n" + + " -p, --package=DIR specify package\n" + ) + + sys.exit (0) (options, files) = getopt.getopt(sys.argv[1:], 'tcshp:', ['class', 'package=', 'help']) for opt in options: - o = opt[0] - a = opt[1] - if o == '-c': - my_options.commentify = c_commentify - elif o == '-t': - my_options.commentify = tex_commentify - elif o == '-s': - my_options.commentify = sh_commentify - elif o == '-h' or o == '--header': - my_options.add_hdr_def = 1 - elif o == '--class': - my_options.classname = a - elif o == '--help': - help () + o = opt[0] + a = opt[1] + if o == '-c': + my_options.commentify = c_commentify + elif o == '-t': + my_options.commentify = tex_commentify + elif o == '-s': + my_options.commentify = sh_commentify + elif o == '-h' or o == '--header': + my_options.add_hdr_def = 1 + elif o == '--class': + my_options.classname = a + elif o == '--help': + help () # FIXME: should create xxx.cc and include/xxx.hh, with implement/declare Xxx # in one run if my_options.classname: - pass - + pass + def do_file(nm): - s = my_options.commentify(head_str(nm)) - if my_options.add_hdr_def: - s = s + c_include(nm) - return s + s = my_options.commentify(head_str(nm)) + if my_options.add_hdr_def: + s = s + c_include(nm) + return s def extension(ext,nm): - ext = '\\.' + ext - return re.search(ext, nm) <> None + ext = '\\.' + ext + return re.search(ext, nm) <> None def c_extension(nm): - return extension('hh',nm) or extension('cc',nm) \ - or extension('icc', nm) or extension('tcc',nm) + return extension('hh',nm) or extension('cc',nm) \ + or extension('icc', nm) or extension('tcc',nm) def select_commentification(nm): - if c_extension (nm): - return c_commentify - elif extension('py',nm) or extension('pl',nm) or extension('sh',nm): - return sh_commentify - elif extension('mf',nm) or extension('tex',nm) or extension('ly',nm): - return tex_commentify - else: - sys.stderr.write ('unknown extension for file %s\n' % nm) - raise 'help' + if c_extension (nm): + return c_commentify + elif extension('py',nm) or extension('pl',nm) or extension('sh',nm): + return sh_commentify + elif extension('mf',nm) or extension('tex',nm) or extension('ly',nm): + return tex_commentify + else: + sys.stderr.write ('unknown extension for file %s\n' % nm) + raise 'help' for nm in files: - if extension('hh', nm) or extension('icc', nm) or extension('tcc', nm): - my_options.add_hdr_def = 1 - if my_options.commentify == None: - my_options.commentify = select_commentification(nm) - print do_file(nm) + if extension('hh', nm) or extension('icc', nm) or extension('tcc', nm): + my_options.add_hdr_def = 1 + if my_options.commentify == None: + my_options.commentify = select_commentification(nm) + print do_file(nm) diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index e13aa2a544..8874fe35b2 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.2.16 -Entered-date: 21OCT99 +Version: 1.2.17 +Entered-date: 27OCT99 Description: 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.2.16.tar.gz + 1000k lilypond-1.2.17.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.2.16.tar.gz + 1000k lilypond-1.2.17.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index cc796c8485..60e42a0cc7 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.2.16 +Version: 1.2.17 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.2.16.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.2.17.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys diff --git a/po/GNUmakefile b/po/GNUmakefile index c6540da3b1..fb421f7890 100644 --- a/po/GNUmakefile +++ b/po/GNUmakefile @@ -15,7 +15,6 @@ EXTRA_DIST_FILES = TODO $(PO_FILES) $(POT_FILES) STEPMAKE_TEMPLATES=podir include $(depth)/make/stepmake.make -include $(stepdir)/po-rules.make default: $(MO_FILES) diff --git a/scripts/convert-mudela.py b/scripts/convert-mudela.py index 097642bf97..b23b0e6cdd 100644 --- a/scripts/convert-mudela.py +++ b/scripts/convert-mudela.py @@ -112,7 +112,7 @@ def show_rules (file): ############################ if 1: # need new a namespace - def conv (lines): + def conv (str): if re.search ('\\\\octave', str): sys.stderr.write ('\nNot smart enough to convert \\octave') raise FatalConversionError() @@ -124,10 +124,10 @@ if 1: # need new a namespace if 1: # need new a namespace - def conv (lines): - x = re.sub ('\\\\textstyle([^;]+);', + def conv (str): + str = re.sub ('\\\\textstyle([^;]+);', '\\\\property Lyrics . textstyle = \\1', str) - x = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', str) + str = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', str) return str @@ -136,9 +136,9 @@ if 1: # need new a namespace if 1: - def conv (lines): - x = re.sub ('\\\\musical_pitch', '\\\\musicalpitch',str) - x = re.sub ('\\\\meter', '\\\\time',str) + def conv (str): + str = re.sub ('\\\\musical_pitch', '\\\\musicalpitch',str) + str = re.sub ('\\\\meter', '\\\\time',str) return str @@ -147,7 +147,7 @@ if 1: '\\meter -> \\time')) if 1: - def conv (lines): + def conv (str): return lines conversions.append ( @@ -155,10 +155,10 @@ if 1: if 1: - def conv (lines): - x = re.sub ('\\\\accidentals', '\\\\keysignature',str) - x = re.sub ('specialaccidentals *= *1', 'keyoctaviation = 0',str) - x = re.sub ('specialaccidentals *= *0', 'keyoctaviation = 1',str) + def conv (str): + str = re.sub ('\\\\accidentals', '\\\\keysignature',str) + str = re.sub ('specialaccidentals *= *1', 'keyoctaviation = 0',str) + str = re.sub ('specialaccidentals *= *0', 'keyoctaviation = 1',str) return str @@ -167,7 +167,7 @@ if 1: 'specialaccidentals -> keyoctaviation')) if 1: - def conv(lines): + def conv(str): if re.search ('\\\\header', lines): sys.stderr.write ('\nNot smart enough to convert to new \\header format') return lines @@ -175,33 +175,33 @@ if 1: conversions.append ((1,0,2), conv, '\\header { key = concat + with + operator }') if 1: - def conv(lines): - x = re.sub ('\\\\melodic', '\\\\notes',str) + def conv(str): + str = re.sub ('\\\\melodic', '\\\\notes',str) return str conversions.append ((1,0,3), conv, '\\melodic -> \\notes') if 1: - def conv(lines): - x = re.sub ('default_paper *=', '',str) - x = re.sub ('default_midi *=', '',x) + def conv(str): + str = re.sub ('default_paper *=', '',str) + str = re.sub ('default_midi *=', '',x) return str conversions.append ((1,0,4), conv, 'default_{paper,midi}') if 1: - def conv(lines): - x = re.sub ('ChoireStaff', 'ChoirStaff',str) - x = re.sub ('\\output', 'output = ',str) + def conv(str): + str = re.sub ('ChoireStaff', 'ChoirStaff',str) + str = re.sub ('\\output', 'output = ',str) return str conversions.append ((1,0,5), conv, 'ChoireStaff -> ChoirStaff') if 1: - def conv(lines): + def conv(str): if re.search ('[a-zA-Z]+ = *\\translator',str): sys.stderr.write ('\nNot smart enough to change \\translator syntax') raise FatalConversionError() @@ -211,46 +211,46 @@ if 1: if 1: - def conv(lines): - x = re.sub ('\\\\lyric', '\\\\lyrics',str) + def conv(str): + str = re.sub ('\\\\lyric', '\\\\lyrics',str) return str conversions.append ((1,0,7), conv, '\\lyric -> \\lyrics') if 1: - def conv(lines): - x = re.sub ('\\\\\\[/3+', '\\\\times 2/3 { ',str) - x = re.sub ('\\[/3+', '\\\\times 2/3 { [',str) - x = re.sub ('\\\\\\[([0-9/]+)', '\\\\times \\1 {',str) - x = re.sub ('\\[([0-9/]+)', '\\\\times \\1 { [',str) - x = re.sub ('\\\\\\]([0-9/]+)', '}', str) - x = re.sub ('\\\\\\]', '}',str) - x = re.sub ('\\]([0-9/]+)', '] }', str) + def conv(str): + str = re.sub ('\\\\\\[/3+', '\\\\times 2/3 { ',str) + str = re.sub ('\\[/3+', '\\\\times 2/3 { [',str) + str = re.sub ('\\\\\\[([0-9/]+)', '\\\\times \\1 {',str) + str = re.sub ('\\[([0-9/]+)', '\\\\times \\1 { [',str) + str = re.sub ('\\\\\\]([0-9/]+)', '}', str) + str = re.sub ('\\\\\\]', '}',str) + str = re.sub ('\\]([0-9/]+)', '] }', str) return str conversions.append ((1,0,10), conv, '[2/3 ]1/1 -> \\times 2/3 ') if 1: - def conv(lines): + def conv(str): return lines conversions.append ((1,0,12), conv, 'Chord syntax stuff') if 1: - def conv(lines): + def conv(str): - x = re.sub ('<([^>~]+)~([^>]*)>','<\\1 \\2> ~', str) + str = re.sub ('<([^>~]+)~([^>]*)>','<\\1 \\2> ~', str) return str conversions.append ((1,0,13), conv, ' c -> ~ c') if 1: - def conv(lines): - x = re.sub ('<\\[','[<', str) - x = re.sub ('\\]>','>]', str) + def conv(str): + str = re.sub ('<\\[','[<', str) + str = re.sub ('\\]>','>]', str) return str @@ -258,9 +258,9 @@ if 1: if 1: - def conv(lines): - x = re.sub ('\\\\type','\\\\context', str) - x = re.sub ('textstyle','textStyle', str) + def conv(str): + str = re.sub ('\\\\type','\\\\context', str) + str = re.sub ('textstyle','textStyle', str) return str @@ -268,7 +268,7 @@ if 1: if 1: - def conv(lines): + def conv(str): if re.search ('\\\\repeat',str): sys.stderr.write ('\nNot smart enough to convert \\repeat') raise FatalConversionError() @@ -278,10 +278,10 @@ if 1: '\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative') if 1: - def conv(lines): - x = re.sub ('SkipBars','skipBars', str) - x = re.sub ('fontsize','fontSize', str) - x = re.sub ('midi_instrument','midiInstrument', x) + def conv(str): + str = re.sub ('SkipBars','skipBars', str) + str = re.sub ('fontsize','fontSize', str) + str = re.sub ('midi_instrument','midiInstrument', x) return str @@ -290,10 +290,10 @@ if 1: if 1: - def conv(lines): - x = re.sub ('tieydirection','tieVerticalDirection', str) - x = re.sub ('slurydirection','slurVerticalDirection', str) - x = re.sub ('ydirection','verticalDirection', x) + def conv(str): + str = re.sub ('tieydirection','tieVerticalDirection', str) + str = re.sub ('slurydirection','slurVerticalDirection', str) + str = re.sub ('ydirection','verticalDirection', x) return str @@ -302,8 +302,8 @@ if 1: if 1: - def conv(lines): - x = re.sub ('hshift','horizontalNoteShift', str) + def conv(str): + str = re.sub ('hshift','horizontalNoteShift', str) return str @@ -312,8 +312,8 @@ if 1: if 1: - def conv(lines): - x = re.sub ('\\\\grouping[^;]*;','', str) + def conv(str): + str = re.sub ('\\\\grouping[^;]*;','', str) return str @@ -322,8 +322,8 @@ if 1: if 1: - def conv(lines): - x = re.sub ('\\\\wheel','\\\\coda', str) + def conv(str): + str = re.sub ('\\\\wheel','\\\\coda', str) return str @@ -331,9 +331,9 @@ if 1: '\\wheel -> \\coda') if 1: - def conv(lines): - x = re.sub ('keyoctaviation','keyOctaviation', str) - x = re.sub ('slurdash','slurDash', str) + def conv(str): + str = re.sub ('keyoctaviation','keyOctaviation', str) + str = re.sub ('slurdash','slurDash', str) return str @@ -341,8 +341,8 @@ if 1: 'slurdash -> slurDash, keyoctaviation -> keyOctaviation') if 1: - def conv(lines): - x = re.sub ('\\\\repeat *\"?semi\"?','\\\\repeat "volta"', str) + def conv(str): + str = re.sub ('\\\\repeat *\"?semi\"?','\\\\repeat "volta"', str) return str @@ -351,8 +351,8 @@ if 1: if 1: - def conv(lines): - x = re.sub ('\"?beamAuto\"? *= *\"?0?\"?','noAutoBeaming = "1"', str) + def conv(str): + str = re.sub ('\"?beamAuto\"? *= *\"?0?\"?','noAutoBeaming = "1"', str) return str @@ -360,8 +360,8 @@ if 1: 'beamAuto -> noAutoBeaming') if 1: - def conv(lines): - x = re.sub ('automaticMelismas', 'automaticMelismata', str) + def conv(str): + str = re.sub ('automaticMelismas', 'automaticMelismata', str) return str @@ -369,8 +369,8 @@ if 1: 'automaticMelismas -> automaticMelismata') if 1: - def conv(lines): - x = re.sub ('dynamicDir', 'dynamicDirection', str) + def conv(str): + str = re.sub ('dynamicDir', 'dynamicDirection', str) return str @@ -394,7 +394,7 @@ def do_conversion (infile, from_version, outfile, to_version): conv_list = get_conversions (from_version, to_version) sys.stderr.write ('Applying conversions: ') - str = infile.read (-1) + str = infile.read () last_conversion = () try: for x in conv_list: @@ -408,13 +408,15 @@ def do_conversion (infile, from_version, outfile, to_version): if last_conversion: sys.stderr.write ('\n') new_ver = '\\\\version \"%s\"' % tup_to_str (last_conversion) - if re.search (mudela_version_re_str): + if re.search (mudela_version_re_str, str): str = re.sub (mudela_version_re_str,new_ver , str) else: str = new_ver + '\n' + str outfile.write(str) + return last_conversion + class UnknownVersion: pass @@ -450,8 +452,7 @@ def do_one_file (infile_name): else: outfile = sys.stdout - - do_conversion (infile, from_version, outfile, to_version) + touched = do_conversion (infile, from_version, outfile, to_version) if infile_name: infile.close () @@ -459,7 +460,7 @@ def do_one_file (infile_name): if outfile_name: outfile.close () - if __main__.edit: + if __main__.edit and touched: try: os.remove(infile_name + '~') except: diff --git a/stepmake/stepmake/documentation-targets.make b/stepmake/stepmake/documentation-targets.make index 36650129c0..7223b973c4 100644 --- a/stepmake/stepmake/documentation-targets.make +++ b/stepmake/stepmake/documentation-targets.make @@ -1,8 +1,6 @@ default: -do-doc: $(OUTTXT_FILES) - local-WWW: $(OUTHTML_FILES) echo $^ > $(depth)/wwwlist @@ -10,9 +8,6 @@ local-WWW: $(OUTHTML_FILES) local-web: $(MAKE) CONFIGSUFFIX=www local-WWW -doc: do-doc - - footify: $(footify) $(sort $(wildcard $(outdir)/*.html out/*.html out-www/*.html)) diff --git a/stepmake/stepmake/documentation-vars.make b/stepmake/stepmake/documentation-vars.make index 82861d8227..6fb5343eae 100644 --- a/stepmake/stepmake/documentation-vars.make +++ b/stepmake/stepmake/documentation-vars.make @@ -7,20 +7,3 @@ footify=$(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --ver footify-all-command=$(footify) `$(FIND) . -name '*.html' -print` -# -YO_FILES := $(wildcard *.yo) -POD_FILES := $(wildcard *.pod) -TEXINFO_FILES := $(wildcard *.texinfo) -OUTYO_FILES = $(addprefix $(outdir)/,$(YO_FILES)) -OUTPOD_FILES = $(addprefix $(outdir)/,$(POD_FILES)) -OUTTEXINFO_FILES = $(addprefix $(outdir)/,$(TEXINFO_FILES)) - -# -ALL_DOC_FILES = $(POD_FILES) $(TEXINFO_FILES) $(YO_FILES) -OUTTXT_FILES = $(OUTYO_FILES:.yo=.txt) $(OUTIN_FILES:.yo=.txt) -OUTHTML_FILES = $(OUTYO_FILES:.yo=.html) $(OUTIN_FILES:.yo=.html) - -OUTREADME_TXT_FILES=$(addprefix $(outdir)/,$(addsuffix .txt, $(README_TOP_FILES))) -OUTREADME_HTML_FILES=$(addprefix $(outdir)/,$(addsuffix .html, $(README_TOP_FILES))) - -ALL_SOURCES += $(ALL_DOC_FILES) diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make index 327e1e9207..d2b2f9914d 100644 --- a/stepmake/stepmake/generic-targets.make +++ b/stepmake/stepmake/generic-targets.make @@ -82,10 +82,10 @@ Note that all commands recurse into SUBSDIRS\n\ local-help: -doc: -#UGH - true # $(MAKE) -C $(depth)/Documentation all +doc: local-doc + $(LOOP) +local-doc: # Ugh. C++ specific. doc++: diff --git a/stepmake/stepmake/pod-vars.make b/stepmake/stepmake/pod-vars.make new file mode 100644 index 0000000000..541da42c94 --- /dev/null +++ b/stepmake/stepmake/pod-vars.make @@ -0,0 +1,3 @@ + +POD_FILES := $(wildcard *.pod) +OUTPOD_FILES = $(addprefix $(outdir)/,$(POD_FILES)) diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index 8879351964..7b013a29e7 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -19,3 +19,4 @@ $(outdir)/%.txt: $(outdir)/%.texi $(outdir)/%.texi: %.texi cp $< $@ + diff --git a/stepmake/stepmake/texinfo-targets.make b/stepmake/stepmake/texinfo-targets.make index 313f8a23e7..ca47789ef0 100644 --- a/stepmake/stepmake/texinfo-targets.make +++ b/stepmake/stepmake/texinfo-targets.make @@ -1,3 +1,5 @@ # empty local-WWW: $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.html)) + +local-doc: $(OUTTXT_FILES) diff --git a/stepmake/stepmake/texinfo-vars.make b/stepmake/stepmake/texinfo-vars.make index 3a7e7ae04c..2447edd7a6 100644 --- a/stepmake/stepmake/texinfo-vars.make +++ b/stepmake/stepmake/texinfo-vars.make @@ -1,4 +1,6 @@ TEXI_FILES = $(wildcard *.texi) -EXTRA_DIST_FILES += $(TEXI_FILES) +ALL_SOURCES += $(TEXI_FILES) + +OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt)) diff --git a/stepmake/stepmake/yodl-vars.make b/stepmake/stepmake/yodl-vars.make new file mode 100644 index 0000000000..b97bb19492 --- /dev/null +++ b/stepmake/stepmake/yodl-vars.make @@ -0,0 +1,6 @@ + +YO_FILES := $(wildcard *.yo) +OUTYO_FILES = $(addprefix $(outdir)/,$(YO_FILES)) + +OUTTXT_FILES = $(OUTYO_FILES:.yo=.txt) $(OUTIN_FILES:.yo=.txt) +OUTHTML_FILES = $(OUTYO_FILES:.yo=.html) $(OUTIN_FILES:.yo=.html) diff --git a/stepmake/stepmake/yolily-topdoc-targets.make b/stepmake/stepmake/yolily-topdoc-targets.make index 5aadd24bf2..b60d82b2d3 100644 --- a/stepmake/stepmake/yolily-topdoc-targets.make +++ b/stepmake/stepmake/yolily-topdoc-targets.make @@ -1,6 +1,6 @@ # Yolily_topdoc_targets.make -default: do-doc +default: local-doc # urg $(outdir)/%.html: %.yo diff --git a/tex/titledefs.tex b/tex/titledefs.tex index 107b523442..5b02ba912f 100644 --- a/tex/titledefs.tex +++ b/tex/titledefs.tex @@ -14,7 +14,7 @@ \def\theinstrument{} \def\theopus{} \def\thepiece{} -\def\themetre{} +\def\themeter{} \def\thepoet{} % % duh. LaTeX has a \title too. -- 2.39.5