Skip to content

Commit

Permalink
scripts/get_feat.pl: allow output the parsed file names
Browse files Browse the repository at this point in the history
Such output could be helpful while debugging it, but its main
goal is to tell kernel_feat.py about what files were used
by the script. Thie way, kernel_feat.py can add those as
documentation dependencies.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Link: https://lore.kernel.org/r/11b438ee01e00c866f5ea197d6aecc26e9f86945.1648290305.git.mchehab@kernel.org
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
mchehab authored and Jonathan Corbet committed Mar 28, 2022
1 parent d987d5a commit 01096e5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/get_feat.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
my $debug;
my $arch;
my $feat;
my $enable_fname;

my $basename = abs_path($0);
$basename =~ s,/[^/]+$,/,;
Expand All @@ -31,6 +32,7 @@
'arch=s' => \$arch,
'feat=s' => \$feat,
'feature=s' => \$feat,
"enable-fname" => \$enable_fname,
man => \$man
) or pod2usage(2);

Expand Down Expand Up @@ -95,6 +97,10 @@ sub parse_feat {
return if ($file =~ m,($prefix)/arch-support.txt,);
return if (!($file =~ m,arch-support.txt$,));

if ($enable_fname) {
printf ".. FILE %s\n", abs_path($file);
}

my $subsys = "";
$subsys = $2 if ( m,.*($prefix)/([^/]+).*,);

Expand Down Expand Up @@ -580,6 +586,11 @@ =head1 OPTIONS
Changes the location of the Feature files. By default, it uses
the Documentation/features directory.
=item B<--enable-fname>
Prints the file name of the feature files. This can be used in order to
track dependencies during documentation build.
=item B<--debug>
Put the script in verbose mode, useful for debugging. Can be called multiple
Expand Down

0 comments on commit 01096e5

Please sign in to comment.