Nick Ing-Simmons wrote:
> Stas Bekman <[EMAIL PROTECTED]> writes:
>
>>>Multiple .xs files in a directory used to at least sort-of-work.
>>>The problem was that you needed a custom BOOT: {} section in at
>>>least one to load the others.
>>
>>The problem is before the loading. How do you write Makefile.PL so it'll
>>create the right rules for Makefile to do all the xs2c conversion.
>
>
> You don't need to do anything:
>
> nick@bactrian 1010$ cd /tmp/Thing
> nick@bactrian 1011$ touch Foo.xs Bar.xs
> nick@bactrian 1012$ perl -MExtUtils::MakeMaker -e 'WriteMakefile()'
> Warning: Guessing NAME [Thing] from current directory name.
> Writing Makefile for Thing
>
> Gives:
>
> # Handy lists of source code files:
> XS_FILES= Bar.xs \
> Foo.xs
> C_FILES = Bar.c \
> Foo.c
> O_FILES = Bar.o \
> Foo.o
>
>
> So all you need is the "normal" OBJECT => '$(O_FILES)'
> that anything with multiple .o files needs.
yay, why things are always so simple when somebody tells you how ;)
I've added :
BOOT:
# boot the second XS file
boot_Bar();
to Foo.xs and it all worked!
Thanks Nick!
do we have some place where this trick (technique) can be documented?
I'll submit a patch.
or should we start something like perlmmtut.pod? where this kind of
tricks can go to?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com