<[EMAIL PROTECTED]> writes:
>I've been trying but have been unable to get ExtUtils::MakeMaker to
>correctly build multiple XS modules in one distribution. I.e. instead
>of having something akin to what h2xs would create, a single .pm file
>and one .xs file I'm trying to build a distribution with multiple XS
>files and multiple pure Perl files.
>
>I've made an example distribution that demonstrates the problem, it can
>be retrived with:
>
>$ svn co http://avar.lir.dk/vcs/src/perl/xs/Hello/
>
>or from http://www.simnet.is/velfag/tmp/Hello.tar.gz, there's a
>README.pod file in the distribution that describes the problem in
>further detail (http://avar.lir.dk/vcs/src/perl/xs/Hello/README.pod),
>I'll copy the BUGS section here:
I have not unpacked your example, but have several distributions which
work on CPAN.
e.g. perl/Tk
which has Text and Canvas (etc.) as sub-modules
Structure is
/Tk/Tk.pm
/Tk.xs
/Makefile.PL
/Text/Text.pm
/Text/Text.xs
/Text/Makefile.PL
...
i.e. each module's .pm and .xs are in a sub-directory named for the module
with its own Makefile.PL
>
>----
>
>When this module is being built through the normal process:
>
> perl Makefile.PL
> make
>
>The XS modules in F<ext/> build due to the main F<Makefile.PL> having a
>C<DIR>
>key-value pair which tells the main F<Makefile.PL> to pick up on the
>sub-makefiles. However when attempting to test the distribution:
>
> make test
>
>or installing it:
>
> make install PREFIX=.
>
>None of the XS modules are installed, this is because the F<blib/>
>directory
>doesn't include the required files, but should.
>
>There's an I<easy> workaround for this problem though:
>
> perl Makefile.PL
> make
> rsync -av ext/Hello/blib/ blib
> make test
>
>After syncing F<ext/Hello/blib/> to F<blib/> B<make test> works fine,
>and:
>
> perl -Iblib/lib -Iblib/arch -MHello -MHello::World -MHello::There -le
>'print for Hello::hello, Hello::World::hello, Hello::There::hello'
>
>work as expected, i.e. it prints:
>
> hello
> hello, world
> hello, there
>
>----