dougm       01/02/27 21:38:11

  Modified:    lib/Apache ParseSource.pm
  Log:
  allow new() to configure apxs location
  sort headers so apr_*.h are #include-d first
  
  Revision  Changes    Path
  1.8       +13 -2     modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ParseSource.pm    2001/02/22 08:43:04     1.7
  +++ ParseSource.pm    2001/02/28 05:38:10     1.8
  @@ -8,9 +8,15 @@
   
   sub new {
       my $class = shift;
  -    bless {
  +
  +    my $self = bless {
           config => Apache::Build->new,
  +        @_,
       }, $class;
  +
  +    $Apache::Build::APXS ||= $self->{apxs};
  +
  +    $self;
   }
   
   sub config {
  @@ -75,6 +81,7 @@
   
       my @includes;
       my $unwanted = join '|', qw(ap_listen internal);
  +
       File::Find::finddepth({
                              wanted => sub {
                                  return unless /\.h$/;
  @@ -84,8 +91,12 @@
                              },
                              follow => 1,
                             }, $dir);
  +
  +    #include apr_*.h before the others
  +    my @wanted = grep { /apr_\w+\.h$/ } @includes;
  +    push @wanted, grep { !/apr_\w+\.h$/ } @includes;
   
  -    return $self->{includes} = \@includes;
  +    return $self->{includes} = \@wanted;
   }
   
   sub generate_cscan_file {
  
  
  

Reply via email to