]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.143.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 27 Mar 2001 14:38:36 +0000 (16:38 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 27 Mar 2001 14:38:36 +0000 (16:38 +0200)
1.3.143.jcn2
============

* Added environment settings to ly2dvi and lilypond-book.

* Bugfix: make diff links diff into patch-dir, like make release.

* Bugfix: make diff/release for different configs.

* Bugfix: convert-ly: don't change item name ChordName to ChordNames.

* Added flag (LilyPond-kick-xdvi) to LilyPond emacs mode to allow
simultaneous view processes.

16 files changed:
CHANGES
VERSION
buildscripts/lilypond-login.sh
buildscripts/lilypond-profile.sh
input/bugs/lyrics-spacing.ly [new file with mode: 0644]
input/test/american-chords.ly
input/test/chords.ly
input/test/jazz-chords.ly
lilypond-mode.el
scripts/convert-ly.py
scripts/lilypond-book.py
scripts/ly2dvi.py
scripts/update-lily.py
stepmake/bin/package-diff.py
stepmake/bin/release.py
stepmake/stepmake/package.make

diff --git a/CHANGES b/CHANGES
index cbdfc1be3334efb8a63dadb386ffe56ba202bda4..74a6a0dd357b607932be9b43996651b5faa37843 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,17 @@
+1.3.143.jcn2
+============
+
+* Added environment settings to ly2dvi and lilypond-book.
+
+* Bugfix: make diff links diff into patch-dir, like make release.
+
+* Bugfix: make diff/release for different configs.
+
+* Bugfix: convert-ly: don't change item name ChordName to ChordNames.
+
+* Added flag (LilyPond-kick-xdvi) to LilyPond emacs mode to allow
+simultaneous view processes.
+
 1.3.143.jcn1
 ============
 
diff --git a/VERSION b/VERSION
index 74ac4485095bb35c80adfad34c3b824d100835dc..ad508afa1634befbac5fd44b6806356abd735a38 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=143
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 38fb855e8042711b15f10903061376c09da1f30f..436c53d0c1dee7d096d4aea935c633897cb15d31 100755 (executable)
@@ -1,12 +1,14 @@
 #!/bin/csh
 
-# env. vars for the C-shell.
-# set environment for LilyPond.  To be installed in /etc/profile.d/
+# Setup TeX/LaTeX Ghostscript C-shell environment for LilyPond.
+# 
+# Red Hat-like systems should install this in /etc/profile.d/
 
-setenv GS_FONTPATH "@datadir@/afm"
+setenv GS_FONTPATH "@datadir@/afm:@datadir@/pfa:$GS_FONTPATH"
+setenv GS_LIB "@datadir@/ps:$GS_LIB"
 
 # bit silly. for ly2dvi, overrules compiled-in datadir...
-setenv LILYPONDPREFIX "@datadir@"
+setenv LILYPONDPREFIX "@datadir@"
 
 # include an empty path component for the system wide includes.
 if ($?MFINPUTS) then
@@ -19,7 +21,7 @@ if ($?TEXINPUTS) then
 else
         setenv TEXINPUTS "/usr/share/lilypond/tex::"
 endif
-if ($?TEXINPUTS) then
+if ($?TFMFONTS) then
         setenv TFMFONTS "@datadir@/tfm:$TFMFONTS"
 else
         setenv TFMFONTS "@datadir@/tfm:"
index 48e60c0f3ec15440974dc217ca2a59d516dd5f8e..576a30b9fe4b26c3e8d318aa753fa1876b943012 100755 (executable)
@@ -1,20 +1,34 @@
 #!/bin/sh
 
+# Setup TeX/LaTeX Ghostscript environment for LilyPond.
 
-# set environment for LilyPond.  To be installed in /etc/profile.d/
-GS_FONTPATH="@datadir@/afm:@datadir@/pfa"
+# Red Hat-like systems should install this in /etc/profile.d/
+
+# This is a bit of a kludge.  Ideally, lilypond's tex, afm, pfa, ps
+# directories should be installed into their location in the texmf/gs
+# trees, rather than messing around with environment variables (eg,
+# see Debian or SuSE package).
+
+datadir="@datadir@"
+
+# For direct ps output fonts
+GS_FONTPATH="$datadir/afm:$datadir/pfa"
+
+# For direct ps output: ps/lilyponddefs.ps
+GS_LIB="$datadir/ps"
 
 # bit silly. for ly2dvi, overrules compiled-in datadir...
-LILYPONDPREFIX="@datadir@"
+# Better comment this out.  Compiled-in datadir serves exactly the
+# same purpose, but is more likely to be correct (think multiple
+# versions of lilypond).
+# LILYPONDPREFIX="$datadir"
 
 # include an empty path component for the system wide includes.
-MFINPUTS="@datadir@/mf:"${MFINPUTS:=":"}
-TEXINPUTS="@datadir@/tex:@datadir@/ps:"${TEXINPUTS:=":"}
-
-# TFMFONTS="@datadir@/tfm:$TFMFONTS"
+MFINPUTS="$datadir/mf:"${MFINPUTS:=":"}
+TEXINPUTS="$datadir/tex:$datadir/ps:"${TEXINPUTS:=":"}
+TFMFONTS="$datadir/tfm:"${TFMFONTS:=":"}
 
-## gs_lib ??? 
-export LILYINCLUDE LILYPONDPREFIX MFINPUTS TEXINPUTS GS_LIB GS_FONTPATH
+export MFINPUTS TEXINPUTS TFMFONTS GS_LIB GS_FONTPATH
 
        
 
diff --git a/input/bugs/lyrics-spacing.ly b/input/bugs/lyrics-spacing.ly
new file mode 100644 (file)
index 0000000..bb43fbc
--- /dev/null
@@ -0,0 +1,27 @@
+\include "norsk.ly"
+
+\header {
+texidoc ="``baz'' should be centered on the a (tenor voice), but it is
+not.";
+}
+
+\version "1.3.140";
+
+sop = \notes \transpose c''  {e2 e fis1 }
+alt = \notes \relative c' {cis2 e e d }
+ten = \notes \relative c' {a2 a a1 }
+txt = \lyrics {foo2 bar baz jazz }
+
+\score {
+    <
+       \context Staff = up \notes <
+           \context Voice=sopv {\stemUp \sop}
+           \context Voice=altv {\stemDown \alt}
+       >
+       \context Staff = down \notes < \clef "F";
+           \context Voice=tenv {\stemUp \ten}
+       >
+       \context Lyrics = la { \txt }
+    >
+    \paper { linewidth = -1; }
+}
index 0b356c2980b5dd473d3a45e2884a8ccaaad3adf3..6adc6167d30042643222e73bcd743844b0c85120 100644 (file)
@@ -48,8 +48,8 @@ scheme = \chords {
   \paper {
     \translator { 
       \ChordNamesContext
-      ChordNames \override #'word-space = #1 
-      ChordNames \override #'style = #'american
+      ChordName \override #'word-space = #1 
+      ChordName \override #'style = #'american
     }
   }
 }
index 051ea928d4606f949a8083fcdb86a37390b4ddee..14669e7a00a57eac85829636b06710dd5d000a3a 100644 (file)
@@ -62,7 +62,7 @@ keys =  \notes{
        \paper{
                \translator { 
                        \ChordNamesContext
-                       ChordNames \override #'word-space = #1 
+                       ChordName \override #'word-space = #1 
                }
        }
 }
index 59f350aebb5002a1fbabc8cea10ad0cf7f55ee65..9ff4455d7f14cd48a56c305c296ab5076fc534c3 100644 (file)
@@ -60,8 +60,8 @@ scheme = \chords {
   \paper {
     \translator { 
       \ChordNamesContext
-      ChordNames \override #'word-space = #1 
-      ChordNames \override #'style = #'jazz
+      ChordName \override #'word-space = #1 
+      ChordName \override #'style = #'jazz
     }
   }
 }
index 15dc21ae6e24dc4aa4317b9b17a509399bfcb961..a72f32a034e2548439d9cd4159caac1be13a6720 100644 (file)
@@ -3,7 +3,7 @@
 ;;;
 ;;; source file of the GNU LilyPond music typesetter
 ;;; 
-;;; (c) 1999, 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;;; Inspired on auctex
 
@@ -19,7 +19,7 @@
 (require 'easymenu)
 (require 'compile)
 
-(defconst LilyPond-version "1.3.103"
+(defconst LilyPond-version "1.3.143"
   "`LilyPond-mode' version number.")
 
 (defconst LilyPond-help-address "bug-gnu-music@gnu.org"
@@ -28,6 +28,9 @@
 (defvar LilyPond-mode-hook nil
   "*Hook called by `LilyPond-mode'.")
 
+(defvar LilyPond-kick-xdvi nil
+  "If true, no simultaneous xdvi's are started, but reload signal is sent.")
+
 (defvar LilyPond-regexp-alist
   '(("\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2))
   "Regexp used to match LilyPond errors.  See `compilation-error-regexp-alist'.")
@@ -305,17 +308,19 @@ command."
     (if entry
        (let ((command (LilyPond-command-expand (cadr entry)
                                                (apply file nil))))
-         (let* (
-                (buffer-xdvi (get-buffer "*view*"))
-                (process-xdvi (if buffer-xdvi (get-buffer-process buffer-xdvi) nil)))
-           (if (and process-xdvi
-                    (string-equal name "View"))
-               ;; Don't open new xdvi window, but force redisplay
-               ;; We could make this an option.
-               (signal-process (process-id process-xdvi) 'SIGUSR1)
-             (progn
-               (setq LilyPond-command-default name)
-               (LilyPond-compile-file command name))))))))
+         (if (string-equal name "View")
+             (let ((buffer-xdvi (get-buffer-create "*view*")))
+               (if LilyPond-kick-xdvi
+                 (let ((process-xdvi (get-buffer-process buffer-xdvi)))
+                   (if process-xdvi
+                       ;; Don't open new xdvi window, but force redisplay
+                       ;; We could make this an option.
+                       (signal-process (process-id process-xdvi) 'SIGUSR1)
+                     (start-process-shell-command name buffer-xdvi command)))
+                 (start-process-shell-command name buffer-xdvi command)))
+           (progn
+             (setq LilyPond-command-default name)
+             (LilyPond-compile-file command name)))))))
          
 ;; XEmacs stuff
 ;; Sadly we need this for a macro in Emacs 19.
index e24b537299a9908d3d7751726ba92cde65cc9b70..583d7f5f9e90559e3ac64e91b4737e460128ca59 100644 (file)
@@ -675,6 +675,7 @@ if 1:
                str = re.sub ('LyricVoice', 'LyricsVoice', str)
                # old fix
                str = re.sub ('Chord[Nn]ames*.Chord[Nn]ames*', 'ChordNames.ChordName', str)
+               str = re.sub ('Chord[Nn]ames([ \t\n]+\\\\override)', 'ChordName\\1', str)
                return str
        
        conversions.append (((1,3,113), conv, 'LyricVoice -> LyricsVoice'))
index e15ee356ddaff5485255bcb2291298bdc053c8e0..e4bb7ffef369379b40f2d75d7b0761b9b1e741ad 100644 (file)
@@ -44,6 +44,29 @@ program_version = '@TOPLEVEL_VERSION@'
 if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
        program_version = '1.4pre'
 
+#
+# 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.
+#
+environment = {
+       'MFINPUTS' : datadir + '/mf:',
+       'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:.:',
+       'TFMFONTS' : datadir + '/tfm:',
+       'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa',
+       'GS_LIB' : datadir + '/ps',
+}
+
+def setup_environment ():
+       for key in environment.keys ():
+               val = environment[key]
+               if os.environ.has_key (key):
+                       val = val + os.pathsep + os.environ[key]
+               os.environ[key] = val
+
+
+
 include_path = [os.getcwd()]
 
 
@@ -1219,6 +1242,7 @@ if g_outdir:
                error ("outdir is a file: %s" % g_outdir)
        if not os.path.exists(g_outdir):
                os.mkdir(g_outdir)
+setup_environment ()
 for input_filename in files:
        do_file(input_filename)
        
index ccd80c83788033add40fbfc5bb43dcae45321714..56de2cb14a7bf9e0497a1bc91ee1088c2572bd5c 100644 (file)
@@ -20,9 +20,6 @@ TODO:
 
   * head/header tagline/endfooter
 
-  * check/set TEXINPUTS: see to it that/warn if not/
-    kpathsea can find titledefs.tex?
-    
   * dvi from lilypond .tex output?  This is hairy, because we create dvi
     from lilypond .tex *and* header output.
 
@@ -43,7 +40,8 @@ import __main__
 import operator
 import tempfile
 
-sys.path.append ('@datadir@/python')
+datadir = '@datadir@'
+sys.path.append (datadir + '/python')
 try:
        import gettext
        gettext.bindtextdomain ('lilypond', '@localedir@')
@@ -107,6 +105,27 @@ temp_dir = '%s.dir' % program_name
 keep_temp_dir_p = 0
 verbose_p = 0
 
+#
+# 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.
+#
+environment = {
+       'MFINPUTS' : datadir + '/mf:',
+       'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:.:',
+       'TFMFONTS' : datadir + '/tfm:',
+       'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa',
+       'GS_LIB' : datadir + '/ps',
+}
+
+def setup_environment ():
+       for key in environment.keys ():
+               val = environment[key]
+               if os.environ.has_key (key):
+                       val = val + os.pathsep + os.environ[key]
+               os.environ[key] = val
+
 def identify ():
        sys.stdout.write ('%s (GNU LilyPond) %s\n' % (program_name, program_version))
 
@@ -544,6 +563,8 @@ files = map (lambda x: strip_extension (x, '.ly'), files)
 
 if files:
        setup_temp ()
+       setup_environment ()
+       
        extra = extra_init
        
        dvi_name = do_files (files, extra)
index 4248459bb85634952f9c0c9dabef68660ef14469..1e2c75afee0a91b9953e98a0c536d601ff92f6b7 100644 (file)
@@ -222,6 +222,7 @@ option_definitions = [
        ('DIR', 'b', 'build-root', _ ("unpack and build in DIR [%s]") % build_root),
        ('', 'h', 'help', _ ("this help")),
         ('', 'k', 'keep', _ ("keep all output, and name the directory %s") % temp_dir),
+       ('', 'r', 'remove-previous', _ ("remove previous build")),
        ('', 'V', 'verbose', _ ("verbose")),
        ('', 'v', 'version', _ ("print version number")),
        ('URL', 'u', 'url', _ ("fetch and build URL [%s]") % url),
index 16e8f992fc8c43b1a1347dfc42529a7aae74504e..bc2c8a8eba31a2527f3c761b311dc49a05404cc4 100644 (file)
@@ -49,6 +49,8 @@ def help ():
                'Generate a patch to go to current version\n'
                '  -f, --from=FROM      old is FROM\n'
                '  -h, --help           print this help\n'
+               '      --outdir=DIR     generate in DIR\n'
+               '  -o, --output=NAME    write patch to NAME\n'
                '  -p, --package=DIR    specify package\n'
                '  -r, --release        diff against latest release\n'  
                '  -t, --to=TO          to version TO\n'  
@@ -57,12 +59,12 @@ def help ():
                )
 
 def cleanup ():
-       global from_diff, to_diff, prev_cwd
+       global from_diff, to_diff, original_dir
        os.chdir ('/tmp/package-diff')
        sys.stderr.write ('Cleaning ... ')
        os.system ('rm -fr %s %s' % (from_diff, to_diff))
        sys.stderr.write ('\n')
-       os.chdir (prev_cwd)
+       os.chdir (original_dir)
 
 def untar (fn):
        # os.system ('pwd');
@@ -176,11 +178,13 @@ def makediff (fromdir, todir, patch_name):
    
 
 os.environ['GZIP'] = '-q'
-print 'argv: ' + string.join (sys.argv[2:])
+print 'argv: ' + string.join (sys.argv[1:])
 (options, files) = getopt.getopt (sys.argv[1:], 
-       'hF:f:o:p:rT:t:', ['from=', 'dir-from=', 'dir-to=', 'help', 'output=', 'package=', 'release', 'to='])
+       'hF:f:o:p:rT:t:', ['conf=', 'from=', 'dir-from=', 'dir-to=', 'help', 'outdir=', 'output=', 'package=', 'release', 'to='])
 
 patch_name = ''
