diff options
author | Karl Berry <karl@freefriends.org> | 2011-02-05 00:04:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-02-05 00:04:26 +0000 |
commit | 9a354cbbcf35c3a26b5234bc9dc6bb3d44b24dd4 (patch) | |
tree | 0fdc224c85673c1c02c041260d45b757a1eb838b /Master/texmf-dist | |
parent | 884a1d5cd40763780f0dba415b6c2d81aeeee04d (diff) |
latexmk 4.22e (4feb11)
git-svn-id: svn://tug.org/texlive/trunk@21284 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/CHANGES | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/INSTALL | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/README | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/latexmk.pdf | bin | 82802 -> 82989 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/latexmk.txt | 64 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/latexmk/latexmk.pl | 72 |
6 files changed, 66 insertions, 83 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/CHANGES b/Master/texmf-dist/doc/support/latexmk/CHANGES index 0e7fa4e8b9a..620b7dc9951 100644 --- a/Master/texmf-dist/doc/support/latexmk/CHANGES +++ b/Master/texmf-dist/doc/support/latexmk/CHANGES @@ -231,3 +231,8 @@ From v. 4.22c to v. 4.22d Fix compatibility problem MiKTeX v. 2.8, that latexmk didn't always detect use of makeindex. +From v. 4.22d to v. 4.22e + Fix incorrect error handling in reading initialization files. + (Sometimes an error was incorrectly detected, after which latexmk + stopped.) + diff --git a/Master/texmf-dist/doc/support/latexmk/INSTALL b/Master/texmf-dist/doc/support/latexmk/INSTALL index 429ccf9faff..fc116c4407f 100644 --- a/Master/texmf-dist/doc/support/latexmk/INSTALL +++ b/Master/texmf-dist/doc/support/latexmk/INSTALL @@ -1,6 +1,6 @@ INSTALLING latexmk ================== - (Version 4.22d, 26 January 2011) + (Version 4.22e, 3 February 2011) John Collins Physics Department diff --git a/Master/texmf-dist/doc/support/latexmk/README b/Master/texmf-dist/doc/support/latexmk/README index be65d6230b8..c8e1faa0a94 100644 --- a/Master/texmf-dist/doc/support/latexmk/README +++ b/Master/texmf-dist/doc/support/latexmk/README @@ -1,5 +1,5 @@ -Latexmk, version 4.22d, 26 Jan. 2011 ------------------------------------- +Latexmk, version 4.22e, 3 Feb. 2011 +----------------------------------- Latexmk completely automates the process of generating a LaTeX document. Essentially, it is a highly specialized cousin of the @@ -92,7 +92,7 @@ NOTES:- John Collins ---------------------------- "latexmk -h" ---------------------------- -Latexmk 4.22d: Automatic LaTeX document generation routine +Latexmk 4.22e: Automatic LaTeX document generation routine Usage: latexmk [latexmk_options] [filename ...] diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf Binary files differindex 19815d49289..ac989e8bba4 100644 --- a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf +++ b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.txt b/Master/texmf-dist/doc/support/latexmk/latexmk.txt index 8f30d5725a9..7ef1258c7b1 100644 --- a/Master/texmf-dist/doc/support/latexmk/latexmk.txt +++ b/Master/texmf-dist/doc/support/latexmk/latexmk.txt @@ -127,7 +127,7 @@ LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE - 26 January 2011 2 + 3 February 2011 2 @@ -193,7 +193,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 3 + 3 February 2011 3 @@ -259,7 +259,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 4 + 3 February 2011 4 @@ -325,7 +325,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 5 + 3 February 2011 5 @@ -391,7 +391,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 6 + 3 February 2011 6 @@ -457,7 +457,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 7 + 3 February 2011 7 @@ -523,7 +523,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 8 + 3 February 2011 8 @@ -590,7 +590,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 9 + 3 February 2011 9 @@ -657,7 +657,7 @@ CONFIGURATION/INITIALIZATION (RC) FILES - 26 January 2011 10 + 3 February 2011 10 @@ -724,7 +724,7 @@ HOW TO SET VARIABLES IN INITIALIZATION FILES - 26 January 2011 11 + 3 February 2011 11 @@ -791,7 +791,7 @@ FORMAT OF COMMAND SPECIFICATIONS - 26 January 2011 12 + 3 February 2011 12 @@ -858,7 +858,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 13 + 3 February 2011 13 @@ -925,7 +925,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 14 + 3 February 2011 14 @@ -992,7 +992,7 @@ LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES - 26 January 2011 15 + 3 February 2011 15 @@ -1060,7 +1060,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 16 + 3 February 2011 16 @@ -1128,7 +1128,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 17 + 3 February 2011 17 @@ -1198,7 +1198,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 18 + 3 February 2011 18 @@ -1269,7 +1269,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 19 + 3 February 2011 19 @@ -1340,7 +1340,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 20 + 3 February 2011 20 @@ -1411,7 +1411,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 21 + 3 February 2011 21 @@ -1482,7 +1482,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 22 + 3 February 2011 22 @@ -1553,7 +1553,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 23 + 3 February 2011 23 @@ -1624,7 +1624,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 24 + 3 February 2011 24 @@ -1695,7 +1695,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 25 + 3 February 2011 25 @@ -1766,7 +1766,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 26 + 3 February 2011 26 @@ -1837,7 +1837,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 27 + 3 February 2011 27 @@ -1908,7 +1908,7 @@ CUSTOM DEPENDENCIES - 26 January 2011 28 + 3 February 2011 28 @@ -1979,7 +1979,7 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 29 + 3 February 2011 29 @@ -2050,7 +2050,7 @@ OLD METHOD OF DEFINING CUSTOM DEPENDENCIES - 26 January 2011 30 + 3 February 2011 30 @@ -2108,7 +2108,7 @@ THANKS TO AUTHOR Current version, by John Collins (username collins at node - phys.psu.edu). (Version 4.22d). + phys.psu.edu). (Version 4.22e). Released version can be obtained from CTAN: <http://www.tug.org/tex- archive/support/latexmk/>, and from the author's website @@ -2121,7 +2121,7 @@ AUTHOR - 26 January 2011 31 + 3 February 2011 31 @@ -2192,6 +2192,6 @@ LATEXMK(1L) LATEXMK(1L) - 26 January 2011 32 + 3 February 2011 32 diff --git a/Master/texmf-dist/scripts/latexmk/latexmk.pl b/Master/texmf-dist/scripts/latexmk/latexmk.pl index 88d6bdbec05..4f0c9b13228 100755 --- a/Master/texmf-dist/scripts/latexmk/latexmk.pl +++ b/Master/texmf-dist/scripts/latexmk/latexmk.pl @@ -107,8 +107,8 @@ use warnings; $my_name = 'latexmk'; $My_name = 'Latexmk'; -$version_num = '4.22d'; -$version_details = "$My_name, John Collins, 26 January 2011"; +$version_num = '4.22e'; +$version_details = "$My_name, John Collins, 3 February 2011"; use Config; @@ -177,6 +177,7 @@ else { ## ## Modification log from 23 Jun 2010 onwards in detail ## +## 3 Feb 2011, John Collins Correct handling of errors in rc files ## 23 Jan 2011, John Collins Fix detection of makeindex files with ## MiKTeX v >= 2.8 ## 23 Jan 2011, John Collins Fix detection of biber use with MiKTeX @@ -1343,7 +1344,6 @@ while ($_ = $ARGV[0]) process_rc_file( $ARGV[0] ); } else { - $! = 11; die "$My_name: RC file [$ARGV[0]] does not exist\n"; } shift; @@ -2540,57 +2540,37 @@ CHANGE: sub process_rc_file { # Usage process_rc_file( filename ) + # NEW VERSION # Run rc_file whose name is given in first argument - # Exit with code 11 if file could not be read. - # (In general this is not QUITE the right error) - # Exit with code 13 if there is a syntax error or other problem. - # ???Should I leave the exiting to the caller (perhaps as an option)? - # But I can always catch it with an eval if necessary. - # That confuses ctrl/C and ctrl/break handling. + # Exit with code 0 on success + # Exit with code 1 if file could not be read. + # Stop if there is a syntax error or other problem. my $rc_file = $_[0]; - warn "$My_name: Executing PERL code in file '$rc_file'...\n" + my $ret_code = 0; + warn "$My_name: Executing Perl code in file '$rc_file'...\n" if $diagnostics; - do( $rc_file ); - # The return value from the do is not useful, since it is the value of - # the last expression evaluated, which could be anything. - # The correct test of errors is on the values of $! and $@. - -# This is not entirely correct. On gluon2: -# rc_file does open of file, and $! has error, apparently innocuous -# See ~/proposal/06/latexmkrc-effect - - my $OK = 1; - if ( $! ) { - # Get both numeric error and its string, by forcing numeric and - # string contexts: - my $err_no = $!+0; - my $err_string = "$!"; - warn "$My_name: Initialization file '$rc_file' could not be read,\n", - " or it gave some other problem. Error code \$! = $err_no.\n", - " Error string = '$err_string'\n"; - $! = 256; - $OK = 0; + if ( ! -r $rc_file ) { + return 1; } + do( $rc_file ); if ( $@ ) { - $! = 256; - # Indent the error message to make it easier to locate - my $indented = prefix( $@, " " ); - $@ = ""; + # Indent each line of possibly multiline message: + my $message = prefix( $@, " " ); warn "$My_name: Initialization file '$rc_file' gave an error:\n", - "$indented"; - $OK = 0; - } - if ( ! $OK ) { - die "$My_name: Stopping because of problem with rc file\n"; + "$message\n"; + die "$My_name: Stopping because of problem with rc file\n"; + # Use the following if want non-fatal error. + return 2; } + return 0; } #END process_rc_file #************************************************************ sub execute_code_string { # Usage execute_code_string( string_of_code ) - # Run the PERL code contained in first argument - # Exit with code 13 if there is a syntax error or other problem. + # Run the perl code contained in first argument + # Halt if there is a syntax error or other problem. # ???Should I leave the exiting to the caller (perhaps as an option)? # But I can always catch it with an eval if necessary. # That confuses ctrl/C and ctrl/break handling. @@ -2601,18 +2581,16 @@ sub execute_code_string { eval $code; # The return value from the eval is not useful, since it is the value of # the last expression evaluated, which could be anything. - # The correct test of errors is on the values of $! and $@. + # The correct test of errors is on the value of $@. if ( $@ ) { - $! = 256; - my $message = $@; - $@ = ""; - $message =~ s/\s*$//; + # Indent each line of possibly multiline message: + my $message = prefix( $@, " " ); die "$My_name: ", "Stopping because executing following code from command line\n", " $code\n", "gave an error:\n", - " $message\n"; + "$message\n"; } } #END execute_code_string |