Re: apxs on Win32
Randy Kobes wrote: On Thu, 31 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: [ .. ] As Bill mentioned in another message, it looks like it would be possible to integrate it within httpd-2.0. So rather than including it within the Apache-Test sources, what I could do is add a post-install script to the Win32 ppm package we have here for Apache-Test that would install the apxs script, if desired - that might be handy for people who'd like to play with it now. Though it won't be available for people with older httpd-2.0. I guess in that case Apache::Test could install it. That's what I was thinking - sorry, I should have been clearer. ppm has a feature that, when one installs a ppm package, a script from some server can optionally be fetched and run (by Perl, or anything, actually). So what I could do for the Apache-Test ppm package we have is use such a script to get the needed files for the apxs script and run and install them (if the user wants) - that way, a person running an older httpd-2.0 could just ppm install Apache-Test from here, and apxs would also get installed (of course, associating this script with Apache-Test is just convenience - a user can fetch and run the script him/herself manually). So this wouldn't require any changes to the Apache-Test sources. Thanks Randy, I did understand that. I was asking about those who try to install from source, without using ppm. __ Stas BekmanJAm_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
Re: apxs on Win32
Randy Kobes wrote: On Thu, 31 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: [ .. ] That's what I was thinking - sorry, I should have been clearer. ppm has a feature that, when one installs a ppm package, a script from some server can optionally be fetched and run (by Perl, or anything, actually). So what I could do for the Apache-Test ppm package we have is use such a script to get the needed files for the apxs script and run and install them (if the user wants) - that way, a person running an older httpd-2.0 could just ppm install Apache-Test from here, and apxs would also get installed [ ... ] Thanks Randy, I did understand that. I was asking about those who try to install from source, without using ppm. Ah, I see now ... What could be done, within Apache-Test's Makefile.PL, is offer to get the same remote source and configuration files to install apxs that the ppm post-install script gets. This would be easier to maintain and upgrade, and plus wouldn't require adding additional files to the Apache-Test distribution. since it seems that most win32 users use ppm anyways this sounds good to me. __ Stas BekmanJAm_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
Re: apxs on Win32
On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: [...] I'll take a look at this tonight as well - it'd probably be easier to change, for Win32, the assumption of the name of the httpd binary when apxs is present. Thanks Randy! Thanks for looking this over, Stas - I know you're really busy right now ... I've attached a diff incorporating the earlier suggestions - this one also has an additional fix to adjust the file names to be cleaned on Win32, which are different. As far getting the right name for the Win32 binary goes with apxs present, I don't think there's an ideal solution ... To summarize, the problem is that apxs -q TARGET ( = httpd) is used in Apache-Test for the name of the apache binary, whereas in other places (in apxs itself, for example) it's used to represent httpd.conf. What I ended up doing here is following the Apache-Test convention of setting $vars-{target} to Apache.exe for Win32 - this means overwriting the apxs value, which isn't great, but I guess as long as the same convention is followed throughout the package, it should be OK. -- best regards, randy? s.diff ? s.txt Index: TestConfig.pm === RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.166 diff -u -r1.166 TestConfig.pm --- TestConfig.pm 29 Jul 2003 15:19:24 - 1.166 +++ TestConfig.pm 30 Jul 2003 02:50:32 - @@ -283,7 +283,7 @@ $self-{APXS} = $self-default_apxs; return unless $self-{APXS}; - +$self-{APXS} =~ s {/}{\\}g if WIN32; my $vars = $self-{vars}; $vars-{bindir} ||= $self-apxs('BINDIR', 1); @@ -300,7 +300,8 @@ my $self = shift; my $vars = $self-{vars}; -$vars-{target} ||= (WIN32 ? 'Apache.exe' : 'httpd'); +$vars-{target} ||= 'httpd'; +$vars-{target} = 'Apache.exe' if WIN32; unless ($vars-{httpd}) { #sbindir should be bin/ with the default layout Index: TestConfigC.pm === RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm,v retrieving revision 1.20 diff -u -r1.20 TestConfigC.pm --- TestConfigC.pm 31 Mar 2003 06:58:40 - 1.20 +++ TestConfigC.pm 30 Jul 2003 02:50:32 - @@ -9,6 +9,8 @@ use Apache::TestTrace; use File::Find qw(finddepth); +use constant WIN32 = Apache::TestConfig::WIN32; + sub cmodule_find { my($self, $mod) = @_; @@ -76,7 +78,7 @@ EOF } -my %lib_dir = (1 = , 2 = .libs/); +my %lib_dir = WIN32 ? (1 = , 2 = ) : (1 = , 2 = .libs/); sub cmodules_build_so { my($self, $name) = @_; @@ -135,6 +137,11 @@ my $lib = $self-cmodules_build_so($name); +my $extras = WIN32 ? ' -llibhttpd -p ' : ''; +my $rm = WIN32 ? '@erase' : 'rm -rf'; +my $goners = join ' ', ( map {$name . '.' . $_} +(WIN32 ? qw(exp lib so lo) : qw(o lo slo la)) ); + my $fh = Symbol::gensym(); open $fh, $makefile or die open $makefile: $!; @@ -143,10 +150,10 @@ all: $lib $lib: $name.c - \$(APXS) $dversion -I$self-{cmodules_dir} -c $name.c + \$(APXS) $dversion -I$self-{cmodules_dir} $extras -c $name.c clean: - -rm -rf $name.o $name.lo $name.slo $name.la .libs + -$rm $goners .libs EOF close $fh or die close $makefile: $!;
Re: apxs on Win32
On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: I've been looking at getting apxs for Win32 working on Apache 2. where would it go? Apache::Test? mod_perl? If there's consensus, I think the better place would be Apache-Test, as it can be used outside of mod_perl. If so, I'll clean things up a bit, and put up a new version; I could also generate something for Apache-Test's Makefile.PL to have it configure and install this on Win32, if wanted. +1 Here's a diff to do this for the top-level Apache-Test Makefile.PL: Index: Makefile.PL === RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Makefile.PL,v retrieving revision 1.13 diff -u -r1.13 Makefile.PL --- Makefile.PL 18 Jun 2003 08:55:57 - 1.13 +++ Makefile.PL 30 Jul 2003 04:56:53 - @@ -10,6 +10,8 @@ # Makefile.PL, top-level sets this env var use constant TOP_LEVEL = !exists $ENV{MOD_PERL_2_BUILD}; +use constant WIN32 = $^O =~ /Win32/; + use ExtUtils::MakeMaker; use Symbol; @@ -26,6 +28,8 @@ Apache::TestMM::generate_script($_); } +ask_about_apxs() if WIN32; + set_version(); # if built with mod_perl 2.0, it top-level Makefile.PL already @@ -97,4 +101,24 @@ $string; }; +} + +sub ask_about_apxs { +print 'END'; + +I see you're on Win32. If you use Apache 2, I can install a +version of apxs, which is a tool that automates many of the +steps to build Apache C modules, if you like. Just answer 'yes' +at the prompt below. + +END +my $ans = prompt('Install apxs?', 'yes'); +if ($ans =~ /^y/i) { +my $file = 'apxs_win32_PL'; +unless (my $return = do $file) { +warn Couldn't parse $file: $@ if $@; +warn Couldn't do $file: $! unless defined $return; +warn Couldn't run $fileunless $return; +} +} } This requires two files at the same level as Makefile.PL - apxs_win32 and apxs_win32_PL, which I've put up under http://theoryx5.uwinnipeg.ca/. apxs_win32 isn't the cleanest script ever been written :); part of the reason is that I tried to make minimal changes, in case it was desired to merge the changes at some point into the unix version. -- best regards, randy
Re: apxs on Win32
At 10:09 PM 7/29/2003, Randy Kobes wrote: As far getting the right name for the Win32 binary goes with apxs present, I don't think there's an ideal solution ... To summarize, the problem is that apxs -q TARGET ( = httpd) is used in Apache-Test for the name of the apache binary, whereas in other places (in apxs itself, for example) it's used to represent httpd.conf. What I ended up doing here is following the Apache-Test convention of setting $vars-{target} to Apache.exe for Win32 - this means overwriting the apxs value, which isn't great, but I guess as long as the same convention is followed throughout the package, it should be OK. I think the right solution here is to provide two seperate flags for apxs to determine the name of the conf file v.s. the name of the binary. Call me crazy but it seems pretty simple :-) Only question, does the old option preserve the 'binary name' or the 'conf name'? I suspect we want to use the original flag as the 'binary name'. The new flag to return the '.conf name' should properly decorate it with .conf on all platforms. And the original flag can be used to retrieve the decorated 'Apache2.exe' program name on Win32. I'm really excited about trying your implementation, although I'm a bit backlogged after traveling this weekend. Certainly this belongs in httpd-2.0/build/ once we dot all the I's and cross the t's. If you don't object, once I give it the once-over, I'll commit it after I can address any minor quibbles to the httpd 2.1 dev branch, and we can work from there on improving it. We should definately look to make this usable for our Netware users as well, who might not be using a full gcc environment, but tools like codewarrior suite, etc. I'm not saying we commit to this, but if we can keep some bits pretty abstract, it will be easy for another contributor to come along and connect the dots. {maybe it's already this way, I promise to delve into the code this week :-} Bill
Re: apxs on Win32
Randy Kobes wrote: On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: [...] I'll take a look at this tonight as well - it'd probably be easier to change, for Win32, the assumption of the name of the httpd binary when apxs is present. Thanks Randy! Thanks for looking this over, Stas - I know you're really busy right now ... I've attached a diff incorporating the earlier suggestions - this one also has an additional fix to adjust the file names to be cleaned on Win32, which are different. As far getting the right name for the Win32 binary goes with apxs present, I don't think there's an ideal solution ... To summarize, the problem is that apxs -q TARGET ( = httpd) is used in Apache-Test for the name of the apache binary, whereas in other places (in apxs itself, for example) it's used to represent httpd.conf. What I ended up doing here is following the Apache-Test convention of setting $vars-{target} to Apache.exe for Win32 - this means overwriting the apxs value, which isn't great, but I guess as long as the same convention is followed throughout the package, it should be OK. +1 on the patch Randy, whatever you think is the best for win32, please go ahead with it. Untill we get someone else on win32 involved, you are pretty much free to decide how to handle things and what's the best for the user, as long as the changes don't break the code on other platforms. It's really hard to judge what's good or less good without seeing the problem. Perhaps somebody else can do that. I remember Philippe was trying to set win32 env, but he is now in transition from one continent to another... On the other hand, I really dislike the fact that the code gets too many conditionals, making it much harder to comprehend. We should consider to use subclasses for win32 (or any other platform that requires too many special cases). What do you think? There is no hurry for now, but we should keep it at the backs of our heads (unless of course you think it's a cool idea and want to go with it right now ;). The good thing is once subclassed, there is very little danger that the code on other platforms will go broken. __ Stas BekmanJAm_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
Re: apxs on Win32
Randy Kobes wrote: On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: I've been looking at getting apxs for Win32 working on Apache 2. where would it go? Apache::Test? mod_perl? If there's consensus, I think the better place would be Apache-Test, as it can be used outside of mod_perl. If so, I'll clean things up a bit, and put up a new version; I could also generate something for Apache-Test's Makefile.PL to have it configure and install this on Win32, if wanted. +1 Here's a diff to do this for the top-level Apache-Test Makefile.PL: Index: Makefile.PL === RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Makefile.PL,v retrieving revision 1.13 diff -u -r1.13 Makefile.PL --- Makefile.PL 18 Jun 2003 08:55:57 - 1.13 +++ Makefile.PL 30 Jul 2003 04:56:53 - @@ -10,6 +10,8 @@ # Makefile.PL, top-level sets this env var use constant TOP_LEVEL = !exists $ENV{MOD_PERL_2_BUILD}; +use constant WIN32 = $^O =~ /Win32/; + use ExtUtils::MakeMaker; use Symbol; @@ -26,6 +28,8 @@ Apache::TestMM::generate_script($_); } +ask_about_apxs() if WIN32; + set_version(); # if built with mod_perl 2.0, it top-level Makefile.PL already @@ -97,4 +101,24 @@ $string; }; +} + +sub ask_about_apxs { +print 'END'; + +I see you're on Win32. If you use Apache 2, I can install a +version of apxs, which is a tool that automates many of the +steps to build Apache C modules, if you like. Just answer 'yes' +at the prompt below. + +END +my $ans = prompt('Install apxs?', 'yes'); +if ($ans =~ /^y/i) { +my $file = 'apxs_win32_PL'; +unless (my $return = do $file) { +warn Couldn't parse $file: $@ if $@; +warn Couldn't do $file: $! unless defined $return; +warn Couldn't run $fileunless $return; +} +} } will this work when Apache::Test is installed as a part of the mod_perl-2.0 distro? This requires two files at the same level as Makefile.PL - apxs_win32 and apxs_win32_PL, which I've put up under http://theoryx5.uwinnipeg.ca/. apxs_win32 isn't the cleanest script ever been written :); part of the reason is that I tried to make minimal changes, in case it was desired to merge the changes at some point into the unix version. Where apxs_win32_PL is coming from? Is it possible to somehow integrate it within httpd-2.0? __ Stas BekmanJAm_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
Re: apxs on Win32
On Wed, 30 Jul 2003, Stas Bekman wrote: +1 on the patch Randy, whatever you think is the best for win32, please go ahead with it. Untill we get someone else on win32 involved, you are pretty much free to decide how to handle things and what's the best for the user, as long as the changes don't break the code on other platforms. It's really hard to judge what's good or less good without seeing the problem. Perhaps somebody else can do that. I remember Philippe was trying to set win32 env, but he is now in transition from one continent to another... On the other hand, I really dislike the fact that the code gets too many conditionals, making it much harder to comprehend. We should consider to use subclasses for win32 (or any other platform that requires too many special cases). What do you think? There is no hurry for now, but we should keep it at the backs of our heads (unless of course you think it's a cool idea and want to go with it right now ;). The good thing is once subclassed, there is very little danger that the code on other platforms will go broken. You're right that there's getting to be too many conditionals in places, and subclassing would be a better way to go ... I'll take a look at that, but I'm going on a bit of a break in a couple of days - what about for now, doing something like ModPerl::Build does: have, for some sub sub whatever { my $self = shift; my $what = \{whatever_$^O}; $what = \whatever_default unless defined $what; $what-($self); } sub whatever_default { } and then, to add something special for MSWin32, simply define a sub whatever_MSWin32 { ... } which gets used in place of the default. I could redo that patch in this form easily, if that would be better for now. -- best regards, randy
Re: apxs on Win32
On Thu, 31 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: [ .. ] As Bill mentioned in another message, it looks like it would be possible to integrate it within httpd-2.0. So rather than including it within the Apache-Test sources, what I could do is add a post-install script to the Win32 ppm package we have here for Apache-Test that would install the apxs script, if desired - that might be handy for people who'd like to play with it now. Though it won't be available for people with older httpd-2.0. I guess in that case Apache::Test could install it. That's what I was thinking - sorry, I should have been clearer. ppm has a feature that, when one installs a ppm package, a script from some server can optionally be fetched and run (by Perl, or anything, actually). So what I could do for the Apache-Test ppm package we have is use such a script to get the needed files for the apxs script and run and install them (if the user wants) - that way, a person running an older httpd-2.0 could just ppm install Apache-Test from here, and apxs would also get installed (of course, associating this script with Apache-Test is just convenience - a user can fetch and run the script him/herself manually). So this wouldn't require any changes to the Apache-Test sources. -- best regards, randy
Re: apxs on Win32
Randy Kobes wrote: I've been looking at getting apxs for Win32 working on Apache 2. There's a number of changes needed due to the current reliance on libtool, so initially I've tried just a pure Win32 version - if anyone wants to try it, I've put up two files - Configure.apxs and apxs.in - at http://theoryx5.uwinnipeg.ca/. Running C:\Some\Path perl Configure.apxs (in the same directory as apxs.in) will guess at your Apache2 directory (a --with-apache2=... option can be specified to tell it explicitly), and then an apxs.bat will be created under C:\Path\to\Apache2\bin\, along with the associated C:\Path\to\Apache2\build\config_vars.mk. where would it go? Apache::Test? mod_perl? I've tried using this for the c-modules tests of perl-framework, and it seems to work OK, with the following diff applied to a couple of files under perl-framework/Apache-Test/lib/Apache: === Index: TestConfig.pm === RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.165 diff -u -r1.165 TestConfig.pm --- TestConfig.pm 7 Jul 2003 18:42:29 - 1.165 +++ TestConfig.pm 29 Jul 2003 05:51:22 - @@ -283,7 +283,7 @@ $self-{APXS} = $self-default_apxs; return unless $self-{APXS}; - +$self-{APXS} =~ s !/!\\!g if WIN32; can this please be: $self-{APXS} =~ s|/|\\|g if WIN32; os some other separator than !, probably something like s{/}{//}g my $vars = $self-{vars}; $vars-{bindir} ||= $self-apxs('BINDIR', 1); Index: TestConfigC.pm === RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm,v retrieving revision 1.20 diff -u -r1.20 TestConfigC.pm --- TestConfigC.pm 31 Mar 2003 06:58:40 - 1.20 +++ TestConfigC.pm 29 Jul 2003 05:51:22 - @@ -76,7 +76,8 @@ EOF } -my %lib_dir = (1 = , 2 = .libs/); +my %lib_dir = Apache::TestConfig::WIN32 ? (1 = , 2 = ) : +(1 = , 2 = .libs/); sub cmodules_build_so { my($self, $name) = @_; @@ -135,6 +136,9 @@ my $lib = $self-cmodules_build_so($name); +my $extras; it must be: my $extras = ''; +$extras = ' -llibhttpd -p ' if Apache::TestConfig::WIN32; or: my $extras = Apache::TestConfig::WIN32 ? ' -llibhttpd -p ' : ''; probably worth adding on top: use constant WIN32 = Apache::TestConfig::WIN32; so there will be less to type, shorter lines... my $fh = Symbol::gensym(); open $fh, $makefile or die open $makefile: $!; @@ -143,7 +147,7 @@ all: $lib $lib: $name.c - \$(APXS) $dversion -I$self-{cmodules_dir} -c $name.c + \$(APXS) $dversion -I$self-{cmodules_dir} $extras -c $name.c please always inline and attach the diff when it includes tabs, since they get lost... clean: -rm -rf $name.o $name.lo $name.slo $name.la .libs === (there's a failure in building one of the tests due to a missing random-ish function). The tests were configured as C:\perl-framework Perl Makefile.PL -apxs C:\Apache2\bin\apxs -httpd C:\Apache2\bin\Apache.exe The reason for specifying both -apxs and -httpd is related to the current Apache-Test using the fact that the apxs variable TARGET specifies the name of the httpd binary (httpd). On Win32 the binary is Apache.exe, but changing the value of TARGET on Win32 would break assumptions elsewhere that the Apache configuration file (httpd.conf on Win32 as well) is TARGET.conf. How to handle this better should be looked at. it'd be cool to need to rely only on any of the two. Merging this Win32 apxs.in and the one in the httpd sources would possible, if that was desired. -- __ Stas BekmanJAm_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
Re: apxs on Win32
On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: I've been looking at getting apxs for Win32 working on Apache 2. There's a number of changes needed due to the current reliance on libtool, so initially I've tried just a pure Win32 version - if anyone wants to try it, I've put up two files - Configure.apxs and apxs.in - at http://theoryx5.uwinnipeg.ca/. Running C:\Some\Path perl Configure.apxs (in the same directory as apxs.in) will guess at your Apache2 directory (a --with-apache2=... option can be specified to tell it explicitly), and then an apxs.bat will be created under C:\Path\to\Apache2\bin\, along with the associated C:\Path\to\Apache2\build\config_vars.mk. where would it go? Apache::Test? mod_perl? If there's consensus, I think the better place would be Apache-Test, as it can be used outside of mod_perl. If so, I'll clean things up a bit, and put up a new version; I could also generate something for Apache-Test's Makefile.PL to have it configure and install this on Win32, if wanted. I've tried using this for the c-modules tests of perl-framework, and it seems to work OK, with the following diff applied to a couple of files under perl-framework/Apache-Test/lib/Apache: === Index: TestConfig.pm === RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.165 diff -u -r1.165 TestConfig.pm --- TestConfig.pm 7 Jul 2003 18:42:29 - 1.165 +++ TestConfig.pm 29 Jul 2003 05:51:22 - @@ -283,7 +283,7 @@ $self-{APXS} = $self-default_apxs; return unless $self-{APXS}; - +$self-{APXS} =~ s !/!\\!g if WIN32; can this please be: $self-{APXS} =~ s|/|\\|g if WIN32; os some other separator than !, probably something like s{/}{//}g Sure, no problem. my $vars = $self-{vars}; $vars-{bindir} ||= $self-apxs('BINDIR', 1); Index: TestConfigC.pm === RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm,v retrieving revision 1.20 diff -u -r1.20 TestConfigC.pm --- TestConfigC.pm 31 Mar 2003 06:58:40 - 1.20 +++ TestConfigC.pm 29 Jul 2003 05:51:22 - @@ -76,7 +76,8 @@ EOF } -my %lib_dir = (1 = , 2 = .libs/); +my %lib_dir = Apache::TestConfig::WIN32 ? (1 = , 2 = ) : +(1 = , 2 = .libs/); sub cmodules_build_so { my($self, $name) = @_; @@ -135,6 +136,9 @@ my $lib = $self-cmodules_build_so($name); +my $extras; it must be: my $extras = ''; +$extras = ' -llibhttpd -p ' if Apache::TestConfig::WIN32; or: my $extras = Apache::TestConfig::WIN32 ? ' -llibhttpd -p ' : ''; probably worth adding on top: use constant WIN32 = Apache::TestConfig::WIN32; so there will be less to type, shorter lines... Good idea - I'll fix that too. my $fh = Symbol::gensym(); open $fh, $makefile or die open $makefile: $!; @@ -143,7 +147,7 @@ all: $lib $lib: $name.c - \$(APXS) $dversion -I$self-{cmodules_dir} -c $name.c + \$(APXS) $dversion -I$self-{cmodules_dir} $extras -c $name.c please always inline and attach the diff when it includes tabs, since they get lost... Sorry about that - I'll generate a new diff tonight. clean: -rm -rf $name.o $name.lo $name.slo $name.la .libs === (there's a failure in building one of the tests due to a missing random-ish function). The tests were configured as C:\perl-framework Perl Makefile.PL -apxs C:\Apache2\bin\apxs -httpd C:\Apache2\bin\Apache.exe The reason for specifying both -apxs and -httpd is related to the current Apache-Test using the fact that the apxs variable TARGET specifies the name of the httpd binary (httpd). On Win32 the binary is Apache.exe, but changing the value of TARGET on Win32 would break assumptions elsewhere that the Apache configuration file (httpd.conf on Win32 as well) is TARGET.conf. How to handle this better should be looked at. it'd be cool to need to rely only on any of the two. I'll take a look at this tonight as well - it'd probably be easier to change, for Win32, the assumption of the name of the httpd binary when apxs is present. -- best regards, randy
Re: apxs on Win32
Randy Kobes wrote: On Tue, 29 Jul 2003, Stas Bekman wrote: Randy Kobes wrote: I've been looking at getting apxs for Win32 working on Apache 2. There's a number of changes needed due to the current reliance on libtool, so initially I've tried just a pure Win32 version - if anyone wants to try it, I've put up two files - Configure.apxs and apxs.in - at http://theoryx5.uwinnipeg.ca/. Running C:\Some\Path perl Configure.apxs (in the same directory as apxs.in) will guess at your Apache2 directory (a --with-apache2=... option can be specified to tell it explicitly), and then an apxs.bat will be created under C:\Path\to\Apache2\bin\, along with the associated C:\Path\to\Apache2\build\config_vars.mk. where would it go? Apache::Test? mod_perl? If there's consensus, I think the better place would be Apache-Test, as it can be used outside of mod_perl. If so, I'll clean things up a bit, and put up a new version; I could also generate something for Apache-Test's Makefile.PL to have it configure and install this on Win32, if wanted. +1 [...] I'll take a look at this tonight as well - it'd probably be easier to change, for Win32, the assumption of the name of the httpd binary when apxs is present. Thanks Randy! __ Stas BekmanJAm_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