Commit 9a4fac6a authored by Robert Ricci's avatar Robert Ricci
Browse files

Fix the target for generating the perl wrappers for the event library

with SWIG, and update the README explaining how to use it.
parent 3bca18fb
......@@ -56,9 +56,17 @@ util.o: util.c
# These three targets are for the perl binding to the event system
#$(SRCDIR)/event_wrap.c: event.i event.c
# swig -exportall -dnone -perl5 -shadow -I$(SRCDIR) $(SRCDIR)/event.i
# cat $(SRCDIR)/ >>
# SWIG has some horribly annyonying behavior and bugs that we have to work
# around, so we normally check the SWIG-generated code into CVS. This is a
# maintainer target for regenerating the SWIG wrappers - see README for full
# instructions
swig-wrappers: event.i event.c
swig1.1 -exportall -dnone -perl5 -shadow -I$(SRCDIR) $(SRCDIR)/event.i
cat $(SRCDIR)/ >>
mv $(SRCDIR)
event_wrap.o: $(SRCDIR)/event_wrap.c
$(CC) -c $(CFLAGS_NOWARN) -I/usr/libdata/perl/5.00503/mach/CORE $<
......@@ -5,3 +5,21 @@ versions. Threaded clients require a bunch of extra link goo, but at
the moment the only threaded client is the event scheduler. If you
try and use the threaded API without the proper link, the library will
print an error message and quit.
* SWIG perl library wrappers for the event system
To generate new version of the perl wrappers for the C event library, do the
1) In your object tree (in event/lib), run 'gmake swig-wrappers'. Note: this
will update and event_wrap.c in your source tree.
2) Edit the new version of in your source tree, to work around a SWIG
bug. Find the line near the beginning of the file that starts with @EXPORT.
Move it up a few lines, to right above the 'package eventc;' line.
3) Test with some of the event/examples programs to make sure steps 1 and 2
NOTE: Right now, we are intentionally using an old version of SWIG: 1.1 instead
of the current 1.3 . 1.3 seems to have some bugs that are harder to work around
than version 1.1's bug noted above. The major one is a problem with the
handling of typedefs. Probably, with enough work, we could get 1.3 to work, but
there's no incentive to spend that time just yet.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment