jepri has asked for the wisdom of the Perl Monks concerning the following question:

I've managed to wrap a library using xs, and it all works fine. But since the library is uncommon and fairly small I'd like to package it as part of the perl module.

I have found the right code to include in Makefile.PL so that the library gets made correctly when I run make in the xs directory, but I can't figure out where to stick code to 'clean' and 'install' the library as well.

I guess the other trick would be to statically compile this library into the xs code, but I'm not so good at that kind of thing, and it doesn't allow sharing with other (C) programs that might start using this library.

Which way do people recommend approaching this?

____________________
Jeremy
I didn't believe in evil until I dated it.

  • Comment on Making MakeMaker install my library for xs

Replies are listed 'Best First'.
Re: Making MakeMaker install my library for xs
by PodMaster (Abbot) on May 20, 2003 at 05:44 UTC
    Check out Tie::PureDB for an example of how I did it.
    "and it doesn't allow sharing with other (C) programs that might start using this library."
    I wouldn't worry about that at all, especially since the library is small enough to be packaged with your XS wrapper.


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.

      Thanks++. That's easier than I thought it would be. But then again, it's Perl :)

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.