summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/hitexdir/am/hitex.am10
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.w10
-rw-r--r--Build/source/texk/web2c/hitexdir/hilexer.c4
-rw-r--r--Build/source/texk/web2c/hitexdir/hilexer.l4
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.c4
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.h2
-rw-r--r--Build/source/texk/web2c/hitexdir/hiparser.y6
-rwxr-xr-xBuild/source/texk/web2c/hitexdir/tests/hello.test27
-rw-r--r--Build/source/texk/web2c/hitexdir/tests/hello.tex11
-rw-r--r--Build/source/texk/web2c/hitexdir/tests/rule.test19
10 files changed, 73 insertions, 24 deletions
diff --git a/Build/source/texk/web2c/hitexdir/am/hitex.am b/Build/source/texk/web2c/hitexdir/am/hitex.am
index 3abd066e31b..10a985feae5 100644
--- a/Build/source/texk/web2c/hitexdir/am/hitex.am
+++ b/Build/source/texk/web2c/hitexdir/am/hitex.am
@@ -100,9 +100,11 @@ DISTCLEANFILES += hiformat-tangle hitex-tangle
## HiTeX tests
#
-hitex_tests = hitexdir/tests/rule.test
+hitex_tests = hitexdir/tests/rule.test\
+ hitexdir/tests/hello.test
hitexdir/tests/rule.log: hitex$(EXEEXT) histretch$(EXEEXT) hishrink$(EXEEXT)
+hitexdir/tests/hello.log: hitex$(EXEEXT) histretch$(EXEEXT)
EXTRA_DIST += $(hitex_tests)
@@ -112,5 +114,9 @@ TESTS += $(hitex_tests)
endif HITEX
## rule.test
-EXTRA_DIST += tests/rule.tex
+EXTRA_DIST += tests/rule.tex
DISTCLEANFILES += rule.log
+
+## hello.test
+EXTRA_DIST += tests/hello.tex
+DISTCLEANFILES += hello.log
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.w b/Build/source/texk/web2c/hitexdir/hiformat.w
index 5b1fd22a2d8..9208890ffe6 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.w
+++ b/Build/source/texk/web2c/hitexdir/hiformat.w
@@ -6834,8 +6834,8 @@ void hset_entry(entry_t *e, uint16_t i, uint32_t size, uint32_t xsize, @|char *f
@
-Writing the auxiliary files depends on the {\tt -f} and the {\tt -g}
-option.
+Writing the auxiliary files depends on the {\tt -n}, {\tt -f} and {\tt -g}
+options.
@<without {\tt -f} skip writing an existing file@>=
if ( !option_force && access(file_name,F_OK)==0)
@@ -6939,13 +6939,13 @@ extern int stem_length;
void hget_section(uint16_t n);
void hwrite_aux_files(void)
{ int i;
+ if (option_no_aux) return;
DBG(DBGBASIC|DBGDIR,"Writing %d aux files\n",max_section_no-2);
for (i=3;i<=max_section_no;i++)
{ FILE *f;
char * file_name=dir[i].file_name;
int file_name_length=0;
-
@<without {\tt -g} compute a local |file_name|@>@;
@<without {\tt -f} skip writing an existing file@>@;
@<make sure the path in |file_name| exists@>@;
@@ -8524,6 +8524,8 @@ It tells us what to expect in the rest of this section.
"\t --version\t display the HINT version\n"@/
"\t -o file\t specify an output file name\n"@/
"\t -g \t assume global names for auxiliary files\n"@/
+ "\t -f \t force overwriting auxiliary files\n"@/
+ "\t -n \t do not write auxiliary files\n"@/
"\t -l \t redirect stderr to a log file\n"@/
"\t -u \t enable writing utf8 character codes\n"@/
"\t -x \t enable writing hexadecimal character codes\n"@/
@@ -8580,6 +8582,7 @@ int option_utf8=false;
int option_hex=false;
int option_force=false;
int option_global=false;
+int option_no_aux=false;
int option_compress=false;
char *stem_name=NULL;
int stem_length=0;
@@ -8634,6 +8637,7 @@ are supported in addition to the short options.
case 'x': option_hex=true;@+break;
case 'f': option_force=true; @+break;
case 'g': option_global=true; @+break;
+ case 'n': option_no_aux=true; @+break;
case 'c': option_compress=true; @+break;
case 'd': @/
argv++; if (*argv==NULL) goto explain_usage;
diff --git a/Build/source/texk/web2c/hitexdir/hilexer.c b/Build/source/texk/web2c/hitexdir/hilexer.c
index 228cd613cd1..a075b22397d 100644
--- a/Build/source/texk/web2c/hitexdir/hilexer.c
+++ b/Build/source/texk/web2c/hitexdir/hilexer.c
@@ -844,7 +844,7 @@ char *yytext;
#line 1 "lexer.l"
#line 2 "lexer.l"
/*509:*/
- #line 10171 "format.w"
+ #line 10175 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
@@ -980,7 +980,7 @@ float64_t xtof(char*x)
}
/*:61*/
int yywrap(void){
- #line 10182 "format.w"
+ #line 10186 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
diff --git a/Build/source/texk/web2c/hitexdir/hilexer.l b/Build/source/texk/web2c/hitexdir/hilexer.l
index 1f7280727c9..17ffe51bc11 100644
--- a/Build/source/texk/web2c/hitexdir/hilexer.l
+++ b/Build/source/texk/web2c/hitexdir/hilexer.l
@@ -1,6 +1,6 @@
/*509:*/
%{
- #line 10171 "format.w"
+ #line 10175 "format.w"
#include "hibasetypes.h"
#include "hierror.h"
@@ -136,7 +136,7 @@ float64_t xtof(char*x)
}
/*:61*/
int yywrap(void){
- #line 10182 "format.w"
+ #line 10186 "format.w"
return 1;}
#ifdef _MSC_VER
#pragma warning( disable : 4267)
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.c b/Build/source/texk/web2c/hitexdir/hiparser.c
index 947f2141169..ba32a0db995 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.c
+++ b/Build/source/texk/web2c/hitexdir/hiparser.c
@@ -69,7 +69,7 @@
/* First part of user prologue. */
#line 2 "parser.y"
- #line 10212 "format.w"
+ #line 10216 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -132,7 +132,7 @@ void check_param_def(ref_t*df)
extern int yylineno;
int yyerror(const char*msg)
{
- #line 8799 "format.w"
+ #line 8803 "format.w"
QUIT(" in line %d %s",yylineno,msg);
return 0;
}
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.h b/Build/source/texk/web2c/hitexdir/hiparser.h
index 511228663eb..a368d1069cc 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.h
+++ b/Build/source/texk/web2c/hitexdir/hiparser.h
@@ -147,7 +147,7 @@ union YYSTYPE
{
#line 79 "parser.y"
- #line 10237 "format.w"
+ #line 10241 "format.w"
uint32_t u; int32_t i; char *s; float64_t f; glyph_t c;
dimen_t d;stretch_t st;xdimen_t xd;kern_t kt;
rule_t r;glue_t g;image_t x;
diff --git a/Build/source/texk/web2c/hitexdir/hiparser.y b/Build/source/texk/web2c/hitexdir/hiparser.y
index dc1ab177ccb..b3f1b1e2a05 100644
--- a/Build/source/texk/web2c/hitexdir/hiparser.y
+++ b/Build/source/texk/web2c/hitexdir/hiparser.y
@@ -1,6 +1,6 @@
/*510:*/
%{
- #line 10212 "format.w"
+ #line 10216 "format.w"
#include "hibasetypes.h"
#include <string.h>
@@ -63,7 +63,7 @@ void check_param_def(ref_t*df)
extern int yylineno;
int yyerror(const char*msg)
{
- #line 8799 "format.w"
+ #line 8803 "format.w"
QUIT(" in line %d %s",yylineno,msg);
return 0;
}
@@ -77,7 +77,7 @@ int yyerror(const char*msg)
%union {
- #line 10237 "format.w"
+ #line 10241 "format.w"
uint32_t u; int32_t i; char *s; float64_t f; glyph_t c;
dimen_t d;stretch_t st;xdimen_t xd;kern_t kt;
rule_t r;glue_t g;image_t x;
diff --git a/Build/source/texk/web2c/hitexdir/tests/hello.test b/Build/source/texk/web2c/hitexdir/tests/hello.test
new file mode 100755
index 00000000000..41f43e4179c
--- /dev/null
+++ b/Build/source/texk/web2c/hitexdir/tests/hello.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+# $Id: rule.test $
+# Public domain. Originally written by Martin Ruckert
+# Basic check that rule.tex can be hitexed stretched and shrinked.
+
+LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
+
+TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
+TEXINPUTS=$srcdir/hitexdir/tests; export TEXINPUTS
+TFMFONTS=$srcdir/tests; export TFMFONTS
+#PKFONTS=$srcdir/tests; export PKFONTS
+T1FONTS=$srcdir/tests; export T1FONTS
+OUTDIR=./hitexdir/tests
+
+./hitex -ini -interaction=nonstopmode -output-directory=$OUTDIR hello.tex || exit $?
+./histretch -n $OUTDIR/hello.hnt || exit $?
+
+if grep -q "<section 3 '../../../texk/web2c/tests/cmr10.tfm'>" $OUTDIR/hello.HINT
+then
+ : # OK
+else
+ echo "hello.HINT does not contain the propper .tfm file" >&2
+ exit 1
+fi
+
+exit 0
+
diff --git a/Build/source/texk/web2c/hitexdir/tests/hello.tex b/Build/source/texk/web2c/hitexdir/tests/hello.tex
new file mode 100644
index 00000000000..0f74b2a9183
--- /dev/null
+++ b/Build/source/texk/web2c/hitexdir/tests/hello.tex
@@ -0,0 +1,11 @@
+% $Id: rule.tex $
+% Public domain. Test file for generating a single rule
+% Originally written 2021 Martin Ruckert
+
+\catcode`\{=1 \catcode`\}=2 % can run under -ini
+\font\tenrm=cmr10 %
+\tenrm Hello world!
+\vfill
+
+\end
+
diff --git a/Build/source/texk/web2c/hitexdir/tests/rule.test b/Build/source/texk/web2c/hitexdir/tests/rule.test
index 24d55f53469..48644f83445 100644
--- a/Build/source/texk/web2c/hitexdir/tests/rule.test
+++ b/Build/source/texk/web2c/hitexdir/tests/rule.test
@@ -1,4 +1,4 @@
-#! /bin/sh -vx
+#!/bin/sh
# $Id: rule.test $
# Public domain. Originally written by Martin Ruckert
# Basic check that rule.tex can be hitexed stretched and shrinked.
@@ -7,25 +7,26 @@ LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
TEXINPUTS=$srcdir/hitexdir/tests; export TEXINPUTS
+OUTDIR=./hitexdir/tests
-./hitex -ini --interaction=nonstopmode rule.tex || exit $?
-./histretch rule.hnt || exit $?
-./hishrink -o rule.out.hnt rule.HINT || exit $?
-./histretch rule.out.hnt || exit $?
+./hitex -ini --interaction=nonstopmode -output-directory=$OUTDIR rule.tex || exit $?
+./histretch $OUTDIR/rule.hnt || exit $?
+./hishrink -o $OUTDIR/rule.out.hnt $OUTDIR/rule.HINT || exit $?
+./histretch $OUTDIR/rule.out.hnt || exit $?
-if grep -q "<rule 0x48.451Ept 1pt 0x1C.73E7pt>" rule.HINT
+if grep -q "<rule 0x48.451Ept 1pt 0x1C.73E7pt>" $OUTDIR/rule.HINT
then
: # OK
else
- echo "rule.HINT does not contain the propper rule"
+ echo "rule.HINT does not contain the propper rule" >&2
exit 1
fi
-if diff -q -w rule.out.HINT rule.HINT
+if diff -q -w $OUTDIR/rule.out.HINT $OUTDIR/rule.HINT
then
: #OK
else
- echo "rule.out.HINT and rule.HINT differ"
+ echo "rule.out.HINT and rule.HINT differ" >&2
exit 1
fi