diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-26 11:27:19 +0100 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2022-03-28 13:53:46 -0600 |
commit | 01096e5cfe3ce5b26ccc933ad20401e24074a76a (patch) | |
tree | e59ec1b2ee0630340ff7fffdff13368212989c41 /scripts/get_feat.pl | |
parent | d987d5ae51ecfa75e61f4de56c7e2bb77be57fea (diff) | |
download | linux-01096e5cfe3ce5b26ccc933ad20401e24074a76a.tar.gz linux-01096e5cfe3ce5b26ccc933ad20401e24074a76a.tar.bz2 linux-01096e5cfe3ce5b26ccc933ad20401e24074a76a.zip |
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>
Diffstat (limited to 'scripts/get_feat.pl')
-rwxr-xr-x | scripts/get_feat.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/get_feat.pl b/scripts/get_feat.pl index 457712355676..76cfb96b59b6 100755 --- a/scripts/get_feat.pl +++ b/scripts/get_feat.pl @@ -13,6 +13,7 @@ my $man; my $debug; my $arch; my $feat; +my $enable_fname; my $basename = abs_path($0); $basename =~ s,/[^/]+$,/,; @@ -31,6 +32,7 @@ GetOptions( 'arch=s' => \$arch, 'feat=s' => \$feat, 'feature=s' => \$feat, + "enable-fname" => \$enable_fname, man => \$man ) or pod2usage(2); @@ -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)/([^/]+).*,); @@ -580,6 +586,11 @@ Output features for a single specific feature. 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 |