summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-30 16:31:52 +0000
committerKarl Berry <karl@freefriends.org>2008-03-30 16:31:52 +0000
commit45ec1396216b8bbf9236e33fbc4756a88c780bd1 (patch)
tree3907acbfa93f1f8253416e8971449b80c78a88f5 /Build/source
parenta92ea41a1cc2dd77db68e6ae30905919a98dbf8b (diff)
import web2c/convert from luatex; declare loadpoolstrings in one place
git-svn-id: svn://tug.org/texlive/trunk@7245 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/ChangeLog11
-rw-r--r--Build/source/texk/web2c/Makefile.in6
-rw-r--r--Build/source/texk/web2c/alephdir/aleph.defines3
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.defines14
-rw-r--r--Build/source/texk/web2c/mpdir/mp.defines6
-rw-r--r--Build/source/texk/web2c/omegadir/omega.defines1
-rwxr-xr-xBuild/source/texk/web2c/web2c/convert63
-rw-r--r--Build/source/texk/web2c/web2c/loadpool.defines7
-rw-r--r--Build/source/texk/web2c/web2c/texmf.defines1
9 files changed, 65 insertions, 47 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index f3152a04c01..2fc1624edfc 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,14 @@
+2008-03-30 Karl Berry <karl@tug.org>
+
+ * Makefile.in (web2c): pass . for native tooldir argument.
+ * web2c/convert: accept tooldir argument a la luatex.
+ * web2c/texmf.defines (loadpoolstrings): define here.
+ * web2c/loadpool.defines: remove.
+ * luatexdir/luatex.defines,
+ * mpdir/mp.defines,
+ * omegadir/omega.defines,
+ * alephdir/aleph.defines (loadpoolstrings): rm.
+
2008-03-25 Karl Berry <karl@tug.org>
* Makefile.in,
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 1188a375f9a..0b3510078d8 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -77,8 +77,10 @@ install_makeargs = INSTALL='$(INSTALL)' INSTALL_DATA='$(INSTALL_DATA)' \
proglib = lib/lib.a
windowlib = window/window.a
-# The sh script that does the conversion:
-web2c = srcdir=$(srcdir) $(SHELL) $(srcdir)/web2c/convert
+# The sh script that does the conversion. The "." is the directory with
+# native tools; we don't attempt cross-compiling a la luatex.
+web2c = srcdir=$(srcdir) $(SHELL) $(srcdir)/web2c/convert .
+
# Additional dependencies:
web2c_common = web2c/convert web2c/common.defines
web2c_programs = web2c/fixwrites web2c/splitup web2c/web2c
diff --git a/Build/source/texk/web2c/alephdir/aleph.defines b/Build/source/texk/web2c/alephdir/aleph.defines
index dc9628e7ab9..c5cfedeb134 100644
--- a/Build/source/texk/web2c/alephdir/aleph.defines
+++ b/Build/source/texk/web2c/alephdir/aleph.defines
@@ -3,7 +3,7 @@
This file is part of Aleph,
which is based on the web2c distribution of TeX,
-Copyright (C) 1994--2000 John Plaice and Yannis Haralambous
+Copyright (C) 1994--2000, 2008 John Plaice and Yannis Haralambous
Copyright (C) 2002--2004, 2008 the Aleph task force
Aleph is free software; you can redistribute it and/or modify
@@ -22,7 +22,6 @@ along with Aleph; if not, write to the Free Software Foundation, Inc.,
}
-@define function loadpoolstrings();
@define function newinputln ();
@define function getfilemode ();
@define function newinputline ();
diff --git a/Build/source/texk/web2c/luatexdir/luatex.defines b/Build/source/texk/web2c/luatexdir/luatex.defines
index b2d296671dc..7a1ac4e79d8 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.defines
+++ b/Build/source/texk/web2c/luatexdir/luatex.defines
@@ -1,23 +1,23 @@
{
-Copyright (c) 1996-2006 Han The Thanh, <thanh@pdftex.org>
+Copyright (c) 1996-2006, 2008 Han The Thanh, Taco Hoekwater
-This file is part of pdfTeX.
+This file is part of luaTeX.
-pdfTeX is free software; you can redistribute it and/or modify
+This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-pdfTeX is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with pdfTeX; if not, write to the Free Software
+along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-$Id $
+$Id$
}
{ luatex.defines: additions for luaTeX }
@@ -227,8 +227,6 @@ $Id $
@define procedure undump_ocp_table ();
@define procedure run_external_ocp ();
-@define function loadpoolstrings();
-
{ 'texfont' library definitions }
@define procedure dump_font ();
diff --git a/Build/source/texk/web2c/mpdir/mp.defines b/Build/source/texk/web2c/mpdir/mp.defines
index 7af554a389a..4c8c35f6f11 100644
--- a/Build/source/texk/web2c/mpdir/mp.defines
+++ b/Build/source/texk/web2c/mpdir/mp.defines
@@ -1,5 +1,5 @@
{
-Copyright (c) 2006 Taco Hoekwater <taco@elvenkind.com>
+Copyright (c) 2006, 2008 Taco Hoekwater <taco@elvenkind.com>
This file is part of MetaPost.
@@ -20,10 +20,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id$
}
-{ functions from loadpool.c }
-
-@define function loadpoolstrings();
-
{ functions from mapfile.c }
@define function hasfmentry();
diff --git a/Build/source/texk/web2c/omegadir/omega.defines b/Build/source/texk/web2c/omegadir/omega.defines
index 13987fa124e..c47c515314f 100644
--- a/Build/source/texk/web2c/omegadir/omega.defines
+++ b/Build/source/texk/web2c/omegadir/omega.defines
@@ -21,7 +21,6 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
}
-@define function loadpoolstrings();
@define function newinputln ();
@define function getfilemode ();
@define function newinputline ();
diff --git a/Build/source/texk/web2c/web2c/convert b/Build/source/texk/web2c/web2c/convert
index c12b8a19b7d..de6c251eb95 100755
--- a/Build/source/texk/web2c/web2c/convert
+++ b/Build/source/texk/web2c/web2c/convert
@@ -1,15 +1,29 @@
#!/bin/sh
# Convert WEB programs not needing special treatment to C.
-#
-# $1 is the Pascal file to be converted.
-# $2 is the C file to be created.
-# $3, if present, is extended with .h, and #included in the C file, and
-# extended with .defines, and prepended along with the common
-# definitions.
: ${srcdir=.}
-usage="Usage: $0 <basefile>."
+usage="Usage: $0 TOOLDIR BASEFILE
+
+TOOLDIR is the root of a tree for native tools; when not cross-compiling,
+this is just the present web2c directory.
+
+BASEFILE is the root part of the file to be converted; it is extended
+native=$1
+shift
+
+with .p to make the name of the (input) Pascal file, and extended with
+.c and .h to make the name of the main (output) C files. Additional
+files BASEini.c, BASEd.h, BASEcoerce.h are created for the larger program.
+"
+
+native=$1
+shift
+if test ! -d "$native"; then
+ echo "$0: native argument not a directory: $native" >&2
+ exit 1
+fi
+
basefile=
while test $# -gt 0; do
case $1 in
@@ -21,7 +35,7 @@ while test $# -gt 0; do
shift
done
if test -z "$basefile"; then
- echo "Missing basefile argument." >&2
+ echo "$0: missing base (Pascal) file argument." >&2
echo "$usage" >&2
exit 1
fi
@@ -49,20 +63,22 @@ output_files="$cfile $basefile.h"
case $basefile in
bibtex)
- midcmd="| sed -f $srcdir/web2c/cvtbib.sed";;
+ midcmd="| sed -f $srcdir/web2c/cvtbib.sed"
+ ;;
+
mf) # MF and MP are almost the same.
more_defines="$srcdir/web2c/texmf.defines $srcdir/web2c/mfmp.defines"
- more_defines="$more_defines $srcdir/web2c/loadpool.defines"
precmd="| sed -f $srcdir/web2c/cvtmf1.sed"
web2c_options="-m -c${basefile}coerce"
hfile=texmfmp.h
midcmd="| sed -f $srcdir/web2c/cvtmf2.sed"
- postcmd="| ./web2c/splitup $splitup_options $basefile"
+ postcmd="| $native/web2c/splitup $splitup_options $basefile"
cfile=${basefile}1.c # last output file, or thereabouts
output=
output_files="$basefile[0-9].c ${basefile}ini.c ${basefile}d.h \
${basefile}coerce.h"
;;
+
mp) # MP now needs mp.defines for font inclusion library
more_defines="$srcdir/web2c/texmf.defines $srcdir/web2c/mfmp.defines"
prog_defines="$srcdir/${basefile}dir/$basefile.defines"
@@ -73,15 +89,15 @@ ${basefile}coerce.h"
web2c_options="-m -c${basefile}coerce"
hfile=texmfmp.h
midcmd="| sed -f $srcdir/web2c/cvtmf2.sed"
- postcmd="| ./web2c/splitup $splitup_options $basefile"
+ postcmd="| $native/web2c/splitup $splitup_options $basefile"
cfile=${basefile}2.c # last output file, or thereabouts
output=
output_files="$basefile[0-9].c ${basefile}ini.c ${basefile}d.h \
${basefile}coerce.h"
;;
- tex|etex)
+
+ tex|eomega|etex|pdftex|pdfetex|omega|aleph|xetex)
more_defines="$srcdir/web2c/texmf.defines"
- more_defines="$more_defines $srcdir/web2c/loadpool.defines"
prog_defines="$srcdir/${basefile}dir/$basefile.defines"
if test -f $prog_defines; then
more_defines="$more_defines $prog_defines"
@@ -89,13 +105,14 @@ ${basefile}coerce.h"
web2c_options="-t -c${basefile}coerce"
hfile=texmfmp.h
fixwrites_options=-t
- postcmd="| ./web2c/splitup $splitup_options ${basefile}"
+ postcmd="| $native/web2c/splitup $splitup_options ${basefile}"
cfile=${basefile}2.c # last output file, or thereabouts
output=
output_files="$basefile[0-9].c ${basefile}ini.c ${basefile}d.h \
-${basefile}coerce.h"
+ ${basefile}coerce.h"
;;
- pdftex|pdfetex|omega|aleph|xetex)
+
+ luatex)
more_defines="$srcdir/web2c/texmf.defines"
prog_defines="$srcdir/${basefile}dir/$basefile.defines"
if test -f $prog_defines; then
@@ -104,20 +121,22 @@ ${basefile}coerce.h"
web2c_options="-t -c${basefile}coerce"
hfile=texmfmp.h
fixwrites_options=-t
- postcmd="| ./web2c/splitup $splitup_options ${basefile}"
+ splitup_options="-i -l 13500"
+ postcmd="| $native/web2c/splitup $splitup_options ${basefile}"
cfile=${basefile}2.c # last output file, or thereabouts
output=
output_files="$basefile[0-9].c ${basefile}ini.c ${basefile}d.h \
-${basefile}coerce.h"
+ ${basefile}coerce.h"
;;
esac
# Do it.
+#set -x
eval "cat $srcdir/web2c/common.defines $more_defines $pascalfile \
$precmd \
- | ./web2c/web2c -h$hfile $web2c_options \
+ | $native/web2c/web2c -h$hfile $web2c_options \
$midcmd \
- | ./web2c/fixwrites $fixwrites_options $basefile \
+ | $native/web2c/fixwrites $fixwrites_options $basefile \
$postcmd \
$output"
@@ -140,7 +159,7 @@ case $basefile in
sed -e 's/(buftype)//g' -e 's/(pdstype)//g' <bibtex.h >xbibtex.h
mv xbibtex.h bibtex.h
;;
- tex|etex|pdftex|pdfetex|omega|aleph|mf|mp|xetex)
+ tex|eomega|etex|luatex|pdftex|pdfetex|omega|aleph|mf|mp|xetex)
sleep 2 # so timestamps are definitely later, to avoid make weirdness
cat ${basefile}coerce.h $srcdir/web2c/coerce.h >x${basefile}coerce.h
mv x${basefile}coerce.h ${basefile}coerce.h
diff --git a/Build/source/texk/web2c/web2c/loadpool.defines b/Build/source/texk/web2c/web2c/loadpool.defines
deleted file mode 100644
index 9811ffdb361..00000000000
--- a/Build/source/texk/web2c/web2c/loadpool.defines
+++ /dev/null
@@ -1,7 +0,0 @@
-{ loadpool.defines
-
-}
-
-@define function loadpoolstrings();
-
-{ end of loadpool.defines }
diff --git a/Build/source/texk/web2c/web2c/texmf.defines b/Build/source/texk/web2c/web2c/texmf.defines
index 2d16c3394bb..b25651b91ed 100644
--- a/Build/source/texk/web2c/web2c/texmf.defines
+++ b/Build/source/texk/web2c/web2c/texmf.defines
@@ -27,6 +27,7 @@
@define function initscreen;
@define function inputln ();
@define function isnewsource ();
+@define function loadpoolstrings();
@define function makefullnamestring;
@define function makesrcspecial ();
@define function ocpopenin ();