Monday, August 24, 2009

Vector: Proper file layout and makefile

In my last post I was worried about how to set up a Configure.pl for Vector. (See the comments of that post.) However, I have been able to piece together how to do it by raiding masak's grampa repo for the appropriate files.

Here's what I did:

1) Moved Vector.pm to a new lib/ directory.
2) Added grampa/lib/Configure.pm to lib/.
3) Added grampa/Configure and grampa/Makefile.in to Vector's root directory.
4) Edited Makefile.in to look for Vector.pm as the source rather than grampa.pm.

Then it's just a matter of the usual:
~/tools/rakudo/perl6 Configure
make
make test

And everything works!

Configure is smart enough to use perl6 to invoke Rakudo if your Perl 6 is set up that way. Mine's not, thus explicitly invoking it in the above. You may have to set the executable bit as well, I'm not sure how to do that in git.

A big hearty round of applause for masak++ and mberends++!

Update: I just realized I got the first step wrong. ./Configure won't do it for me (even now with the executable bit set in git); it needs to be

PERL6LIB=$PERL6LIB:lib ./Configure

so that the Configure.pm library gets picked up properly. Sorry for any difficulties this may have caused people.

1 comment:

  1. I'm sure this will sound stupid, but I'm so excited by this I'm having to fight an urge to just keep on running "make test", just because I can...

    ReplyDelete