[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Derek.texinfo
From: |
Akim Demaille |
Subject: |
Derek.texinfo |
Date: |
12 Apr 2001 16:06:09 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
Hi Derek, I think the patch below addresses your issue. At least, it
works on my CVS CVS. You can remove your hack :)
Tom, I'm applying it as it's a bug fix, but of course, I can revert
whatever you want me to.
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (&scan_texinfo_file): Catch @cindex and the like,
but also @deffn and so on which push data in indexes.
Reported by Derek R. Price.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1036
diff -u -u -r1.1036 automake.in
--- automake.in 2001/04/12 09:13:45 1.1036
+++ automake.in 2001/04/12 14:03:56
@@ -2467,13 +2467,46 @@
sub scan_texinfo_file
{
my ($filename) = @_;
+
+ # These are always created, no matter whether indexes are used or not.
my @clean_suffixes = ('aux', 'dvi', 'log', 'ps', 'toc',
# grep new.*index texinfo.tex
'cp', 'fn', 'ky', 'vr', 'tp', 'pg');
+ # There are predefined indexes which don't follow the regular rules.
+ my %predefined_index =
+ (
+ # cindex => *.cps
+ 'c' => 'cps', 'f' => 'fns', 'k' => 'kys',
+ 'v' => 'vrs', 't' => 'tps', 'p' => 'pgs'
+ );
+
+ # There are commands which include a hidden index command.
+ my %hidden_index =
+ (
+ # deffn => *.fns.
+ 'fn' => 'fns', 'un' => 'fns',
+ 'typefn' => 'fns', 'typefun' => 'fns',
+ 'mac' => 'fns', 'spec' => 'fns',
+ 'op' => 'fns', 'typeop' => 'fns',
+ 'method' => 'fns', 'typemethod' => 'fns',
+
+ 'vr' => 'vrs', 'var' => 'vrs',
+ 'typevr' => 'vrs', 'typevar' => 'vrs',
+ 'opt' => 'vrs',
+ 'cv' => 'vrs',
+ 'ivar' => 'vrs', 'typeivar' => 'vrs',
+
+ 'tp' => 'tps'
+ );
+
+ # Indexes stored into another one. In this case, the *.??s file
+ # is not created.
+ my @syncodeindexes = ();
+
my $texi = new IO::File ("< $filename");
if (! $texi)
- {
+ {
&am_error ("couldn't open `$filename': $!");
return '';
}
@@ -2498,14 +2531,31 @@
{
$vfile = $1;
}
- elsif (/address@hidden (\w*)/)
+
+ # Try to find what are the indexes which are used.
+
+ # Creating a new category of index.
+ elsif (/address@hidden (\w+)/)
{
push @clean_suffixes, $1;
+ }
+
+ # Storing in a predefined index.
+ elsif (/^\@([cfkvtp])index /)
+ {
+ push @clean_suffixes, $predefined_index{$1};
}
- elsif (/address@hidden \w+ (\w*)/)
+ elsif (/address@hidden(\w+) /)
{
- push @clean_suffixes, "$1s";
+ push @clean_suffixes, $hidden_index{$1};
}
+
+ # Merging an index into an another.
+ elsif (/address@hidden (\w+) \w+/)
+ {
+ push @syncodeindexes, "$1s";
+ }
+
}
$texi->close;
@@ -2518,7 +2568,8 @@
my $infobase = basename ($filename);
$infobase =~ s/\.te?xi(nfo)?$//;
my %clean_files;
- grep { $clean_files{"$infobase.$_"} = 1 } @clean_suffixes;
+ grep { $clean_files{"$infobase.$_"} = 1 } @clean_suffixes;
+ grep { delete $clean_files{"$infobase.$_"} } @syncodeindexes;
return ($outfile, $vfile, (sort keys %clean_files));
}
- Derek.texinfo,
Akim Demaille <=