diff options
author | Karl Berry <karl@freefriends.org> | 2010-01-18 23:40:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-01-18 23:40:43 +0000 |
commit | 8332a009308981f30ebde19220c14fbd53f657dd (patch) | |
tree | 94f44bffa8b60e915a51ba246394dbc25179b8a4 /Master/texmf-dist/scripts | |
parent | e18b91e6f8214f045017a6cfe26f61c0c06c4ded (diff) |
latexmk 4.13a (18jan10)
git-svn-id: svn://tug.org/texlive/trunk@16776 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/latexmk/latexmk.pl | 121 |
1 files changed, 23 insertions, 98 deletions
diff --git a/Master/texmf-dist/scripts/latexmk/latexmk.pl b/Master/texmf-dist/scripts/latexmk/latexmk.pl index 2ea0e023e8f..e721d8f2e05 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.13'; -$version_details = "$My_name, John Collins, 13 January 2010"; +$version_num = '4.13a'; +$version_details = "$My_name, John Collins, 16 January 2010"; use Config; @@ -178,6 +178,10 @@ else { ## ## Modification log from 25 Nov 2009 onwards in detail ## +## 16 Jan 2010, John Collins V. 4.13a. +## Correct bug in deleting extra files (I wasn't +## consistent about periods in file extensions) +## Delete unused subroutines ## 13 Jan 2010, John Collins V. 4.13 ## 27 Dec 2009, John Collins Correct position of inserting bbl into list ## of generated extensions. @@ -1562,13 +1566,11 @@ if ( $pdf_mode == 2 ) { # Make convenient forms for lookup. # Extensions always have period. -# Convert @generated_exts to a hash for ease of look up, with exts -# preceeded by a '.' -# %generated_exts_all is used in analyzing file changes, to -# distinguish changes in user files from changes in generated files. +# Convert @generated_exts to a hash for ease of look up and deletion +# Keep extension without period! %generated_exts_all = (); foreach (@generated_exts ) { - $generated_exts_all{".$_"} = 1; + $generated_exts_all{$_} = 1; } $quell_uptodate_msgs = $silent; @@ -5165,7 +5167,7 @@ sub rdb_file_change1 { #?? print "FC1 '$rule':$file $$Pout_of_date TK=$$Ptest_kind\n"; #?? print " OLD $$Ptime, $$Psize, $$Pmd5\n", #?? " New $new_time, $new_size, $new_md5\n"; - my $ext = ext( $file ); + my $ext_no_period = ext_no_period( $file ); if ( ($new_size < 0) && ($$Psize >= 0) ) { # print "Disappeared '$file' in '$rule'\n"; push @disappeared, $file; @@ -5189,7 +5191,7 @@ sub rdb_file_change1 { #?? print "FC1: changed $file: ($new_size != $$Psize) $new_md5 ne $$Pmd5)\n"; push @changed, $file; $$Pout_of_date = 1; - if ( ! exists $generated_exts_all{$ext} ) { + if ( ! exists $generated_exts_all{$ext_no_period} ) { $$Pout_of_date_user = 1; } } @@ -5198,7 +5200,7 @@ sub rdb_file_change1 { $$Ptime = $new_time; } if ( ( ($$Ptest_kind == 2) || ($$Ptest_kind == 3) ) - && (! exists $generated_exts_all{$ext} ) + && (! exists $generated_exts_all{$ext_no_period} ) && ( $new_time > $dest_mtime ) ) { #?? print "FC1: changed $file: ($new_time > $dest_mtime)\n"; @@ -5669,7 +5671,7 @@ sub rdb_update_gen_files { # Assumes rule context. Update source files of rule to current state. rdb_do_files( sub{ - if ( exists $generated_exts_all{ ext($file) } ) {&rdb_update1;} + if ( exists $generated_exts_all{ ext_no_period($file) } ) {&rdb_update1;} } ); } #END rdb_update_gen_files @@ -5986,93 +5988,6 @@ sub get_checksum_md5 { } #************************************************************ - -#?? OBSOLETE -# Find file with default extension -# Usage: find_file_ext( name, default_ext, ref_to_array_search_path) -sub find_file_ext -#?? Need to use kpsewhich, if possible. Leave to find_file? -{ - my $full_filename = shift; - my $ext = shift; - my $ref_search_path = shift; - my $full_filename1 = &find_file($full_filename, $ref_search_path, '1'); -#print "Finding \"$full_filename\" with ext \"$ext\" ... "; - if (( $full_filename1 eq '' ) || ( ! -e $full_filename1 )) - { - my $full_filename2 = - &find_file("$full_filename.$ext",$ref_search_path,'1'); - if (( $full_filename2 ne '' ) && ( -e $full_filename2 )) - { - $full_filename = $full_filename2; - } - else - { - $full_filename = $full_filename1; - } - } - else - { - $full_filename = $full_filename1; - } -#print "Found \"$full_filename\".\n"; - return $full_filename; -} - -#************************************************************ -#?? OBSOLETE -# given filename and path, return full name of file, or die if none found. -# when force_include_mode=1, only warn if an include file was not -# found, and return 0 (PvdS). -# Usage: find_file(name, ref_to_array_search_path, warn_on_continue) -sub find_file -#?? Need to use kpsewhich, if possible -{ - my $name = $_[0]; - my $ref_path = $_[1]; - my $dir; - if ( $name =~ /^\// ) - { - #Aboslute pathname (by UNIX standards) - if ( (!-e $name) && ( $_[2] eq '' ) ) { - if ($force_include_mode) { - warn "$My_name: Could not find file [$name]\n"; - } - else { - die "$My_name: Could not find file [$name]\n"; - } - } - return $name; - } - # Relative pathname - foreach $dir ( @{$ref_path} ) - { -#warn "\"$dir\", \"$name\"\n"; - if (-e "$dir/$name") - { - return("$dir/$name"); - } - } - if ($force_include_mode) - { - if ( $_[2] eq '' ) - { - warn "$My_name: Could not find file [$name] in path [@{$ref_path}]\n"; - warn " assuming in current directory (./$name)\n"; - } - return("./$name"); - } - else - { - if ( $_[2] ne '' ) - { - return(''); - } -# warn "\"$name\", \"$ref_path\", \"$dir\"\n"; - die "$My_name: Could not find file [$name] in path [@{$ref_path}]\n"; - } -} - #************************************************************ sub find_file1 { @@ -6373,6 +6288,16 @@ sub ext { #************************************************************ +sub ext_no_period { + # Return extension of filename. Extension excludes the period + my $file_name = $_[0]; + my ($base_name, $path, $ext) = fileparseA( $file_name ); + $ext =~ s/^\.//; + return $ext; + } + +#************************************************************ + sub fileparseA { # Like fileparse but replace $path for current dir ('./' or '.\') by '' # Also default second argument to get normal extension. |