Ignore:
Timestamp:
Oct 2, 2007, 12:14:05 AM (12 years ago)
Author:
bruno
Message:

Support global filter gfiles (taken before package specific ones)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Base.pm

    r156 r169  
    367367my @ffiles;
    368368my ($ffile0, $ffile1, $ffile2, $ffile3);
     369my ($mfile0, $mfile1, $mfile2, $mfile3);
    369370my $pbpkg = shift || die "No package specified";
    370371my $dtype = shift || die "No dtype specified";
     
    374375my $ptr; # returned value pointer on the hash of filters
    375376my %ptr;
     377
     378# Global filter files first, then package specificities
     379if (-d "$ENV{'PBCONF'}/pbfilter") {
     380    $mfile0 = "$ENV{'PBCONF'}/pbfilter/$dtype.pbf" if (-f "$ENV{'PBCONF'}/pbfilter/$dtype.pbf");
     381    $mfile1 = "$ENV{'PBCONF'}/pbfilter/$dfam.pbf" if (-f "$ENV{'PBCONF'}/pbfilter/$dfam.pbf");
     382    $mfile2 = "$ENV{'PBCONF'}/pbfilter/$ddir.pbf" if (-f "$ENV{'PBCONF'}/pbfilter/$ddir.pbf");
     383    $mfile3 = "$ENV{'PBCONF'}/pbfilter/$ddir-$dver.pbf" if (-f "$ENV{'PBCONF'}/pbfilter/$ddir-$dver.pbf");
     384
     385    push @ffiles,$mfile0 if (defined $mfile0);
     386    push @ffiles,$mfile1 if (defined $mfile1);
     387    push @ffiles,$mfile2 if (defined $mfile2);
     388    push @ffiles,$mfile3 if (defined $mfile3);
     389}
    376390
    377391if (-d "$ENV{'PBCONF'}/$pbpkg/pbfilter") {
Note: See TracChangeset for help on using the changeset viewer.