Fix: Meilleur gestion du makepack sous linux

This commit is contained in:
Laurent Destailleur 2004-11-12 14:59:30 +00:00
parent bc66e5d667
commit cdd15f6e73

View File

@ -134,14 +134,14 @@ 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 && $PROGPATH) { if ($coderetour != 0 && ($coderetour2 == 1 || $coderetour2 == 127) && $PROGPATH) {
# If error not found, we try in PROGPATH # If error not found, 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 || $ret =~ /Usage/) { if ($coderetour == 0 || ($coderetour2 > 1 && $coderetour2 < 127) || $ret =~ /Usage/) {
# Pas erreur ou erreur autre que programme absent # Pas erreur ou erreur autre que programme absent
print " Found ".$REQUIREMENTTARGET{$target}."\n"; print " Found ".$REQUIREMENTTARGET{$target}."\n";
} else { } else {
@ -154,6 +154,16 @@ foreach my $target (keys %CHOOSEDTARGET) {
print "\n"; print "\n";
# Check if there is at least on target to build
#----------------------------------------------
$nboftargetok=0;
foreach $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) { next; }
$nboftargetok++;
}
if ($nboftarget) {
# Update buildroot # Update buildroot
#----------------- #-----------------
my $copyalreadydone=1; my $copyalreadydone=1;
@ -233,6 +243,8 @@ foreach $target (keys %CHOOSEDTARGET) {
} }
}
print "\n----- Summary -----\n"; print "\n----- Summary -----\n";
foreach $target (keys %CHOOSEDTARGET) { foreach $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) { if ($CHOOSEDTARGET{$target} < 0) {