in reply to Re: INSTALLSCRIPT Not Working
in thread INSTALLSCRIPT Not Working

That's not what I want. I am supporting 3 different platforms with this installation of Perl and associated modules. I am using a single module directory and a distinct script dir for each platform. My CPANPLUS config looks like this:

    makemakerflags            'PREFIX=/home/perl/lib INSTALLSCRIPT=/home/perl/lib/x86_64-bin'

In fact, it looks like this in the actual Config.pm file:

$conf->set_conf( makemakerflags => 'PREFIX=/home/perl/lib INSTALLSCRIPT=' .$ENV{MY_PERL_DIR} );

Where MY_PERL_DIR is set based on the architecture of the platform on which I run CPANPLUS, so the value of INSTALLSCRIPT always points to the directory that shold contain the executables for the current platform.

PREFIX is working as expected, but INSTALLSCRIPT isn't.

Replies are listed 'Best First'.
Re^3: INSTALLSCRIPT Not Working
by Khen1950fx (Canon) on Sep 25, 2010 at 13:14 UTC
    Try adding INSTALLBIN:
    makemakerflags 'PREFIX=/home/perl/lib INSTALLBIN=/home/perl/lib/x86_6 +4-bin INSTALLSCRIPT=/home/perl/lib/x86_64-bin'

      No go. INSTALLBIN doesn't help. Still goes into the bin dir under the PREFIX dir.

      I suspect that it's a packaging mistake, not a MakeMaker problem.

      ...so I followed up on that and, for instance in Perl::Tidy, the script is specified as EXE_SCRIPT:

      EXE_FILES => ['bin/perltidy'],

      From the MakeMaker man page:

      EXE_FILES

      Ref to array of executable files. The files will be copied to the INST_SCRIPT directory. Make realclean will delete them from there again.

      If your executables start with something like #!perl or #!/usr/bin/perl MakeMaker will change this to the path of the perl 'Makefile.PL' was invoked with so the programs will be sure to run properly even if perl is not in /usr/bin/perl.

      So, problem solved. Thanks for your help.

        It's just a matter of time before I forget the solution I found here, so I know I'll be back one day and wanted to clear up what I found as a solution here and what the problem actually appears to have been.

        First of all, EXE_FILES is obviously not the solution. Forget that. Neither was the problem in ExtUtils::MakeMaker, rather it was with the way that CPANPLUS was building and executing the "perl Makefile.PL". What seems to have been happening is that, in addition to the value that I was setting for PREFIX or INSTALL_BASE for the makemakerflags, the entire line was being appended to the value of PREFIX, so I'd wind up with something like this in my Makefile after the configuration was executed:

        INSTALL_BASE = /home/nypntdev/iprs_perl INSTALLSCRIPT=/home/nypntdev/iprs_perl/x86_64/bin

        The solution was to populate the PERL_MM_OPT environment variable that is used by ExtUtils::MakeMaker. http://search.cpan.org/~mschwern/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm#PERL_MM_OPT says:

        Command line options used by MakeMaker->new(), and thus by WriteMakefile(). The string is split on whitespace, and the result is processed before any actual command line arguments are processed.
        So, there you have it.
Re^3: INSTALLSCRIPT Not Working
by Anonymous Monk on Sep 25, 2010 at 03:53 UTC
    same problem here