+conf = ''
+outdir = ''
 from_src = ''
 to_src = ''
 release=0
@@ -200,8 +204,12 @@ for opt in options:
        elif o == '--help' or o == '-h':
                help ()
                sys.exit (0)
+       elif o == '--outdir':
+               outdir = a
+       elif o == '--conf':
+               conf = a
        elif o == '--output' or o == '-o':
-               patch_name = os.path.join (os.getcwd (), a)
+               patch_name = a
        elif o == '-p' or o == '--package':
                topdir = a
        elif o == '--release' or o == '-r':
@@ -241,7 +249,7 @@ if release:
                flags.from_version[1], flags.from_version[2], '');
 
 import tempfile
-prev_cwd = os.getcwd ();
+original_dir = os.getcwd ();
 
 os.system ('rm -rf /tmp/package-diff') 
 try:
@@ -260,10 +268,15 @@ if to_diff == from_diff:
              sys.stderr.write (patch_name + ': nothing to do: to == from = ' + from_diff + '\n')
              sys.exit (1)
 
+def compat_abspath (path):
+       return os.path.normpath (os.path.join (os.getcwd (), path))
+
+if conf and not outdir:
+       outdir = 'out-' + conf
+
 if not patch_name:
-       pn = to_diff + '.diff'
-       patch_name =  os.path.join (os.getcwd (), 'out')
-       patch_name =  os.path.join (patch_name, pn)
+       to_diff + '.diff'
+patch_name = compat_abspath (os.path.join (outdir, to_diff + '.diff'))
 
 from_diff = '/tmp/package-diff/' + from_diff
 to_diff =  '/tmp/package-diff/' + to_diff
