]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/ly2dvi.py
release: 1.5.43
[lilypond.git] / scripts / ly2dvi.py
index 90fa4d603224e176692bbd6ba457bc767f8b9d25..d428202869b5eccf511cac581c4c8c2bba2ef0c9 100644 (file)
@@ -96,7 +96,7 @@ def identify ():
 def warranty ():
        identify ()
        sys.stdout.write ('\n')
-       sys.stdout.write (_ ('Copyright (c) %s by' % ' 2001'))
+       sys.stdout.write (_ ('Copyright (c) %s by' % ' 2001--2002'))
        sys.stdout.write ('\n')
        sys.stdout.write ('  Han-Wen Nienhuys')
        sys.stdout.write ('  Jan Nieuwenhuizen')
@@ -359,17 +359,13 @@ track_dependencies_p = 0
 dependency_files = []
 
 
-#
-# 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)
+
 environment = {
-       'MFINPUTS' : datadir + '/mf' + ':',
-       'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:' + '.:'
-               + os.getcwd() + ':',
-       'TFMFONTS' : datadir + '/tfm' + ':',
+       ## todo: prevent multiple addition.
+       'TEXMF' : "{%s,%s}" % (datadir, kpse) ,
        'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa',
        'GS_LIB' : datadir + '/ps',
 }