Skip to content

Commit 01096e5

Browse files
mchehabJonathan Corbet
authored andcommitted
scripts/get_feat.pl: allow output the parsed file names
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 <mchehab@kernel.org> Link: https://lore.kernel.org/r/11b438ee01e00c866f5ea197d6aecc26e9f86945.1648290305.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent d987d5a commit 01096e5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

scripts/get_feat.pl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
my $debug;
1414
my $arch;
1515
my $feat;
16+
my $enable_fname;
1617

1718
my $basename = abs_path($0);
1819
$basename =~ s,/[^/]+$,/,;
@@ -31,6 +32,7 @@
3132
'arch=s' => \$arch,
3233
'feat=s' => \$feat,
3334
'feature=s' => \$feat,
35+
"enable-fname" => \$enable_fname,
3436
man => \$man
3537
) or pod2usage(2);
3638

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

100+
if ($enable_fname) {
101+
printf ".. FILE %s\n", abs_path($file);
102+
}
103+
98104
my $subsys = "";
99105
$subsys = $2 if ( m,.*($prefix)/([^/]+).*,);
100106

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

0 commit comments

Comments
 (0)