Question

I've got a largish project to which I've just added some XS code, and I'd like to keep the top-level directory as clean as possible. I want to put the XS file and typemap et al. into a subdirectory, but if I do, MakeMaker can't find them. So right now, they're just sitting out in the project root.

How to I tell MakeMaker to look in a subdirectory for the XS stuff so it can be built from there?

Was it helpful?

Solution

I believe if you put the .xs files into the lib directory, MakeMaker will find them.

You can explicitly tell MakeMaker where the .xs files and what .c file to translate it into using the XS option to WriteMakefile.

WriteMakefile(
    NAME    => "Foo::Bar",
    XS      => {
        "lib/Foo/Bar.xs" => "lib/Foo/Bar.c",
    }
);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top