Commits

releng  committed 5f15895

#100000# some changes for SO build environment

  • Participants
  • Parent commits 5eadaa5

Comments (0)

Files changed (1)

File solenv/bin/build.pl

 #
 sub get_build_list_path {
     my $module = shift;
-    my @possible_dirs = ($module, $module. '.lnk');
+    my @possible_dirs = ($module, $module. '.lnk', $module. '.link');
     return $build_list_paths{$module} if (defined $build_list_paths{$module});
     foreach (@possible_dirs) {
         my $possible_dir_path = $StandDir.$_.'/prj/';
     my ($ExclPrj, $i, $Prj, $Dependencies);
     $ExclPrj = shift;
     my $ExclPrj_orig = '';
-    $ExclPrj_orig = $` if ($ExclPrj =~ /\.lnk$/o);
+    $ExclPrj_orig = $` if (($ExclPrj =~ /\.lnk$/o) || ($ExclPrj =~ /\.link$/o));
     $Dependencies = shift;
     foreach $Prj (keys %$Dependencies) {
         my $prj_deps_hash = $$Dependencies{$Prj};
 sub modules_classify {
     my @modules = @_;
     foreach my $module (sort @modules) {
+        if ((-e $StandDir.$module.'.lnk') || (-e $StandDir.$module.'.link')) {
+            $modules_types{$module} = 'lnk';
+            next;
+        };
         if (-d $StandDir.$module) {
             $modules_types{$module} = 'mod';
             next;
         };
-        if (-e $StandDir.$module.'.lnk') {
-            $modules_types{$module} = 'lnk';
-            next;
-        };
         $modules_types{$module} = 'img';
     };
 };
         if ($$var_ref) {
             return if (-d $StandDir.$$var_ref);
             $$var_ref .= '.lnk' and return if (-d $StandDir.$$var_ref.'.lnk');
+            $$var_ref .= '.link' and return if (-d $StandDir.$$var_ref.'.link');
             print_error("Cannot find module '$$var_ref'", 9);
             return;
         };
 sub ensure_clear_module {
     my $module = shift;
     my $module_type = $modules_types{$module};
-    my $lnk_name = $module . '.lnk';
     if ($module_type eq 'mod') {
-        if (-e ($StandDir.$lnk_name)) {
-            print "Last checkout for $module seems to have been interrupted...\n";
-            print "Checking it out again...\n";
-            #rmtree("$StandDir$module", 0, 1);
-            $module_type = 'lnk';
+         clear_module($module);
+         return;
+    };
+    if ($module_type eq 'lnk') {
+        if((!rename("$StandDir$module.lnk", "$StandDir$module")) && (!rename("$StandDir$module.link", "$StandDir$module"))) {
+            print_error("Cannot rename link to $module. Please rename it manually");
         } else {
             clear_module($module);
-            return;
-        };
-    };
-    if ($module_type eq 'lnk') {
-        if(!rename("$StandDir$lnk_name", "$StandDir$module")) {
-            print_error("Cannot rename $StandDir$lnk_name. Please rename it manually");
         };
     };
 };
     $deps_hash = shift;
     foreach (keys %incompatibles) {
         my $incomp_prj = $_;
-        $incomp_prj .= '.lnk' if (!defined $$deps_hash{$_});
+        if (!defined $$deps_hash{$_}) {
+            $incomp_prj .= '.lnk' if (-e $StandDir.$incomp_prj . '.lnk');
+            $incomp_prj .= '.link' if (-e $StandDir.$incomp_prj . '.link');
+        }
         delete $incompatibles{$_};
         $incompatibles{$incomp_prj} = $$deps_hash{$incomp_prj};
         delete $$deps_hash{$incomp_prj};
     while ($prj = PickPrjToBuild($deps_hash)) {
         $orig_prj = '';
         $orig_prj = $` if ($prj =~ /\.lnk$/o);
+        $orig_prj = $` if ($prj =~ /\.link$/o);
         if (($border_prj ne $prj) &&
             ($border_prj ne $orig_prj)) {
             RemoveFromDependencies($prj, $deps_hash);
 #        my $current_dir = getcwd();
         foreach my $module (sort @modules_built) {
             my $module_path = CorrectPath($StandDir.$module);
-            if (!(chdir($module_path.'.lnk') or chdir($module_path))) {
+            if (!(chdir($module_path.'.lnk') or chdir($module_path.'.link') or chdir($module_path))) {
                 push(@warnings, "Could not remove delivered files from the module $module. Your build can become inconsistent.\n");
             } else {
                 print "Removing delivered from module $module\n";
 }
 
 #
-# Procedure renames <module>.lnk into <module>
+# Procedure renames <module>.lnk (.link) into <module>
 #
 sub get_current_module {
     my $module_name = shift;
     my $link_name = $module_name . '.lnk';
+    $link_name .= '.link' if (-e $StandDir.$module_name . '.link');
     chdir $StandDir;
     getcwd();
     print "\nBreaking link to module $module_name";
     my $start_dir = getcwd();
     my @dir_entries = split(/[\\\/]/, $start_dir);
     my $current_module = $dir_entries[$#dir_entries];
-    $current_module = $` if ($current_module =~ /(\.lnk)$/);
-    my $link_name = $ENV{SRC_ROOT}.'/'.$current_module.'.lnk';
+    $current_module = $` if (($current_module =~ /(\.lnk)$/) || ($current_module =~ /(\.link)$/));
+    my $link_name = $ENV{SRC_ROOT}.'/'.$current_module.$1;
     if ( $^O eq 'MSWin32' ) {
         $start_dir =~ s/\\/\//go;
         $link_name =~ s/\\/\//go;