On Tue, 22 Jul 2003, Randy Kobes wrote:
[ .. ]
> I've attached a revised version of the patch,
> which includes the better alignment and the use of
> single quotes to avoid backslashism.

Sorry about this - I think some of the tabs got lost
in the transfer. Hopefully the attached one is better.

-- 
best regards,
randy
Index: Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.127
diff -u -r1.127 Build.pm
--- Build.pm    12 Jun 2003 23:42:23 -0000      1.127
+++ Build.pm    23 Jul 2003 04:38:14 -0000
@@ -319,7 +319,9 @@
 
     if ($self->{MP_DEBUG}) {
         if (MSVC) {
-            $val =~ s/-release/-debug/;
+            unless ($val =~ s/-release/-debug/) {
+                $val .= ' -debug';
+            }
         }
     }
 
@@ -1058,8 +1060,11 @@
 sub dynamic_link_MSWin32 {
     my $self = shift;
     my $defs = $self->export_files_MSWin32;
+    my $symbols = $self->modperl_symbols_MSWin32;
     return $self->dynamic_link_header_default .
-           "\t$defs" . ' -out:$@';
+        "\t$defs" .
+        ($symbols ? ' \\' . "\n\t-pdb:$symbols" : '') .
+        ' -out:$@';
 }
 
 sub dynamic_link_aix {
@@ -1104,11 +1109,35 @@
     $libs->($self);
 }
 
+sub modperl_symbols_MSWin32 {
+    my $self = shift;
+    return "" unless $self->{MP_DEBUG};
+    "$self->{cwd}/src/modules/perl/$self->{MP_LIBNAME}.pdb";
+}
+
+sub modperl_symbols {
+    my $self = shift;
+    my $symbols = \&{"modperl_symbols_$^O"};
+    return "" unless defined &$symbols;
+    $symbols->($self);
+}
+
 sub write_src_makefile {
     my $self = shift;
     my $code = ModPerl::Code->new;
     my $path = $code->path;
 
+    my $install = <<'EOI';
+install:
+# install mod_perl.so
+       @$(MKPATH) $(MODPERL_AP_LIBEXECDIR)
+       $(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
+       $(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
+# install mod_perl .h files
+       @$(MKPATH) $(MODPERL_AP_INCLUDEDIR)
+       $(MODPERL_CP) $(MODPERL_H_FILES) $(MODPERL_AP_INCLUDEDIR)
+EOI
+
     my $mf = $self->default_file('makefile');
 
     open my $fh, '>', $mf or die "open $mf: $!";
@@ -1141,6 +1170,28 @@
         print $fh $self->canon_make_attr("lib_$type", $libs{$type});
     }
 
+    if (my $symbols = $self->modperl_symbols) {
+        print $fh $self->canon_make_attr('lib_symbols', $symbols);
+        $install .= <<'EOI';
+# install mod_perl symbol file
+       @$(MKPATH) $(MODPERL_AP_LIBEXECDIR)
+       $(MODPERL_TEST_F) $(MODPERL_LIB_SYMBOLS) && \
+       $(MODPERL_CP) $(MODPERL_LIB_SYMBOLS) $(MODPERL_AP_LIBEXECDIR)
+EOI
+    }
+
+    if (my $libs = $self->modperl_libs) {
+        print $fh $self->canon_make_attr('lib_location', $libs);
+        print $fh $self->canon_make_attr('ap_libdir', 
+                                         "$self->{MP_AP_PREFIX}/lib");
+        $install .= <<'EOI';
+# install mod_perl.lib
+       @$(MKPATH) $(MODPERL_AP_LIBDIR)
+       $(MODPERL_TEST_F) $(MODPERL_LIB_LOCATION) && \
+       $(MODPERL_CP) $(MODPERL_LIB_LOCATION) $(MODPERL_AP_LIBDIR)
+EOI
+    }
+
     my $libperl = join '/',
       $self->perl_config('archlibexp'), 'CORE', $self->perl_config('libperl');
 
@@ -1188,14 +1239,11 @@
 
 lib: $(MODPERL_LIB)
 
-install:
-# install mod_perl.so
-       @$(MKPATH) $(MODPERL_AP_LIBEXECDIR)
-       $(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
-       $(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
-# install mod_perl .h files
-       @$(MKPATH) $(MODPERL_AP_INCLUDEDIR)
-       $(MODPERL_CP) $(MODPERL_H_FILES) $(MODPERL_AP_INCLUDEDIR)
+EOF
+
+    print $fh $install;
+
+    print $fh <<'EOF';
 
 .SUFFIXES: .xs .c $(MODPERL_OBJ_EXT) .lo .i .s
 
@@ -1264,6 +1312,13 @@
     my $flags = \&{"otherldflags_$^O"};
     return $self->otherldflags_default unless defined &$flags;
     $flags->($self);
+}
+
+sub otherldflags_MSWin32 {
+    my $self = shift;
+    my $flags = $self->otherldflags_default;
+    $flags .= ' -pdb:$(INST_ARCHAUTODIR)\$(BASEEXT).pdb' if $self->{MP_DEBUG};
+    $flags;
 }
 
 sub typemaps {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to