mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: remove existing doxygen html/ in background
This commit is contained in:
54
doc/tools/find-templateInComments
Executable file
54
doc/tools/find-templateInComments
Executable file
@ -0,0 +1,54 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use File::Find ();
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# Script
|
||||
# find-templateInComments
|
||||
#
|
||||
# Description
|
||||
# Search for *.[CH] files with '<xxx>' tags within the first comment block
|
||||
# These likely need to be quoted as '\<xxx\>' for Doxygen.
|
||||
# - print filename and lineNumber
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
my $re_filespec = qr{^.+\.[CH]$};
|
||||
|
||||
# for the convenience of &wanted calls, including -eval statements:
|
||||
## use vars qw( *name *dir *prune );
|
||||
## *name = *File::Find::name;
|
||||
## *dir = *File::Find::dir;
|
||||
## *prune = *File::Find::prune;
|
||||
|
||||
sub wanted {
|
||||
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
|
||||
return;
|
||||
}
|
||||
|
||||
local @ARGV = $_;
|
||||
while (<>) {
|
||||
if (m{^\s*/\*} ... m{\*/})
|
||||
{
|
||||
if (m{\<\s*\w+\s*\>}) {
|
||||
print "$File::Find::name line=$.\n";
|
||||
}
|
||||
|
||||
if (m{\*/}) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close ARGV;
|
||||
}
|
||||
|
||||
|
||||
## Traverse desired filesystems
|
||||
for my $dir (@ARGV) {
|
||||
no warnings 'File::Find';
|
||||
warn "(**) checking '$dir' ...\n";
|
||||
File::Find::find( { wanted => \&wanted }, $dir );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user