Randy Kobes wrote:
randy++!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
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:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com