[tex-live] Having a .fmt for different engines

Norbert Preining preining at logic.at
Fri Jan 5 13:21:31 CET 2007


Hi all!

New incarnation, thanks to Kakuto-sans remarks mf.base and mpost.mem are
now installed into
	$enginedir
which is set respectively.

What I am not sure is whether the call to mktexupd works, as I had to
call mktexlsr /var/lib/texmf ny hand before I got it working.

Anyway, now all formats are put into engine subdirs, and all the engines
I have are working.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at>                    Università di Siena
Debian Developer <preining at debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
FLIMBY (n.)
One of those irritating handle-less slippery translucent plastic bags
you get in supermarkets which, no matter how you hold them, always
contrive to let something fall out.
			--- Douglas Adams, The Meaning of Liff
-------------- next part --------------
--- /usr/bin/fmtutil.save	2007-01-05 10:01:50.000000000 +0100
+++ /usr/bin/fmtutil	2007-01-05 13:20:59.000000000 +0100
@@ -598,16 +598,21 @@
   esac
 
   # install the log files and format files:
-  for i in *.log; do
+  for i in */*.log; do
+    bn=`basename $i`
+    dn=`dirname $i`
     test -f "$i" || continue
     rm -f "$destdir/$i"
 
     # We don't want user-interaction for the following "mv" command:
+    mkdir -p "$destdir/$dn" 
     mv "$i" "$destdir/$i" </dev/null
   done
-  for i in *.fmt *.mem *.base; do
+  for i in */*.fmt */*.base */*.mem ; do
     test -f "$i" || continue
     rm -f "$destdir/$i"
+    dn=`dirname $i`
+    mkdir -p "$destdir/$dn"
 
     # We don't want user-interaction for the following "mv" command:
     if mv "$i" "$destdir/$i" </dev/null; then
@@ -667,9 +672,9 @@
   inifile=`echo $lastarg | sed 's%^\*%%'`
 
   case "$engine" in
-    mpost)  fmtfile="$format.mem";  kpsefmt=mpost;;
-    mf|mfw|mf-nowin) fmtfile="$format.base"; kpsefmt=mf;;
-    *)      fmtfile="$format.fmt";  kpsefmt=tex;;
+    mpost)  fmtfile="$format.mem";  kpsefmt=mpost; texengine=metapost;;
+    mf|mfw|mf-nowin) fmtfile="$format.base"; kpsefmt=mf; texengine=metafont;;
+    *)      fmtfile="$format.fmt";  kpsefmt=tex; texengine=$engine;;
   esac
 
   # See if we can find $inifile for return code:
@@ -713,6 +718,8 @@
 {
 
   # install a pool file and set tcx flag if requested in lang= option:
+  mkdir -p $texengine
+  cd $texengine
   rm -f *.pool
   poolfile=
   tcxflag=
@@ -750,6 +757,7 @@
   else
     log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' failed"
   fi
+  cd ..
 }
 
 ###############################################################################
@@ -822,7 +830,7 @@
 create_missing()
 {
   # match_cmd='test ! -f $destdir/$fmtfile'
-  match_cmd='test ! -f "`kpsewhich -progname=$format $fmtfile`"'
+  match_cmd='test ! -f "`kpsewhich -engine=$texengine -progname=$format $fmtfile`"'
   recreate_loop
 }
 


More information about the tex-live mailing list