Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / bin / regenerate_exports.pl
blobb753a44a8818ae631ac007d62cb1f2fe775a9973
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # Goes through ACE/TAO and replaces
7 use File::Find;
8 use Cwd;
10 $args = '';
11 $root = cwd.'/';
13 while ($#ARGV >= 0) {
14 $args = $args . ' ' . shift @ARGV;
17 # wanted is only used for the File::Find
18 sub wanted
20 my $file = $File::Find::name;
22 $file =~ s/\.\//$root/;
24 if ($File::Find::name =~ /\_export\.h$/i) {
25 my $flag = 0;
26 my $name = '';
28 if (!open (FILE, $file)) {
29 print STDERR "Error: Could not open $file\n";
32 while (<FILE>) {
33 $flag = 1 if ((/generate_export/ || /GenExportH/) && $flag == 0);
34 $name = $1 if (/define (\w*)_Export/);
37 if ($flag == 1) {
38 print "Regenerating: $file\n";
39 if ($OSNAME eq 'MSWIn32') {
40 $file =~ s/\//\\/g;
42 system ("perl -S generate_export_file.pl $args $name > $file");
44 else {
45 print "Skipping: $file\n";
47 close FILE;
52 find (\&wanted, ".");