Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How to tell EU::MM to install a pure-perl module into an architecture-specific location

by syphilis (Archbishop)
on Sep 23, 2022 at 10:50 UTC ( [id://11147081]=note: print w/replies, xml ) Need Help??


in reply to Re: How to tell EU::MM to install a pure-perl module into an architecture-specific location
in thread How to tell EU::MM to install a pure-perl module into an architecture-specific location

Thanks for the pointer tobyink.
I get the impression that this section of the EU::MM documentation is telling me what I need to know, but I can't make any sense of the table that it includes:
make install make alone puts all relevant files into directories that are named + by the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and INST_MAN3DIR. All these default to something below ./blib if you a +re *not* building below the perl source directory. If you *are* build +ing below the perl source, INST_LIB and INST_ARCHLIB default to ../../ +lib, and INST_SCRIPT is not defined. The *install* target of the generated Makefile copies the files fo +und below each of the INST_* directories to their INSTALL* counterpart +s. Which counterparts are chosen depends on the setting of INSTALLDIR +S according to the following table: INSTALLDIRS set to perl site vendor PERLPREFIX SITEPREFIX VENDORPREFIX INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDOR +ARCH INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDOR +LIB INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDOR +BIN INST_SCRIPT INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDOR +SCRIPT INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDOR +MAN1DIR INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDOR +MAN3DIR The INSTALL... macros in turn default to their %Config ($Config{installprivlib}, $Config{installarchlib}, etc.) counterpa +rts. You can check the values of these variables on your system with perl '-V:install.*'
If I can just get 'make install' to install into INSTALLSITEARCH (which is mentioned in the table), then that will be fine.
But neither INSTALLDIRS => 'perl', nor INSTALLDIRS => 'site', nor INSTALLDIRS => 'vendor', will do that, and everything else I try turns out to be either ineffective or just plain rubbish.

Can anyone tell from that (supposed) "table" just what argument I need to give to WriteMakefile() ?

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: How to tell EU::MM to install a pure-perl module into an architecture-specific location
by hippo (Bishop) on Sep 23, 2022 at 12:43 UTC

    This looks to have some effect at least. It may be what you are after.

    #!/usr/bin/perl use strict; use warnings; use ExtUtils::MakeMaker; use Config; my %MF = ( macro => { INSTALLSITELIB => $Config{installsitearch} } ); WriteMakefile (%MF); exit;

    🦛

      macro => { INSTALLSITELIB => $Config{installsitearch} }

      Thanks hippo - that WriteMakefile() argument does exactly what I want.
      And "macro" is a valid argument going all the way back to EU-MM-6.17 (and probably beyond) - so it should certainly suffice for a module that (intentionally) doesn't work on perls older than 5.22.0.

      Cheers,
      Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11147081]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-03-29 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found