@@ -271,7 +284,7 @@ to_diff =  '/tmp/package-diff/' + to_diff
 if not from_src:
        os.chdir ('/tmp/package-diff')
        untar (released_tarball (flags.from_version))
-       os.chdir (prev_cwd)
+       os.chdir (original_dir)
 else:
        sys.stderr.write ('copying ' + from_src + ' to ' + from_diff + '\n')
        # os.system ('cp -pr %s %s' % (srcdir, from_diff))
@@ -284,7 +297,7 @@ else:
 if not to_src:
        os.chdir ('/tmp/package-diff')
        untar (released_tarball (flags.to_version))
-       os.chdir (prev_cwd)
+       os.chdir (original_dir)
 else:
        sys.stderr.write ('copying ' + to_src + ' to ' + to_diff + '\n')
        os.system ('mkdir -p %s '% (to_diff))
index cc6d6ec5ed440c172e9e06a07b792199d2451e2a..4b563143da581d4000bd1982c6902eae0bcad346 100755 (executable)
@@ -61,7 +61,7 @@ except:
 os.link(orig,  os.path.join (package.release_dir, tarball))
 
 # urg: howto check exit code?
-os.system(sys.executable + ' ' + package.topdir + '/stepmake/bin/package-diff.py --package=' + topdir)
+os.system(sys.executable + ' ' + package.topdir + '/stepmake/bin/package-diff.py --outdir=%s --package=%s' % (outdir, topdir))
 
 diffname = pn + '.diff.gz'
 rel_pn = package.patch_dir + diffname
index 8c75e8cc012ba85b937768ee4d7bd6bde5f2439d..f0fa0c0330283d5e90ba221c5bfc40f0fc4d780b 100644 (file)
@@ -20,7 +20,8 @@ deb:
 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
 
 diff:
-       $(PYTHON) $(step-bindir)/package-diff.py --package=$(topdir) $(makeflags)
+       $(PYTHON) $(step-bindir)/package-diff.py  --outdir=$(topdir)/$(outdir) --package=$(topdir) $(makeflags)
+       -ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
 
 release: 
        $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)