diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-06 21:20:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-06 21:20:16 +0000 |
commit | 5e465bc694b0d7c28b26639f59d4cb54575d1809 (patch) | |
tree | 7b0baf53c70116094a14c4cb49c1dc35faec61ba /Build | |
parent | 58c54fc5fd1a8263d56fd49e67f1dff3c9a0faea (diff) |
remove empty (thus invalid) .p file
git-svn-id: svn://tug.org/texlive/trunk@40268 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/web2c/ChangeLog | 5 | ||||
-rwxr-xr-x | Build/source/texk/web2c/web2c/convert | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog index 3bf48558545..792a9f5939b 100644 --- a/Build/source/texk/web2c/web2c/ChangeLog +++ b/Build/source/texk/web2c/web2c/ChangeLog @@ -1,3 +1,8 @@ +2016-04-06 Karl Berry <karl@tug.org> + + * convert: remove $pascalfile if it is empty, + along with moving the non-empty .c output, etc. + 2015-06-12 Peter Breitenlohner <peb@mppmu.mpg.de> Integrate MFLua and MFLuaJIT. diff --git a/Build/source/texk/web2c/web2c/convert b/Build/source/texk/web2c/web2c/convert index 36c5c13c94c..0b56a9202ef 100755 --- a/Build/source/texk/web2c/web2c/convert +++ b/Build/source/texk/web2c/web2c/convert @@ -1,5 +1,7 @@ #!/bin/sh # Convert WEB programs not needing special treatment to C. +# Public domain. Originally written ca.1985 by Tom Rokicki, +# Tim Morgan, Karl Berry, et al. : ${srcdir=.} @@ -105,9 +107,13 @@ eval "cat $srcdir/web2c/common.defines $more_defines $pascalfile \ # Using the above pipeline as the condition of an if does no good, since # typical sh's use the status of the first command as the pipeline result. # So check for an empty output file, or one with the error marker we put in. -if test ! -s $cfile || grep @error@ $output_files >/dev/null; then +if test ! -s "$cfile" || grep @error@ $output_files >/dev/null; then : ${TMPDIR=/tmp} # Don't just delete it, since it may be useful for debugging. + if test ! -s "$pascalfile"; then + echo "$0: $pascalfile empty, removing it." >&2 + rm -f $pascalfile + fi echo "$0: conversion of $pascalfile failed, moving dregs:" >&2 cmd="mv $output_files $TMPDIR" (cd $TMPDIR && rm -f $output_files) |