[tex-k] Argh! mktextfm

Tomas G. Rokicki rokicki@CS.Stanford.EDU
Sun, 4 Mar 2001 13:42:44 -0800 (PST)


Forwarded:  a contributed patch!  Can a greater god than I check
this out, bless it, and get it into perforce?  Thanks!   -tom

>From hanwen@cs.uu.nl Sun Mar  4 10:14:54 2001
From: Han-Wen Nienhuys <hanwen@cs.uu.nl>
Date: Sun, 4 Mar 2001 19:17:29 +0100
To: "Tomas G. Rokicki" <rokicki@CS.Stanford.EDU>
Cc: jantien@xs4all.nl
Subject: Re: [tex-k] Argh! mktextfm --destdir

rokicki@CS.Stanford.EDU writes:
> Harsh words indeed.  Why not just politely contribute a patch?


It's just so frustrating -- when you finally get to the point where
you found out how to coax some arguments into the mktextfm calling
sequence, then you have to gaze at set -x sh-dumps for half an hour to
figure what's going wrong next.

Maybe it's just me. I swore off shell scripts long, in favor of
python.  I always have trouble figuring out what that code does. And
the reality is even worse: someone actually writes this kind of stuff
with an intent.

Anyway, contributing a patch is easy, here goes. The hard part is
ensuring that the cardhouse doesn't fall apart. If you accept this, I
shall retract all previous statements and say
thanks-with-gassho-deep-kowtow-and-sugar-on-top.


--- /usr/share/texmf/web2c/mktexnam	Thu Jul 20 04:46:23 2000
+++ mktexnam				Sun Mar  4 19:10:57 2001
@@ -1,4 +1,5 @@
 #!/bin/sh
+
 # maketexnam -- find PK and TFM names.
 # te@informatik.uni-hannover.de, kb@mail.tug.org, and
infovore@xs4all.nl.
 # Public domain.
@@ -146,9 +147,11 @@
     *$SEP$MT_DESTROOT$SEP*) # A system tree, check for varfonts.
       if test "x$USE_VARTEXFONTS" = x1 || test "x$USE_ALTERNATE" =
x1; then
         MT_DESTROOT=$MT_VARTEXFONTS
-      fi ;;
+      fi
+      ;;
     *) # A non-system tree.
-      test "x$USE_ALTERNATE" = x1 && MT_DESTROOT=;;
+      test "x$USE_ALTERNATE" = x1 && MT_DESTROOT=
+      ;;
   esac
 fi

@@ -158,9 +161,15 @@
       MT_PKDESTDIR=$DEST
       MT_TFMDESTDIR=$DEST
       MT_MFDESTDIR=$DEST
-      MT_NAMEPART=;;
+
+      # make sure that the next IF (that overwrites MT_xxxDESTDIR) fails
+      MT_DESTROOT=foobar
+      MT_NAMEPART=
+      ;;
+
    *) # Relative destdir => append to the default.
-      MT_NAMEPART=$DEST;;
+      MT_NAMEPART=$DEST
+      ;;
 esac

 if test -z "$MT_DESTROOT"; then





-- 

Han-Wen Nienhuys   |   hanwen@cs.uu.nl    | http://www.cs.uu.nl/~hanwen/