]> git.donarmstrong.com Git - lilypond.git/commitdiff
* GNUmakefile.in (builddir-setup): Bugfix: include srcdir/tex as
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 16 Jun 2002 21:01:50 +0000 (21:01 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 16 Jun 2002 21:01:50 +0000 (21:01 +0000)
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.

ChangeLog
GNUmakefile.in
scripts/lilypond-book.py
scripts/ly2dvi.py

index 8c38697d2af369aef8cf5927b32ce6994aa5b212..1d7531a456ca12a2214afa403e3a9b5b63fcba39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2002-06-16  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * 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): 
index 6f9510cd8c517bb05092aa643d5e9be237e3c928..f33e116afb88a1477b536b084ec888994480be04 100644 (file)
@@ -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 && \
index 49c20ecfdab72da47b6c66bee51871ef8618c451..2f0bf3a7a0b0cf6df61504dfce4bf19b834f144b 100644 (file)
@@ -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)
index 7b7baea5f6f2b971ea4f6cac065293d26cf18499..96f0a43b638659b2387a330410e191ae232f95f0 100644 (file)
@@ -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):