From 6390f0ddcb03abdef1f5dca4b441cf7844e437ad Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:02:17 +0000 Subject: [PATCH] lilypond-1.3.106 --- scripts/mudela-book.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py index fa2ec8706e..d37806d3a9 100644 --- a/scripts/mudela-book.py +++ b/scripts/mudela-book.py @@ -5,6 +5,8 @@ # * add support for .lilyrc +# todo: dimension handling (all the x2y) is clumsy. + # This is was the idea for handling of comments: # Multiline comments, @ignore .. @end ignore is scanned for # in read_doc_file, and the chunks are marked as 'ignore', so @@ -36,10 +38,14 @@ import operator program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.3.85' + program_version = '1.3.106' include_path = [os.getcwd()] + +# g_ is for global (?) + +g_here_dir = os.getcwd () g_dep_prefix = '' g_outdir = '' g_force_mudela_fontsize = 0 @@ -814,7 +820,9 @@ def find_eps_dims (match): fn =match.group (1) dims = bounding_box_dimensions (fn) - + if g_outdir: + fn = os.path.join(g_outdir, fn) + return '%ipt' % dims[0] @@ -848,8 +856,14 @@ def compile_all_files (chunks): if g_outdir: os.chdir(g_outdir) if tex: - lilyopts = map (lambda x: '-I ' + x, include_path) - lilyopts = string.join (lilyopts, ' ' ) + # fixme: be sys-independent. + def incl_opt (x): + if g_outdir and x[0] <> '/' : + x = os.path.join (g_here_dir, x) + return ' -I %s' % x + + incs = map (incl_opt, include_path) + lilyopts = string.join (incs, ' ' ) texfiles = string.join (tex, ' ') system ('lilypond %s %s' % (lilyopts, texfiles)) for e in eps: -- 2.39.5