perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0 Makefile.PL
Date Sat, 06 Apr 2002 16:38:13 GMT
dougm       02/04/06 08:38:13

  Modified:    .        Makefile.PL
  Log:
  cat xs/typemap and WrapXS/typemap into Apache2/typemap
  
  Revision  Changes    Path
  1.69      +19 -1     modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Makefile.PL	6 Apr 2002 16:24:51 -0000	1.68
  +++ Makefile.PL	6 Apr 2002 16:38:12 -0000	1.69
  @@ -20,6 +20,7 @@
   use Config;
   use File::Spec::Functions;
   use DirHandle ();
  +use File::Copy 'cp';
   
   use Apache::Build ();
   use Apache::TestReportPerl ();
  @@ -58,7 +59,7 @@
   configure();
   
   local %ModPerl::MM::PM = (
  -    'xs/typemap' => 'blib/lib/Apache2/typemap',
  +    'lib/typemap' => 'blib/lib/Apache2/typemap',
   );
   
   ModPerl::MM::WriteMakefile(
  @@ -161,6 +162,8 @@
           print "generating XS code using $tables_dir...\n";
           xs_generate($httpd_version);
       }
  +
  +    install_typemap();
   }
   
   sub post_configure {
  @@ -205,6 +208,20 @@
       #shift @INC; #ModPerl::Code needs this path too
   }
   
  +sub install_typemap {
  +    my $to_file = 'lib/typemap';
  +
  +    open my $to_fh, ">$to_file" or die "open $to_file: $!";
  +
  +    for my $from_file (qw(WrapXS/typemap xs/typemap)) {
  +        open my $from_fh, $from_file or die "open $from_file: $!";
  +        cp $from_fh, $to_fh;
  +        close $from_fh;
  +    }
  +
  +    close $to_fh or die "close $to_file: $!";
  +}
  +
   sub echo_cmd {
       my $cmd = shift;
       print "$cmd\n";
  @@ -215,6 +232,7 @@
       my $path = $code->path;
   
       return [@{ $build->clean_files },
  +            qw(lib/typemap),
               <xs/*.exp>, <xs/*.def>,
               map { "$path/$_"} @{ $code->clean_files }];
   }
  
  
  

Mime
View raw message