coar 2004/03/05 03:30:42
Modified: perl-framework/Apache-Test/lib/Apache TestConfigC.pm
Log:
we need to explicitly export symbols on AIX when compiling
1.3 modules; set that up. (it's not necessary with the way
2.0 is built.) also, change some assumptions about '/' being
the path separator. there are more, but not right now..
Revision Changes Path
1.27 +43 -1
httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm
Index: TestConfigC.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -u -r1.26 -r1.27
--- TestConfigC.pm 4 Mar 2004 05:51:31 -0000 1.26
+++ TestConfigC.pm 5 Mar 2004 11:30:42 -0000 1.27
@@ -167,7 +167,7 @@
my $dversion = $self->server->dversion;
my $name = $mod->{name};
- my $makefile = "$mod->{dir}/Makefile";
+ my $makefile = catfile $mod->{dir}, 'Makefile';
debug "writing $makefile";
my $lib = $self->cmodules_build_so($name);
@@ -181,6 +181,48 @@
$lib: $name.c
\$(APXS) $dversion -I$self->{cmodules_dir} -c $name.c
+
+clean:
+ -rm -rf $name.o $name.lo $name.slo $name.la .libs
+EOF
+
+ close $fh or die "close $makefile: $!";
+}
+
+sub cmodules_write_makefile_aix {
+ my($self, $mod) = @_;
+
+ my $dversion = $self->server->dversion;
+ my $name = $mod->{name};
+ my $makefile = catfile $mod->{dir}, 'Makefile';
+ my $apxsflags = '';
+
+ if ($dversion eq '-DAPACHE1') {
+ $apxsflags = "-Wl,-bE:$name.exp";
+ my $expfile = catfile $mod->{dir}, "$name.exp";
+ if (! -f $expfile) {
+ my $fh = Symbol::gensym();
+ $name =~ /^mod_(\w+)(?:\.c)?$/;
+ my $sym = $1 . '_module';
+ open $fh, ">$expfile" or die "open $expfile: $!";
+ print $fh "$sym\n";
+ close $fh;
+ }
+ }
+ debug "writing $makefile";
+
+ my $lib = $self->cmodules_build_so($name);
+
+ my $fh = Symbol::gensym();
+ open $fh, ">$makefile" or die "open $makefile: $!";
+
+ print $fh <<EOF;
+APXS=$self->{APXS}
+APXSFLAGS=$apxsflags
+all: $lib
+
+$lib: $name.c
+ \$(APXS) $dversion -I$self->{cmodules_dir} \$(APXSFLAGS) -c $name.c
clean:
-rm -rf $name.o $name.lo $name.slo $name.la .libs