summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/perltex/perltex.pl (renamed from Master/texmf-dist/scripts/perltex/perltex)10
1 files changed, 10 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/perltex/perltex b/Master/texmf-dist/scripts/perltex/perltex.pl
index 47f8cfc27ec..64309cc1926 100755
--- a/Master/texmf-dist/scripts/perltex/perltex
+++ b/Master/texmf-dist/scripts/perltex/perltex.pl
@@ -39,6 +39,7 @@ use Pod::Usage;
use File::Basename;
use Fcntl;
use POSIX;
+use Cwd qw(abs_path);
use IO::Handle;
use warnings;
use strict;
@@ -104,6 +105,13 @@ $latexcmdline[$firstcmd] =
'\plmac@doneflag', $doneflag,
'\plmac@pipe', $pipe,
$latexcmdline[$firstcmd];
+$toperl = abs_path $toperl;
+$fromperl = abs_path $fromperl;
+$toflag = abs_path $toflag;
+$fromflag = abs_path $fromflag;
+$doneflag = abs_path $doneflag;
+$logfile = abs_path $logfile;
+$pipe = abs_path $pipe;
$SIG{"ALRM"} = sub {
undef $latexpid;
exit 0;
@@ -133,6 +141,7 @@ sub awaitexists ($)
}
delete_files($toperl, $fromperl, $toflag, $fromflag, $doneflag, $pipe);
open (LOGFILE, ">$logfile") || die "open(\"$logfile\"): $!\n";
+autoflush LOGFILE 1;
if (defined $styfile) {
open (STYFILE, ">$styfile") || die "open(\"$styfile\"): $!\n";
}
@@ -211,6 +220,7 @@ while (1) {
if ($@) {
my $msg = $@;
$msg =~ s/at \(eval \d+\) line \d+\W+//;
+ $msg =~ s/\n/\\MessageBreak\n/g;
$msg =~ s/\s+/ /;
$result = "\\PackageError{perltex}{$msg}";
my @helpstring;