summaryrefslogtreecommitdiff
path: root/ACE/bin/doxygen-convert-h.pl
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-02-12 14:37:15 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-02-12 14:37:15 +0000
commit05a4fa5b354821ecfc686887a75ac07f7fe202d8 (patch)
tree6de0cb69f780002f1d940465681974ddf916a368 /ACE/bin/doxygen-convert-h.pl
parent4ad893e12291b38e05d033824fcc3229d4550796 (diff)
downloadATCD-05a4fa5b354821ecfc686887a75ac07f7fe202d8.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-xACE/bin/doxygen-convert-h.pl41
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);
+ }
+ }
+ }
}
##############################################################################