You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Beau E. Cox" <be...@beaucox.com> on 2002/12/13 08:15:08 UTC
[mp2] make install quirk
Hi -
I am posting this message informally - this is not
critical (maybe not worth looking at); during
the mp2 make install, mod_perl.so is copied to the
apache2 tree (on my system) like this:
cp mod_perl.so /usr/local/apache2/modules
Now, if you haven't configured any apache2 modules
(as I haven't for my test server), the subdirectory
modules doesn't exist, so mod_perl.so is put into
the apache2 tree as _file_ 'modules' under
/usr/local/apache2. That's why I couldn't find it!
I will update my mini-HOWTO:
http://beaucox.com/mason/mason-with-apmp2-mini-HOWTO.htm
to reflect this quirk.
Aloha => Beau.
Re: [mp2] make install quirk
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 14 Dec 2002, Stas Bekman wrote:
[ .. ]
> Please check that this work for you and I'll commit it
> (verified on linux). You need to run a full build to check,
> unless you patch the Makefile manually.
>
> I also see that my copy-n-paste has translated \t into spaces,
> so replace those with tabs (between the + and $)
>
> I've replaced \"\" with qq{} because shells and quotes, even
> escaped ones are a big trouble. At least your suggestion didn't
> work for me. qq{} works just fine.
>
> Index: lib/Apache/Build.pm
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
> retrieving revision 1.108
> diff -u -r1.108 Build.pm
> --- lib/Apache/Build.pm 28 Nov 2002 16:31:36 -0000 1.108
> +++ lib/Apache/Build.pm 14 Dec 2002 08:43:32 -0000
> @@ -1057,6 +1057,9 @@
> lib: $(MODPERL_LIB)
>
> install:
> + $(MODPERL_PERLPATH) -e "exit ! -d qq{$(MODPERL_AP_LIBEXECDIR)}" || \
> + $(MODPERL_PERLPATH) -MExtUtils::Command \
> + -e mkpath $(MODPERL_AP_LIBEXECDIR)
> $(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
> $(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
This works fine on Win32, both if the modules directory
exists, and in creating it if it doesn't. Thanks!
--
best regards,
randy
Re: [mp2] make install quirk
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Sat, 14 Dec 2002, Stas Bekman wrote:
>
>
>>[looks my original reply didn't make it through, trying again]
>>
>>Beau E. Cox wrote:
>> > Hi -
>> >
>> > I am posting this message informally - this is not
>> > critical (maybe not worth looking at); during
>> > the mp2 make install, mod_perl.so is copied to the
>> > apache2 tree (on my system) like this:
>> >
>> > cp mod_perl.so /usr/local/apache2/modules
>> >
>> > Now, if you haven't configured any apache2 modules
>> > (as I haven't for my test server), the subdirectory
>> > modules doesn't exist, so mod_perl.so is put into
>> > the apache2 tree as _file_ 'modules' under
>> > /usr/local/apache2. That's why I couldn't find it!
>>
>>[...]
>>
>>This is a known problem. I came up with this patch:
>>http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=103847596809386&w=2
>>
>>But I'm afraid it's not portable and hence I couldn't commit it. Here is the
>>relevant snippet of the patch:
>>
>> install:
>>+ test -d $(MODPERL_AP_LIBEXECDIR) || mkdir $(MODPERL_AP_LIBEXECDIR)
>> $(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
>> $(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
>>
>>Any portability gurus know how to make this Makefile's line (the one with +)
>>portable? I think 'mkdir' is portable. What about 'test -d'?
>
>
> On Win32, at least, 'test' isn't available. What about something
> like the following:
>
> perl -e "exit ! -d \"$(MODPERL_AP_LIBEXECDIR)\"" || mkdir $(...)
>
> (the \" may be needed if the directory contains spaces, as Win32
> might). And if one is worried about the system mkdir
> availability, one can use
> perl -MExtUtils::Command -e mkpath directory
>
randy++!
Please check that this work for you and I'll commit it (verified on linux).
You need to run a full build to check, unless you patch the Makefile manually.
I also see that my copy-n-paste has translated \t into spaces, so replace
those with tabs (between the + and $)
I've replaced \"\" with qq{} because shells and quotes, even escaped ones are
a big trouble. At least your suggestion didn't work for me. qq{} works just fine.
Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.108
diff -u -r1.108 Build.pm
--- lib/Apache/Build.pm 28 Nov 2002 16:31:36 -0000 1.108
+++ lib/Apache/Build.pm 14 Dec 2002 08:43:32 -0000
@@ -1057,6 +1057,9 @@
lib: $(MODPERL_LIB)
install:
+ $(MODPERL_PERLPATH) -e "exit ! -d qq{$(MODPERL_AP_LIBEXECDIR)}" || \
+ $(MODPERL_PERLPATH) -MExtUtils::Command \
+ -e mkpath $(MODPERL_AP_LIBEXECDIR)
$(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
$(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [mp2] make install quirk
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 14 Dec 2002, Stas Bekman wrote:
> [looks my original reply didn't make it through, trying again]
>
> Beau E. Cox wrote:
> > Hi -
> >
> > I am posting this message informally - this is not
> > critical (maybe not worth looking at); during
> > the mp2 make install, mod_perl.so is copied to the
> > apache2 tree (on my system) like this:
> >
> > cp mod_perl.so /usr/local/apache2/modules
> >
> > Now, if you haven't configured any apache2 modules
> > (as I haven't for my test server), the subdirectory
> > modules doesn't exist, so mod_perl.so is put into
> > the apache2 tree as _file_ 'modules' under
> > /usr/local/apache2. That's why I couldn't find it!
>
> [...]
>
> This is a known problem. I came up with this patch:
> http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=103847596809386&w=2
>
> But I'm afraid it's not portable and hence I couldn't commit it. Here is the
> relevant snippet of the patch:
>
> install:
> + test -d $(MODPERL_AP_LIBEXECDIR) || mkdir $(MODPERL_AP_LIBEXECDIR)
> $(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
> $(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
>
> Any portability gurus know how to make this Makefile's line (the one with +)
> portable? I think 'mkdir' is portable. What about 'test -d'?
On Win32, at least, 'test' isn't available. What about something
like the following:
perl -e "exit ! -d \"$(MODPERL_AP_LIBEXECDIR)\"" || mkdir $(...)
(the \" may be needed if the directory contains spaces, as Win32
might). And if one is worried about the system mkdir
availability, one can use
perl -MExtUtils::Command -e mkpath directory
--
best regards,
randy
Re: [mp2] make install quirk
Posted by Stas Bekman <st...@stason.org>.
[looks my original reply didn't make it through, trying again]
Beau E. Cox wrote:
> Hi -
>
> I am posting this message informally - this is not
> critical (maybe not worth looking at); during
> the mp2 make install, mod_perl.so is copied to the
> apache2 tree (on my system) like this:
>
> cp mod_perl.so /usr/local/apache2/modules
>
> Now, if you haven't configured any apache2 modules
> (as I haven't for my test server), the subdirectory
> modules doesn't exist, so mod_perl.so is put into
> the apache2 tree as _file_ 'modules' under
> /usr/local/apache2. That's why I couldn't find it!
[...]
This is a known problem. I came up with this patch:
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=103847596809386&w=2
But I'm afraid it's not portable and hence I couldn't commit it. Here is the
relevant snippet of the patch:
install:
+ test -d $(MODPERL_AP_LIBEXECDIR) || mkdir $(MODPERL_AP_LIBEXECDIR)
$(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
$(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
Any portability gurus know how to make this Makefile's line (the one with +)
portable? I think 'mkdir' is portable. What about 'test -d'?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com