Print this page
make: unifdef for PARALLEL (undefined, this relates to the old pmake)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/main.cc
          +++ new/usr/src/cmd/make/bin/main.cc
↓ open down ↓ 228 lines elided ↑ open up ↑
 229  229  #ifdef TEAMWARE_MAKE_CMN
 230  230          struct itimerval        value;
 231  231          char                    def_dmakerc_path[MAXPATHLEN];
 232  232          Name                    dmake_name, dmake_name2;
 233  233          Name                    dmake_value, dmake_value2;
 234  234          Property                prop, prop2;
 235  235          struct stat             statbuf;
 236  236          int                     statval;
 237  237  #endif
 238  238  
 239      -#ifndef PARALLEL
 240  239          struct stat             out_stat, err_stat;
 241      -#endif
 242  240          hostid = gethostid();
 243  241  #ifdef TEAMWARE_MAKE_CMN
 244  242          avo_get_user(NULL, NULL); // Initialize user name
 245  243  #endif
 246  244          bsd_signals();
 247  245  
 248  246          (void) setlocale(LC_ALL, "");
 249  247  
 250  248  
 251  249  #ifdef DMAKE_STATISTICS
↓ open down ↓ 157 lines elided ↑ open up ↑
 409  407                                  mbs_buffer, getpid());
 410  408                          int fd = mkstemp(mbs_buffer2);
 411  409                          if (fd >= 0) {
 412  410                                  close(fd);
 413  411                                  unlink(mbs_buffer2);
 414  412                                  tmpdir = strdup(mbs_buffer);
 415  413                          }
 416  414                  }
 417  415          }
 418  416  
 419      -#ifndef PARALLEL
 420  417          /* find out if stdout and stderr point to the same place */
 421  418          if (fstat(1, &out_stat) < 0) {
 422  419                  fatal(catgets(catd, 1, 165, "fstat of standard out failed: %s"), errmsg(errno));
 423  420          }
 424  421          if (fstat(2, &err_stat) < 0) {
 425  422                  fatal(catgets(catd, 1, 166, "fstat of standard error failed: %s"), errmsg(errno));
 426  423          }
 427  424          if ((out_stat.st_dev == err_stat.st_dev) &&
 428  425              (out_stat.st_ino == err_stat.st_ino)) {
 429  426                  stdout_stderr_same = true;
 430  427          } else {
 431  428                  stdout_stderr_same = false;
 432  429          }
 433      -#else
 434      -        stdout_stderr_same = false;
 435      -#endif
 436  430          /* Make the vroot package scan the path using shell semantics */
 437  431          set_path_style(0);
 438  432  
 439  433          setup_char_semantics();
 440  434  
 441  435          setup_for_projectdir();
 442  436  
 443  437          /*
 444  438           * If running with .KEEP_STATE, curdir will be set with
 445  439           * the connected directory.
↓ open down ↓ 880 lines elided ↑ open up ↑
1326 1320  #ifndef TEAMWARE_MAKE_CMN
1327 1321                                  warning(catgets(catd, 1, 284, "Ignoring ParallelMake -M option"));
1328 1322  #endif
1329 1323                                  break;
1330 1324                          case 32: /* -m seen */
1331 1325                                  argv[i] = (char *)NOCATGETS("-m");
1332 1326  #ifndef TEAMWARE_MAKE_CMN
1333 1327                                  warning(catgets(catd, 1, 285, "Ignoring DistributedMake -m option"));
1334 1328  #endif
1335 1329                                  break;
1336      -#ifndef PARALLEL
1337 1330                          case 128: /* -O seen */
1338 1331                                  argv[i] = (char *)NOCATGETS("-O");
1339 1332                                  break;
1340      -#endif
1341 1333                          case 256: /* -K seen */
1342 1334                                  argv[i] = (char *)NOCATGETS("-K");
1343 1335                                  break;
1344 1336                          case 512:       /* -o seen */
1345 1337                                  argv[i] = (char *)NOCATGETS("-o");
1346 1338  #ifndef TEAMWARE_MAKE_CMN
1347 1339                                  warning(catgets(catd, 1, 311, "Ignoring DistributedMake -o option"));
1348 1340  #endif
1349 1341                                  break;
1350 1342                          case 1024: /* -x seen */
↓ open down ↓ 339 lines elided ↑ open up ↑
1690 1682                          do_not_exec_rule = false;
1691 1683                  }
1692 1684                  return 0;
1693 1685          case 'n':                        /* Print, not exec commands */
1694 1686                  if (invert_this) {
1695 1687                          do_not_exec_rule = false;
1696 1688                  } else {
1697 1689                          do_not_exec_rule = true;
1698 1690                  }
1699 1691                  return 0;
1700      -#ifndef PARALLEL
1701 1692          case 'O':                        /* Send job start & result msgs */
1702 1693                  if (invert_this) {
1703 1694                          send_mtool_msgs = false;
1704 1695                  } else {
1705 1696  #ifdef DISTRIBUTED
1706 1697                          send_mtool_msgs = true;
1707 1698  #endif
1708 1699                  }
1709 1700                  return 128;
1710      -#endif
1711 1701          case 'o':                        /* Use alternative dmake output dir */
1712 1702                  if (invert_this) {
1713 1703                          dmake_odir_specified = false;
1714 1704                  } else {
1715 1705                          dmake_odir_specified = true;
1716 1706                  }
1717 1707                  return 512;
1718 1708          case 'P':                        /* Print for selected targets */
1719 1709                  if (invert_this) {
1720 1710                          report_dependencies_level--;
↓ open down ↓ 479 lines elided ↑ open up ↑
2200 2190                  append_char('t', &makeflags_string_posix);
2201 2191          }
2202 2192          if (build_unconditional) {
2203 2193                  append_char('u', &makeflags_string);
2204 2194                  append_char('u', &makeflags_string_posix);
2205 2195          }
2206 2196          if (report_cwd) {
2207 2197                  append_char('w', &makeflags_string);
2208 2198                  append_char('w', &makeflags_string_posix);
2209 2199          }
2210      -#ifndef PARALLEL
2211 2200          /* -c dmake_rcfile */
2212 2201          if (dmake_rcfile_specified) {
2213 2202                  MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_RCFILE"));
2214 2203                  dmake_rcfile = GETNAME(wcs_buffer, FIND_LENGTH);
2215 2204                  append_makeflags_string(dmake_rcfile, &makeflags_string);
2216 2205                  append_makeflags_string(dmake_rcfile, &makeflags_string_posix);
2217 2206          }
2218 2207          /* -g dmake_group */
2219 2208          if (dmake_group_specified) {
2220 2209                  MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_GROUP"));
↓ open down ↓ 45 lines elided ↑ open up ↑
2266 2255          }
2267 2256          /* -R */
2268 2257          if (pmake_cap_r_specified) {
2269 2258                  append_char((int) space_char, &makeflags_string);
2270 2259                  append_char((int) hyphen_char, &makeflags_string);
2271 2260                  append_char('R', &makeflags_string);
2272 2261                  append_char((int) space_char, &makeflags_string_posix);
2273 2262                  append_char((int) hyphen_char, &makeflags_string_posix);
2274 2263                  append_char('R', &makeflags_string_posix);
2275 2264          }
2276      -#endif
2277 2265  
2278 2266  /*
2279 2267   *      Make sure MAKEFLAGS is exported
2280 2268   */
2281 2269          maybe_append_prop(makeflags, macro_prop)->
2282 2270            body.macro.exported = true;
2283 2271  
2284 2272          if (makeflags_string.buffer.start[1] != (int) nul_char) {
2285 2273                  if (makeflags_string.buffer.start[1] != (int) space_char) {
2286 2274                          MBSTOWCS(wcs_buffer, NOCATGETS("MFLAGS"));
↓ open down ↓ 1297 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX