mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 02:25:40 +00:00
f94279195c
* makefile: Add parser to build (for install only) * parser/makefile: Add distclean target. * parser/gapi.pl: Forgot to add this. * api/: Replace APIs with correctly generated ones. svn path=/trunk/gtk-sharp/; revision=6827
43 lines
686 B
Perl
Executable file
43 lines
686 B
Perl
Executable file
#!/usr/bin/perl -w
|
|
|
|
if ($ARGV[0] && $ARGV[1]) {
|
|
open INFILE, $ARGV[0];
|
|
$outdir = $ARGV[1];
|
|
} else {
|
|
print "Usage: gapi.pl <sources_file> <out_dir>\n";
|
|
exit 0;
|
|
}
|
|
|
|
@srcs = ();
|
|
%files = ();
|
|
|
|
while (<INFILE>)
|
|
{
|
|
chomp;
|
|
my @entry = split /\s+/;
|
|
push @srcs, \@entry;
|
|
|
|
$ns = $entry[1];
|
|
if (not $files{$ns}) {
|
|
$files{$ns} = lc ($ns) . "-api.xml";
|
|
}
|
|
}
|
|
|
|
foreach $ns (keys (%files)) {
|
|
unlink $files{$ns};
|
|
}
|
|
|
|
foreach $entry (@srcs) {
|
|
($dir, $ns, $lib) = @$entry;
|
|
print "hi $ns\n";
|
|
$file = $files{$ns};
|
|
system ("gapi_pp.pl $dir | gapi2xml.pl $ns $file $lib");
|
|
}
|
|
|
|
foreach $ns (keys (%files)) {
|
|
$file = $files{$ns};
|
|
system ("gapi_format_xml $file $outdir/$file");
|
|
unlink $file;
|
|
}
|
|
|