<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">eval '(exit $?0)' &amp;&amp; eval 'exec perl -S $0 ${1+"$@"}'
    &amp; eval 'exec perl -S $0 $argv:q'
    if 0;

# regenerate_exports.pl,v 1.1 2000/10/09 22:48:45 brunsch Exp
# Goes through ACE/TAO and replaces 

use File::Find;
use Cwd;

$args = '';
$root = cwd.'/';

while ($#ARGV &gt;= 0) {
  $args = $args . ' ' . shift @ARGV;
}

# wanted is only used for the File::Find
sub wanted
{
    my $file = $File::Find::name;

    $file =~ s/\.\//$root/;

    if ($File::Find::name =~ /\_export\.h$/i) {
        my $flag = 0;
        my $name = '';

        if (!open (FILE, $file)) {
            print STDERR "Error: Could not open $file\n";
        }

        while (&lt;FILE&gt;) {
            $flag = 1 if ((/generate_export/ || /GenExportH/) &amp;&amp; $flag == 0);
            $name = $1 if (/define (\w*)_Export/);
        }

        if ($flag == 1) {
            print "Regenerating: $file\n";
            if ($OSNAME eq 'MSWIn32') { 
                $file =~ s/\//\\/g;
            }
            system ("perl -S generate_export_file.pl $args $name &gt; $file");
        }
        else {
            print "Skipping:     $file\n";
        }
        close FILE;
    }
}


find (\&amp;wanted, ".");

</pre></body></html>