From eaee0b923cbc8a495e7828153904ac8b674c5a21 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 9 Dec 2000 23:51:08 +0100 Subject: [PATCH] patch::: 1.3.116.jcn1 1.3.116.jcn1 ============ * Bugfix: lilypond-book: check for .texidoc files *after* running lilypond. --- Generated by janneke@gnu.org, From = lilypond-1.3.116, To = lilypond-1.3.116.jcn1 usage cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.116.jcn1.diff Patches do not contain automatically generated files or (urg) empty directories, i.e., you should rerun autoconf, configure --- CHANGES | 12 +++++++++++- VERSION | 2 +- scripts/lilypond-book.py | 41 +++++++++++++++++++++++++++++----------- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/CHANGES b/CHANGES index 277d51ff11..afa7ea9766 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,14 @@ -1.3.116.mb1 +--- ../lilypond-1.3.116/CHANGES Fri Dec 8 14:40:11 2000 +++ b/CHANGES Sat Dec 9 23:51:08 2000 +@@ -1,3 +1,8 @@ +1.3.116.jcn1 +============ + +* Bugfix: lilypond-book: check for .texidoc files *after* running lilypond. + + 1.3.115.jcn2 + ============ + 1.3.116.mb1 =========== * Bugfix: convert-ly.py: Correct syntax for inserted \version, diff --git a/VERSION b/VERSION index 8534d83a23..153b797949 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=116 -MY_PATCH_LEVEL=mb1 +MY_PATCH_LEVEL=jcn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 4d6b0e58f8..0634dad0ab 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -805,8 +805,6 @@ def schedule_lilypond_block (chunk): else: s = 'output-tex' else: # format == 'texi' - if os.path.isfile (pathbase + '.texidoc'): - newbody = newbody + '\n@include %s.texidoc' % basename s = 'output-all' newbody = newbody + get_output (s) % {'fn': basename } return ('lilypond', newbody, opts, todo, basename) @@ -999,6 +997,30 @@ Distributed under terms of the GNU General Public License. It comes with NO WARRANTY. """) + +def check_texidoc (chunks): + n = [] + for c in chunks: + if c[0] == 'lilypond': + (type, body, opts, todo, basename) = c; + pathbase = os.path.join (g_outdir, basename) + if os.path.isfile (pathbase + '.texidoc'): + body = '\n@include %s.texidoc' % basename + body + c = (type, body, opts, todo, basename) + n.append (c) + return n + +def fix_epswidth (chunks): + newchunks = [] + for c in chunks: + if c[0] == 'lilypond' and 'eps' in c[2]: + body = re.sub (r"""\\lilypondepswidth{(.*?)}""", find_eps_dims, c[1]) + # why do we junk opts, todo, basename? + new_chunk = (('lilypond', body)) + newchunks.append (c) + return newchunks + + def do_file(input_filename): file_settings = {} if outname: @@ -1019,18 +1041,15 @@ def do_file(input_filename): #sys.exit() scan_preamble(chunks) chunks = process_lilypond_blocks(my_outname, chunks) + # Do It. if __main__.g_run_lilypond: compile_all_files (chunks) - newchunks = [] - # finishing touch. - for c in chunks: - if c[0] == 'lilypond' and 'eps' in c[2]: - body = re.sub (r"""\\lilypondepswidth{(.*?)}""", find_eps_dims, c[1]) - newchunks.append (('lilypond', body)) - else: - newchunks.append (c) - chunks = newchunks + chunks = fix_epswidth (chunks) + + if __main__.format == 'texi': + chunks = check_texidoc (chunks) + x = 0 chunks = completize_preamble (chunks) foutn = os.path.join(g_outdir, my_outname + '.' + format) -- 2.39.5