Fix: Meilleur gestion du makepack sous linux

This commit is contained in:
Laurent Destailleur 2004-11-13 23:01:32 +00:00
parent 5b3fcdacff
commit 4a1980cf8f

View File

@ -135,20 +135,21 @@ foreach my $target (keys %CHOOSEDTARGET) {
print "Test requirement for target $target: Search '$req'... "; print "Test requirement for target $target: Search '$req'... ";
$ret=`"$req" 2>&1`; $ret=`"$req" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8; $coderetour=$?; $coderetour2=$coderetour>>8;
if ($coderetour != 0 && ($coderetour2 == 1 && $OS =~ /windows/) || ($coderetour2 == 127 && $OS !~ /windows/) && $PROGPATH) { if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
# If error not found, we try in PROGPATH # Not found error, we try in PROGPATH
$ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`; $ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8; $coderetour=$?; $coderetour2=$coderetour>>8;
$REQUIREMENTTARGET{$target}="$PROGPATH/$ALTERNATEPATH{$req}/$req"; $REQUIREMENTTARGET{$target}="$PROGPATH/$ALTERNATEPATH{$req}/$req";
} }
if ($coderetour == 0 || ($coderetour2 > 1 && $coderetour2 < 127) || $ret =~ /Usage/) { if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/))) {
# Pas erreur ou erreur autre que programme absent # Not found error
print " Found ".$REQUIREMENTTARGET{$target}."\n";
} else {
print "Not found\nCan't build target $target. Requirement '$req' not found in PATH\n"; print "Not found\nCan't build target $target. Requirement '$req' not found in PATH\n";
$CHOOSEDTARGET{$target}=-1; $CHOOSEDTARGET{$target}=-1;
last; last;
} else {
# Pas erreur ou erreur autre que programme absent
print " Found ".$REQUIREMENTTARGET{$target}."\n";
} }
} }
} }