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

Norbert Preining preining at logic.at
Fri Jan 5 11:26:27 CET 2007


New incarnation, now fmtutil-sys --missing works. The only addition is:
 create_missing()
 {
   # match_cmd='test ! -f $destdir/$fmtfile'
-  match_cmd='test ! -f "`kpsewhich -progname=$format $fmtfile`"'
+  match_cmd='test ! -f "`kpsewhich -engine=$engine -progname=$format $fmtfile`"'
   recreate_loop
 }

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
-------------------------------------------------------------------------------
CRAIL (n. mineral)
Crail is a common kind of rock or gravel found widely across the
British Isles. Each individual stone (due to an as yet undiscovered
gravitational property) is charged with 'negative buoyancy'. This
means that no matter how much crail you remove from the garden, more
of it will rise to the surface. Crail is much employed by the Royal
Navy for making the paperweights and ashtrays used inside submarines.
			--- 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 11:23:57.000000000 +0100
@@ -598,16 +598,34 @@
   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 */*.base */*.mem ; do
+    test -f "$i" || continue
+    bn=`basename $i`
+    dn=`dirname $i`
+    rm -f "$destdir/$bn"
+  
+    # We don't want user-interaction for the following "mv" command:
+    if mv "$i" "$destdir/$bn" </dev/null; then
+      verboseMsg "$progname: $destdir/$bn installed."
+      $mktexfmtMode && echo "$destdir/$bn"
+    fi
+    mktexupd "$destdir" "$bn"
+  done
+  for i in */*.fmt ; 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
@@ -713,6 +731,8 @@
 {
 
   # install a pool file and set tcx flag if requested in lang= option:
+  mkdir -p $engine
+  cd $engine
   rm -f *.pool
   poolfile=
   tcxflag=
@@ -750,6 +770,7 @@
   else
     log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' failed"
   fi
+  cd ..
 }
 
 ###############################################################################
@@ -822,7 +843,7 @@
 create_missing()
 {
   # match_cmd='test ! -f $destdir/$fmtfile'
-  match_cmd='test ! -f "`kpsewhich -progname=$format $fmtfile`"'
+  match_cmd='test ! -f "`kpsewhich -engine=$engine -progname=$format $fmtfile`"'
   recreate_loop
 }
 


More information about the tex-live mailing list