Greets,

I'm working on a huge CPAN distro, 50 modules and counting, of which around 10 or so use XS code at present. The XS code is integrated into the distro in an unconventional way -- it's at the end of the .pm file after an __XS__ token. A routine built into Makefile.PL walks the file hierarchy and extracts all the code, writing a single KinoSearch.xs file on the fly just before WriteMakefile gets called. There are a couple other tricks I'll skip for brevity's sake that are necessary to make this scheme fly, but on the whole, it seems to be working out pretty well.

I have a new problem now: in addition to the XS code, there's a bunch of straight up C code which I've been stuffing in at the top of the .xs file. That C codebase is growing large enough that it needs to be broken out into separate files. However, I don't understand the MakeMaker docs on how to add in .c and .h files.

The bulk of my C programming has been via Inline::C and XS, so I've never had to beat my head against make. It seems to me that trying to pick apart a wrapper as complex as MakeMaker is the wrong way to go about learning a tool like make. I'd be content to put off those lessons a little longer if another solution presented itself, but the docs for the obvious candidate, Module::Build indicate that XS support is in alpha, and sure enough, "./Build test" can't even find the compiled libraries on my system. :\

I'll need to learn make eventually, and I'm happy to study, I'd just like to 1) solve my current problem sooner rather than later, and 2) go about learning systematically. Any advice?

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/

Reply via email to