[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ed42655e3d721df82e6f358f34cb66b7485b4f09.1603893146.git.mchehab+huawei@kernel.org>
Date: Wed, 28 Oct 2020 15:23:06 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
"Jonathan Corbet" <corbet@....net>, linux-kernel@...r.kernel.org
Subject: [PATCH 08/33] scripts: get_abi.pl: prevent duplicated file names
The same filename may exist on multiple directories within
ABI. Create separate entries at the internal database for
each of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
scripts/get_abi.pl | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index 97a1455789f2..f2c8a888148b 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -65,7 +65,10 @@ sub parse_abi {
my $name = $file;
$name =~ s,.*/,,;
- my $nametag = "File $name";
+ my $fn = $file;
+ $fn =~ s,Documentation/ABI/,,;
+
+ my $nametag = "File $fn";
$data{$nametag}->{what} = "File $name";
$data{$nametag}->{type} = "File";
$data{$nametag}->{file} = $name;
@@ -320,16 +323,18 @@ sub output_rest {
my $fileref = "abi_file_".$path;
if ($type eq "File") {
- my $bar = $w;
- $bar =~ s/./-/g;
-
print ".. _$fileref:\n\n";
- print "$w\n$bar\n\n";
} else {
print "Defined on file :ref:`$f <$fileref>`\n\n";
}
}
+ if ($type eq "File") {
+ my $bar = $w;
+ $bar =~ s/./-/g;
+ print "$w\n$bar\n\n";
+ }
+
my $desc = "";
$desc = $data{$what}->{description} if (defined($data{$what}->{description}));
$desc =~ s/\s+$/\n/;
--
2.26.2
Powered by blists - more mailing lists