Sfoglia il codice sorgente

Use DPB_PROPERTIES to determine parallel build for a port

Markus Hennecke 4 anni fa
parent
commit
141aea618e
1 ha cambiato i file con 3 aggiunte e 7 eliminazioni
  1. 3 7
      autoupdate.pl

+ 3 - 7
autoupdate.pl

@@ -576,7 +576,7 @@ sub build_pkg {
 
 	# Create the command that will build the package
 	my $cmd = 'env ';
-	$cmd .= 'MAKE_JOBS=' . $info->{jobs} . ' ';
+	$cmd .= 'MAKE_JOBS=' . $info->{jobs} . ' ' if ($info->{jobs});
 	$cmd .= "FLAVOR=\"$info->{flavor}\" " if ($info->{flavor} ne '');
 	$cmd .= "SUBPACKAGE=$info->{subpkg} " if ($info->{subpkg} ne '');
 	$cmd .= 'make build';
@@ -652,17 +652,13 @@ sub set_parallel_build {
 	my $info = shift;
 
 	my $cur_dir = getcwd;
-	my $cmd = 'make show=PARALLEL_BUILD';
+	my $cmd = 'make show=DPB_PROPERTIES';
 	my ($port, $port_dir) = find_newer_ports_dir($info);
 	chdir $port_dir or die "Unable to change to '$port_dir'\n";
 
-	my $parallel = 1;
 	open(my $in, "$cmd |")
 	    or die "Unable to determine parallel build info for \"$port\"\n";
-	while (<$in>) {
-		chomp;
-		$parallel &= ($_ eq 'Yes');
-	}
+	my $parallel = grep(/parallel/, (<$in>));
 	close($in);
 	chdir $cur_dir;