2002-08-20 Rachel Hestilow <hestilow@ximian.com>

* 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
This commit is contained in:
Rachel Hestilow 2002-08-20 20:35:42 +00:00
parent c220e2c8e6
commit f94279195c
9 changed files with 15249 additions and 28 deletions

View File

@ -1,3 +1,11 @@
2002-08-20 Rachel Hestilow <hestilow@ximian.com>
* 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.
2002-08-20 Rachel Hestilow <hestilow@ximian.com> 2002-08-20 Rachel Hestilow <hestilow@ximian.com>
* README.generator: Added docs on using the generator. * README.generator: Added docs on using the generator.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
EXTRA_DIRS = NATIVE_DIRS = glue parser
DIRS=generator api glib pango atk gdk art gtk glade gnome sample DIRS=generator api glib pango atk gdk art gtk glade gnome sample
ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT))) ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT)))
@ -23,15 +23,19 @@ binding:
done; done;
native: native:
(cd glue; make) || exit 1; for i in $(NATIVE_DIRS); do \
(cd $$i; make) || exit 1;\
done
clean: clean:
for i in glue $(DIRS); do \ for i in $(NATIVE_DIRS) $(DIRS); do \
(cd $$i; make clean) || exit 1; \ (cd $$i; make clean) || exit 1; \
done; done;
distclean: clean distclean: clean
(cd glue; make distclean) || exit 1; for i in $(NATIVE_DIRS); do \
(cd $$i; make distclean) || exit 1;\
done
for i in $(DIRS); do \ for i in $(DIRS); do \
rm -f $$i/Makefile; \ rm -f $$i/Makefile; \
done done
@ -45,5 +49,7 @@ install-binding:
done; done;
install-native: install-native:
(cd glue; make install) || exit 1; \ for i in $(NATIVE_DIRS); do \
(cd $$i; make install) || exit 1;\
done

View File

@ -1,23 +0,0 @@
#!/usr/bin/perl -w
$file = "gtkapi.xml";
unlink ($file);
%srcs = ( "atk-1.0.2/atk" => "Atk:atk-1.0",
"pango-1.0.3/pango" => "Pango:pango-1.0",
"gtk+-2.0.5/gdk" => "Gdk:gdk-x11-2.0",
"gtk+-2.0.5/gdk-pixbuf" => "Gdk:gdk_pixbuf-2.0",
"gtk+-2.0.5/gtk" => "Gtk:gtk-x11-2.0",
"libgnome-2.0.1/libgnome" => "Gnome:gnome-2",
"libgnomecanvas-2.0.1/libgnomecanvas" => "Gnome:gnomecanvas-2",
"libgnomeui-2.0.1/libgnomeui" => "Gnome:gnomeui-2",
"gtkhtml/src" => "Gtk:gtkhtml-3.0",
"libglade-2.0.0/glade" => "Glade:glade-2.0",
"libart_lgpl-2.3.10" => "Art:art_lgpl");
foreach $dir (keys %srcs) {
($ns, $lib) = split (/:/, $srcs{$dir});
system ("./gapi_pp.pl $dir | ./gapi2xml.pl $ns $file $lib");
}

42
parser/gapi.pl Executable file
View File

@ -0,0 +1,42 @@
#!/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;
}

View File

@ -13,6 +13,9 @@ gapi_format_xml: formatXml.c
clean: clean:
rm -f gapi_format_xml rm -f gapi_format_xml
distclean:
rm -f gapi_format_xml
prefix=/usr prefix=/usr
install: all install: all

View File

@ -1,4 +1,6 @@
Put source modules here to parse for the gtkapi.xml file. Put source modules here to parse for the gtkapi.xml file.
Directories are now listed in gtk-sharp.sources, you need to update this when
adding an API.
Currently supported: Currently supported:
@ -14,3 +16,4 @@ gtkhtml: cvs branch gnome-2-port files gtkhtml.[ch], gtkhtml-types.h,
gtkhtml-enums.h, gtkhtml-stream.[ch] gtkhtml-enums.h, gtkhtml-stream.[ch]
libglade-2.0.0 libglade-2.0.0
libart_lgpl-2.3.10 libart_lgpl-2.3.10