+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
============
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.
#!/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
else
setenv TEXINPUTS "/usr/share/lilypond/tex::"
endif
-if ($?TEXINPUTS) then
+if ($?TFMFONTS) then
setenv TFMFONTS "@datadir@/tfm:$TFMFONTS"
else
setenv TFMFONTS "@datadir@/tfm:"
#!/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
--- /dev/null
+\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; }
+}
\paper {
\translator {
\ChordNamesContext
- ChordNames \override #'word-space = #1
- ChordNames \override #'style = #'american
+ ChordName \override #'word-space = #1
+ ChordName \override #'style = #'american
}
}
}
\paper{
\translator {
\ChordNamesContext
- ChordNames \override #'word-space = #1
+ ChordName \override #'word-space = #1
}
}
}
\paper {
\translator {
\ChordNamesContext
- ChordNames \override #'word-space = #1
- ChordNames \override #'style = #'jazz
+ ChordName \override #'word-space = #1
+ ChordName \override #'style = #'jazz
}
}
}
;;;
;;; 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
(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"
(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'.")
(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.
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'))
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()]
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)
* 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.
import operator
import tempfile
-sys.path.append ('@datadir@/python')
+datadir = '@datadir@'
+sys.path.append (datadir + '/python')
try:
import gettext
gettext.bindtextdomain ('lilypond', '@localedir@')
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))
if files:
setup_temp ()
+ setup_environment ()
+
extra = extra_init
dvi_name = do_files (files, extra)
('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),
'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'
)
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');
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
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':
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:
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
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))
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))
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
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)