summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mpdir
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/source/texk/web2c/mpdir
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/source/texk/web2c/mpdir')
-rw-r--r--Build/source/texk/web2c/mpdir/makecpool.c81
-rw-r--r--Build/source/texk/web2c/mpdir/mpostlib.mk8
2 files changed, 0 insertions, 89 deletions
diff --git a/Build/source/texk/web2c/mpdir/makecpool.c b/Build/source/texk/web2c/mpdir/makecpool.c
deleted file mode 100644
index 728e1f86654..00000000000
--- a/Build/source/texk/web2c/mpdir/makecpool.c
+++ /dev/null
@@ -1,81 +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];
- int is_metapost = 0;
- int is_luatex = 0;
- if (argc!=3) {
- fprintf(stderr,"%s: need exactly two arguments (pool name and C header name).\n", argv[0]);
- exit(EXIT_FAILURE);
- }
- filename = argv[1];
- headername = argv[2];
- fh = fopen(filename,"r");
- if (!fh) {
- fprintf(stderr,"%s: can't open %s for reading.\n", argv[0], filename);
- exit(EXIT_FAILURE);
- }
- if (strstr(filename,"luatex.pool")!=NULL)
- is_luatex = 1;
- else if (strstr(filename,"mp.pool")!=NULL)
- is_metapost = 1;
- printf(
- "/*\n"
- " * This file is auto-generated by makecpool. \n"
- " * %s %s %s\n"
- " */\n"
- "\n"
- "#include <stdio.h>\n"
- "#include <string.h>\n"
- "#include \"%s\"\n"
- "\n"
- "static const char *poolfilearr[] = {\n", argv[0], filename, headername, headername);
- while (fgets(data,1024,fh)) {
- int i;
- int len = strlen(data);
- int o = 0; /* skip first bytes */
- if (data[len-1]=='\n') {
- data[len-1] = 0;
- len--;
- }
- if (data[0]=='*') break;
- if (data[0]>='0' && data[0]<='9' && data[1]>='0' && data[1]<='9') {
- o=2;
- }
- printf(" \"");
- for (i=o; i<len; i++) {
- if (data[i]=='"' || data[i]=='\\') putchar('\\');
- if (data[i]=='?') printf("\" \""); /* suppress trigraphs */
- putchar(data[i]);
- }
- printf("\",\n");
- }
- fclose(fh);
- printf(" NULL };\n"
- "int loadpoolstrings (integer spare_size) {\n"
- " const char *s;\n"
- " strnumber g=0;\n"
- " int i=0,j=0;\n"
- " while ((s = poolfilearr[j++])) {\n"
- " int l = strlen (s);\n"
- " i += l;\n"
- " if (i>=spare_size) return 0;\n");
- if (is_luatex)
- printf(" while (l-- > 0) str_pool[pool_ptr++] = *s++;\n"
- " g = make_string();\n");
- else
- printf(" while (l-- > 0) strpool[poolptr++] = *s++;\n"
- " g = makestring();\n");
- if (is_metapost)
- printf(" strref[g]= 127;\n");
- printf(" }\n" " return g;\n" "}\n");
- return EXIT_SUCCESS;
-}
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)