|
From: Joerg F. <jf...@ao...> - 2003-11-12 17:41:57
|
>>>>> "Leif" == Leif Johnson <le...@am...> writes:
>> If we had a SWIG interface generator, we'd get the Python wrapper for
>> free, along with other languages.
Leif> Yessssss ...
>> Well, almost: we'd only have to convince Confix to build that stuff
>> :-). It shouldn't be that hard though.
>>
>> Could that be an option?
Leif> You mean as part of the CCM Tools or part of Confix ? Both ?
Leif> It definitely doesn't seem like it would be difficult to generate SWIG
Leif> interface files. But what about calling SWIG with Confix ? I suppose we
Leif> could do that in the Makefile.py ?
Yes. It's currently a bit halfbaked, but Confix is moving in that
direction. To invoke orbit-idl-2 on an installed IDL file (currently
all IDL files are installed into $(includedir), and nothing else is
done with them automatically), you write in a module's Makefile.py,
from libconfix.plugin_salomon_idl import BuildableSalomonIDL
BUILDABLES_.append(BuildableSalomonIDL(dir=MODULE_.dir(),
idlfile='lvs_svr_idl.idl'))
With this you register one header file and three C files as
BUILT_SOURCES, build them into $(builddir), and collapse them into a
library as the outcome of the module's build. Substitute SWIG for IDL,
remove Salomon, and the same applies for any language wrappers that
SWIG supports. Theoretically.
What remains to be done is
- Polish the plugin interface, so that nobody has to mess with the
internals of module_iface.
- Decouple the actual location of $(includedir) from the source
scanning process since $(includedir) may not contain anything
meaningful at that time. Anything that counts at that time should be
the repo. Advanced stuff here; I'd like to try to keep the repo
stuff and automake two completely different things. Note that the
problem does not occur when you are building from an IDL file in
$(srcdir) because then you have the source available at any time -
the complicated stuff is building from installed files that you are
not guaranteed to see at scan time. But, unfortunately, that's the
general case.
Anyway, I'm confident that I'll get it right real soon now (TM).
Joerg
|