Changeset 1128 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Base.pm


Ignore:
Timestamp:
Dec 21, 2010, 3:01:44 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • pb_check_requirements now takes direct result from pb_conf_get_if and does more internal work, which ease caller.
File:
1 edited

Legend:

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

    r1127 r1128  
    409409sub pb_check_requirements {
    410410
    411 my $cmds = shift || "";
    412 my $options = shift || "";
     411my $req = shift || undef;
     412my $opt = shift || undef;
     413my $appname = shift || undef;
     414
     415my ($req2,$opt2) = (undef,undef);
     416$req2 = $req->{$appname} if (defined $req and defined $appname);
     417$opt2 = $opt->{$appname} if (defined $opt and defined $appname);
    413418
    414419# cmds is a string of coma separated commands
    415 foreach my $file (split(/,/,$cmds)) {
    416     pb_check_req($file,0);
     420if (defined $req2) {
     421    foreach my $file (split(/,/,$req2)) {
     422        pb_check_req($file,0);
     423    }
    417424}
    418425
    419426# opts is a string of coma separated commands
    420 foreach my $file (split(/,/,$options)) {
    421     pb_check_req($file,1);
     427if (defined $opt2) {
     428    foreach my $file (split(/,/,$opt2)) {
     429        pb_check_req($file,1);
     430    }
    422431}
    423432}
     
    455464} else {
    456465    pb_log(2,"OK\n");
    457     return($found");
     466    return($found);
    458467}
    459468}
Note: See TracChangeset for help on using the changeset viewer.