* wrap/Makefile.am, wrap/spot.i: Move ...

* wrap/python/Makefile.am, wrap/python/spot.i: ... here.
* wrap/Makefile.am: New file.
* configure.ac: Output wrap/python/Makefile.
This commit is contained in:
Alexandre Duret-Lutz 2003-07-31 12:20:49 +00:00
parent bdd2be3366
commit 525cc01696
7 changed files with 34 additions and 25 deletions

9
wrap/python/.cvsignore Normal file
View file

@ -0,0 +1,9 @@
.deps
.libs
Makefile
Makefile.in
*.la
spot.py*
*.lo
*.loT
spot_wrap.cxx

18
wrap/python/Makefile.am Normal file
View file

@ -0,0 +1,18 @@
AM_CPPFLAGS = -I$(PYTHONINC) -I$(top_srcdir)/src
python_PYTHON = spot.py
pyexec_LTLIBRARIES = _spot.la
_spot_la_SOURCES = spot_wrap.cxx
_spot_la_LDFLAGS = -avoid-version -module
_spot_la_LIBADD = $(top_builddir)/src/libspot.la
EXTRA_DIST = spot.i
spot_wrap.cxx: spot.i
swig -c++ -python -I$(top_srcdir)/src spot.i
spot.py: spot.i
$(MAKE) $(AM_MAKEFLAGS) spot_wrap.cxx
MAINTAINERCLEANFILES = spot_wrap.cxx spot.py

64
wrap/python/spot.i Normal file
View file

@ -0,0 +1,64 @@
%module spot
%include "std_string.i"
%include "std_list.i"
%{
#include "ltlenv/environment.hh"
#include "ltlenv/defaultenv.hh"
#include "ltlast/formula.hh"
#include "ltlparse/public.hh"
#include "ltlast/visitor.hh"
#include "ltlvisit/clone.hh"
#include "ltlvisit/dotty.hh"
#include "ltlvisit/dump.hh"
#include "ltlvisit/lunabbrev.hh"
#include "ltlvisit/tunabbrev.hh"
#include "ltlvisit/nenoform.hh"
#include "ltlvisit/tostring.hh"
using namespace spot::ltl;
%}
%include "ltlenv/environment.hh"
%include "ltlenv/defaultenv.hh"
%include "ltlast/formula.hh"
%include "ltlparse/public.hh"
%include "ltlast/visitor.hh"
%include "ltlvisit/clone.hh"
%include "ltlvisit/dotty.hh"
%include "ltlvisit/dump.hh"
%include "ltlvisit/lunabbrev.hh"
%include "ltlvisit/tunabbrev.hh"
%include "ltlvisit/nenoform.hh"
%include "ltlvisit/tostring.hh"
%inline %{
spot::ltl::parse_error_list
empty_parse_error_list()
{
parse_error_list l;
return l;
}
std::ostream&
get_cout()
{
return std::cout;
}
std::ostream&
get_cerr()
{
return std::cerr;
}
void
print_on(std::ostream& on, const std::string& what)
{
on << what;
}
%}