O.K., here's how I think it should work:

The Makefile.PL has a postamble subroutine that adds an additional step to
"make install" that installs the http-webtest directory in /usr/local/etc.

There is a Bourne shell script called "configure", to be run BEFORE "perl
Makefile.PL", that prompts the user for where he/she wants to install the
http-webtest directory.  If the desired location is not /usr/local/etc, the
shell script modifies the Makefile.PL using sed.

Sounds good?  The alternative is to have the "make install" step prompt the
user for the location of the directory, but this seems non-standard to me
and would be more difficult for me to program.

[EMAIL PROTECTED]              RayCosoft, LLC
Perl/Java/Oracle/Unix software engineering    www.unixscripts.com
www.zipcon.net/~starfire/home                     Seattle, WA, USA
----- Original Message -----
From: "Andreas J. Koenig" <[EMAIL PROTECTED]>
To: "Richard Anderson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, December 12, 2000 12:48 AM
Subject: Re: MakeMaker question


> >>>>> On Sun, 10 Dec 2000 13:50:41 -0800, "Richard Anderson"
<[EMAIL PROTECTED]> said:
>
>  > And how do I hook this subroutine into Makefile.PL so that typing "perl
>  > Makefile.PL will insert the needed lines into the Makefile?  Or do I
need to
>  > add another step to the normal installation procedure?
>
> It may sound weird, but it has historical reasons: MakeMaker looks
> into the MY namespace and handles subroutines there as if they had
> been written in its own namespace so that your subroutine
> MY::postamble will be executed. Its return value will end up in the
> Makefile. So all you do is write something like
>
> sub MY::postamble {
>         return "# See me in the Makefile\n";
> }
>
> in your Makefile.PL
>
>  > I don't like using /usr/local/etc/http-webtest either, but I don't
think it
>  > is appropriate to install a subdirectory structure in
>  > /usr/lib/perl5/site_perl/5.005/HTTP - this seems reserved for .pm
files.  At
>  > least /usr/local/etc/http-webtest will persist even after an upgrade to
perl
>  > v 6.0.  The only problem with that directory would be if another app
uses
>  > /usr/local/etc/http-webtest, which seems unlikely.  Or is your point
that
>  > even the mere presence of a subdirectory in /usr/local/etc give MYSQL
>  > problems?
>
> The latter. But mind you, I have no solution for that, just the
> recommendation that you let the users decide where they prefer the
> files installed. A safer default place might be ~/.http-webtest.
>
> --
> andreas
>
>

Reply via email to