[xbuild] Add property $(SkipCopyUnchangedFiles)
[mono.git] / msvc / create-windef.pl
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 my $outfile = shift || usage ();
6 my @symbols = ();
7 my %excludes = ();
8 my $cmd = "nm -D ../mono/mini/.libs/libmono-2.0.so";
9
10 @excludes {qw(
11         mono_class_setup_vtable_general_new mono_debugger_init mono_debugger_main
12         mono_once mono_pthread_key_for_tls
13         mono_gc_pthread_create mono_gc_pthread_detach mono_gc_pthread_join
14 )} = ();
15
16 open (SYMS, "$cmd |") || die "Cannot run \$cmd': $!\n";
17 while (<SYMS>) {
18         next unless / T (mono_.*)/;
19         next if exists $excludes {$1};
20         push @symbols, $1;
21 }
22 close (SYMS);
23 push @symbols, "MonoFixupCorEE";
24 @symbols = sort @symbols;
25
26 open (OUT, ">$outfile") || die "Cannot open '$outfile': $!\n";
27 print OUT "; file generated by create-windef.pl\n";
28 print OUT "LIBRARY mono-2.0.dll\nEXPORTS\n";
29 print OUT join ("\n", @symbols);
30 print OUT "\n";
31
32 close (OUT);
33
34 sub usage {
35         print "Usage: create-windef.pl output_file\n";
36         exit (1);
37 }
38