The smart build command now saves the build command in a file smart-build.log. This way
[charm.git] / smart-build.pl
index d0dfe24057b53d624e27401919db22562ccedfca..e8d2d8acb96789c8ae855bef8ec1e477d43debe8 100755 (executable)
@@ -47,10 +47,14 @@ if($cpu =~ m/i[0-9]86/){
 } elsif($cpu =~ m/powerpc/){
        print "Detected architecture ppc\n";
        $ppc = 1;
+} elsif($cpu =~ m/Power Mac/){
+  print "Detected architecture ppc\n";
+  $ppc = 1;
 }
 
 
 
+
 # Determine converse architecture
 # net, mpi, ...
 
@@ -96,15 +100,15 @@ EOF
                        last;
                } elsif($line eq "2"){
                        $converse_network_type = "net";
-                       $network_option_string += "ibverbs ";
+                       $network_option_string = $network_option_string . "ibverbs ";
                        last;
                } elsif($line eq "3"){
                        $converse_network_type = "net";
-                       $network_option_string += "gm ";
+                       $network_option_string = $network_option_string . "gm ";
                        last;
                } elsif($line eq "4"){
                        $converse_network_type = "net";
-                       $network_option_string += "mx ";
+                       $network_option_string = $network_option_string . "mx ";
                        last;
                } elsif($line eq "5"){
                        $converse_network_type = "ammasso";
@@ -140,6 +144,9 @@ EOF
 $target = "LIBS";
 $arch = "";
 
+print "arch_os: $arch_os\n";
+print "converse_network_type: $converse_network_type\n";
+
 if($converse_network_type eq "ammasso" || 
    $converse_network_type eq "bluegenel" ||
    $converse_network_type eq "mpi-bluegenel"||
@@ -150,15 +157,17 @@ if($converse_network_type eq "ammasso" ||
 else 
    {
          $arch = "${converse_network_type}-${arch_os}";
+          print "arch: $arch\n";
          if($amd64) {
-               $arch += "-amd64";
+                $arch = $arch . "-amd64";
          } elsif($ia64){
-               $arch += "-ia64";
+               $arch = $arch . "-ia64";
          } elsif($ppc){
-               $arch += "-ppc";
+               $arch = $arch . "-ppc";
          }
          
    }
+print "arch: $arch\n";
 
 
 
@@ -372,6 +381,10 @@ if($j ne ""){
 
 $build_line = "./build $target $arch ${network_option_string} $compiler $smp $j ${compiler_flags}\n";
 
+open(BUILDLINE, ">smart-build.log");
+print BUILDLINE "Using the following build command:\n$build_line\n";
+close(BUILDLINE);
+
 if(-e "src/arch/$arch"){
        print "Building with: ${build_line}\n"; 
        system($build_line);