Print this page
make: remove more distributed mode code

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/main.cc
          +++ new/usr/src/cmd/make/bin/main.cc
↓ open down ↓ 401 lines elided ↑ open up ↑
 402  402                  } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("TXT2"))) {
 403  403                          output_mode = txt2_mode;
 404  404                  } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("HTML1"))) {
 405  405                          output_mode = html1_mode;
 406  406                  } else {
 407  407                          warning(catgets(catd, 1, 352, "Unsupported value `%s' for DMAKE_OUTPUT_MODE after -x flag (ignored)"),
 408  408                                dmake_value2->string_mb);
 409  409                  }
 410  410          }
 411  411          /*
 412      -         * Find the dmake_mode: distributed, parallel, or serial.
      412 +         * Find the dmake_mode: parallel, or serial.
 413  413           */
 414  414      if ((!pmake_cap_r_specified) &&
 415  415          (!pmake_machinesfile_specified)) {
 416  416          MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
 417  417          dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
 418  418          prop2 = get_prop(dmake_name2->prop, macro_prop);
 419  419          if (prop2 == NULL) {
 420      -                /* DMAKE_MODE not defined, default to distributed mode */
 421      -                dmake_mode_type = distributed_mode;
      420 +                /* DMAKE_MODE not defined, default to parallel mode */
      421 +                dmake_mode_type = parallel_mode;
 422  422                  no_parallel = false;
 423  423          } else {
 424  424                  dmake_value2 = prop2->body.macro.value;
 425      -                if ((dmake_value2 == NULL) ||
 426      -                    (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("distributed")))) {
 427      -                        dmake_mode_type = distributed_mode;
 428      -                        no_parallel = false;
 429      -                } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("parallel"))) {
      425 +                if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("parallel"))) {
 430  426                          dmake_mode_type = parallel_mode;
 431  427                          no_parallel = false;
 432  428                  } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("serial"))) {
 433  429                          dmake_mode_type = serial_mode;
 434  430                          no_parallel = true;
 435  431                  } else {
 436  432                          fatal(catgets(catd, 1, 307, "Unknown dmake mode argument `%s' after -m flag"), dmake_value2->string_mb);
 437  433                  }
 438  434          }
 439  435  
 440      -        if ((!list_all_targets) &&
 441      -            (report_dependencies_level == 0)) {
 442      -                /*
 443      -                 * Check to see if either DMAKE_RCFILE or DMAKE_MODE is defined.
 444      -                 * They could be defined in the env, in the makefile, or on the
 445      -                 * command line.
 446      -                 * If neither is defined, and $(HOME)/.dmakerc does not exists,
 447      -                 * then print a message, and default to parallel mode.
 448      -                 */
 449      -                if(dmake_mode_type == distributed_mode) {
 450      -                        dmake_mode_type = parallel_mode;
 451      -                        no_parallel = false;
 452      -                }
 453      -        }
 454  436      }
 455  437  
 456  438          parallel_flag = true;
 457  439          putenv(strdup(NOCATGETS("DMAKE_CHILD=TRUE")));
 458  440  
 459  441  //
 460  442  // If dmake is running with -t option, set dmake_mode_type to serial.
 461  443  // This is done because doname() calls touch_command() that runs serially.
 462  444  // If we do not do that, maketool will have problems. 
 463  445  //
↓ open down ↓ 309 lines elided ↑ open up ↑
 773  755                  }
 774  756                  if (rp->pid > 0) {
 775  757                          kill(rp->pid, SIGTERM);
 776  758                          rp->pid = -1;
 777  759                  }
 778  760          }
 779  761          if (getpid() == getpgrp()) {
 780  762                  bsd_signal(SIGTERM, SIG_IGN);
 781  763                  kill (-getpid(), SIGTERM);
 782  764          }
 783      -        /* Clean up all parallel/distributed children already finished */
      765 +        /* Clean up all parallel children already finished */
 784  766          finish_children(false);
 785  767  
 786  768          /* Make sure the processes running under us terminate first */
 787  769  
 788  770          while (wait((int *) NULL) != -1);
 789  771          /* Delete the current targets unless they are precious */
 790  772          if ((current_target != NULL) &&
 791  773              current_target->is_member &&
 792  774              ((member = get_prop(current_target->prop, member_prop)) != NULL)) {
 793  775                  current_target = member->body.member.library;
↓ open down ↓ 988 lines elided ↑ open up ↑
1782 1764          MBSTOWCS(wcs_buffer, NOCATGETS("Makefile"));
1783 1765          Makefile = GETNAME(wcs_buffer, FIND_LENGTH);
1784 1766          MBSTOWCS(wcs_buffer, NOCATGETS("makefile"));
1785 1767          makefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
1786 1768          MBSTOWCS(wcs_buffer, NOCATGETS("s.makefile"));
1787 1769          sdotmakefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
1788 1770          MBSTOWCS(wcs_buffer, NOCATGETS("s.Makefile"));
1789 1771          sdotMakefile = GETNAME(wcs_buffer, FIND_LENGTH);
1790 1772  
1791 1773  /*
1792      - *      Set flag if NSE is active
1793      - */
1794      -
1795      -/*
1796 1774   *      initialize global dependency entry for .NOT_AUTO
1797 1775   */
1798 1776          not_auto_depen->next = NULL;
1799 1777          not_auto_depen->name = not_auto;
1800 1778          not_auto_depen->automatic = not_auto_depen->stale = false;
1801 1779  
1802 1780  /*
1803 1781   *      Read internal definitions and rules.
1804 1782   */
1805 1783          if (read_trace_level > 1) {
↓ open down ↓ 1453 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX