summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-15 23:20:46 +0000
committerKarl Berry <karl@freefriends.org>2008-04-15 23:20:46 +0000
commit852df5a4bca0e1a04205d6174789ce30fc96ec45 (patch)
tree52185f33153b6e7a814c9c24ea3192cd3fec10a5 /Build
parent0b4a47871b0fdceacb8444a72a1fc3a7b7b9ab9b (diff)
use one makecpool for all programs
git-svn-id: svn://tug.org/texlive/trunk@7433 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ChangeLog6
-rw-r--r--Build/source/texk/web2c/Makefile.in36
-rw-r--r--Build/source/texk/web2c/alephdir/aleph.mk8
-rw-r--r--Build/source/texk/web2c/alephdir/makecpool.c67
-rw-r--r--Build/source/texk/web2c/luatexdir/Makefile.in5
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.mk4
-rw-r--r--Build/source/texk/web2c/luatexdir/makecpool.c60
-rw-r--r--Build/source/texk/web2c/metapost.mk4
-rw-r--r--Build/source/texk/web2c/mf-mkcpool.c61
-rw-r--r--Build/source/texk/web2c/mpdir/mpostlib.mk8
-rw-r--r--Build/source/texk/web2c/omegadir/makecpool.c67
-rw-r--r--Build/source/texk/web2c/omegadir/omega.mk9
-rw-r--r--Build/source/texk/web2c/tex-mkcpool.c60
-rw-r--r--Build/source/texk/web2c/web2c/Makefile.in8
-rw-r--r--Build/source/texk/web2c/web2c/makecpool.c (renamed from Build/source/texk/web2c/mpdir/makecpool.c)7
15 files changed, 43 insertions, 367 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index b26cb1ee1f8..4b780633d4f 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-16 Karl Berry <karl@tug.org>
+
+ * Makefile.in,
+ * web2c/makecpool.c,
+ * ...: use the one makecpool provided by Taco for all programs.
+
2008-04-11 Karl Berry <karl@tug.org>
* xetexdir/xetex.h (Byte): #define to my_Byte and then #undef to avoid typedef
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index b584b68e028..3b0cf8a8591 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -77,16 +77,22 @@ install_makeargs = INSTALL='$(INSTALL)' INSTALL_DATA='$(INSTALL_DATA)' \
proglib = lib/lib.a
windowlib = window/window.a
+#
# The sh script that does the conversion. The "." is the directory with
# native tools; we don't attempt cross-compiling a la luatex. The
# $(native) variable is used in luatex.mk.
native = .
web2c = srcdir=$(srcdir) $(SHELL) $(srcdir)/web2c/convert $(native)
+# We put this in the web2c directory for lack of a better place, but it
+# is separate from (and simpler than) the actual web-to-C conversion programs.
+makecpool = $(native)/web2c/makecpool
+
# Additional dependencies:
web2c_common = web2c/convert web2c/common.defines
-web2c_programs = web2c/fixwrites web2c/splitup web2c/web2c
-web2c_texmf = $(web2c_common) $(web2c_programs) web2c/texmf.defines web2c/coerce.h
+web2c_programs = web2c/fixwrites web2c/splitup web2c/web2c $(makecpool)
+web2c_texmf = $(web2c_common) $(web2c_programs) \
+ web2c/texmf.defines web2c/coerce.h
# The helper programs:
TANGLEBOOT = @TANGLEBOOT@
@@ -431,8 +437,8 @@ dvitype_args = -output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'
#
# Metafont
-mf_c = mfini.c mf0.c mf1.c
-mf_o = mfini.o mf0.o mf1.o mf-pool.o mfextra.o
+mf_c = mfini.c mf0.c mf1.c
+mf_o = mfini.o mf0.o mf1.o mf-pool.o mfextra.o
mfn_o = mfini.o mf0.o mf1.o mf-pool.o mfnowin.o
mf: $(mf_o) $(windowlib)
$(kpathsea_link) $(mf_o) $(windowlink) $(LOADLIBES)
@@ -506,24 +512,16 @@ tex.p tex.pool: tangle tex.web tex-final.ch
$(tangle) $(srcdir)/tex.web tex-final.ch
tex-final.ch: $(TIE) tex.web tex.ch tex-binpool.ch
$(TIE) -c $@ $(srcdir)/tex.web $(srcdir)/tex.ch $(srcdir)/tex-binpool.ch
+
+# tools to load pool for tex and mf.
#
-# tools to load pool for tex, etex and mf
-#
-tex-pool.c: tex.pool tex-mkcpool tmf-pool.h
- ./tex-mkcpool tex.pool $(srcdir)/tmf-pool.h >tex-pool.c
-mf-pool.c: mf.pool mf-mkcpool tmf-pool.h
- ./mf-mkcpool mf.pool $(srcdir)/tmf-pool.h >mf-pool.c
+tex-pool.c: tex.pool $(makecpool) tmf-pool.h
+ $(makecpool) tex.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@
+mf-pool.c: mf.pool $(makecpool) tmf-pool.h
+ $(makecpool) mf.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@
mf-pool.o: mf-pool.c tmf-pool.h mfd.h
# we include mfd.h, so need lots more includes.
$(CC) $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/.. -DMETA_FONT -c -o $@ mf-pool.c
-tex-mkcpool: tex-mkcpool.o
- $(CC) $(CFLAGS) -o $@ tex-mkcpool.o
-tex-mkcpool.o: tex-mkcpool.c
- $(CC) $(CFLAGS) -c -o $@ $(srcdir)/tex-mkcpool.c
-mf-mkcpool: mf-mkcpool.o
- $(CC) $(CFLAGS) -o $@ mf-mkcpool.o
-mf-mkcpool.o: mf-mkcpool.c
- $(CC) $(CFLAGS) -c -o $@ $(srcdir)/mf-mkcpool.c
check: tex-check
tex-check: trip tex.fmt
@@ -743,6 +741,8 @@ web2c/splitup: web2c/splitup.c web2c/kps.c
cd web2c && $(MAKE) $(common_makeargs) splitup
web2c/web2c: web2c/main.c web2c/web2c.h web2c/web2c.l web2c/web2c.y web2c/kps.c
cd web2c && $(MAKE) $(common_makeargs) web2c
+$(makecpool): web2c/makecpool.c
+ cd web2c && $(MAKE) $(common_makeargs) makecpool
kpse_include ../make/tkpathsea.mk
diff --git a/Build/source/texk/web2c/alephdir/aleph.mk b/Build/source/texk/web2c/alephdir/aleph.mk
index 386bb478e9e..6ace4bd3781 100644
--- a/Build/source/texk/web2c/alephdir/aleph.mk
+++ b/Build/source/texk/web2c/alephdir/aleph.mk
@@ -122,12 +122,8 @@ aleph.ch: $(calephdir)/ceostuff.ch
$(srcdir)/$(calephdir)/comsrcspec.ch \
$(srcdir)/$(calephdir)/ceostuff.ch
-aleph-pool.c: aleph.pool alephdir/makecpool
- alephdir/makecpool aleph.pool alephdir/aleph-pool.h >aleph-pool.c
-alephdir/makecpool: alephdir/makecpool.o
- $(CC) $(CFLAGS) -o $@ alephdir/makecpool.o
-alephdir/makecpool.o: $(srcdir)/alephdir/makecpool.c
- $(CC) $(CFLAGS) -c -o $@ $(srcdir)/alephdir/makecpool.c
+aleph-pool.c: aleph.pool $(makecpool)
+ $(makecpool) aleph.pool alephdir/aleph-pool.h >$@ || rm -f $@
# Check: right now all we do is build the format.
check: @ALEPH@ aleph-check
diff --git a/Build/source/texk/web2c/alephdir/makecpool.c b/Build/source/texk/web2c/alephdir/makecpool.c
deleted file mode 100644
index 4a928068208..00000000000
--- a/Build/source/texk/web2c/alephdir/makecpool.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright 2007, 2008 Taco Hoekwater.
- You may freely use, modify and/or distribute this file. */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main(int argc, char *argv[]) {
- char *filename;
- char *headername;
- FILE *fh;
- char data[1024];
- if (argc!=3) {
- puts("Need exactly two arguments: pool_name and header_name");
- exit(1);
- }
- filename = argv[1];
- headername = argv[2];
- fh = fopen(filename,"r");
- printf(
- "/* This file is auto-generated by makecpool */\n"
- "\n"
- "#include <stdio.h>\n"
- "#include <string.h>\n"
- "#include \"%s\"\n"
- "\n"
- "static char *poolfilearr[] = {\n",headername);
- while (fgets(data,1024,fh)) {
- int len = strlen(data);
- int o = 0; /* skip first o characters*/
- int i;
- if (data[len-1]=='\n') { /* chomp;*/
- data[len-1] = 0;
- len--;
- }
- if (data[0]=='*') break; /* last if !^\*!; */
- if (data[0]>='0' && data[0]<='9' && data[1]>='0' && data[1]<='9') {
- o=2; /* $data =~ s/^\d\d//; */
- }
- printf(" \"");
- for (i=o; i<len; i++) {
- if (data[i]=='"' || data[i]=='\\') putchar('\\');
- if (data[i]=='?') printf("\" \""); /* suppress trigraphs */
- putchar(data[i]);
- } /* $data =~ s/(["\\])/\\$1/g; */
- printf("\",\n");
- }
- fclose(fh);
- printf(" NULL };\n"
- "int loadpoolstrings (integer spare_size) {\n"
- " strnumber g=0;\n"
- " int i=0,j=0;\n"
- " char *s;\n"
- " while ((s = poolfilearr[j++])) {\n"
- " int l = strlen (s);\n"
- " i += l;\n"
- " if (i>=spare_size) return 0;\n"
- " while (l-- > 0) strpool[poolptr++] = *s++;\n"
- /* " while (l-- > 0) str_pool[pool_ptr++] = *s++;\n" */
- " g = makestring();\n"
- /* " g = make_string();\n" */
- /* " strref[g]= 127;\n"*/
- " }\n"
- " return g;\n"
- "}\n");
- return 0;
-}
diff --git a/Build/source/texk/web2c/luatexdir/Makefile.in b/Build/source/texk/web2c/luatexdir/Makefile.in
index 5f30dd24842..43f433fd8b8 100644
--- a/Build/source/texk/web2c/luatexdir/Makefile.in
+++ b/Build/source/texk/web2c/luatexdir/Makefile.in
@@ -107,7 +107,7 @@ textcodes.o \
utils.o \
writezip.o
-all: libpdf.a makecpool
+all: libpdf.a $(makecpool)
libpdf.a: lua/mp.c lua/psout.c $(OBJS)
rm -f $@
@@ -120,9 +120,6 @@ lua/mp.c: lua/mp.w
lua/psout.c: lua/psout.w
$(CTANGLE) $(srcdir)/lua/psout.w - lua/psout.c
-makecpool: makecpool.o
- $(link_command) makecpool.o
-
kpse_include ../make/clean.mk
clean::
diff --git a/Build/source/texk/web2c/luatexdir/luatex.mk b/Build/source/texk/web2c/luatexdir/luatex.mk
index 4bb69034369..02fc2bae055 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.mk
+++ b/Build/source/texk/web2c/luatexdir/luatex.mk
@@ -53,8 +53,8 @@ $(luatexdir)/luatexextra.h: $(luatexdir)/luatexextra.in $(luatexdir)/luatex.vers
test -d $(luatexdir) || mkdir $(luatexdir)
sed -e s/LUATEX-VERSION/`cat $(luatexdir)/luatex.version`/ \
$(srcdir)/$(luatexdir)/luatexextra.in >$@
-loadpool.c: luatex.pool $(luatexdir)/makecpool
- $(native)/$(luatexdir)/makecpool luatex.pool luatexdir/ptexlib.h > loadpool.c
+loadpool.c: luatex.pool $(makecpool)
+ $(makecpool) luatex.pool luatexdir/ptexlib.h >$@ || rm -f $@
# luatangle we need a private version of tangle
diff --git a/Build/source/texk/web2c/luatexdir/makecpool.c b/Build/source/texk/web2c/luatexdir/makecpool.c
deleted file mode 100644
index 162a4848482..00000000000
--- a/Build/source/texk/web2c/luatexdir/makecpool.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main(int argc, char *argv[]) {
- if (argc!=3) {
- puts("Need exactly two arguments: pool_name and header_name");
- exit(1);
- }
- char *filename = argv[1];
- char *headername = argv[2];
- FILE *fh = fopen(filename,"r");
- char data[1024];
- printf(
- "/* This file is auto-generated by makecpool */\n"
- "\n"
- "#include <stdio.h>\n"
- "#include \"%s\"\n"
- "\n"
- "static char *poolfilearr[] = {\n",headername);
- while (fgets(data,1024,fh)) {
- int len = strlen(data);
- int o = 0; /* skip first o characters*/
- int i;
- if (data[len-1]=='\n') { /* chomp;*/
- data[len-1] = 0;
- len--;
- }
- if (data[0]=='*') break; /* last if !^\*!; */
- if (data[0]>='0' && data[0]<='9' && data[1]>='0' && data[1]<='9') {
- o=2; /* $data =~ s/^\d\d//; */
- }
- printf(" \"");
- for (i=o; i<len; i++) {
- if (data[i]=='"' || data[i]=='\\') putchar('\\');
- if (data[i]=='?') printf("\" \""); /* suppress trigraphs */
- putchar(data[i]);
- } /* $data =~ s/(["\\])/\\$1/g; */
- printf("\",\n");
- }
- fclose(fh);
- printf(" NULL };\n"
- "int loadpoolstrings (integer spare_size) {\n"
- " strnumber g=0;\n"
- " int i=0,j=0;\n"
- " char *s;\n"
- " while ((s = poolfilearr[j++])) {\n"
- " int l = strlen (s);\n"
- " i += l;\n"
- " if (i>=spare_size) return 0;\n"
- /*" while (l-- > 0) strpool[poolptr++] = *s++;\n"*/
- " while (l-- > 0) str_pool[pool_ptr++] = *s++;\n"
- /* " g = makestring();\n"*/
- " g = make_string();\n"
- /* " strref[g]= 127;\n"*/
- " }\n"
- " return g;\n"
- "}\n");
- return 0;
-}
diff --git a/Build/source/texk/web2c/metapost.mk b/Build/source/texk/web2c/metapost.mk
index 5ee774a44e1..5ae51d805ae 100644
--- a/Build/source/texk/web2c/metapost.mk
+++ b/Build/source/texk/web2c/metapost.mk
@@ -21,8 +21,8 @@ mpware_sources = mpware/dmp.c mpware/makempx.in mpware/mpto.c mpware/newer.c
mp_c = mpini.c mp0.c mp1.c mp2.c
mp_o = mpini.o mp0.o mp1.o mp2.o mpextra.o mp-loadpool.o
-mp-loadpool.c: mp.pool $(mpostdir)/makecpool
- $(mpostdir)/makecpool mp.pool mpdir/mplib.h >$@
+mp-loadpool.c: mp.pool $(makecpool)
+ $(makecpool) mp.pool mpdir/mplib.h >$@ || rm -f $@
# mpostlibsdep also includes makecpool
mpost: $(mp_o) $(mpostlibsdep)
$(kpathsea_link) $(mp_o) $(mpostlibs) $(LOADLIBES)
diff --git a/Build/source/texk/web2c/mf-mkcpool.c b/Build/source/texk/web2c/mf-mkcpool.c
deleted file mode 100644
index 2b5e4018a1b..00000000000
--- a/Build/source/texk/web2c/mf-mkcpool.c
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main(int argc, char *argv[]) {
- char *filename;
- char *headername;
- FILE *fh;
- char data[1024];
- if (argc!=3) {
- puts("Need exactly two arguments: pool_name and header_name");
- exit(1);
- }
- filename = argv[1];
- headername = argv[2];
- fh = fopen(filename,"r");
- printf(
- "/* This file is auto-generated by makecpool */\n"
- "\n"
- "#include <stdio.h>\n"
- "#include \"%s\"\n"
- "\n"
- "static char *poolfilearr[] = {\n",headername);
- while (fgets(data,1024,fh)) {
- int len = strlen(data);
- int o = 0; /* skip first o characters*/
- int i;
- if (data[len-1]=='\n') { /* chomp;*/
- data[len-1] = 0;
- len--;
- }
- if (data[0]=='*') break; /* last if !^\*!; */
- if (data[0]>='0' && data[0]<='9' && data[1]>='0' && data[1]<='9') {
- o=2; /* $data =~ s/^\d\d//; */
- }
- printf(" \"");
- for (i=o; i<len; i++) {
- if (data[i]=='"' || data[i]=='\\') putchar('\\');
- if (data[i]=='?') printf("\" \""); /* suppress trigraphs */
- putchar(data[i]);
- } /* $data =~ s/(["\\])/\\$1/g; */
- printf("\",\n");
- }
- fclose(fh);
- printf(" NULL };\n"
- "int loadpoolstrings (integer spare_size) {\n"
- " strnumber g=0;\n"
- " int i=0,j=0;\n"
- " char *s;\n"
- " while ((s = poolfilearr[j++])) {\n"
- " int l = strlen (s);\n"
- " i += l;\n"
- " if (i>=spare_size) return 0;\n"
- " while (l-- > 0) strpool[poolptr++] = *s++;\n"
- " g = makestring();\n"
- " strref[g]= 127;\n"
- " }\n"
- " return g;\n"
- "}\n");
- return 0;
-}
diff --git a/Build/source/texk/web2c/mpdir/mpostlib.mk b/Build/source/texk/web2c/mpdir/mpostlib.mk
index 01d798b60bb..e4297341864 100644
--- a/Build/source/texk/web2c/mpdir/mpostlib.mk
+++ b/Build/source/texk/web2c/mpdir/mpostlib.mk
@@ -13,15 +13,7 @@ mpostlib_sources = $(srcdir)/mpdir/*.c $(srcdir)/mpdir/*.h
mpdir/libmpost.a: $(mpostlib_sources)
cd mpdir && $(MAKE) $(common_makeargs) libmpost.a
-# makecpool
-
-makecpool = mpdir/makecpool
-
-mpdir/makecpool: mpdir/makecpool.c
- cd mpdir && $(MAKE) $(common_makeargs) makecpool
-
# Convenience variables.
-
mpostlibs = $(mpostlib)
mpostlibsdep = $(mpostlib) $(makecpool)
diff --git a/Build/source/texk/web2c/omegadir/makecpool.c b/Build/source/texk/web2c/omegadir/makecpool.c
deleted file mode 100644
index 4a928068208..00000000000
--- a/Build/source/texk/web2c/omegadir/makecpool.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright 2007, 2008 Taco Hoekwater.
- You may freely use, modify and/or distribute this file. */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main(int argc, char *argv[]) {
- char *filename;
- char *headername;
- FILE *fh;
- char data[1024];
- if (argc!=3) {
- puts("Need exactly two arguments: pool_name and header_name");
- exit(1);
- }
- filename = argv[1];
- headername = argv[2];
- fh = fopen(filename,"r");
- printf(
- "/* This file is auto-generated by makecpool */\n"
- "\n"
- "#include <stdio.h>\n"
- "#include <string.h>\n"
- "#include \"%s\"\n"
- "\n"
- "static char *poolfilearr[] = {\n",headername);
- while (fgets(data,1024,fh)) {
- int len = strlen(data);
- int o = 0; /* skip first o characters*/
- int i;
- if (data[len-1]=='\n') { /* chomp;*/
- data[len-1] = 0;
- len--;
- }
- if (data[0]=='*') break; /* last if !^\*!; */
- if (data[0]>='0' && data[0]<='9' && data[1]>='0' && data[1]<='9') {
- o=2; /* $data =~ s/^\d\d//; */
- }
- printf(" \"");
- for (i=o; i<len; i++) {
- if (data[i]=='"' || data[i]=='\\') putchar('\\');
- if (data[i]=='?') printf("\" \""); /* suppress trigraphs */
- putchar(data[i]);
- } /* $data =~ s/(["\\])/\\$1/g; */
- printf("\",\n");
- }
- fclose(fh);
- printf(" NULL };\n"
- "int loadpoolstrings (integer spare_size) {\n"
- " strnumber g=0;\n"
- " int i=0,j=0;\n"
- " char *s;\n"
- " while ((s = poolfilearr[j++])) {\n"
- " int l = strlen (s);\n"
- " i += l;\n"
- " if (i>=spare_size) return 0;\n"
- " while (l-- > 0) strpool[poolptr++] = *s++;\n"
- /* " while (l-- > 0) str_pool[pool_ptr++] = *s++;\n" */
- " g = makestring();\n"
- /* " g = make_string();\n" */
- /* " strref[g]= 127;\n"*/
- " }\n"
- " return g;\n"
- "}\n");
- return 0;
-}
diff --git a/Build/source/texk/web2c/omegadir/omega.mk b/Build/source/texk/web2c/omegadir/omega.mk
index 72775719c93..e44d86264cd 100644
--- a/Build/source/texk/web2c/omegadir/omega.mk
+++ b/Build/source/texk/web2c/omegadir/omega.mk
@@ -164,13 +164,8 @@ omega.ch: omegadir/comsrcspec.ch
$(srcdir)/omegadir/comxml.ch \
$(srcdir)/omegadir/comsrcspec.ch
-omega-pool.c: omega.pool omegadir/makecpool
- omegadir/makecpool omega.pool omegadir/omega-pool.h >omega-pool.c
-omegadir/makecpool: omegadir/makecpool.o
- $(CC) $(CFLAGS) -o $@ omegadir/makecpool.o
-omegadir/makecpool.o: $(srcdir)/omegadir/makecpool.c
- test -d omegadir || mkdir omegadir
- $(CC) $(CFLAGS) -c -o $@ $(srcdir)/omegadir/makecpool.c
+omega-pool.c: omega.pool $(makecpool)
+ $(makecpool) omega.pool omegadir/omega-pool.h >$@ || rm -f $@
# Check: right now all we do is build the format.
check: @OMEGA@ omega-check
diff --git a/Build/source/texk/web2c/tex-mkcpool.c b/Build/source/texk/web2c/tex-mkcpool.c
deleted file mode 100644
index bd95e7f5994..00000000000
--- a/Build/source/texk/web2c/tex-mkcpool.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main(int argc, char *argv[]) {
- char *filename;
- char *headername;
- FILE *fh;
- char data[1024];
- if (argc!=3) {
- puts("Need exactly two arguments: pool_name and header_name");
- exit(1);
- }
- filename = argv[1];
- headername = argv[2];
- fh = fopen(filename,"r");
- printf(
- "/* This file is auto-generated by makecpool */\n"
- "\n"
- "#include <stdio.h>\n"
- "#include \"%s\"\n"
- "\n"
- "static char *poolfilearr[] = {\n",headername);
- while (fgets(data,1024,fh)) {
- int len = strlen(data);
- int o = 0; /* skip first o characters*/
- int i;
- if (data[len-1]=='\n') { /* chomp;*/
- data[len-1] = 0;
- len--;
- }
- if (data[0]=='*') break; /* last if !^\*!; */
- if (data[0]>='0' && data[0]<='9' && data[1]>='0' && data[1]<='9') {
- o=2; /* $data =~ s/^\d\d//; */
- }
- printf(" \"");
- for (i=o; i<len; i++) {
- if (data[i]=='"' || data[i]=='\\') putchar('\\');
- if (data[i]=='?') printf("\" \""); /* suppress trigraphs */
- putchar(data[i]);
- } /* $data =~ s/(["\\])/\\$1/g; */
- printf("\",\n");
- }
- fclose(fh);
- printf(" NULL };\n"
- "int loadpoolstrings (integer spare_size) {\n"
- " strnumber g=0;\n"
- " int i=0,j=0;\n"
- " char *s;\n"
- " while ((s = poolfilearr[j++])) {\n"
- " int l = strlen (s);\n"
- " i += l;\n"
- " if (i>=spare_size) return 0;\n"
- " while (l-- > 0) strpool[poolptr++] = *s++;\n"
- " g = makestring();\n"
- " }\n"
- " return g;\n"
- "}\n");
- return 0;
-}
diff --git a/Build/source/texk/web2c/web2c/Makefile.in b/Build/source/texk/web2c/web2c/Makefile.in
index e5889b46a4e..93ab5580fa5 100644
--- a/Build/source/texk/web2c/web2c/Makefile.in
+++ b/Build/source/texk/web2c/web2c/Makefile.in
@@ -17,7 +17,7 @@ LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
YACC = @YACC@
-programs = web2c fixwrites splitup
+programs = web2c fixwrites splitup makecpool
web2c_objects = kps.o main.o y_tab.o $(LEX_OUTPUT_ROOT).o
all: $(programs)
@@ -41,8 +41,8 @@ splitup: splitup.o kps.o
$(build_link_command) splitup.o kps.o
regfix: regfix.o kps.o
$(build_link_command) regfix.o kps.o
-
-$(programs):
+makecpool: makecpool.o
+ $(build_link_command) makecpool.o
main.o: main.c
$(build_compile) -c $<
@@ -58,6 +58,8 @@ splitup.o: splitup.c
$(build_compile) -c $<
regfix.o: regfix.c
$(build_compile) -c $<
+makecpool.o: makecpool.c
+ $(build_compile) -c $<
Makefile: Makefile.in ../config.status
cd .. && $(SHELL) config.status
diff --git a/Build/source/texk/web2c/mpdir/makecpool.c b/Build/source/texk/web2c/web2c/makecpool.c
index 728e1f86654..7e2eca3315c 100644
--- a/Build/source/texk/web2c/mpdir/makecpool.c
+++ b/Build/source/texk/web2c/web2c/makecpool.c
@@ -10,6 +10,7 @@ int main(int argc, char *argv[]) {
char *headername;
FILE *fh;
char data[1024];
+ int is_metafont = 0;
int is_metapost = 0;
int is_luatex = 0;
if (argc!=3) {
@@ -27,9 +28,11 @@ int main(int argc, char *argv[]) {
is_luatex = 1;
else if (strstr(filename,"mp.pool")!=NULL)
is_metapost = 1;
+ else if (strstr(filename,"mf.pool")!=NULL)
+ is_metafont = 1;
printf(
"/*\n"
- " * This file is auto-generated by makecpool. \n"
+ " * This file is auto-generated by makecpool.\n"
" * %s %s %s\n"
" */\n"
"\n"
@@ -74,7 +77,7 @@ int main(int argc, char *argv[]) {
else
printf(" while (l-- > 0) strpool[poolptr++] = *s++;\n"
" g = makestring();\n");
- if (is_metapost)
+ if (is_metapost || is_metafont)
printf(" strref[g]= 127;\n");
printf(" }\n" " return g;\n" "}\n");
return EXIT_SUCCESS;