Mozilla/mozilla/tools/tests/ctor-dtor.pl
cyeh%netscape.com 162f7e0a0a fixed busted perl script by adding proper quoting. duh.
git-svn-id: svn://10.0.0.236/trunk@21965 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 19:43:40 +00:00

27 lines
505 B
Perl
Executable File

#!/usr/bin/perl
use Cwd;
$curdir = cwd();
open( LOG, ">ctor-dtor-report" ) || print "can't open $?\n";
@path_fields = split(/\//,$curdir);
pop(@path_fields);
pop(@path_fields);
$path = join ("/",@path_fields);
open (REPORT, "find $path -name \"*.o\" -print | xargs nm -Bno | egrep \"_GLOBAL_\.[ID]\" 2>&1 |" ) || die "open: $! \n";
while (<REPORT>) {
print $_;
print LOG $_;
}
close(REPORT);
if (-s "./ctor-dtor-report" > 0) {
print "Global Constructors\/Destructors Found" . "\n";
}