2003-11-07 Mike Kestner <mkestner@ximian.com>

* configure.in : add mono check.  expand wrapper scripts
	* generator/Makefile.in : use install. install a gapi-codegen wrapper.
	* generator/SymbolTable.cs : add SimpleGen for short
	* generator/gapi-codegen.in : new wrapper script in file.
	* parser/Makefile.in : use install. install a gapi-fixup wrapper.
	* generator/gapi-fixup.in : new wrapper script in file.
	* parser/gapi2xml.pl : deal with non-namespaced enums. ignore
	forward struct declarations.

svn path=/trunk/gtk-sharp/; revision=19712
This commit is contained in:
Mike Kestner 2003-11-07 18:14:35 +00:00
parent d67b3e62b9
commit d69268abbf
11 changed files with 43 additions and 17 deletions

View File

@ -1,3 +1,14 @@
2003-11-07 Mike Kestner <mkestner@ximian.com>
* configure.in : add mono check. expand wrapper scripts
* generator/Makefile.in : use install. install a gapi-codegen wrapper.
* generator/SymbolTable.cs : add SimpleGen for short
* generator/gapi-codegen.in : new wrapper script in file.
* parser/Makefile.in : use install. install a gapi-fixup wrapper.
* generator/gapi-fixup.in : new wrapper script in file.
* parser/gapi2xml.pl : deal with non-namespaced enums. ignore
forward struct declarations.
2003-11-05 Mike Kestner <mkestner@ximian.com>
* gtk/ITreeNode.cs : make Parent readonly

View File

@ -57,6 +57,10 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
fi
)
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono)
MONO=`which mono`
AC_SUBST(MONO)
## Versions of dependencies
GNOME_REQUIRED_VERSION=2.0.0
@ -111,6 +115,7 @@ AC_OUTPUT([
glue/Makefile
parser/Makefile
generator/Makefile
generator/gapi-codegen
glib/Makefile
pango/Makefile
atk/Makefile
@ -132,6 +137,7 @@ sample/Makefile
sample/rsvg/Makefile
gtk-sharp.pc
parser/gapi.pc
parser/gapi-fixup
Makefile
])

View File

@ -2,5 +2,6 @@
*.exe
*.xml
generated-stamp
gapi-codegen
Makefile

View File

@ -2,22 +2,21 @@ MCS=mcs
RUNTIME=mono
DESTDIR=
all: linux
windows: *.cs
$(CSC) /unsafe /out:codegen.exe *.cs
./codegen gtkapi.xml
linux: gapi_codegen.exe
all: gapi_codegen.exe
clean:
rm -f *.exe
distclean:
rm gapi-codegen
prefix=@prefix@
install=@INSTALL@
install: all
../mkinstalldirs $(DESTDIR)$(prefix)/bin && \
cp gapi_codegen.exe $(DESTDIR)$(prefix)/bin
$(install) gapi_codegen.exe $(DESTDIR)$(prefix)/bin && \
$(install) gapi-codegen $(DESTDIR)$(prefix)/bin
gapi_codegen.exe: *.cs
$(MCS) --unsafe -o gapi_codegen.exe -r System.Xml *.cs

View File

@ -56,6 +56,7 @@ namespace GtkSharp.Generation {
AddType (new SimpleGen ("guint1", "bool"));
AddType (new SimpleGen ("gpointer", "IntPtr"));
AddType (new SimpleGen ("guchar", "byte"));
AddType (new SimpleGen ("short", "short"));
AddType (new SimpleGen ("long", "long"));
AddType (new SimpleGen ("ulong", "ulong"));
AddType (new SimpleGen ("gulong", "ulong"));

2
generator/gapi-codegen.in Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
@MONO@ @prefix@/bin/gapi_codegen.exe "$@"

View File

@ -1,4 +1,5 @@
Makefile
gapi_format_xml
gapi-fixup
*.pc

View File

@ -7,6 +7,7 @@ MCS=mcs
SCRIPTS = \
gapi.pl \
gapi_pp.pl \
gapi-fixup \
gapi-parser \
gapi2xml.pl
@ -29,16 +30,17 @@ distclean:
rm -f gapi.pc
prefix=@prefix@
install=@INSTALL@
DESTDIR=
install: all
for i in $(SCRIPTS) gapi_format_xml gapi-fixup.exe; do \
../mkinstalldirs $(DESTDIR)$(prefix)/bin && \
cp $$i $(DESTDIR)$(prefix)/bin; \
$(install) $$i $(DESTDIR)$(prefix)/bin; \
done
for i in $(MODULES); do \
../mkinstalldirs $(DESTDIR)$(prefix)/share/perl5/GAPI && \
cp $$i $(DESTDIR)$(prefix)/share/perl5/GAPI; \
$(install) $$i $(DESTDIR)$(prefix)/share/perl5/GAPI; \
done
../mkinstalldirs $(DESTDIR)$(prefix)/lib/pkgconfig && \
cp gapi.pc $(DESTDIR)$(prefix)/lib/pkgconfig
$(install) -m 644 gapi.pc $(DESTDIR)$(prefix)/lib/pkgconfig

2
parser/gapi-fixup.in Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
@MONO@ @prefix@/bin/gapi-fixup.exe "$@"

View File

@ -84,8 +84,9 @@ while ($line = <STDIN>) {
$fdef .= $line;
$fdef =~ s/\n\s+//g;
$fpdefs{$fname} = $fdef;
} elsif ($line =~ /struct\s+(\w+)/) {
$sname = $1;
} elsif ($line =~ /^(private)?struct\s+(\w+)/) {
next if ($line =~ /;/);
$sname = $2;
$sdef = $line;
while ($line = <STDIN>) {
$sdef .= $line;
@ -192,17 +193,17 @@ foreach $cname (sort(keys(%edefs))) {
}
foreach $val (@vals) {
if ($val =~ /$common\_(\w+)\s*=\s*(\-?\d+.*)/) {
if ($val =~ /$common\_?(\w+)\s*=\s*(\-?\d+.*)/) {
$name = $1;
if ($2 =~ /1u?\s*<<\s*(\d+)/) {
$enumval = "1 << $1";
} else {
$enumval = $2;
}
} elsif ($val =~ /$common\_(\w+)/) {
} elsif ($val =~ /$common\_?(\w+)/) {
$name = $1; $enumval = "";
} else {
die "Unexpected enum value: $val\n";
die "Unexpected enum value: $val for common value $common\n";
}
$val_elem = addNameElem($enum_elem, 'member');

View File

@ -1,5 +1,5 @@
atk-1.2.4
gstreamer-0.4.2
gstreamer-0.6.4
gtk+-2.2.2
gtkhtml-3.0.8
libart_lgpl-2.3.10