On 28/02/2012 03:29, Marvin Humphrey wrote:
+1 for dropping 'auto'.  Here's what I'd now suggest:

  catdir( $ARCH_DIR, 'Clownfish', '_include' )

Let's also consider what we mean by $ARCH_DIR.  Ordinarily it will be this:

   $ perl -V:installsitearch

The theoretical possibility exists that in the future it might be this:

   $ perl -V:installvendorarch

For more information, see the following:

   http://perldoc.perl.org/Module/Build.html#INSTALL-PATHS
   
http://search.cpan.org/~leont/Module-Build-0.40/lib/Module/Build/API.pod#install_destination
   
http://perl5.git.perl.org/perl.git/blob/cc92ef02098c000d945bcf93c92bdb2a0a05fa97:/INSTALL#l508

The dir would actually be derived within Lucy::Build like so (note: $self is a
Lucy::Build object):

     my $arch_dir = $self->install_destination('arch');
     my $include_dir = catdir( $arch_dir, 'Clownfish', '_include' );

I really like the idea of a single include directory per host language.

The only problem I can see with Perl is the fact that there are different install paths as you pointed out above. Let's say we have a distro that ships with Lucy in installvendorarch. If someone wants to install an extension with its own header files locally, then the extension would be installed in installsitearch while the header files would have to go to installvendorarch. This breaks the concept of separating vendor and site installations and might cause problems with certain setups.

Maybe we should always look in the following two directories:

    catdir( $installvendorarch, 'Clownfish', '_include' )
    catdir( $installsitearch, 'Clownfish', '_include' )

Nick

Reply via email to