diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2007-02-12 14:37:15 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2007-02-12 14:37:15 +0000 |
commit | 7364c5645f3e0892f236404cf4d4793fcb7adfbe (patch) | |
tree | 6de0cb69f780002f1d940465681974ddf916a368 /ACE/bin/doxygen-convert-h.pl | |
parent | 499dcc8c1bbe8dfe80c711abf4edfec37ad92166 (diff) | |
download | ATCD-7364c5645f3e0892f236404cf4d4793fcb7adfbe.tar.gz |
ChangeLogTag: Mon Feb 12 14:35:25 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'ACE/bin/doxygen-convert-h.pl')
-rwxr-xr-x | ACE/bin/doxygen-convert-h.pl | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/ACE/bin/doxygen-convert-h.pl b/ACE/bin/doxygen-convert-h.pl index 3fcfc64abe0..d8d84370059 100755 --- a/ACE/bin/doxygen-convert-h.pl +++ b/ACE/bin/doxygen-convert-h.pl @@ -10,13 +10,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # (Search for @todo in this script) use File::Copy; +use FileHandle; use Getopt::Std; ############################################################################## # Parse the options if (!getopts ('dDhsu') || $opt_h) { - print "doxygen-convert-h.pl [-dDhsu] filename\n"; + print "doxygen-convert-h.pl [-dDhsu] filenames or directories\n"; print "\n"; print " -d debug script\n"; print " -D really verbose debug\n"; @@ -34,12 +35,48 @@ $opt_d = 1 if (defined $opt_D); @files = (); +sub recursive_find { + my($file) = shift; + my(@rfiles) = (); + my($fh) = new FileHandle(); + + if (opendir($fh, $file)) { + foreach my $f (grep(!/^\.\.?$/, readdir($fh))) { + if ($f ne '.svn') { + my($full) = "$file/$f"; + if (-d $full) { + push(@rfiles, recursive_find($full)); + } + else { + push(@rfiles, $full) + ## If we want to limit the recursive find to "source" files, + ## un-comment this line : + ##if ($f =~ /\.(h|hxx|hpp|hh|inl|cpp|cxx|cc|c|C)$/) + ; + } + } + } + closedir($fh); + } + + return @rfiles; +} + foreach $arg (@ARGV) { my @results = glob $arg; if ($#results < 0) { print STDERR "File not Found: $arg\n" } - push @files, @results; + else { + foreach my $result (@results) { + if (-d $result) { + push(@files, recursive_find($result)); + } + else { + push(@files, $results); + } + } + } } ############################################################################## |