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:
parent
d67b3e62b9
commit
d69268abbf
11 changed files with 43 additions and 17 deletions
11
ChangeLog
11
ChangeLog
|
@ -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>
|
2003-11-05 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
* gtk/ITreeNode.cs : make Parent readonly
|
* gtk/ITreeNode.cs : make Parent readonly
|
||||||
|
|
|
@ -57,6 +57,10 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono)
|
||||||
|
|
||||||
|
MONO=`which mono`
|
||||||
|
AC_SUBST(MONO)
|
||||||
|
|
||||||
## Versions of dependencies
|
## Versions of dependencies
|
||||||
GNOME_REQUIRED_VERSION=2.0.0
|
GNOME_REQUIRED_VERSION=2.0.0
|
||||||
|
@ -111,6 +115,7 @@ AC_OUTPUT([
|
||||||
glue/Makefile
|
glue/Makefile
|
||||||
parser/Makefile
|
parser/Makefile
|
||||||
generator/Makefile
|
generator/Makefile
|
||||||
|
generator/gapi-codegen
|
||||||
glib/Makefile
|
glib/Makefile
|
||||||
pango/Makefile
|
pango/Makefile
|
||||||
atk/Makefile
|
atk/Makefile
|
||||||
|
@ -132,6 +137,7 @@ sample/Makefile
|
||||||
sample/rsvg/Makefile
|
sample/rsvg/Makefile
|
||||||
gtk-sharp.pc
|
gtk-sharp.pc
|
||||||
parser/gapi.pc
|
parser/gapi.pc
|
||||||
|
parser/gapi-fixup
|
||||||
Makefile
|
Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
*.exe
|
*.exe
|
||||||
*.xml
|
*.xml
|
||||||
generated-stamp
|
generated-stamp
|
||||||
|
gapi-codegen
|
||||||
Makefile
|
Makefile
|
||||||
|
|
||||||
|
|
|
@ -2,22 +2,21 @@ MCS=mcs
|
||||||
RUNTIME=mono
|
RUNTIME=mono
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
all: linux
|
all: gapi_codegen.exe
|
||||||
|
|
||||||
windows: *.cs
|
|
||||||
$(CSC) /unsafe /out:codegen.exe *.cs
|
|
||||||
./codegen gtkapi.xml
|
|
||||||
|
|
||||||
linux: gapi_codegen.exe
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.exe
|
rm -f *.exe
|
||||||
|
|
||||||
|
distclean:
|
||||||
|
rm gapi-codegen
|
||||||
|
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
|
install=@INSTALL@
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
../mkinstalldirs $(DESTDIR)$(prefix)/bin && \
|
../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
|
gapi_codegen.exe: *.cs
|
||||||
$(MCS) --unsafe -o gapi_codegen.exe -r System.Xml *.cs
|
$(MCS) --unsafe -o gapi_codegen.exe -r System.Xml *.cs
|
||||||
|
|
|
@ -56,6 +56,7 @@ namespace GtkSharp.Generation {
|
||||||
AddType (new SimpleGen ("guint1", "bool"));
|
AddType (new SimpleGen ("guint1", "bool"));
|
||||||
AddType (new SimpleGen ("gpointer", "IntPtr"));
|
AddType (new SimpleGen ("gpointer", "IntPtr"));
|
||||||
AddType (new SimpleGen ("guchar", "byte"));
|
AddType (new SimpleGen ("guchar", "byte"));
|
||||||
|
AddType (new SimpleGen ("short", "short"));
|
||||||
AddType (new SimpleGen ("long", "long"));
|
AddType (new SimpleGen ("long", "long"));
|
||||||
AddType (new SimpleGen ("ulong", "ulong"));
|
AddType (new SimpleGen ("ulong", "ulong"));
|
||||||
AddType (new SimpleGen ("gulong", "ulong"));
|
AddType (new SimpleGen ("gulong", "ulong"));
|
||||||
|
|
2
generator/gapi-codegen.in
Executable file
2
generator/gapi-codegen.in
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
@MONO@ @prefix@/bin/gapi_codegen.exe "$@"
|
|
@ -1,4 +1,5 @@
|
||||||
Makefile
|
Makefile
|
||||||
gapi_format_xml
|
gapi_format_xml
|
||||||
|
gapi-fixup
|
||||||
*.pc
|
*.pc
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ MCS=mcs
|
||||||
SCRIPTS = \
|
SCRIPTS = \
|
||||||
gapi.pl \
|
gapi.pl \
|
||||||
gapi_pp.pl \
|
gapi_pp.pl \
|
||||||
|
gapi-fixup \
|
||||||
gapi-parser \
|
gapi-parser \
|
||||||
gapi2xml.pl
|
gapi2xml.pl
|
||||||
|
|
||||||
|
@ -29,16 +30,17 @@ distclean:
|
||||||
rm -f gapi.pc
|
rm -f gapi.pc
|
||||||
|
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
|
install=@INSTALL@
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
for i in $(SCRIPTS) gapi_format_xml gapi-fixup.exe; do \
|
for i in $(SCRIPTS) gapi_format_xml gapi-fixup.exe; do \
|
||||||
../mkinstalldirs $(DESTDIR)$(prefix)/bin && \
|
../mkinstalldirs $(DESTDIR)$(prefix)/bin && \
|
||||||
cp $$i $(DESTDIR)$(prefix)/bin; \
|
$(install) $$i $(DESTDIR)$(prefix)/bin; \
|
||||||
done
|
done
|
||||||
for i in $(MODULES); do \
|
for i in $(MODULES); do \
|
||||||
../mkinstalldirs $(DESTDIR)$(prefix)/share/perl5/GAPI && \
|
../mkinstalldirs $(DESTDIR)$(prefix)/share/perl5/GAPI && \
|
||||||
cp $$i $(DESTDIR)$(prefix)/share/perl5/GAPI; \
|
$(install) $$i $(DESTDIR)$(prefix)/share/perl5/GAPI; \
|
||||||
done
|
done
|
||||||
../mkinstalldirs $(DESTDIR)$(prefix)/lib/pkgconfig && \
|
../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
2
parser/gapi-fixup.in
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
@MONO@ @prefix@/bin/gapi-fixup.exe "$@"
|
|
@ -84,8 +84,9 @@ while ($line = <STDIN>) {
|
||||||
$fdef .= $line;
|
$fdef .= $line;
|
||||||
$fdef =~ s/\n\s+//g;
|
$fdef =~ s/\n\s+//g;
|
||||||
$fpdefs{$fname} = $fdef;
|
$fpdefs{$fname} = $fdef;
|
||||||
} elsif ($line =~ /struct\s+(\w+)/) {
|
} elsif ($line =~ /^(private)?struct\s+(\w+)/) {
|
||||||
$sname = $1;
|
next if ($line =~ /;/);
|
||||||
|
$sname = $2;
|
||||||
$sdef = $line;
|
$sdef = $line;
|
||||||
while ($line = <STDIN>) {
|
while ($line = <STDIN>) {
|
||||||
$sdef .= $line;
|
$sdef .= $line;
|
||||||
|
@ -192,17 +193,17 @@ foreach $cname (sort(keys(%edefs))) {
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach $val (@vals) {
|
foreach $val (@vals) {
|
||||||
if ($val =~ /$common\_(\w+)\s*=\s*(\-?\d+.*)/) {
|
if ($val =~ /$common\_?(\w+)\s*=\s*(\-?\d+.*)/) {
|
||||||
$name = $1;
|
$name = $1;
|
||||||
if ($2 =~ /1u?\s*<<\s*(\d+)/) {
|
if ($2 =~ /1u?\s*<<\s*(\d+)/) {
|
||||||
$enumval = "1 << $1";
|
$enumval = "1 << $1";
|
||||||
} else {
|
} else {
|
||||||
$enumval = $2;
|
$enumval = $2;
|
||||||
}
|
}
|
||||||
} elsif ($val =~ /$common\_(\w+)/) {
|
} elsif ($val =~ /$common\_?(\w+)/) {
|
||||||
$name = $1; $enumval = "";
|
$name = $1; $enumval = "";
|
||||||
} else {
|
} else {
|
||||||
die "Unexpected enum value: $val\n";
|
die "Unexpected enum value: $val for common value $common\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$val_elem = addNameElem($enum_elem, 'member');
|
$val_elem = addNameElem($enum_elem, 'member');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
atk-1.2.4
|
atk-1.2.4
|
||||||
gstreamer-0.4.2
|
gstreamer-0.6.4
|
||||||
gtk+-2.2.2
|
gtk+-2.2.2
|
||||||
gtkhtml-3.0.8
|
gtkhtml-3.0.8
|
||||||
libart_lgpl-2.3.10
|
libart_lgpl-2.3.10
|
||||||
|
|
Loading…
Reference in a new issue