From: Jan Nieuwenhuizen Date: Sun, 16 Jun 2002 21:01:50 +0000 (+0000) Subject: * GNUmakefile.in (builddir-setup): Bugfix: include srcdir/tex as X-Git-Tag: release/1.5.62~19 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=67babf9e09521a2b90b3dd5fdd58c2e5f26ed98d;p=lilypond.git * GNUmakefile.in (builddir-setup): Bugfix: include srcdir/tex as well as mf/out as subdirs of tex, for kpathsea to find through TEXMF. * scripts/lilypond-book.py (environment): Bugfix: update to new TEXMF scheme, from ly2dvi. --- diff --git a/ChangeLog b/ChangeLog index 8c38697d2a..1d7531a456 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2002-06-16 Jan Nieuwenhuizen + * GNUmakefile.in (builddir-setup): Bugfix: include srcdir/tex as + well as mf/out as subdirs of tex, for kpathsea to find through TEXMF. + + * scripts/lilypond-book.py (environment): Bugfix: update to new + TEXMF scheme, from ly2dvi. + * lily/lookup.cc (slur): Invoke bezier-bow. * scm/tex.scm (bezier-bow): diff --git a/GNUmakefile.in b/GNUmakefile.in index 6f9510cd8c..f33e116afb 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -128,8 +128,12 @@ $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force: ln -s ../../../mf/$(outconfbase) tfm && \ ln -s ../../../$(srcdir)/mf && \ ln -s ../../../$(srcdir)/ps && \ - ln -s ../../../$(srcdir)/scm && \ - ln -s ../../../$(srcdir)/tex + ln -s ../../../$(srcdir)/scm + @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \ + mkdir tex + @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/tex && \ + ln -s ../../../../$(srcdir)/tex source && \ + ln -s ../../../../mf/$(outconfbase) generate @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \ mkdir fonts @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/fonts && \ diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 49c20ecfda..2f0bf3a7a0 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -103,15 +103,17 @@ else: while datadir[-1] == os.sep: datadir= datadir[:-1] -# 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. +kpse = os.popen ('kpsexpand \$TEXMF').read() +kpse = re.sub('[ \t\n]+$','', kpse) +type1_paths = os.popen ('kpsewhich -expand-path=\$T1FONTS').read () + environment = { - 'MFINPUTS' : datadir + '/mf:', - 'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:.:', - 'TFMFONTS' : datadir + '/tfm:', - 'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa', + # TODO: * prevent multiple addition. + # * clean TEXINPUTS, MFINPUTS, TFMFONTS, + # as these take prevalence over $TEXMF + # and thus may break tex run? + 'TEXMF' : "{%s,%s}" % (datadir, kpse) , + 'GS_FONTPATH' : type1_paths, 'GS_LIB' : datadir + '/ps', } @@ -123,6 +125,10 @@ non_path_environment = { } def setup_environment (): + # $TEXMF is special, previous value is already taken care of + if os.environ.has_key ('TEXMF'): + del os.environ['TEXMF'] + for key in environment.keys (): val = environment[key] if os.environ.has_key (key): @@ -1264,7 +1270,7 @@ def compile_all_files (chunks): f.close () for e in eps: - cmd = r"tex '\nonstopmode \input %s'" % e + cmd = r"echo $TEXMF; tex '\nonstopmode \input %s'" % e quiet_system (cmd, 'TeX') cmd = r"dvips -E -o %s %s" % (e + '.eps', e) diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 7b7baea5f6..96f0a43b63 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -386,7 +386,10 @@ kpse = re.sub('[ \t\n]+$','', kpse) type1_paths = os.popen ('kpsewhich -expand-path=\$T1FONTS').read () environment = { - ## todo: prevent multiple addition. + # TODO: * prevent multiple addition. + # * clean TEXINPUTS, MFINPUTS, TFMFONTS, + # as these take prevalence over $TEXMF + # and thus may break tex run? 'TEXMF' : "{%s,%s}" % (datadir, kpse) , 'GS_FONTPATH' : type1_paths, 'GS_LIB' : datadir + '/ps', @@ -404,7 +407,6 @@ def setup_environment (): if os.environ.has_key ('TEXMF'): del os.environ['TEXMF'] - for key in environment.keys (): val = environment[key] if os.environ.has_key (key):