diff options
15 files changed, 1162 insertions, 346 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/mkjobtexmf/mkjobtexmf.pl b/Build/source/texk/texlive/linked_scripts/mkjobtexmf/mkjobtexmf.pl index d9ce104e158..c46f4f4a102 100755 --- a/Build/source/texk/texlive/linked_scripts/mkjobtexmf/mkjobtexmf.pl +++ b/Build/source/texk/texlive/linked_scripts/mkjobtexmf/mkjobtexmf.pl @@ -10,10 +10,10 @@ use strict; $^W=1; my $prj = 'mkjobtexmf'; -my $version = '0.7'; -my $date = '2008/06/28'; +my $version = '0.8'; +my $date = '2011/11/10'; my $author = 'Heiko Oberdiek'; -my $copyright = "Copyright 2007, 2008 $author"; +my $copyright = "Copyright 2007, 2008, 2011 $author"; my $cmd_tex = 'pdflatex'; my $cmd_kpsewhich = 'kpsewhich'; @@ -33,19 +33,21 @@ my $output = 0; my $strace = 0; my $copy = 0; my $flat = 0; +my $texhash = 1; my $needs_texhash = 0; my @texmf; +my @exclude_ext; my %files; my %links; my %flat_ignore = ( 'ls-R' => '', 'aliases' => '', ); +my $win = 0; +$win = 1 if $^O =~ /MSWin/i; my $title = "\U$prj\E $date v$version, $copyright\n"; -print $title; - sub die_error ($) { my $msg = shift; die "!!! Error: $msg!\n"; @@ -78,6 +80,7 @@ use Pod::Usage; my $man = 0; my $help = 0; +my $opt_version = 0; GetOptions( 'jobname=s' => \$jobname, @@ -91,14 +94,27 @@ GetOptions( 'strace' => \$strace, 'copy' => \$copy, 'flat' => \$flat, + 'texhash!' => \$texhash, + 'exclude-ext=s' => \@exclude_ext, 'verbose' => \$verbose, 'output' => \$output, 'help|?' => \$help, 'man' => \$man, + 'version' => \$opt_version, ) or die_usage('Unknown option'); -pod2usage(1) if $help; +if ($help) { + print $title; + pod2usage(1); +} pod2usage(-exitstatus => 0, -verbose => 2) if $man; +if ($opt_version) { + print "$prj $date v$version\n"; + exit(0); +} + +print $title; + if (@ARGV > 0) { $strace = 1; $texname = ''; @@ -112,6 +128,12 @@ verbose "jobname: " . value $jobname; verbose "texname: " . value $texname if $texname; verbose "command: " . value "@args" if @args; verbose "destdir: " . value $destdir; +verbose "system: ". value $^O; + +@exclude_ext = split(/,/, join(',', @exclude_ext)); +foreach my $ext (@exclude_ext) { + verbose "exclude-ext: " . value $ext; +} if (!$copy) { my $symlink_exists = eval { symlink('', ''); 1 }; @@ -202,34 +224,83 @@ sub run_tex { } sub run_texhash { + return unless $texhash; return if $flat; if ($needs_texhash) { - run_generic( - $cmd_texhash, - "$destdir/texmf" - ); + my $cmd_version = "$cmd_texhash --version"; + verbose "exec: $cmd_version"; + print '>' x 79, "\n"; + my @lines = `$cmd_version`; + print @lines if $verbose; + print '<' x 79, "\n"; + if ($? != 0) { + if ($? == -1) { + verbose "Execution failed: $!"; + } + elsif ($? & 127) { + verbose sprintf "Execution died with signal %d, %s coredump", + ($? & 127), ($? & 128) ? 'with' : 'without'; + } + else { + verbose sprintf "Execution failed with error code: %d", + $? >> 8; + } + } + else { + my $catch = "@lines"; + if ($catch =~ /(kpathsea|mktexlsr)/i) { + run_generic( + $cmd_texhash, + "$destdir/texmf" + ); + } + else{ + verbose 'Unsupported port of texhax found.'; + } + } } else { - verbose("texhash run skipped, no files added"); + verbose("Run of texhash skipped, no files added."); } } use Cwd 'abs_path', 'getcwd'; +my $pwd = getcwd; +verbose "pwd: " . value($pwd); + sub get_texmf_trees () { return if $flat; my $cmdline = "$cmd_kpsewhich -expand-path='\$TEXMF'"; + $cmdline = "$cmd_kpsewhich -expand-path=\$TEXMF" if $win; verbose "exec: " . value($cmdline); my $str = `$cmdline`; check_child_error; - chomp $str; - @texmf = split ':', $str; + $str =~ s/[\r\n]+$//; + if ($win) { + @texmf = split ';', $str; + } + else { + @texmf = split ':', $str; + } my %texmf; foreach my $texmf (@texmf) { $texmf{$texmf} = ''; $texmf{abs_path($texmf)} = ''; } @texmf = sort keys %texmf; + if (@texmf == 0 and $win) { + my $cmdline = "$cmd_kpsewhich --show-path=tfm"; + verbose "exec: " . value($cmdline); + my $str = `$cmdline`; + check_child_error; + $str =~ s/[\n\r]+$//; + foreach my $texmf (split ';', $str) { + if ($texmf =~ m|^(.*)/fonts/tfm/*$|) { + push @texmf, $1; + } + } + } if ($verbose) { if (@texmf) { map { verbose 'texmf: ' . value($_) } @texmf; @@ -240,10 +311,25 @@ sub get_texmf_trees () { } } -sub analyze_recorder { - my $pwd = getcwd; - verbose "pwd: " . value($pwd); +sub add_file ($) { + my $file = shift; + my $add = 1; + foreach my $ext (@exclude_ext) { + my $ext = ".$ext"; + my $len_ext = length $ext; + my $len_file = length $file; + if ($len_file >= $len_ext) { + if ($ext eq substr $file, $len_file - $len_ext) { + $add = 0; + verbose "excluded: " . value($file); + last; + } + } + } + $files{$file} = '' if $add; +} +sub analyze_recorder { my $file_rec = $jobname . ($strace ? $ext_strace : $ext_recorder); verbose 'File with recorded file names: ' . value($file_rec); open(IN, '<', $file_rec) @@ -262,7 +348,7 @@ sub analyze_recorder { } /^\d+\s+\w+\(\"([^"]+)\",/ or warning "Unknown entry `$_'"; my $file = $1; - $files{$file} = ''; + add_file $file; } } else { @@ -273,7 +359,7 @@ sub analyze_recorder { /^(INPUT|OUTPUT) (.*)$/ or warning "Unknown entry `$_'"; my $type = $1; my $file = $2; - $files{$file} = ''; + add_file $file; } } close(IN); @@ -328,6 +414,8 @@ sub map_files_flat { sub map_files_texmf { my @failed; + my $pwd_dir = "$pwd/"; + my $pwd_len = length $pwd_dir; foreach my $file (sort keys %files) { verbose "file: " . value($file); @@ -335,21 +423,26 @@ sub map_files_texmf { my $abs_file = abs_path($file); my $found = ''; - foreach (@texmf) { - my $texmf = "$_/"; - my $len = length($texmf); - my $str = substr $file, 0, $len; - if ($texmf eq $str) { - $found = 'texmf/' . substr $file, $len; - if ($found =~ /(^|\/)\.\.\//) { - $found = ''; + if ($pwd_dir eq substr $file, 0, $pwd_len) { + $found = substr $file, $pwd_len; + } + if (not $found) { + foreach (@texmf) { + my $texmf = "$_/"; + my $len = length($texmf); + my $str = substr $file, 0, $len; + if ($texmf eq $str) { + $found = 'texmf/' . substr $file, $len; + if ($found =~ /(^|\/)\.\.\//) { + $found = ''; + } + } + last if $found; + my $str = substr $abs_file, 0, $len; + if ($texmf eq $str) { + $found = 'texmf/' . substr $abs_file, $len; + last; } - } - last if $found; - my $str = substr $abs_file, 0, $len; - if ($texmf eq $str) { - $found = 'texmf/' . substr $abs_file, $len; - last; } } if (not($found)) { @@ -380,7 +473,7 @@ sub make_dirs ($) { my $path = shift; my @elems = split /\/+/, $path; if (@elems <= 1) { - return; + return 1; } pop @elems; my $dir = ''; @@ -388,9 +481,13 @@ sub make_dirs ($) { $dir .= '/' if $dir; $dir .= $elem; next if -d $dir; - verbose 'mkdir: ' . value($dir); - mkdir $dir or die_error "Cannot make directory `$dir'"; + if (mkdir $dir) { + verbose 'mkdir: ' . value($dir); + next; + } + return 0; } + return 1; } sub make_links { @@ -398,7 +495,16 @@ sub make_links { foreach my $key (sort keys %links) { my $source = $links{$key}; my $dest = "$destdir/$key"; - make_dirs $dest; + my $result_mkdir = make_dirs $dest; + if (not $result_mkdir) { + if ($key =~ s|^([A-Za-z]):/|$1/|) { + $dest = "$destdir/$key"; + $result_mkdir = make_dirs $dest; + } + if (not $result_mkdir) { + die_error("Cannot create directory `$dest'"); + } + } if (-e $dest) { my $type = ''; if (-l $dest) { @@ -492,6 +598,10 @@ __DATA__ mkjobtexmf -- Generate a texmf tree for a particular job +=head1 VERSION + +2011-11-10 v0.8 + =head1 SYNOPSIS The progam B<mkjobtexmf> runs a program and tries to @@ -531,6 +641,8 @@ Options: symbol links --flat Junk paths, do not make directories inside the destination directory + --(no)texhash Run texhash, use --notexhash for MiKTeX + --exclude-ext <ext> Exclude files with extension <ext>. --cmd-tex <cmd> Command for the TeX compiler --cmd-kpsewhich <cmd> Command for kpsewhich --cmd-texhash <cmd> Command for texhash @@ -538,13 +650,14 @@ Options: --verbose Verbose output --help Brief help message --man Full documentation + --version Print version identification =head1 DESCRIPTION =head2 Running the program First B<mkjobtexmf> runs a program, usually TeX. The TeX compiler -is configured by option B<--cmd-tex>. Option B<--texname> can +is configured by option C<--cmd-tex>. Option C<--texname> can be used, if the file name extension differs from F<.tex>: mkjobtexmf --jobname foo --texname foo.ltx @@ -591,46 +704,46 @@ result directory F<I<jobname>.mjt>. Absolute file names are not supported and neither paths with links to parent directories. Symbolic links are created by default. The files are copied -if option --copy is given or symbolic linking is not available. +if option C<--copy> is given or symbolic linking is not available. =head1 OPTIONS =over -=item B<--jobname>=I<jobname> +=item B<->B<-jobname>=<I<jobname>> -It is the name of the job. `<jobname>.tex' serves as default for -the TeX file and <jobname> is used for naming various directories -and files. See section L</FILES>. +It is the name of the job. `<I<jobname>>.tex' serves as default for +the TeX file and <I<jobname>> is used for naming various directories +and files. See section L<"FILES">. -=item B<--texname>=I<name> +=item B<->B<-texname>=<I<name>> -The name of the TeX input file, if it differs from <jobname>.tex. +The name of the TeX input file, if it differs from <I<jobname>>.tex. -=item B<--texopt>=I<opt> +=item B<->B<-texopt>=<I<opt>> -Additional option for the TeX compiler, examples are --ini or ---shell-escape. This option can be given more than once. +Additional option for the TeX compiler, examples are C<--ini> or +C<--shell-escape>. This option can be given more than once. -=item B<--destdir>=I<directory> +=item B<->B<-destdir>=<I<directory>> Specifies the name of the destination directory where the result is collected. As default a directory is generated in the current directory with the job name and extension `.mjt'. -=item B<--output> +=item B<->B<-output> Also add output files. -=item B<--strace> +=item B<->B<-strace> Use method with program B<strace>, see L<"DESCRIPTION">. -=item B<--copy> +=item B<->B<-copy> Files are copied instead of creating symbolic links. -=item B<--flat> +=item B<->B<-flat> Files are linked or copied without path elements. The destination directory will contain a flat list of @@ -638,31 +751,59 @@ files or links without directory. The files `ls-R' and `aliases' are ignored. -=item B<--cmd-tex>=I<cmd> +=item B<->B<-exclude-ext>=<I<ext>> + +Files with extension <I<ext>> are excluded. The option can be +given several times or a comma separated list of extensions +can be used. Examples: + + --exclude-ext aux --exclude-ext log --exclude-ext toc + +is the same as + + --exclude-ext aux,log,toc + +=item B<->B<-(no)texhash> + +As default the file `ls-R' is generated in the `texmf' tree, +because this is the file name database that might be used +in TeX Live. Because MiKTeX uses a different mechanism, its +`texhash' does not generate the `ls-R' files and C<--notexhash> +suppresses the call of `texhash'. + +=item B<->B<-cmd-tex>=<I<cmd>> Command for the TeX compiler. Default is pdflatex. -=item B<--cmd-kpsewhich>=I<cmd> +=item B<->B<-cmd-kpsewhich>=<I<cmd>> Command for kpsewhich. -=item B<--cmd-texhash>=I<cmd> +=item B<->B<-cmd-texhash>=<I<cmd>> Command for updating the file name database of the generated texmf tree. Default is texmf. -=item B<--cmd-strace>=I<cmd> +=item B<->B<-cmd-strace>=<I<cmd>> Command for strace. -=item B<--verbose> +=item B<->B<-verbose> Verbose messages. -=item B<--help> +=item B<->B<-help> Display help screen. +=item B<->B(-man> + +Print manual page. + +=item B<->B<-version> + +Print version identification and exit. + =back =head1 EXAMPLES @@ -745,7 +886,7 @@ file recording (e.g. pdfTeX 1.40.3 does not record .pfb and =item F<E<lt>jobnameE<gt>.mjt/> Directory where the resulting texmf tree and symbol links -are stored. It can be changed by option --destdir. +are stored. It can be changed by option C<--destdir>. =item F<E<lt>jobnameE<gt>.fls> @@ -759,11 +900,11 @@ Log file where the result of B<strace> is stored. =head1 AUTHOR -Heiko Oberdiek, email: oberdiek at uni-freiburg.de +Heiko Oberdiek, email: heiko.oberdiek at googlemail.com =head1 COPYRIGHT AND LICENSE -Copyright 2007 by Heiko Oberdiek. +Copyright 2007, 2008, 2011 by Heiko Oberdiek. This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself @@ -771,39 +912,83 @@ modify it under the same terms as Perl itself =head1 HISTORY -=over +=over 2 + +=item B<2007/04/16 v0.1> -=item 2007/04/16 v0.1 +=over 2 -* First experimental version. +=item * First experimental version. -=item 2007/05/09 v0.2 +=back + +=item B<2007/05/09 v0.2> -* Typo in option name fixed. +=over 2 -=item 2007/09/03 v0.3 +=item * Typo in option name fixed. -* New options: --copy, --flat, --destdir +=back + +=item B<2007/09/03 v0.3> + +=over 2 + +=item * New options: C<--copy>, C<--flat>, C<--destdir> + +=back -=item 2007/09/04 v0.4 +=item B<2007/09/04 v0.4> -* Bug fix in map_files_texmf. +=over 2 -=item 2007/09/06 v0.5 +=item * Bug fix in map_files_texmf. -* Support for `configure' added. +=back + +=item B<2007/09/06 v0.5> + +=over 2 + +=item * Support for `configure' added. (Thanks to Norbert Preining for writing a first version of the configure stuff.) -=item 2008/04/05 v0.6 +=back + +=item B<2008/04/05 v0.6> -* Tiny fix in target `uninstall' in file `Makefile.in'. +=over 2 + +=item * Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to Karl Berry) -=item 2008/06/28 v0.7 +=back + +=item B<2008/06/28 v0.7> + +=over 2 + +=item * Fix for unknown option `C<--cmd-strace>'. + (Thanks to Juho Niemelä) -* Fix for unknown option `--cmd-strace'. - (Thanks to Juho Niemel"a) +=back + +=item B<2011/11/10 v0.8> + +=over 2 + +=item * Remove colon from drive specification when making directories. + +=item * Option C<--(no)texhash> added. + +=item * Some support for MiKTeX (thanks Ulrike Fischer). + +=item * Various fixes in the generation of the documentation. + +=item * Options C<--exclude-ext> and C<--version> added. + +=back =back diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/README b/Master/texmf-dist/doc/generic/mkjobtexmf/README index 7e454af1582..e09a30f1822 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/README +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/README @@ -1,6 +1,6 @@ -README for mkjobtexmf 2008/06/28 v0.7 +README for mkjobtexmf 2011/11/10 v0.8 -Copyright 2007, 2008 by Heiko Oberdiek +Copyright 2007, 2008, 2011 by Heiko Oberdiek License ======= @@ -45,4 +45,9 @@ Installation Install them where you find them, for example in directory: /usr/local/share/doc/mkjobtexmf/ +The files clean-case.pl and version.pl are just helper scripts for +generating the documentation and are provided for sake of completeness. +They are usually not needed, because the documentation files are +already generated and provided in the distribution. + See the documentation for further information. diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl b/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl new file mode 100644 index 00000000000..fe72e184d02 --- /dev/null +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl @@ -0,0 +1,20 @@ +#!/usr/bin/env perl +use strict; +$^W=1; + +@ARGV == 2 or die "!!! Syntax: <input file> <output file>\n"; + +my $infile = $ARGV[0]; +my $outfile = $ARGV[1]; + +open(IN, '<', $infile) or die "!!! Error: Cannot open `$infile'!\n"; +open(OUT, '>', $outfile) or die "!!! Error: Cannot write `$outfile'!\n"; +while (<IN>) { + s/^(=head[1] [A-Z])(.*)/$1\L$2\E/; + s/(L<"[A-Z])([^"]+)">/$1\L$2\E">/g; + print OUT; +} +close(IN); +close(OUT); + +__END__ diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html index 8cd658d49de..ed760662e1c 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html @@ -1,7 +1,7 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<title>mkjobtexmf -- Generate a texmf tree for a particular job</title> +<title>mkjobtexmf</title> <link rev="made" href="mailto:feedback@suse.de" /> </head> @@ -12,9 +12,10 @@ <ul> - <li><a href="#name">NAME</a></li> - <li><a href="#synopsis">SYNOPSIS</a></li> - <li><a href="#description">DESCRIPTION</a></li> + <li><a href="#name">Name</a></li> + <li><a href="#version">Version</a></li> + <li><a href="#synopsis">Synopsis</a></li> + <li><a href="#description">Description</a></li> <ul> <li><a href="#running_the_program">Running the program</a></li> @@ -22,25 +23,30 @@ <li><a href="#analyze_and_link_copy_found_files">Analyze and link/copy found files</a></li> </ul> - <li><a href="#options">OPTIONS</a></li> - <li><a href="#examples">EXAMPLES</a></li> - <li><a href="#unsolved_issues__caveats__todos">UNSOLVED ISSUES, CAVEATS, TODOS</a></li> - <li><a href="#files">FILES</a></li> - <li><a href="#author">AUTHOR</a></li> - <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li> - <li><a href="#history">HISTORY</a></li> + <li><a href="#options">Options</a></li> + <li><a href="#examples">Examples</a></li> + <li><a href="#unsolved_issues__caveats__todos">Unsolved issues, caveats, todos</a></li> + <li><a href="#files">Files</a></li> + <li><a href="#author">Author</a></li> + <li><a href="#copyright_and_license">Copyright and license</a></li> + <li><a href="#history">History</a></li> </ul> <!-- INDEX END --> <hr /> <p> </p> -<h1><a name="name">NAME</a></h1> +<h1><a name="name">Name</a></h1> <p>mkjobtexmf -- Generate a texmf tree for a particular job</p> <p> </p> <hr /> -<h1><a name="synopsis">SYNOPSIS</a></h1> +<h1><a name="version">Version</a></h1> +<p>2011-11-10 v0.8</p> +<p> +</p> +<hr /> +<h1><a name="synopsis">Synopsis</a></h1> <p>The progam <strong>mkjobtexmf</strong> runs a program and tries to find the used file names. Two methods are available, option <code>-recorder</code> of TeX (Web2C) or the program <strong>strace</strong>.</p> @@ -73,22 +79,25 @@ instead of TeX. As method only program <strong>strace</strong> is available.</p> symbol links --flat Junk paths, do not make directories inside the destination directory + --(no)texhash Run texhash, use --notexhash for MiKTeX + --exclude-ext <ext> Exclude files with extension <ext>. --cmd-tex <cmd> Command for the TeX compiler --cmd-kpsewhich <cmd> Command for kpsewhich --cmd-texhash <cmd> Command for texhash --cmd-strace <cmd> Command for strace --verbose Verbose output --help Brief help message - --man Full documentation</pre> + --man Full documentation + --version Print version identification</pre> <p> </p> <hr /> -<h1><a name="description">DESCRIPTION</a></h1> +<h1><a name="description">Description</a></h1> <p> </p> <h2><a name="running_the_program">Running the program</a></h2> <p>First <strong>mkjobtexmf</strong> runs a program, usually TeX. The TeX compiler -is configured by option <strong>--cmd-tex</strong>. Option <strong>--texname</strong> can +is configured by option <code>--cmd-tex</code>. Option <code>--texname</code> can be used, if the file name extension differs from <em>.tex</em>:</p> <pre> mkjobtexmf --jobname foo --texname foo.ltx</pre> @@ -132,34 +141,34 @@ a relative file name, then it is directly linked/copied into the result directory <em><em>jobname</em>.mjt</em>. Absolute file names are not supported and neither paths with links to parent directories.</p> <p>Symbolic links are created by default. The files are copied -if option --copy is given or symbolic linking is not available.</p> +if option <a href="#item__2d_2dcopy"><code>--copy</code></a> is given or symbolic linking is not available.</p> <p> </p> <hr /> -<h1><a name="options">OPTIONS</a></h1> +<h1><a name="options">Options</a></h1> <dl> -<dt><strong><a name="item__2d_2djobname_3djobname"><strong>--jobname</strong>=<em>jobname</em></a></strong><br /> +<dt><strong><a name="item__2d_2djobname_3d_3cjobname_3e"><strong>-</strong><strong>-jobname</strong>=<<em>jobname</em>></a></strong><br /> </dt> <dd> -It is the name of the job. `<jobname>.tex' serves as default for -the TeX file and <jobname> is used for naming various directories -and files. See section <a href="#files">FILES</a>. +It is the name of the job. `<<em>jobname</em>>.tex' serves as default for +the TeX file and <<em>jobname</em>> is used for naming various directories +and files. See section <a href="#files">Files</a>. </dd> <p></p> -<dt><strong><a name="item__2d_2dtexname_3dname"><strong>--texname</strong>=<em>name</em></a></strong><br /> +<dt><strong><a name="item__2d_2dtexname_3d_3cname_3e"><strong>-</strong><strong>-texname</strong>=<<em>name</em>></a></strong><br /> </dt> <dd> -The name of the TeX input file, if it differs from <jobname>.tex. +The name of the TeX input file, if it differs from <<em>jobname</em>>.tex. </dd> <p></p> -<dt><strong><a name="item__2d_2dtexopt_3dopt"><strong>--texopt</strong>=<em>opt</em></a></strong><br /> +<dt><strong><a name="item__2d_2dtexopt_3d_3copt_3e"><strong>-</strong><strong>-texopt</strong>=<<em>opt</em>></a></strong><br /> </dt> <dd> -Additional option for the TeX compiler, examples are --ini or ---shell-escape. This option can be given more than once. +Additional option for the TeX compiler, examples are <code>--ini</code> or +<code>--shell-escape</code>. This option can be given more than once. </dd> <p></p> -<dt><strong><a name="item__2d_2ddestdir_3ddirectory"><strong>--destdir</strong>=<em>directory</em></a></strong><br /> +<dt><strong><a name="item__2d_2ddestdir_3d_3cdirectory_3e"><strong>-</strong><strong>-destdir</strong>=<<em>directory</em>></a></strong><br /> </dt> <dd> Specifies the name of the destination directory where the result @@ -167,25 +176,25 @@ is collected. As default a directory is generated in the current directory with the job name and extension `.mjt'. </dd> <p></p> -<dt><strong><a name="item__2d_2doutput"><strong>--output</strong></a></strong><br /> +<dt><strong><a name="item__2d_2doutput"><strong>-</strong><strong>-output</strong></a></strong><br /> </dt> <dd> Also add output files. </dd> <p></p> -<dt><strong><a name="item__2d_2dstrace"><strong>--strace</strong></a></strong><br /> +<dt><strong><a name="item__2d_2dstrace"><strong>-</strong><strong>-strace</strong></a></strong><br /> </dt> <dd> -Use method with program <strong>strace</strong>, see <a href="#description">DESCRIPTION</a>. +Use method with program <strong>strace</strong>, see <a href="#description">Description</a>. </dd> <p></p> -<dt><strong><a name="item__2d_2dcopy"><strong>--copy</strong></a></strong><br /> +<dt><strong><a name="item__2d_2dcopy"><strong>-</strong><strong>-copy</strong></a></strong><br /> </dt> <dd> Files are copied instead of creating symbolic links. </dd> <p></p> -<dt><strong><a name="item__2d_2dflat"><strong>--flat</strong></a></strong><br /> +<dt><strong><a name="item__2d_2dflat"><strong>-</strong><strong>-flat</strong></a></strong><br /> </dt> <dd> Files are linked or copied without path elements. @@ -196,47 +205,88 @@ files or links without directory. <p>The files `ls-R' and `aliases' are ignored.</p> </dd> <p></p> -<dt><strong><a name="item__2d_2dcmd_2dtex_3dcmd"><strong>--cmd-tex</strong>=<em>cmd</em></a></strong><br /> +<dt><strong><a name="item__2d_2dexclude_2dext_3d_3cext_3e"><strong>-</strong><strong>-exclude-ext</strong>=<<em>ext</em>></a></strong><br /> +</dt> +<dd> +Files with extension <<em>ext</em>> are excluded. The option can be +given several times or a comma separated list of extensions +can be used. Examples: +</dd> +<dd> +<pre> + --exclude-ext aux --exclude-ext log --exclude-ext toc</pre> +</dd> +<dd> +<p>is the same as</p> +</dd> +<dd> +<pre> + --exclude-ext aux,log,toc</pre> +</dd> +<p></p> +<dt><strong><a name="item__2d_2d_28no_29texhash"><strong>-</strong><strong>-(no)texhash</strong></a></strong><br /> +</dt> +<dd> +As default the file `ls-R' is generated in the `texmf' tree, +because this is the file name database that might be used +in TeX Live. Because MiKTeX uses a different mechanism, its +`texhash' does not generate the `ls-R' files and <code>--notexhash</code> +suppresses the call of `texhash'. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dcmd_2dtex_3d_3ccmd_3e"><strong>-</strong><strong>-cmd-tex</strong>=<<em>cmd</em>></a></strong><br /> </dt> <dd> Command for the TeX compiler. Default is pdflatex. </dd> <p></p> -<dt><strong><a name="item__2d_2dcmd_2dkpsewhich_3dcmd"><strong>--cmd-kpsewhich</strong>=<em>cmd</em></a></strong><br /> +<dt><strong><a name="item__2d_2dcmd_2dkpsewhich_3d_3ccmd_3e"><strong>-</strong><strong>-cmd-kpsewhich</strong>=<<em>cmd</em>></a></strong><br /> </dt> <dd> Command for kpsewhich. </dd> <p></p> -<dt><strong><a name="item__2d_2dcmd_2dtexhash_3dcmd"><strong>--cmd-texhash</strong>=<em>cmd</em></a></strong><br /> +<dt><strong><a name="item__2d_2dcmd_2dtexhash_3d_3ccmd_3e"><strong>-</strong><strong>-cmd-texhash</strong>=<<em>cmd</em>></a></strong><br /> </dt> <dd> Command for updating the file name database of the generated texmf tree. Default is texmf. </dd> <p></p> -<dt><strong><a name="item__2d_2dcmd_2dstrace_3dcmd"><strong>--cmd-strace</strong>=<em>cmd</em></a></strong><br /> +<dt><strong><a name="item__2d_2dcmd_2dstrace_3d_3ccmd_3e"><strong>-</strong><strong>-cmd-strace</strong>=<<em>cmd</em>></a></strong><br /> </dt> <dd> Command for strace. </dd> <p></p> -<dt><strong><a name="item__2d_2dverbose"><strong>--verbose</strong></a></strong><br /> +<dt><strong><a name="item__2d_2dverbose"><strong>-</strong><strong>-verbose</strong></a></strong><br /> </dt> <dd> Verbose messages. </dd> <p></p> -<dt><strong><a name="item__2d_2dhelp"><strong>--help</strong></a></strong><br /> +<dt><strong><a name="item__2d_2dhelp"><strong>-</strong><strong>-help</strong></a></strong><br /> </dt> <dd> Display help screen. </dd> +<p></p> +<dt><strong><a name="item_b"><strong>-</strong>B(-man></a></strong><br /> +</dt> +<dd> +Print manual page. +</dd> +<p></p> +<dt><strong><a name="item__2d_2dversion"><strong>-</strong><strong>-version</strong></a></strong><br /> +</dt> +<dd> +Print version identification and exit. +</dd> <p></p></dl> <p> </p> <hr /> -<h1><a name="examples">EXAMPLES</a></h1> +<h1><a name="examples">Examples</a></h1> <p>TeX file <em>test.tex</em> using TeX's recorder method:</p> <pre> mkjobtexmf --jobname test</pre> @@ -258,7 +308,7 @@ Display help screen. <p> </p> <hr /> -<h1><a name="unsolved_issues__caveats__todos">UNSOLVED ISSUES, CAVEATS, TODOS</a></h1> +<h1><a name="unsolved_issues__caveats__todos">Unsolved issues, caveats, todos</a></h1> <dl> <dt><strong><a name="item_experimental_software">Experimental software</a></strong><br /> </dt> @@ -318,13 +368,13 @@ file recording (e.g. pdfTeX 1.40.3 does not record .pfb and <p> </p> <hr /> -<h1><a name="files">FILES</a></h1> +<h1><a name="files">Files</a></h1> <dl> <dt><strong><a name="item__3cjobname_3e_2emjt_2f"><em><jobname>.mjt/</em></a></strong><br /> </dt> <dd> Directory where the resulting texmf tree and symbol links -are stored. It can be changed by option --destdir. +are stored. It can be changed by option <code>--destdir</code>. </dd> <p></p> <dt><strong><a name="item__3cjobname_3e_2efls"><em><jobname>.fls</em></a></strong><br /> @@ -342,53 +392,82 @@ Log file where the result of <strong>strace</strong> is stored. <p> </p> <hr /> -<h1><a name="author">AUTHOR</a></h1> -<p>Heiko Oberdiek, email: oberdiek at uni-freiburg.de</p> +<h1><a name="author">Author</a></h1> +<p>Heiko Oberdiek, email: heiko.oberdiek at googlemail.com</p> <p> </p> <hr /> -<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1> -<p>Copyright 2007 by Heiko Oberdiek.</p> +<h1><a name="copyright_and_license">Copyright and license</a></h1> +<p>Copyright 2007, 2008, 2011 by Heiko Oberdiek.</p> <p>This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself (Perl Artistic License/GNU General Public License, version 2).</p> <p> </p> <hr /> -<h1><a name="history">HISTORY</a></h1> +<h1><a name="history">History</a></h1> <ol> -<li><strong><a name="item__2f04_2f16_v0_2e1">/04/16 v0.1</a></strong><br /> +<li><strong><a name="item__2f04_2f16_v0_2e1"><strong>2007/04/16 v0.1</strong></a></strong><br /> </li> -* First experimental version. -<p></p> -<li><strong><a name="item__2f05_2f09_v0_2e2">/05/09 v0.2</a></strong><br /> +<ul> +<li><strong><a name="item_first_experimental_version_2e">First experimental version.</a></strong><br /> </li> -* Typo in option name fixed. -<p></p> -<li><strong><a name="item__2f09_2f03_v0_2e3">/09/03 v0.3</a></strong><br /> +</ul> +<li><strong><a name="item__2f05_2f09_v0_2e2"><strong>2007/05/09 v0.2</strong></a></strong><br /> </li> -* New options: --copy, --flat, --destdir -<p></p> -<li><strong><a name="item__2f09_2f04_v0_2e4">/09/04 v0.4</a></strong><br /> +<ul> +<li><strong><a name="item_typo_in_option_name_fixed_2e">Typo in option name fixed.</a></strong><br /> </li> -* Bug fix in map_files_texmf. -<p></p> -<li><strong><a name="item__2f09_2f06_v0_2e5">/09/06 v0.5</a></strong><br /> +</ul> +<li><strong><a name="item__2f09_2f03_v0_2e3"><strong>2007/09/03 v0.3</strong></a></strong><br /> +</li> +<ul> +<li><strong><a name="item_new_options_3a__2d_2dcopy_2c__2d_2dflat_2c__2d_2dd">New options: <a href="#item__2d_2dcopy"><code>--copy</code></a>, <a href="#item__2d_2dflat"><code>--flat</code></a>, <code>--destdir</code></a></strong><br /> +</li> +</ul> +<li><strong><a name="item__2f09_2f04_v0_2e4"><strong>2007/09/04 v0.4</strong></a></strong><br /> </li> -* Support for `configure' added. +<ul> +<li><strong><a name="item_bug_fix_in_map_files_texmf_2e">Bug fix in map_files_texmf.</a></strong><br /> +</li> +</ul> +<li><strong><a name="item__2f09_2f06_v0_2e5"><strong>2007/09/06 v0.5</strong></a></strong><br /> +</li> +<ul> +<li><strong><a name="item_support_for__60configure_27_added_2e__28thanks_to_">Support for `configure' added. (Thanks to Norbert Preining for writing a first version of - the configure stuff.) -<p></p> -<li><strong><a name="item__2f04_2f05_v0_2e6">/04/05 v0.6</a></strong><br /> + the configure stuff.)</a></strong><br /> </li> -* Tiny fix in target `uninstall' in file `Makefile.in'. - (Thanks to Karl Berry) -<p></p> -<li><strong><a name="item__2f06_2f28_v0_2e7">/06/28 v0.7</a></strong><br /> +</ul> +<li><strong><a name="item__2f04_2f05_v0_2e6"><strong>2008/04/05 v0.6</strong></a></strong><br /> </li> -* Fix for unknown option `--cmd-strace'. - (Thanks to Juho Niemel``a) -<p></p></ol> +<ul> +<li><strong><a name="item_tiny_fix_in_target__60uninstall_27_in_file__60make">Tiny fix in target `uninstall' in file `Makefile.in'. + (Thanks to Karl Berry)</a></strong><br /> +</li> +</ul> +<li><strong><a name="item__2f06_2f28_v0_2e7"><strong>2008/06/28 v0.7</strong></a></strong><br /> +</li> +<ul> +<li><strong><a name="item_fix_for_unknown_option__60_2d_2dcmd_2dstrace_27_2e">Fix for unknown option `<code>--cmd-strace</code>'. + (Thanks to Juho Niemelä)</a></strong><br /> +</li> +</ul> +<li><strong><a name="item__2f11_2f10_v0_2e8"><strong>2011/11/10 v0.8</strong></a></strong><br /> +</li> +<ul> +<li><strong><a name="item_remove_colon_from_drive_specification_when_making_">Remove colon from drive specification when making directories.</a></strong><br /> +</li> +<li><strong><a name="item_option__2d_2d_28no_29texhash_added_2e">Option <a href="#item__2d_2d_28no_29texhash"><code>--(no)texhash</code></a> added.</a></strong><br /> +</li> +<li><strong><a name="item_miktex">Some support for MiKTeX (thanks Ulrike Fischer).</a></strong><br /> +</li> +<li><strong><a name="item_various_fixes_in_the_generation_of_the_documentati">Various fixes in the generation of the documentation.</a></strong><br /> +</li> +<li><strong><a name="item_options__2d_2dexclude_2dext_and__2d_2dversion_adde">Options <code>--exclude-ext</code> and <a href="#item__2d_2dversion"><code>--version</code></a> added.</a></strong><br /> +</li> +</ul> +</ol> </body> diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx index 7127c9efa81..bbb70e9ebf4 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx @@ -1,19 +1,59 @@ % mkjobtexmf.ltx % -% Copyright 2007, 2008 by Heiko Oberdiek. +% Copyright 2007, 2008, 2011 by Heiko Oberdiek. % % The file is part of project mkjobtexmf. % It's free software; you may redistribute it and/or % modify it under the same terms as Perl itself % (Perl Artistic License/GNU General Public License, version 2). -\documentclass[a4paper]{article} +\documentclass[a4paper,12pt]{article} -\providecommand*{\DATE}{2008/06/28} -\providecommand*{\VERSION}{0.7} +\providecommand*{\DATE}{2011/11/10} +\providecommand*{\VERSION}{0.8} + +\usepackage[ + hmargin=1in, + top=.75in, + bottom=.5in, + includefoot, + headheight=14.5pt, + footskip=40pt, +]{geometry} + +\usepackage{fancyhdr} +\renewcommand*{\headrulewidth}{0pt} +\renewcommand*{\footrulewidth}{0.4pt} +\fancyhead{} +\fancyfoot[L]{\textsf{mkjobtexmf}} +\fancyfoot[C]{\DATE\ v\VERSION} +\fancyfoot[R]{\thepage} +\pagestyle{fancy} +\makeatletter +\let\ps@plain\ps@fancy +\makeatother + +\makeatletter +\renewenvironment*{theindex}{% + \section*{\indexname}% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus .3pt}% + \let\item\@idxitem +}{% + \clearpage +} +\makeatother + +\usepackage{ifluatex} +\ifluatex + \usepackage{fontspec} +\else + \usepackage[T1]{fontenc}% + \usepackage{lmodern}% + \usepackage[utf8]{inputenc}% +\fi \usepackage{makeidx} -\makeindex \usepackage{hyperref} \hypersetup{ @@ -21,21 +61,23 @@ pdfauthor={Heiko Oberdiek}, pdftitle={mkjobtexmf}, } +\definecolor{linkcolor}{rgb}{0,0,.8} +\hypersetup{ + linkcolor=linkcolor, +} \usepackage{bookmark} \bookmarksetup{ open, + numbered, } +\makeindex + \author{Heiko Oberdiek} \title{Program \textsf{mkjobtexmf}} \date{\DATE\space v\VERSION} -\makeatletter -\let\org@section\section -\def\section{\@ifstar\org@section\org@section} -\makeatother - % ignore minor overfull \hbox warnings \setlength{\hfuzz}{1.5pt} @@ -43,8 +85,14 @@ \maketitle +\pdfbookmark[1]{\contentsname}{toc} \tableofcontents +\makeatletter +\let\org@section\section +\def\section{\@ifstar\org@section\org@section} +\makeatother + \input{mkjobtexmf.tex} \printindex diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf Binary files differindex 13e63f00450..0a75e81aae1 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt index b091141ec1b..e64edeec071 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt @@ -2,6 +2,10 @@ NAME mkjobtexmf -- Generate a texmf tree for a particular job +VERSION + + 2011-11-10 v0.8 + SYNOPSIS The progam mkjobtexmf runs a program and tries to find the used file @@ -40,6 +44,8 @@ SYNOPSIS symbol links --flat Junk paths, do not make directories inside the destination directory + --(no)texhash Run texhash, use --notexhash for MiKTeX + --exclude-ext <ext> Exclude files with extension <ext>. --cmd-tex <cmd> Command for the TeX compiler --cmd-kpsewhich <cmd> Command for kpsewhich --cmd-texhash <cmd> Command for texhash @@ -47,13 +53,14 @@ SYNOPSIS --verbose Verbose output --help Brief help message --man Full documentation + --version Print version identification DESCRIPTION Running the program First mkjobtexmf runs a program, usually TeX. The TeX compiler is - configured by option --cmd-tex. Option --texname can be used, if the + configured by option "--cmd-tex". Option "--texname" can be used, if the file name extension differs from .tex: mkjobtexmf --jobname foo --texname foo.ltx @@ -93,23 +100,23 @@ DESCRIPTION with links to parent directories. Symbolic links are created by default. The files are copied if option - --copy is given or symbolic linking is not available. + "--copy" is given or symbolic linking is not available. OPTIONS - --jobname=*jobname* - It is the name of the job. `<jobname>.tex' serves as default for the - TeX file and <jobname> is used for naming various directories and - files. See section "FILES". + --jobname=<*jobname*> + It is the name of the job. `<*jobname*>.tex' serves as default for + the TeX file and <*jobname*> is used for naming various directories + and files. See section "FILES". - --texname=*name* - The name of the TeX input file, if it differs from <jobname>.tex. + --texname=<*name*> + The name of the TeX input file, if it differs from <*jobname*>.tex. - --texopt=*opt* - Additional option for the TeX compiler, examples are --ini or - --shell-escape. This option can be given more than once. + --texopt=<*opt*> + Additional option for the TeX compiler, examples are "--ini" or + "--shell-escape". This option can be given more than once. - --destdir=*directory* + --destdir=<*directory*> Specifies the name of the destination directory where the result is collected. As default a directory is generated in the current directory with the job name and extension `.mjt'. @@ -130,17 +137,35 @@ OPTIONS The files `ls-R' and `aliases' are ignored. - --cmd-tex=*cmd* + --exclude-ext=<*ext*> + Files with extension <*ext*> are excluded. The option can be given + several times or a comma separated list of extensions can be used. + Examples: + + --exclude-ext aux --exclude-ext log --exclude-ext toc + + is the same as + + --exclude-ext aux,log,toc + + --(no)texhash + As default the file `ls-R' is generated in the `texmf' tree, because + this is the file name database that might be used in TeX Live. + Because MiKTeX uses a different mechanism, its `texhash' does not + generate the `ls-R' files and "--notexhash" suppresses the call of + `texhash'. + + --cmd-tex=<*cmd*> Command for the TeX compiler. Default is pdflatex. - --cmd-kpsewhich=*cmd* + --cmd-kpsewhich=<*cmd*> Command for kpsewhich. - --cmd-texhash=*cmd* + --cmd-texhash=<*cmd*> Command for updating the file name database of the generated texmf tree. Default is texmf. - --cmd-strace=*cmd* + --cmd-strace=<*cmd*> Command for strace. --verbose @@ -149,6 +174,12 @@ OPTIONS --help Display help screen. + -B(-man> + Print manual page. + + --version + Print version identification and exit. + EXAMPLES TeX file test.tex using TeX's recorder method: @@ -215,7 +246,7 @@ FILES <jobname>.mjt/ Directory where the resulting texmf tree and symbol links are - stored. It can be changed by option --destdir. + stored. It can be changed by option "--destdir". <jobname>.fls Name of TeX's recorder file. @@ -225,11 +256,11 @@ FILES AUTHOR - Heiko Oberdiek, email: oberdiek at uni-freiburg.de + Heiko Oberdiek, email: heiko.oberdiek at googlemail.com COPYRIGHT AND LICENSE - Copyright 2007 by Heiko Oberdiek. + Copyright 2007, 2008, 2011 by Heiko Oberdiek. This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself (Perl Artistic License/GNU General @@ -238,25 +269,40 @@ COPYRIGHT AND LICENSE HISTORY 2007/04/16 v0.1 - * First experimental version. + + * First experimental version. 2007/05/09 v0.2 - * Typo in option name fixed. + + * Typo in option name fixed. 2007/09/03 v0.3 - * New options: --copy, --flat, --destdir + + * New options: "--copy", "--flat", "--destdir" 2007/09/04 v0.4 - * Bug fix in map_files_texmf. + + * Bug fix in map_files_texmf. 2007/09/06 v0.5 - * Support for `configure' added. (Thanks to Norbert Preining for - writing a first version of the configure stuff.) + + * Support for `configure' added. (Thanks to Norbert Preining for + writing a first version of the configure stuff.) 2008/04/05 v0.6 - * Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to - Karl Berry) + + * Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to + Karl Berry) 2008/06/28 v0.7 - * Fix for unknown option `--cmd-strace'. (Thanks to Juho Niemel"a) + + * Fix for unknown option `"--cmd-strace"'. (Thanks to Juho Niemelä) + + 2011/11/10 v0.8 + + * Remove colon from drive specification when making directories. + * Option "--(no)texhash" added. + * Some support for MiKTeX (thanks Ulrike Fischer). + * Various fixes in the generation of the documentation. + * Options "--exclude-ext" and "--version" added. diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/version.pl b/Master/texmf-dist/doc/generic/mkjobtexmf/version.pl new file mode 100644 index 00000000000..84223030c74 --- /dev/null +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/version.pl @@ -0,0 +1,144 @@ +#!/usr/bin/env perl +use strict; +$^W=1; + +my $infile = 'mkjobtexmf.pl'; +my $acfile = 'configure.ac'; +my $ltxfile = 'mkjobtexmf.ltx'; +my $readmefile = 'README'; +my $datefile = 'date-version.txt'; +my $tmpfile = "version.tmp"; + +my $date = ''; +my $version = ''; +my $copyright_years = ''; +my $pl_date_version = ''; + +open(IN, '<', $infile) or die "!!! Error: Cannot open `$infile'!\n"; +while (<IN>) { + if (/my \$date\s*=\s*'([0-9\/]+)'/) { + $date = $1; + next; + } + if (/my \$version\s*=\s*'([0-9\.]+)'/) { + $version = $1; + next; + } + if (/my \$copyright\s*=\s*"Copyright (.*) \$author"/) { + $copyright_years = $1; + next; + } + if (/^(\d{4}-\d{2}-\d{2} v\d+\.\d+)\s*$/) { + $pl_date_version = $1; + next; + } +} + +$date or die "!!! Error: Date not found!\n"; +$version or die "!!! Error: Version not found!\n"; +$copyright_years or die "!!! Error: Copyright years not found!\n"; +my $isodate = $date; +$isodate =~ s|/|-|g; +my $date_version = "$isodate v$version"; +$pl_date_version or die "!!! Error: VERSION/POD not found!\n"; +$pl_date_version eq $date_version or die "!!! Error: Fix VERSION in pod section!\n"; + +open(OUT, '>', $tmpfile) or die "!!! Error: Cannot open `$tmpfile'!\n"; +open(IN, '<', $acfile) or die "!!! Error: Cannot open `$acfile'!\n"; +my $found = 0; +my $update = 0; +while (<IN>) { + if (/^(dnl Copyright )(.*)( by .*)$/) { + $found |= 1; + $_ = "$1$copyright_years$3\n"; + $update = 1 unless $2 eq $copyright_years; + } + if (/^(AC_INIT\(mkjobtexmf, )([^,]*)(,.*|\).*)$/) { + $found |= 2; + $_ = "$1$version$3\n"; + $update = 1 unless $2 eq $version; + } + print OUT; +} +die "!!! Error: COPYRIGHT or AC_INIT line not found!\n" unless $found = 3; +unlink $acfile or die "!!! Error: Cannot delete `$acfile'!\n"; +rename $tmpfile, $acfile + or die "!!! Error: Cannot rename `$tmpfile' to `$acfile'!\n"; +print "--> `$acfile' updated\n" if $update; + +open(OUT, '>', $tmpfile) or die "!!! Error: Cannot open `$tmpfile'!\n"; +open(IN, '<', $ltxfile) or die "!!! Error: Cannot open `$ltxfile'!\n"; +$found = 0; +$update = 0; +while (<IN>) { + if (/^(% Copyright )(.*)( by .*)$/) { + $found |= 1; + $_ = "$1$copyright_years$3\n"; + $update = 1 unless $2 eq $copyright_years; + } + if (/^(\\providecommand\*{\\DATE}{)(.*)(})$/) { + $found |= 2; + $_ = "$1$date$3\n"; + $update = 1 unless $2 eq $date; + } + if (/^(\\providecommand\*{\\VERSION}{)(.*)(})$/) { + $found |= 4; + $_ = "$1$version$3\n"; + $update = 1 unless $2 eq $version; + } + print OUT; +} +close(IN); +close(OUT); +die "!!! Error: COPYRIGHT or DATE or VERSION line not found!\n" + unless $found == 7; +unlink $ltxfile or die "!!! Error: Cannot delete `$ltxfile'!\n"; +rename $tmpfile, $ltxfile + or die "!!! Error: Cannot rename `$tmpfile' to `$ltxfile'!\n"; +print "--> `$ltxfile' updated\n" if $update; + +open(OUT, '>', $tmpfile) or die "!!! Error: Cannot open `$tmpfile'!\n"; +open(IN, '<', $readmefile) or die "!!! Error: Cannot open `$readmefile'!\n"; +$found = 0; +$update = 0; +while (<IN>) { + if (/^(Copyright )(.*)( by .*)$/) { + $found |= 1; + $_ = "$1$copyright_years$3\n"; + $update = 1 unless $2 eq $copyright_years; + } + if (/^(README for mkjobtexmf )([0-9\/]+) v([0-9\.]+)$/) { + $found |= 2; + $_ = "$1$date v$version\n"; + $update = 1 unless $2 eq $date and $3 eq $version; + } + print OUT; +} +close(IN); +close(OUT); +die "!!! Error: COPYRIGHT or DATE/VERSION line not found!\n" + unless $found == 3; +unlink $readmefile or die "!!! Error: Cannot delete `$readmefile'!\n"; +rename $tmpfile, $readmefile + or die "!!! Error: Cannot rename `$tmpfile' to `$readmefile'!\n"; +print "--> `$readmefile' updated.\n" if $update; + +my $old_date_version = ''; +if (-f $datefile) { + open(IN, '<', $datefile) or die "!!! Error: Cannot open `$datefile'!\n"; + my @lines = <IN>; + $old_date_version = "@lines"; + close(IN); +} +if ($old_date_version eq $date_version) { + # print "--> `$datefile' is already uptodate.\n"; +} +else { + open(OUT, '>', $datefile) or die "!!! Error: Cannot open `$datefile'!\n"; + print OUT $date_version; + close(OUT); + print "--> `$datefile' updated.\n"; +} + +1; +__END__ diff --git a/Master/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl b/Master/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl index d9ce104e158..c46f4f4a102 100755 --- a/Master/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl +++ b/Master/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl @@ -10,10 +10,10 @@ use strict; $^W=1; my $prj = 'mkjobtexmf'; -my $version = '0.7'; -my $date = '2008/06/28'; +my $version = '0.8'; +my $date = '2011/11/10'; my $author = 'Heiko Oberdiek'; -my $copyright = "Copyright 2007, 2008 $author"; +my $copyright = "Copyright 2007, 2008, 2011 $author"; my $cmd_tex = 'pdflatex'; my $cmd_kpsewhich = 'kpsewhich'; @@ -33,19 +33,21 @@ my $output = 0; my $strace = 0; my $copy = 0; my $flat = 0; +my $texhash = 1; my $needs_texhash = 0; my @texmf; +my @exclude_ext; my %files; my %links; my %flat_ignore = ( 'ls-R' => '', 'aliases' => '', ); +my $win = 0; +$win = 1 if $^O =~ /MSWin/i; my $title = "\U$prj\E $date v$version, $copyright\n"; -print $title; - sub die_error ($) { my $msg = shift; die "!!! Error: $msg!\n"; @@ -78,6 +80,7 @@ use Pod::Usage; my $man = 0; my $help = 0; +my $opt_version = 0; GetOptions( 'jobname=s' => \$jobname, @@ -91,14 +94,27 @@ GetOptions( 'strace' => \$strace, 'copy' => \$copy, 'flat' => \$flat, + 'texhash!' => \$texhash, + 'exclude-ext=s' => \@exclude_ext, 'verbose' => \$verbose, 'output' => \$output, 'help|?' => \$help, 'man' => \$man, + 'version' => \$opt_version, ) or die_usage('Unknown option'); -pod2usage(1) if $help; +if ($help) { + print $title; + pod2usage(1); +} pod2usage(-exitstatus => 0, -verbose => 2) if $man; +if ($opt_version) { + print "$prj $date v$version\n"; + exit(0); +} + +print $title; + if (@ARGV > 0) { $strace = 1; $texname = ''; @@ -112,6 +128,12 @@ verbose "jobname: " . value $jobname; verbose "texname: " . value $texname if $texname; verbose "command: " . value "@args" if @args; verbose "destdir: " . value $destdir; +verbose "system: ". value $^O; + +@exclude_ext = split(/,/, join(',', @exclude_ext)); +foreach my $ext (@exclude_ext) { + verbose "exclude-ext: " . value $ext; +} if (!$copy) { my $symlink_exists = eval { symlink('', ''); 1 }; @@ -202,34 +224,83 @@ sub run_tex { } sub run_texhash { + return unless $texhash; return if $flat; if ($needs_texhash) { - run_generic( - $cmd_texhash, - "$destdir/texmf" - ); + my $cmd_version = "$cmd_texhash --version"; + verbose "exec: $cmd_version"; + print '>' x 79, "\n"; + my @lines = `$cmd_version`; + print @lines if $verbose; + print '<' x 79, "\n"; + if ($? != 0) { + if ($? == -1) { + verbose "Execution failed: $!"; + } + elsif ($? & 127) { + verbose sprintf "Execution died with signal %d, %s coredump", + ($? & 127), ($? & 128) ? 'with' : 'without'; + } + else { + verbose sprintf "Execution failed with error code: %d", + $? >> 8; + } + } + else { + my $catch = "@lines"; + if ($catch =~ /(kpathsea|mktexlsr)/i) { + run_generic( + $cmd_texhash, + "$destdir/texmf" + ); + } + else{ + verbose 'Unsupported port of texhax found.'; + } + } } else { - verbose("texhash run skipped, no files added"); + verbose("Run of texhash skipped, no files added."); } } use Cwd 'abs_path', 'getcwd'; +my $pwd = getcwd; +verbose "pwd: " . value($pwd); + sub get_texmf_trees () { return if $flat; my $cmdline = "$cmd_kpsewhich -expand-path='\$TEXMF'"; + $cmdline = "$cmd_kpsewhich -expand-path=\$TEXMF" if $win; verbose "exec: " . value($cmdline); my $str = `$cmdline`; check_child_error; - chomp $str; - @texmf = split ':', $str; + $str =~ s/[\r\n]+$//; + if ($win) { + @texmf = split ';', $str; + } + else { + @texmf = split ':', $str; + } my %texmf; foreach my $texmf (@texmf) { $texmf{$texmf} = ''; $texmf{abs_path($texmf)} = ''; } @texmf = sort keys %texmf; + if (@texmf == 0 and $win) { + my $cmdline = "$cmd_kpsewhich --show-path=tfm"; + verbose "exec: " . value($cmdline); + my $str = `$cmdline`; + check_child_error; + $str =~ s/[\n\r]+$//; + foreach my $texmf (split ';', $str) { + if ($texmf =~ m|^(.*)/fonts/tfm/*$|) { + push @texmf, $1; + } + } + } if ($verbose) { if (@texmf) { map { verbose 'texmf: ' . value($_) } @texmf; @@ -240,10 +311,25 @@ sub get_texmf_trees () { } } -sub analyze_recorder { - my $pwd = getcwd; - verbose "pwd: " . value($pwd); +sub add_file ($) { + my $file = shift; + my $add = 1; + foreach my $ext (@exclude_ext) { + my $ext = ".$ext"; + my $len_ext = length $ext; + my $len_file = length $file; + if ($len_file >= $len_ext) { + if ($ext eq substr $file, $len_file - $len_ext) { + $add = 0; + verbose "excluded: " . value($file); + last; + } + } + } + $files{$file} = '' if $add; +} +sub analyze_recorder { my $file_rec = $jobname . ($strace ? $ext_strace : $ext_recorder); verbose 'File with recorded file names: ' . value($file_rec); open(IN, '<', $file_rec) @@ -262,7 +348,7 @@ sub analyze_recorder { } /^\d+\s+\w+\(\"([^"]+)\",/ or warning "Unknown entry `$_'"; my $file = $1; - $files{$file} = ''; + add_file $file; } } else { @@ -273,7 +359,7 @@ sub analyze_recorder { /^(INPUT|OUTPUT) (.*)$/ or warning "Unknown entry `$_'"; my $type = $1; my $file = $2; - $files{$file} = ''; + add_file $file; } } close(IN); @@ -328,6 +414,8 @@ sub map_files_flat { sub map_files_texmf { my @failed; + my $pwd_dir = "$pwd/"; + my $pwd_len = length $pwd_dir; foreach my $file (sort keys %files) { verbose "file: " . value($file); @@ -335,21 +423,26 @@ sub map_files_texmf { my $abs_file = abs_path($file); my $found = ''; - foreach (@texmf) { - my $texmf = "$_/"; - my $len = length($texmf); - my $str = substr $file, 0, $len; - if ($texmf eq $str) { - $found = 'texmf/' . substr $file, $len; - if ($found =~ /(^|\/)\.\.\//) { - $found = ''; + if ($pwd_dir eq substr $file, 0, $pwd_len) { + $found = substr $file, $pwd_len; + } + if (not $found) { + foreach (@texmf) { + my $texmf = "$_/"; + my $len = length($texmf); + my $str = substr $file, 0, $len; + if ($texmf eq $str) { + $found = 'texmf/' . substr $file, $len; + if ($found =~ /(^|\/)\.\.\//) { + $found = ''; + } + } + last if $found; + my $str = substr $abs_file, 0, $len; + if ($texmf eq $str) { + $found = 'texmf/' . substr $abs_file, $len; + last; } - } - last if $found; - my $str = substr $abs_file, 0, $len; - if ($texmf eq $str) { - $found = 'texmf/' . substr $abs_file, $len; - last; } } if (not($found)) { @@ -380,7 +473,7 @@ sub make_dirs ($) { my $path = shift; my @elems = split /\/+/, $path; if (@elems <= 1) { - return; + return 1; } pop @elems; my $dir = ''; @@ -388,9 +481,13 @@ sub make_dirs ($) { $dir .= '/' if $dir; $dir .= $elem; next if -d $dir; - verbose 'mkdir: ' . value($dir); - mkdir $dir or die_error "Cannot make directory `$dir'"; + if (mkdir $dir) { + verbose 'mkdir: ' . value($dir); + next; + } + return 0; } + return 1; } sub make_links { @@ -398,7 +495,16 @@ sub make_links { foreach my $key (sort keys %links) { my $source = $links{$key}; my $dest = "$destdir/$key"; - make_dirs $dest; + my $result_mkdir = make_dirs $dest; + if (not $result_mkdir) { + if ($key =~ s|^([A-Za-z]):/|$1/|) { + $dest = "$destdir/$key"; + $result_mkdir = make_dirs $dest; + } + if (not $result_mkdir) { + die_error("Cannot create directory `$dest'"); + } + } if (-e $dest) { my $type = ''; if (-l $dest) { @@ -492,6 +598,10 @@ __DATA__ mkjobtexmf -- Generate a texmf tree for a particular job +=head1 VERSION + +2011-11-10 v0.8 + =head1 SYNOPSIS The progam B<mkjobtexmf> runs a program and tries to @@ -531,6 +641,8 @@ Options: symbol links --flat Junk paths, do not make directories inside the destination directory + --(no)texhash Run texhash, use --notexhash for MiKTeX + --exclude-ext <ext> Exclude files with extension <ext>. --cmd-tex <cmd> Command for the TeX compiler --cmd-kpsewhich <cmd> Command for kpsewhich --cmd-texhash <cmd> Command for texhash @@ -538,13 +650,14 @@ Options: --verbose Verbose output --help Brief help message --man Full documentation + --version Print version identification =head1 DESCRIPTION =head2 Running the program First B<mkjobtexmf> runs a program, usually TeX. The TeX compiler -is configured by option B<--cmd-tex>. Option B<--texname> can +is configured by option C<--cmd-tex>. Option C<--texname> can be used, if the file name extension differs from F<.tex>: mkjobtexmf --jobname foo --texname foo.ltx @@ -591,46 +704,46 @@ result directory F<I<jobname>.mjt>. Absolute file names are not supported and neither paths with links to parent directories. Symbolic links are created by default. The files are copied -if option --copy is given or symbolic linking is not available. +if option C<--copy> is given or symbolic linking is not available. =head1 OPTIONS =over -=item B<--jobname>=I<jobname> +=item B<->B<-jobname>=<I<jobname>> -It is the name of the job. `<jobname>.tex' serves as default for -the TeX file and <jobname> is used for naming various directories -and files. See section L</FILES>. +It is the name of the job. `<I<jobname>>.tex' serves as default for +the TeX file and <I<jobname>> is used for naming various directories +and files. See section L<"FILES">. -=item B<--texname>=I<name> +=item B<->B<-texname>=<I<name>> -The name of the TeX input file, if it differs from <jobname>.tex. +The name of the TeX input file, if it differs from <I<jobname>>.tex. -=item B<--texopt>=I<opt> +=item B<->B<-texopt>=<I<opt>> -Additional option for the TeX compiler, examples are --ini or ---shell-escape. This option can be given more than once. +Additional option for the TeX compiler, examples are C<--ini> or +C<--shell-escape>. This option can be given more than once. -=item B<--destdir>=I<directory> +=item B<->B<-destdir>=<I<directory>> Specifies the name of the destination directory where the result is collected. As default a directory is generated in the current directory with the job name and extension `.mjt'. -=item B<--output> +=item B<->B<-output> Also add output files. -=item B<--strace> +=item B<->B<-strace> Use method with program B<strace>, see L<"DESCRIPTION">. -=item B<--copy> +=item B<->B<-copy> Files are copied instead of creating symbolic links. -=item B<--flat> +=item B<->B<-flat> Files are linked or copied without path elements. The destination directory will contain a flat list of @@ -638,31 +751,59 @@ files or links without directory. The files `ls-R' and `aliases' are ignored. -=item B<--cmd-tex>=I<cmd> +=item B<->B<-exclude-ext>=<I<ext>> + +Files with extension <I<ext>> are excluded. The option can be +given several times or a comma separated list of extensions +can be used. Examples: + + --exclude-ext aux --exclude-ext log --exclude-ext toc + +is the same as + + --exclude-ext aux,log,toc + +=item B<->B<-(no)texhash> + +As default the file `ls-R' is generated in the `texmf' tree, +because this is the file name database that might be used +in TeX Live. Because MiKTeX uses a different mechanism, its +`texhash' does not generate the `ls-R' files and C<--notexhash> +suppresses the call of `texhash'. + +=item B<->B<-cmd-tex>=<I<cmd>> Command for the TeX compiler. Default is pdflatex. -=item B<--cmd-kpsewhich>=I<cmd> +=item B<->B<-cmd-kpsewhich>=<I<cmd>> Command for kpsewhich. -=item B<--cmd-texhash>=I<cmd> +=item B<->B<-cmd-texhash>=<I<cmd>> Command for updating the file name database of the generated texmf tree. Default is texmf. -=item B<--cmd-strace>=I<cmd> +=item B<->B<-cmd-strace>=<I<cmd>> Command for strace. -=item B<--verbose> +=item B<->B<-verbose> Verbose messages. -=item B<--help> +=item B<->B<-help> Display help screen. +=item B<->B(-man> + +Print manual page. + +=item B<->B<-version> + +Print version identification and exit. + =back =head1 EXAMPLES @@ -745,7 +886,7 @@ file recording (e.g. pdfTeX 1.40.3 does not record .pfb and =item F<E<lt>jobnameE<gt>.mjt/> Directory where the resulting texmf tree and symbol links -are stored. It can be changed by option --destdir. +are stored. It can be changed by option C<--destdir>. =item F<E<lt>jobnameE<gt>.fls> @@ -759,11 +900,11 @@ Log file where the result of B<strace> is stored. =head1 AUTHOR -Heiko Oberdiek, email: oberdiek at uni-freiburg.de +Heiko Oberdiek, email: heiko.oberdiek at googlemail.com =head1 COPYRIGHT AND LICENSE -Copyright 2007 by Heiko Oberdiek. +Copyright 2007, 2008, 2011 by Heiko Oberdiek. This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself @@ -771,39 +912,83 @@ modify it under the same terms as Perl itself =head1 HISTORY -=over +=over 2 + +=item B<2007/04/16 v0.1> -=item 2007/04/16 v0.1 +=over 2 -* First experimental version. +=item * First experimental version. -=item 2007/05/09 v0.2 +=back + +=item B<2007/05/09 v0.2> -* Typo in option name fixed. +=over 2 -=item 2007/09/03 v0.3 +=item * Typo in option name fixed. -* New options: --copy, --flat, --destdir +=back + +=item B<2007/09/03 v0.3> + +=over 2 + +=item * New options: C<--copy>, C<--flat>, C<--destdir> + +=back -=item 2007/09/04 v0.4 +=item B<2007/09/04 v0.4> -* Bug fix in map_files_texmf. +=over 2 -=item 2007/09/06 v0.5 +=item * Bug fix in map_files_texmf. -* Support for `configure' added. +=back + +=item B<2007/09/06 v0.5> + +=over 2 + +=item * Support for `configure' added. (Thanks to Norbert Preining for writing a first version of the configure stuff.) -=item 2008/04/05 v0.6 +=back + +=item B<2008/04/05 v0.6> -* Tiny fix in target `uninstall' in file `Makefile.in'. +=over 2 + +=item * Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to Karl Berry) -=item 2008/06/28 v0.7 +=back + +=item B<2008/06/28 v0.7> + +=over 2 + +=item * Fix for unknown option `C<--cmd-strace>'. + (Thanks to Juho Niemelä) -* Fix for unknown option `--cmd-strace'. - (Thanks to Juho Niemel"a) +=back + +=item B<2011/11/10 v0.8> + +=over 2 + +=item * Remove colon from drive specification when making directories. + +=item * Option C<--(no)texhash> added. + +=item * Some support for MiKTeX (thanks Ulrike Fischer). + +=item * Various fixes in the generation of the documentation. + +=item * Options C<--exclude-ext> and C<--version> added. + +=back =back diff --git a/Master/texmf-dist/source/generic/mkjobtexmf/Makefile.in b/Master/texmf-dist/source/generic/mkjobtexmf/Makefile.in index b3a37f37ad8..8c6b97b7c58 100644 --- a/Master/texmf-dist/source/generic/mkjobtexmf/Makefile.in +++ b/Master/texmf-dist/source/generic/mkjobtexmf/Makefile.in @@ -1,7 +1,7 @@ # Makefile.in # @configure_input@ -# Copyright 2007 by Heiko Oberdiek. +# Copyright 2007, 2008, 2011 by Heiko Oberdiek. # # The file is part of project mkjobtexmf. # It's free software; you may redistribute it and/or @@ -26,41 +26,59 @@ INSTALL_DATA = @INSTALL_DATA@ PRJ = mkjobtexmf SRC_FILE = $(PRJ).pl -SRC_FILES = $(SRC_FILE) $(PRJ).ltx +SRC_FILES = $(SRC_FILE) $(PRJ).ltx clean-case.pl version.pl DOC_FILES = $(PRJ).txt $(PRJ).man $(PRJ).html $(PRJ).pdf README ALL_FILES = $(DOC_FILES) configure AUTOSRC_FILES = configure.ac Makefile.in install-sh DISTRIB_FILES = $(SRC_FILES) $(ALL_FILES) $(AUTOSRC_FILES) PDFLATEX = TEXINPUTS=$(srcdir): pdflatex +LUALATEX = TEXINPUTS=$(srcdir): lualatex +TMP_FILE = __temp__.pl +FILE_DATE_VERSION = date-version.txt default all: include $(wildcard $(srcdir)/$(PRJ).mk) +configure: configure.ac + autoconf + +Makefile: Makefile.in configure + ./configure + doc: $(DOC_FILES) +$(FILE_DATE_VERSION): $(SRC_FILE) + ./version.pl + autoconf + ./configure + $(PRJ).txt: $(SRC_FILE) pod2text -l $< $@ -$(PRJ).man: $(SRC_FILE) - pod2man $< $@ +$(PRJ).man: $(SRC_FILE) $(FILE_DATE_VERSION) + pod2man -d "$(shell cat $(FILE_DATE_VERSION))" $< $@ -$(PRJ).html: $(SRC_FILE) - pod2html --infile=$< --outfile=$@ +html: $(PRJ).html +$(PRJ).html: $(SRC_FILE) ./clean-case.pl + ./clean-case.pl $< $(TMP_FILE) + pod2html --title=$(PRJ) --infile=$(TMP_FILE) --outfile=$@ $(PRJ).pdf: $(PRJ).ltx $(PRJ).tex - $(PDFLATEX) $< + $(LUALATEX) $< makeindex $(PRJ) - $(PDFLATEX) $< + $(LUALATEX) $< makeindex $(PRJ) - $(PDFLATEX) $< + $(LUALATEX) $< makeindex $(PRJ) - $(PDFLATEX) $< + $(LUALATEX) $< makeindex $(PRJ) - $(PDFLATEX) $< + $(LUALATEX) $< $(PRJ).tex: $(SRC_FILE) - pod2latex -out $@ $< + ./clean-case.pl $< $(TMP_FILE) + pod2latex -out $@ $(TMP_FILE) + recode latin1..utf8 $@ distrib: $(PRJ).zip @@ -93,4 +111,4 @@ realclean: distclean mostlyclean: clean .PHONY: default all doc distrib install check uninstall \ - clean distclean realclean mostlyclean + clean distclean realclean mostlyclean test html diff --git a/Master/texmf-dist/source/generic/mkjobtexmf/configure b/Master/texmf-dist/source/generic/mkjobtexmf/configure index 8e2f8ec1309..8c9d1c1cfcc 100644 --- a/Master/texmf-dist/source/generic/mkjobtexmf/configure +++ b/Master/texmf-dist/source/generic/mkjobtexmf/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for mkjobtexmf 0.6. +# Generated by GNU Autoconf 2.57 for mkjobtexmf 0.8. # -# Report bugs to <oberdiek@uni-freiburg.de>. +# Report bugs to <heiko.oberdiek@googlemail.com>. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. @@ -268,9 +268,9 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='mkjobtexmf' PACKAGE_TARNAME='mkjobtexmf' -PACKAGE_VERSION='0.6' -PACKAGE_STRING='mkjobtexmf 0.6' -PACKAGE_BUGREPORT='oberdiek@uni-freiburg.de' +PACKAGE_VERSION='0.8' +PACKAGE_STRING='mkjobtexmf 0.8' +PACKAGE_BUGREPORT='heiko.oberdiek@googlemail.com' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -721,7 +721,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mkjobtexmf 0.6 to adapt to many kinds of systems. +\`configure' configures mkjobtexmf 0.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -778,11 +778,11 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mkjobtexmf 0.6:";; + short | recursive ) echo "Configuration of mkjobtexmf 0.8:";; esac cat <<\_ACEOF -Report bugs to <oberdiek@uni-freiburg.de>. +Report bugs to <heiko.oberdiek@googlemail.com>. _ACEOF fi @@ -845,7 +845,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -mkjobtexmf configure 0.6 +mkjobtexmf configure 0.8 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -860,7 +860,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mkjobtexmf $as_me 0.6, which was +It was created by mkjobtexmf $as_me 0.8, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1694,7 +1694,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by mkjobtexmf $as_me 0.6, which was +This file was extended by mkjobtexmf $as_me 0.8, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -1749,7 +1749,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -mkjobtexmf config.status 0.6 +mkjobtexmf config.status 0.8 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/Master/texmf-dist/source/generic/mkjobtexmf/configure.ac b/Master/texmf-dist/source/generic/mkjobtexmf/configure.ac index 1c0834981fe..709792ee94f 100644 --- a/Master/texmf-dist/source/generic/mkjobtexmf/configure.ac +++ b/Master/texmf-dist/source/generic/mkjobtexmf/configure.ac @@ -1,13 +1,13 @@ dnl configure.ac dnl -dnl Copyright 2007, 2008 by Heiko Oberdiek. +dnl Copyright 2007, 2008, 2011 by Heiko Oberdiek. dnl dnl The file is part of project mkjobtexmf. dnl It's free software; you may redistribute it and/or dnl modify it under the same terms as Perl itself dnl (Perl Artistic License/GNU General Public License, version 2). dnl -AC_INIT(mkjobtexmf, 0.7, oberdiek@uni-freiburg.de) +AC_INIT(mkjobtexmf, 0.8, heiko.oberdiek@googlemail.com) AC_CONFIG_FILES(Makefile) diff --git a/Master/texmf/doc/man/man1/mkjobtexmf.1 b/Master/texmf/doc/man/man1/mkjobtexmf.1 index bba1d5d41b8..b3fa622580f 100644 --- a/Master/texmf/doc/man/man1/mkjobtexmf.1 +++ b/Master/texmf/doc/man/man1/mkjobtexmf.1 @@ -129,9 +129,12 @@ .\" ======================================================================== .\" .IX Title "MKJOBTEXMF 1" -.TH MKJOBTEXMF 1 "2008-06-28" "perl v5.8.1" "User Contributed Perl Documentation" +.TH MKJOBTEXMF 1 "2011-11-10 v0.8" "perl v5.8.1" "User Contributed Perl Documentation" .SH "NAME" mkjobtexmf \-\- Generate a texmf tree for a particular job +.SH "VERSION" +.IX Header "VERSION" +2011\-11\-10 v0.8 .SH "SYNOPSIS" .IX Header "SYNOPSIS" The progam \fBmkjobtexmf\fR runs a program and tries to @@ -160,7 +163,7 @@ instead of TeX. As method only program \fBstrace\fR is available. .PP Options: .PP -.Vb 22 +.Vb 25 \& --jobname <name> Name of the job (mandatory). \& Usually this is the TeX file \& without extension @@ -176,6 +179,8 @@ Options: \& symbol links \& --flat Junk paths, do not make directories \& inside the destination directory +\& --(no)texhash Run texhash, use --notexhash for MiKTeX +\& --exclude-ext <ext> Exclude files with extension <ext>. \& --cmd-tex <cmd> Command for the TeX compiler \& --cmd-kpsewhich <cmd> Command for kpsewhich \& --cmd-texhash <cmd> Command for texhash @@ -183,13 +188,14 @@ Options: \& --verbose Verbose output \& --help Brief help message \& --man Full documentation +\& --version Print version identification .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" .Sh "Running the program" .IX Subsection "Running the program" First \fBmkjobtexmf\fR runs a program, usually TeX. The TeX compiler -is configured by option \fB\-\-cmd\-tex\fR. Option \fB\-\-texname\fR can +is configured by option \f(CW\*(C`\-\-cmd\-tex\*(C'\fR. Option \f(CW\*(C`\-\-texname\*(C'\fR can be used, if the file name extension differs from \fI.tex\fR: .PP .Vb 1 @@ -234,61 +240,89 @@ result directory \fI\fIjobname\fI.mjt\fR. Absolute file names are not supported and neither paths with links to parent directories. .PP Symbolic links are created by default. The files are copied -if option \-\-copy is given or symbolic linking is not available. +if option \f(CW\*(C`\-\-copy\*(C'\fR is given or symbolic linking is not available. .SH "OPTIONS" .IX Header "OPTIONS" -.IP "\fB\-\-jobname\fR=\fIjobname\fR" 4 -.IX Item "--jobname=jobname" -It is the name of the job. `<jobname>.tex' serves as default for -the TeX file and <jobname> is used for naming various directories +.IP "\fB\-\fR\fB\-jobname\fR=<\fIjobname\fR>" 4 +.IX Item "--jobname=<jobname>" +It is the name of the job. `<\fIjobname\fR>.tex' serves as default for +the TeX file and <\fIjobname\fR> is used for naming various directories and files. See section \*(L"\s-1FILES\s0\*(R". -.IP "\fB\-\-texname\fR=\fIname\fR" 4 -.IX Item "--texname=name" -The name of the TeX input file, if it differs from <jobname>.tex. -.IP "\fB\-\-texopt\fR=\fIopt\fR" 4 -.IX Item "--texopt=opt" -Additional option for the TeX compiler, examples are \-\-ini or -\&\-\-shell\-escape. This option can be given more than once. -.IP "\fB\-\-destdir\fR=\fIdirectory\fR" 4 -.IX Item "--destdir=directory" +.IP "\fB\-\fR\fB\-texname\fR=<\fIname\fR>" 4 +.IX Item "--texname=<name>" +The name of the TeX input file, if it differs from <\fIjobname\fR>.tex. +.IP "\fB\-\fR\fB\-texopt\fR=<\fIopt\fR>" 4 +.IX Item "--texopt=<opt>" +Additional option for the TeX compiler, examples are \f(CW\*(C`\-\-ini\*(C'\fR or +\&\f(CW\*(C`\-\-shell\-escape\*(C'\fR. This option can be given more than once. +.IP "\fB\-\fR\fB\-destdir\fR=<\fIdirectory\fR>" 4 +.IX Item "--destdir=<directory>" Specifies the name of the destination directory where the result is collected. As default a directory is generated in the current directory with the job name and extension `.mjt'. -.IP "\fB\-\-output\fR" 4 +.IP "\fB\-\fR\fB\-output\fR" 4 .IX Item "--output" Also add output files. -.IP "\fB\-\-strace\fR" 4 +.IP "\fB\-\fR\fB\-strace\fR" 4 .IX Item "--strace" Use method with program \fBstrace\fR, see \*(L"\s-1DESCRIPTION\s0\*(R". -.IP "\fB\-\-copy\fR" 4 +.IP "\fB\-\fR\fB\-copy\fR" 4 .IX Item "--copy" Files are copied instead of creating symbolic links. -.IP "\fB\-\-flat\fR" 4 +.IP "\fB\-\fR\fB\-flat\fR" 4 .IX Item "--flat" Files are linked or copied without path elements. The destination directory will contain a flat list of files or links without directory. .Sp The files `ls\-R' and `aliases' are ignored. -.IP "\fB\-\-cmd\-tex\fR=\fIcmd\fR" 4 -.IX Item "--cmd-tex=cmd" +.IP "\fB\-\fR\fB\-exclude\-ext\fR=<\fIext\fR>" 4 +.IX Item "--exclude-ext=<ext>" +Files with extension <\fIext\fR> are excluded. The option can be +given several times or a comma separated list of extensions +can be used. Examples: +.Sp +.Vb 1 +\& --exclude-ext aux --exclude-ext log --exclude-ext toc +.Ve +.Sp +is the same as +.Sp +.Vb 1 +\& --exclude-ext aux,log,toc +.Ve +.IP "\fB\-\fR\fB\-(no)texhash\fR" 4 +.IX Item "--(no)texhash" +As default the file `ls\-R' is generated in the `texmf' tree, +because this is the file name database that might be used +in TeX Live. Because MiKTeX uses a different mechanism, its +`texhash' does not generate the `ls\-R' files and \f(CW\*(C`\-\-notexhash\*(C'\fR +suppresses the call of `texhash'. +.IP "\fB\-\fR\fB\-cmd\-tex\fR=<\fIcmd\fR>" 4 +.IX Item "--cmd-tex=<cmd>" Command for the TeX compiler. Default is pdflatex. -.IP "\fB\-\-cmd\-kpsewhich\fR=\fIcmd\fR" 4 -.IX Item "--cmd-kpsewhich=cmd" +.IP "\fB\-\fR\fB\-cmd\-kpsewhich\fR=<\fIcmd\fR>" 4 +.IX Item "--cmd-kpsewhich=<cmd>" Command for kpsewhich. -.IP "\fB\-\-cmd\-texhash\fR=\fIcmd\fR" 4 -.IX Item "--cmd-texhash=cmd" +.IP "\fB\-\fR\fB\-cmd\-texhash\fR=<\fIcmd\fR>" 4 +.IX Item "--cmd-texhash=<cmd>" Command for updating the file name database of the generated texmf tree. Default is texmf. -.IP "\fB\-\-cmd\-strace\fR=\fIcmd\fR" 4 -.IX Item "--cmd-strace=cmd" +.IP "\fB\-\fR\fB\-cmd\-strace\fR=<\fIcmd\fR>" 4 +.IX Item "--cmd-strace=<cmd>" Command for strace. -.IP "\fB\-\-verbose\fR" 4 +.IP "\fB\-\fR\fB\-verbose\fR" 4 .IX Item "--verbose" Verbose messages. -.IP "\fB\-\-help\fR" 4 +.IP "\fB\-\fR\fB\-help\fR" 4 .IX Item "--help" Display help screen. +.IP "\fB\-\fRB(\-man>" 4 +.IX Item "-B(-man>" +Print manual page. +.IP "\fB\-\fR\fB\-version\fR" 4 +.IX Item "--version" +Print version identification and exit. .SH "EXAMPLES" .IX Header "EXAMPLES" TeX file \fItest.tex\fR using TeX's recorder method: @@ -369,7 +403,7 @@ file recording (e.g. pdfTeX 1.40.3 does not record .pfb and .IX Item "<jobname>.mjt/" .PD Directory where the resulting texmf tree and symbol links -are stored. It can be changed by option \-\-destdir. +are stored. It can be changed by option \f(CW\*(C`\-\-destdir\*(C'\fR. .IP "\fI<jobname>.fls\fR" 4 .IX Item "<jobname>.fls" Name of TeX's recorder file. @@ -378,38 +412,90 @@ Name of TeX's recorder file. Log file where the result of \fBstrace\fR is stored. .SH "AUTHOR" .IX Header "AUTHOR" -Heiko Oberdiek, email: oberdiek at uni\-freiburg.de +Heiko Oberdiek, email: heiko.oberdiek at googlemail.com .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" -Copyright 2007 by Heiko Oberdiek. +Copyright 2007, 2008, 2011 by Heiko Oberdiek. .PP This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself (Perl Artistic License/GNU General Public License, version 2). .SH "HISTORY" .IX Header "HISTORY" -.IP "2007/04/16 v0.1" 4 +.IP "\fB2007/04/16 v0.1\fR" 2 .IX Item "2007/04/16 v0.1" -* First experimental version. -.IP "2007/05/09 v0.2" 4 +.RS 2 +.PD 0 +.IP "* First experimental version." 2 +.IX Item "First experimental version." +.RE +.RS 2 +.RE +.IP "\fB2007/05/09 v0.2\fR" 2 .IX Item "2007/05/09 v0.2" -* Typo in option name fixed. -.IP "2007/09/03 v0.3" 4 +.RS 2 +.IP "* Typo in option name fixed." 2 +.IX Item "Typo in option name fixed." +.RE +.RS 2 +.RE +.IP "\fB2007/09/03 v0.3\fR" 2 .IX Item "2007/09/03 v0.3" -* New options: \-\-copy, \-\-flat, \-\-destdir -.IP "2007/09/04 v0.4" 4 +.RS 2 +.ie n .IP "* New options: ""\-\-copy""\fR, \f(CW""\-\-flat""\fR, \f(CW""\-\-destdir""" 2 +.el .IP "* New options: \f(CW\-\-copy\fR, \f(CW\-\-flat\fR, \f(CW\-\-destdir\fR" 2 +.IX Item "New options: --copy, --flat, --destdir" +.RE +.RS 2 +.RE +.IP "\fB2007/09/04 v0.4\fR" 2 .IX Item "2007/09/04 v0.4" -* Bug fix in map_files_texmf. -.IP "2007/09/06 v0.5" 4 +.RS 2 +.IP "* Bug fix in map_files_texmf." 2 +.IX Item "Bug fix in map_files_texmf." +.RE +.RS 2 +.RE +.IP "\fB2007/09/06 v0.5\fR" 2 .IX Item "2007/09/06 v0.5" -* Support for `configure' added. - (Thanks to Norbert Preining for writing a first version of - the configure stuff.) -.IP "2008/04/05 v0.6" 4 +.RS 2 +.IP "* Support for `configure' added. (Thanks to Norbert Preining for writing a first version of the configure stuff.)" 2 +.IX Item "Support for `configure' added. (Thanks to Norbert Preining for writing a first version of the configure stuff.)" +.RE +.RS 2 +.RE +.IP "\fB2008/04/05 v0.6\fR" 2 .IX Item "2008/04/05 v0.6" -* Tiny fix in target `uninstall' in file `Makefile.in'. - (Thanks to Karl Berry) -.IP "2008/06/28 v0.7" 4 +.RS 2 +.IP "* Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to Karl Berry)" 2 +.IX Item "Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to Karl Berry)" +.RE +.RS 2 +.RE +.IP "\fB2008/06/28 v0.7\fR" 2 .IX Item "2008/06/28 v0.7" -* Fix for unknown option `\-\-cmd\-strace'. - (Thanks to Juho Niemel"a) +.RS 2 +.ie n .IP "* Fix for unknown option `""\-\-cmd\-strace""'. (Thanks to Juho Niemelä)" 2 +.el .IP "* Fix for unknown option `\f(CW\-\-cmd\-strace\fR'. (Thanks to Juho Niemelä)" 2 +.IX Item "Fix for unknown option `--cmd-strace'. (Thanks to Juho Niemelä)" +.RE +.RS 2 +.RE +.IP "\fB2011/11/10 v0.8\fR" 2 +.IX Item "2011/11/10 v0.8" +.RS 2 +.IP "* Remove colon from drive specification when making directories." 2 +.IX Item "Remove colon from drive specification when making directories." +.ie n .IP "* Option ""\-\-(no)texhash"" added." 2 +.el .IP "* Option \f(CW\-\-(no)texhash\fR added." 2 +.IX Item "Option --(no)texhash added." +.IP "* Some support for MiKTeX (thanks Ulrike Fischer)." 2 +.IX Item "Some support for MiKTeX (thanks Ulrike Fischer)." +.IP "* Various fixes in the generation of the documentation." 2 +.IX Item "Various fixes in the generation of the documentation." +.ie n .IP "* Options ""\-\-exclude\-ext""\fR and \f(CW""\-\-version"" added." 2 +.el .IP "* Options \f(CW\-\-exclude\-ext\fR and \f(CW\-\-version\fR added." 2 +.IX Item "Options --exclude-ext and --version added." +.RE +.RS 2 +.RE diff --git a/Master/texmf/doc/man/man1/mkjobtexmf.man1.pdf b/Master/texmf/doc/man/man1/mkjobtexmf.man1.pdf Binary files differindex a1ce2a2860e..bd42549a2cf 100644 --- a/Master/texmf/doc/man/man1/mkjobtexmf.man1.pdf +++ b/Master/texmf/doc/man/man1/mkjobtexmf.man1.pdf diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 1f068f3c7ad..65989546672 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2036,7 +2036,7 @@ $standardxmt='\.xmt'; 'mathspic' => '^mathspic\.pl$', 'mf2pt1' => '\.pl$', 'mkgrkindex' => 'mkgrkindex$', - 'mkjobtexmf' => '\.pl$', + 'mkjobtexmf' => 'mkjobtexmf\.pl$', 'musixtex' => '\.lua$', 'pdfcrop' => '\.pl$', 'pdfjam' => 'pdf[^.]*$', |