You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by ra...@apache.org on 2003/08/20 09:55:23 UTC
cvs commit: httpd-apreq-2/env/t TEST.PL
randyk 2003/08/20 00:55:23
Modified: env/t TEST.PL
Log:
Adjust the apxs command for building c-modules for Win32.
Revision Changes Path
1.4 +22 -5 httpd-apreq-2/env/t/TEST.PL
Index: TEST.PL
===================================================================
RCS file: /home/cvs/httpd-apreq-2/env/t/TEST.PL,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TEST.PL 20 Jul 2003 08:52:19 -0000 1.3
+++ TEST.PL 20 Aug 2003 07:55:23 -0000 1.4
@@ -3,15 +3,16 @@
use Apache2;
use Apache::Build;
-require Win32 if Apache::Build::WIN32;
+use constant WIN32 => Apache::Build::WIN32;
+require Win32 if WIN32;
use Cwd;
-my $cwd = Apache::Build::WIN32 ?
+my $cwd = WIN32 ?
Win32::GetLongPathName(cwd) : cwd;
$cwd =~ m{^(.+httpd-apreq-2)} or die "Can't find base cvs directory";
my $base_dir = $1;
my $env_dir = "$base_dir/env";
-my $env_dir_libs = Apache::Build::WIN32 ?
+my $env_dir_libs = WIN32 ?
"$base_dir/win32/libs" : "$env_dir/.libs";
use base 'Apache::TestRun';
@@ -38,6 +39,8 @@
package My::TestConfig;
use Apache::TestTrace;
use Apache::TestConfigC;
+use Apache::Build;
+use constant WIN32 => Apache::Build::WIN32;
use base 'Apache::TestConfig';
@@ -58,7 +61,21 @@
my $fh = Symbol::gensym();
open $fh, ">$makefile" or die "open $makefile: $!";
- print $fh <<EOF;
+ if (WIN32) {
+ my @goners = map {$name . '.' . $_} qw(exp ilk lib pdb so lo);
+ print $fh <<EOF;
+APXS=$self->{APXS}
+all: $lib
+
+$lib: $name.c
+ \$(APXS) -L../../../win32/libs -I../../../src -llibapreq -llibhttpd -lmod_apreq $dversion -p -I$self->{cmodules_dir} -c $name.c
+
+clean:
+ -erase @goners vc60.pdb
+EOF
+ }
+ else {
+ print $fh <<EOF;
APXS=$self->{APXS}
all: $lib
@@ -68,6 +85,6 @@
clean:
-rm -rf $name.o $name.lo $name.slo $name.la .libs
EOF
-
+ }
close $fh or die "close $makefile: $!";
}