summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ChangeLog7
-rwxr-xr-xACE/bin/doxygen-convert-h.pl41
2 files changed, 46 insertions, 2 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 62d5308b106..6646d60bda8 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,10 @@
+Mon Feb 12 14:35:25 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/doxygen-convert-h.pl:
+
+ Allow filenames or directories. If a directory is passed, it is
+ recursively searched for any file.
+
Mon Feb 12 13:57:06 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
* etc/*.doxygen:
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);
+ }
+ }
+ }
}
##############################################################################