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 | [reply] [d/l] [select] |
#!/usr/bin/perl
use strict;
use warnings;
use ExtUtils::MakeMaker;
use Config;
my %MF = (
macro => { INSTALLSITELIB => $Config{installsitearch} }
);
WriteMakefile (%MF);
exit;
| [reply] [d/l] |
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
| [reply] [d/l] |