dougm       00/04/15 17:28:39

  Modified:    .        Makefile.PL
  Log:
  -E option to use cpp
  
  Revision  Changes    Path
  1.6       +8 -4      modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.PL       2000/04/15 19:04:20     1.5
  +++ Makefile.PL       2000/04/16 00:28:39     1.6
  @@ -20,9 +20,9 @@
   {
       use Getopt::Std;
       my %opts;
  -    getopts('cm:', \%opts);
  +    getopts('Ecm:', \%opts);
       configure()    if $opts{c};
  -    make($opts{m}) if $opts{m};
  +    make(\%opts) if $opts{m};
   }
   
   sub configure {
  @@ -54,7 +54,8 @@
   }
   
   sub make {
  -    my $target = shift;
  +    my $opts = shift;
  +    my $target = $opts->{m};
       return clean() if $target eq 'c';
       my $single_file = $target =~ /\.c$/ ? $target : "";
   
  @@ -64,8 +65,11 @@
   
       chdir $code->path;
   
  +    my $flags = "-g -Wall";
  +    $flags .= " -E" if $opts->{E};
  +
       for ($single_file ? $single_file : $code->c_files) {
  -        echo_cmd "$cc -g -Wall $ccopts @inc -c $_";
  +        echo_cmd "$cc $flags $ccopts @inc -c $_";
           return if $single_file;
       }
   
  
  
  

Reply via email to