summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexmk/latexmk.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-19 23:23:51 +0000
committerKarl Berry <karl@freefriends.org>2010-05-19 23:23:51 +0000
commit994e8740e5b5588a65c3baec92333b81ae2edd54 (patch)
tree042867ad1828218c2585eea633a2587aaed65006 /Master/texmf-dist/scripts/latexmk/latexmk.pl
parent666a6e2300f00cb53ed434b53f5fecebfc97f2ef (diff)
latexmk 4.16a (19may10)
git-svn-id: svn://tug.org/texlive/trunk@18356 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexmk/latexmk.pl')
-rwxr-xr-xMaster/texmf-dist/scripts/latexmk/latexmk.pl27
1 files changed, 23 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/latexmk/latexmk.pl b/Master/texmf-dist/scripts/latexmk/latexmk.pl
index 7372174cc9f..08fdc5b4ebe 100755
--- a/Master/texmf-dist/scripts/latexmk/latexmk.pl
+++ b/Master/texmf-dist/scripts/latexmk/latexmk.pl
@@ -108,8 +108,8 @@ use warnings;
$my_name = 'latexmk';
$My_name = 'Latexmk';
-$version_num = '4.16';
-$version_details = "$My_name, John Collins, 10 May 2010";
+$version_num = '4.16a';
+$version_details = "$My_name, John Collins, 18 May 2010";
use Config;
@@ -178,6 +178,10 @@ else {
##
## Modification log from 22 Jan 2010 onwards in detail
##
+## 18 May 2010, John Collins Remove unlink $$Pdest in do_viewfile
+## 17 May 2010, John Collins Correct sleep time to 1 sec
+## if s<0 (otherwise infinite delay)
+## or if 0<s<1 (otherwise zero delay)
## 10 May 2010, John Collins Deal with filenames in log file that are
## messed up by pdfTeX warnings not preceeded
## by a new line
@@ -1550,6 +1554,22 @@ if ( $pdf_mode == 2 ) {
add_option( \$dvips, " $dvips_pdf_switch" );
}
+# Note sleep has granularity of 1 second.
+# Sleep periods 0 < $sleep_time < 1 give zero delay,
+# which is probably not what the user intended.
+# Sleep periods less than zero give infinite delay
+if ( $sleep_time < 0 ) {
+ warn "$My_name: Correcting negative sleep_time to 1 sec.\n";
+ $sleep_time = 1;
+}
+elsif ( ($sleep_time < 1) && ( $sleep_time != 0 ) ) {
+ warn "$My_name: Correcting nonzero sleep_time of less than 1 sec to 1 sec.\n";
+ $sleep_time = 1;
+}
+elsif ( $sleep_time == 0 ) {
+ warn "$My_name: sleep_time was configured to zero.\n",
+ " Do you really want to do this? It will give 100% CPU usage.";
+}
# Make convenient forms for lookup.
# Extensions always have period.
@@ -2110,7 +2130,6 @@ sub do_viewfile {
if ( &view_file_via_temporary ) {
my $tmpfile = tempfile1( "${root_filename}_tmp", $ext );
$return = &rdb_ext_cmd1( '', '', $tmpfile );
- unlink $$Pdest;
move( $tmpfile, $$Pdest );
}
else {
@@ -2417,7 +2436,7 @@ CHANGE:
&catch_break;
$have_break = 0;
WAIT: while (1) {
- sleep($sleep_time);
+ sleep( $sleep_time );
if ($have_break) { last WAIT; }
if ( rdb_new_changes(keys %rules_to_watch) ) {
if (!$silent) {