mirror of
https://gitee.com/bianbu-linux/linux-6.6-fh
synced 2025-04-25 22:57:36 -04:00
docs: Kbuild/Makefile: allow check for missing docs at build time
While this doesn't make sense for production Kernels, in order to avoid regressions when documents are touched, let's add a check target at the make file. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
3f9564e680
commit
b1663d7e3a
4 changed files with 29 additions and 0 deletions
|
@ -22,9 +22,16 @@ $scriptname =~ s,.*/([^/]+/),$1,;
|
|||
# Parse arguments
|
||||
my $help = 0;
|
||||
my $fix = 0;
|
||||
my $warn = 0;
|
||||
|
||||
if (! -d ".git") {
|
||||
printf "Warning: can't check if file exists, as this is not a git tree";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
GetOptions(
|
||||
'fix' => \$fix,
|
||||
'warn' => \$warn,
|
||||
'h|help|usage' => \$help,
|
||||
);
|
||||
|
||||
|
@ -139,6 +146,8 @@ while (<IN>) {
|
|||
if (!($ref =~ m/(scripts|Kconfig|Kbuild)/)) {
|
||||
$broken_ref{$ref}++;
|
||||
}
|
||||
} elsif ($warn) {
|
||||
print STDERR "Warning: $f references a file that doesn't exist: $fulref\n";
|
||||
} else {
|
||||
print STDERR "$f: $fulref\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue