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

Norbert Preining preining at logic.at
Fri Jan 5 13:53:55 CET 2007


Hi Jonathan!

On Fre, 05 Jan 2007, Jonathan Kew wrote:
> I don't think this approach is adequate, as it fails to address the  
> behavior of things like

Right. Completely right.

> Attached is a patch which attempts to deal with these. --byfmt will  
> rebuild all formats for the given name, and --{en|dis}ablefmt will  
> modify all entries that match the format name.
> 
> This patch also supports an option --no-engine-subdir, to revert to  
> the old behavior (but using $engine subdirs is the default, so that  
> "naive" use of fmtutil will do the right thing for users).

Here is a fix for two things:
- TeXs idea of engine is not the binary, use texengine settings
- --missing needs a kpsewhich call with -engine=$texengine

This patch applies on top of yours!

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
-------------------------------------------------------------------------------
Zaphod grinned two manic grins, sauntered over to the bar
and bought most of it.
                 --- Zaphod in paradise.
                 --- Douglas Adams, The Hitchhikers Guide to the Galaxy
-------------- next part --------------
--- fmtutil.jk	2007-01-05 13:44:02.000000000 +0100
+++ fmtutil	2007-01-05 13:51:01.000000000 +0100
@@ -609,9 +609,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:
@@ -687,7 +687,7 @@
   ) </dev/null
 
   if test $use_engine_dir -eq 1; then
-    fulldestdir="$destdir/$engine"
+    fulldestdir="$destdir/$texengine"
   else
     fulldestdir="$destdir"
   fi
@@ -777,7 +777,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