summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mfluajitdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-06-12 08:45:07 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-06-12 08:45:07 +0000
commit4403160cd26a0ba4eb014d69bfb9dcd568f64fc6 (patch)
tree0a036c9b3654e6e7b2e73753225598980d25c54f /Build/source/texk/web2c/mfluajitdir
parent1dde8ab4578f370c597332ff3421097d7cb39a1a (diff)
Integrate MFLua and MFLuaJIT
git-svn-id: svn://tug.org/texlive/trunk@37504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mfluajitdir')
-rw-r--r--Build/source/texk/web2c/mfluajitdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/mfluajitdir/am/mfluajit.am129
-rw-r--r--Build/source/texk/web2c/mfluajitdir/mf-luajit.ch8
-rw-r--r--Build/source/texk/web2c/mfluajitdir/mfluajit.defines25
-rw-r--r--Build/source/texk/web2c/mfluajitdir/mfluajitextra.c11
-rw-r--r--Build/source/texk/web2c/mfluajitdir/mfluajitextra.h23
-rw-r--r--Build/source/texk/web2c/mfluajitdir/mfluajittrap/mfluajittrap.diffs203
-rwxr-xr-xBuild/source/texk/web2c/mfluajitdir/mfluajittraptest52
8 files changed, 456 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/mfluajitdir/ChangeLog b/Build/source/texk/web2c/mfluajitdir/ChangeLog
new file mode 100644
index 00000000000..45c8f107a07
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/ChangeLog
@@ -0,0 +1,5 @@
+2015-04-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Imported MFLuaJIT into TeX Live, based on the SVN repository
+ https://foundry.supelec.fr/projects/mflua
+ from Luigi Scarso <luigi.scarso@gmail.com>.
diff --git a/Build/source/texk/web2c/mfluajitdir/am/mfluajit.am b/Build/source/texk/web2c/mfluajitdir/am/mfluajit.am
new file mode 100644
index 00000000000..4a98fa3da18
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/am/mfluajit.am
@@ -0,0 +1,129 @@
+## texk/web2c/mfluajitdir/am/mfluajit.am: Makefile fragment for MFLuaJIT.
+##
+## Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+
+## MFLua
+##
+if MFLUAJIT
+bin_PROGRAMS += mfluajit
+if MFLUAJITN
+bin_PROGRAMS += mfluajit-nowin
+endif MFLUAJITN
+if WIN32
+bin_PROGRAMS += inimfluajit
+else !WIN32
+bin_links += mfluajit$(EXEEXT):inimfluajit
+endif !WIN32
+endif MFLUAJIT
+EXTRA_PROGRAMS += mfluajit mfluajit-nowin
+DISTCLEANFILES += mfluajittrap.diffs
+
+inimfluajit_CPPFLAGS = -DEXEPROG=\"mfluajit.exe\"
+nodist_inimfluajit_SOURCES = callexe.c
+inimfluajit_LDADD =
+
+dist_mfluajit_SOURCES = mfluajitdir/mfluajitextra.c mfluajitdir/mfluajitextra.h mfluadir/mflua_version.h
+mfluajit_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) $(LUAJIT_INCLUDES) $(LUAJIT_DEFINES)
+mfluajit_LDADD = libmfluajit.a $(LDADD) $(windowlib) $(mf_x_libs) $(LUAJIT_LIBS)
+mfluajit_LDFLAGS = -export-dynamic $(LUAJIT_LDEXTRA)
+nodist_mfluajit_nowin_SOURCES = $(dist_mfluajit_SOURCES)
+mfluajit_nowin_CPPFLAGS = $(mfluajit_CPPFLAGS) -DMFNOWIN $(LUAJIT_INCLUDES) $(LUAJIT_DEFINES)
+mfluajit_nowin_LDADD = libmfluajit.a $(LDADD) $(windowlib) $(LUAJIT_LIBS)
+mfluajit_nowin_LDFLAGS = -export-dynamic $(LUAJIT_LDEXTRA)
+
+# We must create mfluajitd.h and mfluadir/mflua_version.h before compiling mfluajitextra.c.
+$(mfluajit_OBJECTS) $(mfluajit_nowin_OBJECTS): mfluajitd.h mfluadir/mflua_version.h
+
+## mfluajit and mfluajit-nowin compile mfluajitextra.c with different CPPFLAGS.
+## Automake, however, does not support CPPFLAGS for individual source files.
+## To avoid compiling everything twice, the common objects are in a library.
+EXTRA_LIBRARIES += libmfluajit.a
+
+# MFLua C sources
+mfluajit_c_h = mfluajitini.c mfluajit0.c mfluajitcoerce.h mfluajitd.h
+dist_libmfluajit_a_SOURCES = mfluadir/mfluac.c mfluadir/mfluac.h
+nodist_libmfluajit_a_SOURCES = $(mfluajit_c_h) mfluajit-pool.c
+libmfluajit_a_CPPFLAGS = $(AM_CPPFLAGS) $(LUAJIT_INCLUDES) -DJIT
+
+# We must create mfluajitd.h before building the libmfluajit_a_OBJECTS.
+$(libmfluajit_a_OBJECTS): mfluajitd.h
+
+$(mfluajit_c_h): mfluajit-web2c $(LUAJIT_LIBS)
+ @$(web2c) mfluajit
+mfluajit-web2c: mfluajit.p $(web2c_texmf) web2c/cvtmf1.sed web2c/cvtmf2.sed mfluajitdir/mfluajit.defines
+ @$(web2c) mfluajit
+
+mfluajit-pool.c: mfluajit.pool mfluajitd.h $(makecpool_stamp)
+ $(makecpool) mfluajit >$@ || rm -f $@
+
+# Tangling MFLua
+mfluajit.p mfluajit.pool: mfluajit-tangle
+ @$(texmf_tangle) mfluajit mfluajit
+mfluajit-tangle: tangle$(EXEEXT) mfluajit.web mfluajit.ch tangle-sh
+ @$(texmf_tangle) mfluajit mfluajit
+
+# Generate mfluajit.web
+mfluajit.web: tie$(EXEEXT) $(mfluajit_web_srcs)
+ $(tie) -m mfluajit.web $(mfluajit_web_srcs)
+mfluajit_web_srcs = \
+ mf.web \
+ mfluadir/mf-lua.ch \
+ mfluajitdir/mf-luajit.ch
+
+# Generate mfluajit.ch
+mfluajit.ch: tie$(EXEEXT) mfluajit.web $(mfluajit_ch_src)
+ $(tie) -c $@ mfluajit.web $(mfluajit_ch_src)
+mfluajit_ch_src = \
+ mf.ch \
+ mfluadir/mflua-m.ch \
+ mf-binpool.ch
+##
+EXTRA_DIST += $(mfluajit_web_srcs) $(mfluajit_ch_src) mfluajitdir/mfluajit.defines
+
+DISTCLEANFILES += $(nodist_libmfluajit_a_SOURCES) mfluajit.web mfluajit.ch mfluajit-web2c \
+ mfluajit.p mfluajit.pool mfluajit-tangle
+
+EXTRA_DIST += \
+ mfluajitdir/ChangeLog
+
+# MFLua tests
+#
+mfluajit_tests = mfluajitdir/mfluajittraptest
+EXTRA_DIST += $(mfluajit_tests)
+
+if MFLUAJIT
+TESTS += $(mfluajit_tests)
+check_PROGRAMS += gftype tftopl
+TRIPTRAP += mfluajittrap.diffs
+TRIPTRAP_CLEAN += mfluajittrap-clean
+endif MFLUAJIT
+DISTCLEANFILES += mfluajittrap.diffs
+
+## mfluajitdir/mfluajittraptest
+mfluajittrap.diffs: mfluajit$(EXEEXT)
+ $(triptrap_diffs) $@
+.PHONY: mfluajittrap-clean
+mfluajittrap-clean:
+ rm -rf mfluajittrapdir
+
+## Test data
+##
+EXTRA_DIST += \
+ mfluadir/mfluatrap/begin_program.lua \
+ mfluadir/mfluatrap/do_add_to.lua \
+ mfluadir/mfluatrap/end_program.lua \
+ mfluadir/mfluatrap/fill_envelope.lua \
+ mfluadir/mfluatrap/fill_spec.lua \
+ mfluadir/mfluatrap/final_cleanup.lua \
+ mfluadir/mfluatrap/main_control.lua \
+ mfluadir/mfluatrap/make_ellipse.lua \
+ mfluadir/mfluatrap/mfluaini.lua \
+ mfluadir/mfluatrap/offset_prep.lua \
+ mfluadir/mfluatrap/print_edges.lua \
+ mfluadir/mfluatrap/print_path.lua \
+ mfluadir/mfluatrap/scan_direction.lua \
+ mfluadir/mfluatrap/skew_line_edges.lua \
+ mfluadir/mfluatrap/start_of_MF.lua \
+ mfluadir/mfluatrap/texmf.cnf \
+ mfluajitdir/mfluajittrap/mfluajittrap.diffs
diff --git a/Build/source/texk/web2c/mfluajitdir/mf-luajit.ch b/Build/source/texk/web2c/mfluajitdir/mf-luajit.ch
new file mode 100644
index 00000000000..af718650d8a
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/mf-luajit.ch
@@ -0,0 +1,8 @@
+@x [1.2] - this is MFLuaJIT
+@d banner==MFLua_banner
+@y
+@d MFLuaJITbanner=='This is MFLuaJIT, Version 2.7182818', MFLua_version_string
+ {printed when MFLuaJIT starts}
+@#
+@d banner==MFLuaJITbanner
+@z
diff --git a/Build/source/texk/web2c/mfluajitdir/mfluajit.defines b/Build/source/texk/web2c/mfluajitdir/mfluajit.defines
new file mode 100644
index 00000000000..5889c31e803
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/mfluajit.defines
@@ -0,0 +1,25 @@
+{ Additional symbols for MFLuaJIT. Public domain.}
+
+@define procedure mfluainitialize;
+@define procedure mfluaprintpath();
+@define procedure mfluaprintedges();
+@define procedure mfluaPREoffsetprep();
+@define procedure mfluaPOSToffsetprep();
+@define procedure mfluaPREfillenveloperhs();
+@define procedure mfluaPOSTfillenveloperhs();
+@define procedure mfluaPREfillenvelopelhs();
+@define procedure mfluaPOSTfillenvelopelhs();
+@define procedure mfluaPREfillspecrhs();
+@define procedure mfluaPOSTfillspecrhs();
+@define procedure mfluaPREfillspeclhs();
+@define procedure mfluaPOSTfillspeclhs();
+@define procedure mfluaPREmovetoedges();
+@define procedure mfluaPOSTmovetoedges();
+@define procedure mfluaPREmakechoices();
+@define procedure mfluaPOSTmakechoices();
+@define procedure mfluaprintretrogradeline();
+@define procedure mfluaprinttransitionlinefrom();
+@define procedure mfluaprinttransitionlineto();
+@define procedure mfluaPREmakeellipse();
+@define procedure mfluaPOSTmakeellipse();
+@define procedure mfluarunscript();
diff --git a/Build/source/texk/web2c/mfluajitdir/mfluajitextra.c b/Build/source/texk/web2c/mfluajitdir/mfluajitextra.c
new file mode 100644
index 00000000000..653bc69113d
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/mfluajitextra.c
@@ -0,0 +1,11 @@
+/* mfluajitextra.c: Hand-coded routines for MFLuaJIT.
+
+ This file is public domain. */
+
+#define EXTERN /* Instantiate data from mfluajitd.h here. */
+
+/* This file defines MFLuaJIT. */
+#include <mfluajitd.h>
+
+/* Hand-coded routines for TeX or Metafont in C. */
+#include <lib/texmfmp.c>
diff --git a/Build/source/texk/web2c/mfluajitdir/mfluajitextra.h b/Build/source/texk/web2c/mfluajitdir/mfluajitextra.h
new file mode 100644
index 00000000000..9927a9e9f26
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/mfluajitextra.h
@@ -0,0 +1,23 @@
+/* mfluajitextra.h: banner etc. for MFLuaJIT.
+
+ This is included by MFLuaJIT, from mfluajitextra.c
+*/
+
+#include <mfluadir/mflua_version.h> /* for MFLUA_VERSION */
+
+#define BANNER "This is MFLuaJIT, Version 2.7182818-" MFLUA_VERSION
+#define COPYRIGHT_HOLDER "L. Scarso"
+#define AUTHOR NULL
+#define PROGRAM_HELP MFLUAJITHELP
+#define BUG_ADDRESS "luigi.scarso@gmail.com"
+#define DUMP_VAR MFbasedefault
+#define DUMP_LENGTH_VAR basedefaultlength
+#define DUMP_OPTION "base"
+#ifdef DOS
+#define DUMP_EXT ".bas"
+#else
+#define DUMP_EXT ".base"
+#endif
+#define INPUT_FORMAT kpse_mf_format
+#define INI_PROGRAM "inimfluajit"
+#define VIR_PROGRAM "virmfluajit"
diff --git a/Build/source/texk/web2c/mfluajitdir/mfluajittrap/mfluajittrap.diffs b/Build/source/texk/web2c/mfluajitdir/mfluajittrap/mfluajittrap.diffs
new file mode 100644
index 00000000000..a12ee7d11cc
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/mfluajittrap/mfluajittrap.diffs
@@ -0,0 +1,203 @@
+>>> Running TRAP test for MFLuaJIT.
+>>> See SRCDIR/mfluajitdir/mfluajittrap/mfluajittrap.diffs for example of acceptable diffs.
++ ln -s SRCDIR/triptrap/trap.mf .
++ ./mfluajit --progname=inimfluajit
++ test '!' -s trap.base
++ mv trap.log mftrapin.log
++ diff SRCDIR/triptrap/mftrapin.log mftrapin.log
+1c1
+< This is METAFONT, Version 2.7182818 (INIMF) 7 JAN 2014 17:51
+---
+> This is MFLuaJIT, Version 2.7182818-0.5 (TeX Live 2015) (INIMF) 17 APR 2015 11:16
+150c150
+< String usage 26&83 (891&11438 still untouched)
+---
+> String usage 30&98 (6384&979377 still untouched)
+176,177c176,177
+< (preloaded base=trap 2014.1.7)
+< 1117 strings of total length 20614
+---
+> (preloaded base=trap 2015.4.17)
+> 1125 strings of total length 20684
+179c179
+< 265 symbolic tokens
+---
+> 266 symbolic tokens
++ ./mfluajit --progname=inimfluajit
++ mv trap.log mftrap.log
++ mv trap.tfm mftrap.tfm
++ diff SRCDIR/triptrap/mftrap.fot mftrap.fot
+1,3c1,2
+< This is METAFONT, Version 2.7182818 (INIMF)
+< ** &trap trap
+< (trap.mf
+---
+> This is MFLuaJIT, Version 2.7182818-0.5 (TeX Live 2015) (INIMF)
+> **(trap.mf
+39c38
+< String usage 41&161 (815&7634 still untouched)
+---
+> String usage 50&202 (6298&975523 still untouched)
++ diff SRCDIR/triptrap/mftrap.log mftrap.log
+1c1
+< This is METAFONT, Version 2.7182818 (preloaded base=trap 2014.1.7) 7 JAN 2014 18:11
+---
+> This is MFLuaJIT, Version 2.7182818-0.5 (TeX Live 2015) (preloaded base=trap 2015.4.17) 17 APR 2015 11:16
+133,134c133,134
+< <scantokens> pair
+< p[],';^^ff
+---
+> <scantokens> or <runscript> pair
+> p[],';^^ff
+145,146c145,146
+< <scantokens> pair
+< p[],';^^ff
+---
+> <scantokens> or <runscript> pair
+> p[],';^^ff
+158,159c158,159
+< <scantokens> pair
+< p[],';^^ff
+---
+> <scantokens> or <runscript> pair
+> p[],';^^ff
+169,170c169,170
+< <scantokens> pair p[],';^^ff
+<
+---
+> <scantokens> or <runscript> ...f
+>
+1825c1825
+< String usage 24&92 (858&11309 still untouched)
+---
+> String usage 30&119 (6344&979191 still untouched)
+3693,3695c3693,3695
+< xpart %CAPSULE1359=xx
+< %CAPSULE1367=2yy-2
+< %CAPSULE1375 = 3.3333xx+3.3333
+---
+> xpart %CAPSULE1370=xx
+> %CAPSULE1378=2yy-2
+> %CAPSULE1386 = 3.3333xx+3.3333
+3755,3757c3755,3757
+< xpart %CAPSULE1049 = 8000o2-4000o1+1000o3+9
+< xpart %CAPSULE1383=xpart '
+< ypart %CAPSULE1383=ypart '
+---
+> xpart %CAPSULE604 = 8000o2-4000o1+1000o3+9
+> xpart %CAPSULE1394=xpart '
+> ypart %CAPSULE1394=ypart '
+3760,3761c3760,3761
+< ### 4000o1 = -xpart %CAPSULE1049+8000o2+1000o3+9
+< ### -4.87383o2 = -oo-0.0004xpart %CAPSULE1049+0.39673o3-17.99643
+---
+> ### 4000o1 = -xpart %CAPSULE604+8000o2+1000o3+9
+> ### -4.87383o2 = -oo-0.0004xpart %CAPSULE604+0.39673o3-17.99643
+3768c3768
+< ### -alfa=-xpart %CAPSULE1494
+---
+> ### -alfa=-xpart %CAPSULE368
+3770,3771c3770,3771
+< {xpart((xpart %CAPSULE1494,0))}
+< ### -xpart %CAPSULE17=-%CAPSULE1176
+---
+> {xpart((xpart %CAPSULE368,0))}
+> ### -xpart %CAPSULE17=-%CAPSULE1376
+3773,3775c3773,3775
+< {(%CAPSULE382)+(%CAPSULE1176)}
+< ### -%CAPSULE382=-%CAPSULE1893+%CAPSULE1176
+< ### -%CAPSULE1893=-ypart %CAPSULE1049
+---
+> {(%CAPSULE382)+(%CAPSULE1376)}
+> ### -%CAPSULE382=-%CAPSULE1364+%CAPSULE1376
+> ### -%CAPSULE1364=-ypart %CAPSULE604
+3780c3780
+< ### p$=-ypart %CAPSULE604+1
+---
+> ### p$=-ypart %CAPSULE1360+1
+3782,3793c3782,3793
+< {(2/3)*((-ypart %CAPSULE604+1,ypart %CAPSULE604))}
+< ### ypart %CAPSULE604=-xpart %CAPSULE604+1
+< ### -0.66667xpart %CAPSULE604=-xpart %CAPSULE1889
+< {-((xpart %CAPSULE1889,-xpart %CAPSULE1889+0.66667))}
+< ### xpart %CAPSULE1889=-xpart %CAPSULE1172
+< {((xpart %CAPSULE1049,ypart %CAPSULE1049))=((xpart %CAPSULE1172,-xpart %
+< CAPSULE1172-0.66667))}
+< ## xpart %CAPSULE1172=-ypart %CAPSULE1049-0.66667
+< ## ypart %CAPSULE1049=-xpart %CAPSULE1049-0.66667
+< ### -xpart %CAPSULE1049=-xpart %CAPSULE1172
+< {((xpart ',ypart '))=((xpart %CAPSULE1172,-xpart %CAPSULE1172-0.66667))}
+< ## xpart %CAPSULE1172=-ypart '-0.66667
+---
+> {(2/3)*((-ypart %CAPSULE1360+1,ypart %CAPSULE1360))}
+> ### ypart %CAPSULE1360=-xpart %CAPSULE1360+1
+> ### -0.66667xpart %CAPSULE1360=-xpart %CAPSULE1744
+> {-((xpart %CAPSULE1744,-xpart %CAPSULE1744+0.66667))}
+> ### xpart %CAPSULE1744=-xpart %CAPSULE1675
+> {((xpart %CAPSULE604,ypart %CAPSULE604))=((xpart %CAPSULE1675,-xpart %CA
+> PSULE1675-0.66667))}
+> ## xpart %CAPSULE1675=-ypart %CAPSULE604-0.66667
+> ## ypart %CAPSULE604=-xpart %CAPSULE604-0.66667
+> ### -xpart %CAPSULE604=-xpart %CAPSULE1675
+> {((xpart ',ypart '))=((xpart %CAPSULE1675,-xpart %CAPSULE1675-0.66667))}
+> ## xpart %CAPSULE1675=-ypart '-0.66667
+3799c3799
+< ### -ooo=-%CAPSULE1494
+---
+> ### -ooo=-%CAPSULE1051
+3801,3810c3801,3810
+< {(%CAPSULE1494)+(1)}
+< ### -%CAPSULE1494=-%CAPSULE1350+1
+< {(1/2)*(%CAPSULE1350)}
+< ### -0.5%CAPSULE1350=-%CAPSULE1367
+< {-(%CAPSULE1367)}
+< ### %CAPSULE1367=-%CAPSULE1893
+< {(2)*(%CAPSULE1893)}
+< ### -2%CAPSULE1893=-%CAPSULE1885
+< {(-0.5%CAPSULE1885-0.5)=(%CAPSULE1885)}
+< ## %CAPSULE1885=-0.33333
+---
+> {(%CAPSULE1051)+(1)}
+> ### -%CAPSULE1051=-%CAPSULE1378+1
+> {(1/2)*(%CAPSULE1378)}
+> ### -0.5%CAPSULE1378=-%CAPSULE1370
+> {-(%CAPSULE1370)}
+> ### %CAPSULE1370=-%CAPSULE1362
+> {(2)*(%CAPSULE1362)}
+> ### -2%CAPSULE1362=-%CAPSULE1354
+> {(-0.5%CAPSULE1354-0.5)=(%CAPSULE1354)}
+> ## %CAPSULE1354=-0.33333
+4235c4235
+< String usage 41&161 (815&7634 still untouched)
+---
+> String usage 50&202 (6298&975523 still untouched)
+4251,4252c4251,4252
+< 68 strings out of 883
+< 3752 string characters out of 11386
+---
+> 77 strings out of 6375
+> 3793 string characters out of 979316
+4254,4255c4254,4255
+< 289 symbolic tokens out of 2100
+< 8i,43n,14r,8p,167b stack positions out of 30i,100n,300r,150p,500b
+---
+> 290 symbolic tokens out of 9500
+> 8i,43n,14r,8p,167b stack positions out of 300i,300n,1000r,150p,3000b
+4263c4263
+< out of 256w,16h,16d,64i,5000l,500k,256e,50p)
+---
+> out of 256w,16h,16d,64i,15000l,2500k,256e,60p)
++ ./tftopl ./mftrap.tfm mftrap.pl
++ diff SRCDIR/triptrap/mftrap.pl mftrap.pl
++ ./gftype -m -i ./trap.72270gf
++ diff SRCDIR/triptrap/trap.typ trap.typ
+1c1
+< This is GFtype, Version 3.1
+---
+> This is GFtype, Version 3.1 (TeX Live 2015)
+3c3
+< ' METAFONT output 2014.01.07:1811'
+---
+> ' METAFONT output 2015.04.17:1116'
++ :
+PASS: mfluajitdir/mfluajittraptest
diff --git a/Build/source/texk/web2c/mfluajitdir/mfluajittraptest b/Build/source/texk/web2c/mfluajitdir/mfluajittraptest
new file mode 100755
index 00000000000..78437cd92a2
--- /dev/null
+++ b/Build/source/texk/web2c/mfluajitdir/mfluajittraptest
@@ -0,0 +1,52 @@
+#! /bin/sh
+
+# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+testdir=$abs_srcdir/triptrap
+ltestdir=$abs_srcdir/mfluadir/mfluatrap
+jtestdir=$abs_srcdir/mfluajitdir/mfluajittrap
+
+TEXMFCNF=$ltestdir; export TEXMFCNF
+
+rm -rf mfluajittrapdir
+mkdir mfluajittrapdir
+cd mfluajittrapdir
+
+cp $ltestdir/*.lua .
+
+echo ">>> Running TRAP test for MFLuaJIT." >&2
+echo ">>> See $jtestdir/mfluajittrap.diffs for example of acceptable diffs." >&2
+
+is_OK=:
+
+set -x
+
+# get same filename in log
+$LN_S $testdir/trap.mf .
+
+../mfluajit --progname=inimfluajit <$testdir/mftrap1.in >mftrapin.fot
+if test ! -s trap.base; then
+ echo "*** trap.base not created by mftrap1.in, investigate!" >&2
+ exit 1
+fi
+mv trap.log mftrapin.log || exit 1
+diff $testdir/mftrapin.log mftrapin.log
+
+../mfluajit --progname=inimfluajit <$testdir/mftrap2.in >mftrap.fot
+mv trap.log mftrap.log || exit 1
+mv trap.tfm mftrap.tfm || exit 1
+diff $testdir/mftrap.fot mftrap.fot
+diff $testdir/mftrap.log mftrap.log
+
+../tftopl ./mftrap.tfm mftrap.pl || exit 1
+diff $testdir/mftrap.pl mftrap.pl || is_OK=false
+
+../gftype -m -i ./trap.72270gf >trap.typ || exit 1
+diff $testdir/trap.typ trap.typ
+
+$is_OK || {
+ echo ">>> There were some errors." >&2
+ exit 1
+}
+