You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/02/08 20:21:24 UTC
cvs commit: modperl-2.0/src/modules/perl modperl_types.h
dougm 01/02/08 11:20:48
Modified: lib/Apache Build.pm
lib/ModPerl MM.pm
src/modules/perl modperl_types.h
Log:
various changes for the xs generator
Revision Changes Path
1.29 +7 -7 modperl-2.0/lib/Apache/Build.pm
Index: Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- Build.pm 2001/01/21 20:51:35 1.28
+++ Build.pm 2001/02/08 19:20:18 1.29
@@ -308,9 +308,9 @@
}
sub file_path {
- my($self, $file) = @_;
- return $file if $file =~ m:^/:;
- join '/', $self->{cwd}, $file;
+ my $self = shift;
+ my @files = map { m:^/: ? $_ : join('/', $self->{cwd}, $_) } @_;
+ return wantarray ? @files : $files[0];
}
sub freeze {
@@ -336,6 +336,8 @@
sub save {
my($self, $file) = @_;
+ delete $INC{$bpm};
+
$file ||= $self->default_file('build_config');
$file = $self->file_path($file);
@@ -359,7 +361,7 @@
1;
EOF
- close $fh;
+ close $fh or die "failed to write $file: $!";
}
#--- attribute access ---
@@ -586,8 +588,6 @@
(my $c = $xs) =~ s:.*/(\w+)\.xs$:$1.c:;
push @files, $c;
- $xs = "../../../$xs"; #XXX
-
push @xs_targ, <<EOF;
$c: $xs
\t\$(MODPERL_XSUBPP) $xs > \$*.xsc && \$(MODPERL_MV) \$*.xsc \$@
@@ -775,7 +775,7 @@
my $self = shift;
my $src = $self->dir;
my $os = is_win32 ? 'win32' : 'unix';
- my @inc = $self->file_path("src/modules/perl");
+ my @inc = $self->file_path("src/modules/perl", "xs");
my $ainc = $self->apxs('-q' => 'INCLUDEDIR');
if (-d $ainc) {
1.5 +13 -5 modperl-2.0/lib/ModPerl/MM.pm
Index: MM.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MM.pm 2001/01/02 06:40:19 1.4
+++ MM.pm 2001/02/08 19:20:28 1.5
@@ -4,6 +4,7 @@
use warnings;
use ExtUtils::MakeMaker ();
use ExtUtils::Install ();
+use Cwd ();
#to override MakeMaker MOD_INSTALL macro
sub mod_install {
@@ -54,10 +55,17 @@
my $build = build_config();
my_import();
my @opts = (INC => $build->inc, CCFLAGS => $build->ap_ccopts);
- my $typemap = $build->file_path('src/modules/perl/typemap');
- if (-e $typemap) {
- push @opts, TYPEMAPS => [$typemap];
+
+ my @typemaps;
+ my $pwd = Cwd::fastcwd();
+ for ('xs', $pwd, "$pwd/..") {
+ my $typemap = $build->file_path("$_/typemap");
+ if (-e $typemap) {
+ push @typemaps, $typemap;
+ }
}
+ push @opts, TYPEMAPS => \@typemaps if @typemaps;
+
ExtUtils::MakeMaker::WriteMakefile(@opts, @_);
}
@@ -90,8 +98,8 @@
$self->{HAS_LINK_CODE} = 0;
print "$name will be linked static\n";
#propagate static xs module to src/modules/perl/Makefile
- $build->{XS}->{$name} = join '/',
- $self->{BASEEXT}, $xs;
+ $build->{XS}->{$name} =
+ join '/', Cwd::fastcwd(), $xs;
$build->save;
}
}
1.20 +0 -14 modperl-2.0/src/modules/perl/modperl_types.h
Index: modperl_types.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- modperl_types.h 2001/01/20 21:19:09 1.19
+++ modperl_types.h 2001/02/08 19:20:40 1.20
@@ -6,20 +6,6 @@
typedef apr_array_header_t MpAV;
typedef apr_table_t MpHV;
-/* xs typemap */
-
-typedef request_rec * Apache;
-typedef request_rec * Apache__SubRequest;
-typedef conn_rec * Apache__Connection;
-typedef server_rec * Apache__Server;
-
-typedef cmd_parms * Apache__CmdParms;
-typedef module * Apache__Module;
-typedef command_rec * Apache__Command;
-
-typedef apr_table_t * Apache__table;
-typedef apr_pool_t * Apache__Pool;
-
/* mod_perl structures */
typedef struct {