Print this page
make: translate using gettext, rather than the unmaintainable catgets

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/main.cc
          +++ new/usr/src/cmd/make/bin/main.cc
↓ open down ↓ 24 lines elided ↑ open up ↑
  25   25  
  26   26  /*
  27   27   *      main.cc
  28   28   *
  29   29   *      make program main routine plus some helper routines
  30   30   */
  31   31   
  32   32  /*
  33   33   * Included files
  34   34   */
  35      -#if defined(TEAMWARE_MAKE_CMN)
  36      -#       include <avo/intl.h>
  37      -#endif
  38      -
  39   35  #include <bsd/bsd.h>            /* bsd_signal() */
  40   36  
  41   37  
  42   38  #include <locale.h>             /* setlocale() */
  43   39  #include <libgen.h>
  44   40  #include <mk/defs.h>
  45      -#include <mksdmsi18n/mksdmsi18n.h>      /* libmksdmsi18n_init() */
  46   41  #include <mksh/macro.h>         /* getvar() */
  47   42  #include <mksh/misc.h>          /* getmem(), setup_char_semantics() */
  48   43  
  49      -#if defined(TEAMWARE_MAKE_CMN)
  50      -#endif
  51      -
  52   44  #include <pwd.h>                /* getpwnam() */
  53   45  #include <setjmp.h>
  54   46  #include <signal.h>
  55   47  #include <stdlib.h>
  56   48  #include <sys/errno.h>          /* ENOENT */
  57   49  #include <sys/stat.h>           /* fstat() */
  58   50  #include <fcntl.h>              /* open() */
  59   51  
  60   52  #       include <sys/systeminfo.h>      /* sysinfo() */
  61   53  
↓ open down ↓ 9 lines elided ↑ open up ↑
  71   63  #define MAXJOBS_ADJUST_RFE4694000
  72   64  
  73   65  #ifdef MAXJOBS_ADJUST_RFE4694000
  74   66  extern void job_adjust_fini();
  75   67  #endif /* MAXJOBS_ADJUST_RFE4694000 */
  76   68  
  77   69  
  78   70  /*
  79   71   * Defined macros
  80   72   */
  81      -#define MAKE_PREFIX             NOCATGETS("/usr")
  82      -#define LD_SUPPORT_ENV_VAR      NOCATGETS("SGS_SUPPORT_32")
  83      -#define LD_SUPPORT_ENV_VAR_32   NOCATGETS("SGS_SUPPORT_32")
  84      -#define LD_SUPPORT_ENV_VAR_64   NOCATGETS("SGS_SUPPORT_64")
  85      -#define LD_SUPPORT_MAKE_LIB     NOCATGETS("libmakestate.so.1")
       73 +#define LD_SUPPORT_ENV_VAR      "SGS_SUPPORT_32"
       74 +#define LD_SUPPORT_ENV_VAR_32   "SGS_SUPPORT_32"
       75 +#define LD_SUPPORT_ENV_VAR_64   "SGS_SUPPORT_64"
       76 +#define LD_SUPPORT_MAKE_LIB     "libmakestate.so.1"
  86   77  #ifdef __i386
  87      -#define LD_SUPPORT_MAKE_ARCH    NOCATGETS("i386")
       78 +#define LD_SUPPORT_MAKE_ARCH    "i386"
  88   79  #elif __sparc
  89      -#define LD_SUPPORT_MAKE_ARCH    NOCATGETS("sparc")
       80 +#define LD_SUPPORT_MAKE_ARCH    "sparc"
  90   81  #else
  91   82  #error "Unsupported architecture"
  92   83  #endif
  93   84  
  94   85  /*
  95   86   * typedefs & structs
  96   87   */
  97   88  
  98   89  /*
  99   90   * Static variables
↓ open down ↓ 56 lines elided ↑ open up ↑
 156  147  static  void            set_sgs_support(void);
 157  148  static  void            setup_for_projectdir(void);
 158  149  static  void            setup_makeflags_argv(void);
 159  150  static  void            report_dir_enter_leave(Boolean entering);
 160  151  
 161  152  extern void expand_value(Name, register String , Boolean);
 162  153  
 163  154  static const char       verstring[] = "illumos make";
 164  155  
 165  156  jmp_buf jmpbuffer;
 166      -extern nl_catd catd;
 167  157  
 168  158  /*
 169  159   *      main(argc, argv)
 170  160   *
 171  161   *      Parameters:
 172  162   *              argc                    You know what this is
 173  163   *              argv                    You know what this is
 174  164   *
 175  165   *      Static variables used:
 176  166   *              list_all_targets        make -T seen
↓ open down ↓ 34 lines elided ↑ open up ↑
 211  201          int                     statval;
 212  202  
 213  203          struct stat             out_stat, err_stat;
 214  204          hostid = gethostid();
 215  205          bsd_signals();
 216  206  
 217  207          (void) setlocale(LC_ALL, "");
 218  208  
 219  209  
 220  210  #ifdef DMAKE_STATISTICS
 221      -        if (getenv(NOCATGETS("DMAKE_STATISTICS"))) {
      211 +        if (getenv("DMAKE_STATISTICS")) {
 222  212                  getname_stat = true;
 223  213          }
 224  214  #endif
 225  215  
 226      -        catd = catopen(AVO_DOMAIN_DMAKE, NL_CAT_LOCALE);
 227      -
 228      -// ---> fprintf(stderr, catgets(catd, 15, 666, "--- SUN make ---\n"));
 229      -
 230      -
 231      -/*
 232      - * I put libmksdmsi18n_init() under #ifdef because it requires avo_i18n_init()
 233      - * from avo_util library. 
 234      - */
 235      -        libmksdmsi18n_init();
 236      -
 237      -
 238      -        textdomain(NOCATGETS("SUNW_SPRO_MAKE"));
      216 +#ifndef TEXT_DOMAIN
      217 +#define TEXT_DOMAIN     "SYS_TEST"      
      218 +#endif
      219 +        textdomain(TEXT_DOMAIN);
 239  220  
 240  221          g_argc = argc;
 241  222          g_argv = (char **) malloc((g_argc + 1) * sizeof(char *));
 242  223          for (i = 0; i < argc; i++) {
 243  224                  g_argv[i] = argv[i];
 244  225          }
 245  226          g_argv[i] = NULL;
 246  227  
 247  228          /*
 248  229           * Set argv_zero_string to some form of argv[0] for
↓ open down ↓ 39 lines elided ↑ open up ↑
 288  269  
 289  270          /*
 290  271           * look for last slash char in the path to look at the binary 
 291  272           * name. This is to resolve the hard link and invoke make
 292  273           * in svr4 mode.
 293  274           */
 294  275  
 295  276          /* Sun OS make standart */
 296  277          svr4 = false;  
 297  278          posix = false;
 298      -        if(!strcmp(argv_zero_string, NOCATGETS("/usr/xpg4/bin/make"))) {
      279 +        if(!strcmp(argv_zero_string, "/usr/xpg4/bin/make")) {
 299  280                  svr4 = false;
 300  281                  posix = true;
 301  282          } else {
 302  283                  prognameptr = strrchr(argv[0], '/');
 303  284                  if(prognameptr) {
 304  285                          prognameptr++;
 305  286                  } else {
 306  287                          prognameptr = argv[0];
 307  288                  }
 308      -                if(!strcmp(prognameptr, NOCATGETS("svr4.make"))) {
      289 +                if(!strcmp(prognameptr, "svr4.make")) {
 309  290                          svr4 = true;
 310  291                          posix = false;
 311  292                  }
 312  293          }
 313      -        if (getenv(USE_SVR4_MAKE) || getenv(NOCATGETS("USE_SVID"))){
      294 +        if (getenv(USE_SVR4_MAKE) || getenv("USE_SVID")){
 314  295             svr4 = true;
 315  296             posix = false;
 316  297          }
 317  298  
 318  299          /*
 319  300           * Find the dmake_compat_mode: posix, sun, svr4, or gnu_style, .
 320  301           */
 321      -        char * dmake_compat_mode_var = getenv(NOCATGETS("SUN_MAKE_COMPAT_MODE"));
      302 +        char * dmake_compat_mode_var = getenv("SUN_MAKE_COMPAT_MODE");
 322  303          if (dmake_compat_mode_var != NULL) {
 323      -                if (0 == strcasecmp(dmake_compat_mode_var, NOCATGETS("GNU"))) {
      304 +                if (0 == strcasecmp(dmake_compat_mode_var, "GNU")) {
 324  305                          gnu_style = true;
 325  306                  }
 326  307                  //svr4 = false;
 327  308                  //posix = false;
 328  309          }
 329  310  
 330  311          /*
 331  312           * Temporary directory set up.
 332  313           */
 333      -        char * tmpdir_var = getenv(NOCATGETS("TMPDIR"));
      314 +        char * tmpdir_var = getenv("TMPDIR");
 334  315          if (tmpdir_var != NULL && *tmpdir_var == '/' && strlen(tmpdir_var) < MAXPATHLEN) {
 335  316                  strcpy(mbs_buffer, tmpdir_var);
 336  317                  for (tmpdir_var = mbs_buffer+strlen(mbs_buffer);
 337  318                          *(--tmpdir_var) == '/' && tmpdir_var > mbs_buffer;
 338  319                          *tmpdir_var = '\0');
 339  320                  if (strlen(mbs_buffer) + 32 < MAXPATHLEN) { /* 32 = strlen("/dmake.stdout.%d.%d.XXXXXX") */
 340      -                        sprintf(mbs_buffer2, NOCATGETS("%s/dmake.tst.%d.XXXXXX"),
      321 +                        sprintf(mbs_buffer2, "%s/dmake.tst.%d.XXXXXX",
 341  322                                  mbs_buffer, getpid());
 342  323                          int fd = mkstemp(mbs_buffer2);
 343  324                          if (fd >= 0) {
 344  325                                  close(fd);
 345  326                                  unlink(mbs_buffer2);
 346  327                                  tmpdir = strdup(mbs_buffer);
 347  328                          }
 348  329                  }
 349  330          }
 350  331  
 351  332          /* find out if stdout and stderr point to the same place */
 352  333          if (fstat(1, &out_stat) < 0) {
 353      -                fatal(catgets(catd, 1, 165, "fstat of standard out failed: %s"), errmsg(errno));
      334 +                fatal(gettext("fstat of standard out failed: %s"), errmsg(errno));
 354  335          }
 355  336          if (fstat(2, &err_stat) < 0) {
 356      -                fatal(catgets(catd, 1, 166, "fstat of standard error failed: %s"), errmsg(errno));
      337 +                fatal(gettext("fstat of standard error failed: %s"), errmsg(errno));
 357  338          }
 358  339          if ((out_stat.st_dev == err_stat.st_dev) &&
 359  340              (out_stat.st_ino == err_stat.st_ino)) {
 360  341                  stdout_stderr_same = true;
 361  342          } else {
 362  343                  stdout_stderr_same = false;
 363  344          }
 364  345          /* Make the vroot package scan the path using shell semantics */
 365  346          set_path_style(0);
 366  347  
↓ open down ↓ 10 lines elided ↑ open up ↑
 377  358          load_cached_names();
 378  359  
 379  360  /*
 380  361   *      Set command line flags
 381  362   */
 382  363          setup_makeflags_argv();
 383  364          read_command_options(mf_argc, mf_argv);
 384  365          read_command_options(argc, argv);
 385  366          if (debug_level > 0) {
 386  367                  cp = getenv(makeflags->string_mb);
 387      -                (void) printf(catgets(catd, 1, 167, "MAKEFLAGS value: %s\n"), cp == NULL ? "" : cp);
      368 +                (void) printf(gettext("MAKEFLAGS value: %s\n"), cp == NULL ? "" : cp);
 388  369          }
 389  370  
 390  371          setup_interrupt(handle_interrupt);
 391  372  
 392  373          read_files_and_state(argc, argv);
 393  374  
 394  375          /*
 395  376           * Find the dmake_output_mode: TXT1, TXT2 or HTML1.
 396  377           */
 397      -        MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_OUTPUT_MODE"));
      378 +        MBSTOWCS(wcs_buffer, "DMAKE_OUTPUT_MODE");
 398  379          dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
 399  380          prop2 = get_prop(dmake_name2->prop, macro_prop);
 400  381          if (prop2 == NULL) {
 401  382                  /* DMAKE_OUTPUT_MODE not defined, default to TXT1 mode */
 402  383                  output_mode = txt1_mode;
 403  384          } else {
 404  385                  dmake_value2 = prop2->body.macro.value;
 405  386                  if ((dmake_value2 == NULL) ||
 406      -                    (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("TXT1")))) {
      387 +                    (IS_EQUAL(dmake_value2->string_mb, "TXT1"))) {
 407  388                          output_mode = txt1_mode;
 408      -                } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("TXT2"))) {
      389 +                } else if (IS_EQUAL(dmake_value2->string_mb, "TXT2")) {
 409  390                          output_mode = txt2_mode;
 410      -                } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("HTML1"))) {
      391 +                } else if (IS_EQUAL(dmake_value2->string_mb, "HTML1")) {
 411  392                          output_mode = html1_mode;
 412  393                  } else {
 413      -                        warning(catgets(catd, 1, 352, "Unsupported value `%s' for DMAKE_OUTPUT_MODE after -x flag (ignored)"),
      394 +                        warning(gettext("Unsupported value `%s' for DMAKE_OUTPUT_MODE after -x flag (ignored)"),
 414  395                                dmake_value2->string_mb);
 415  396                  }
 416  397          }
 417  398          /*
 418  399           * Find the dmake_mode: parallel, or serial.
 419  400           */
 420  401      if ((!pmake_cap_r_specified) &&
 421  402          (!pmake_machinesfile_specified)) {
 422  403          char *s = strdup(argv[0]);    
 423  404              
 424      -        MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
      405 +        MBSTOWCS(wcs_buffer, "DMAKE_MODE");
 425  406          dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
 426  407          prop2 = get_prop(dmake_name2->prop, macro_prop);
 427  408          // If we're invoked as 'make' run serially, regardless of DMAKE_MODE
 428  409          // If we're invoked as 'make' but passed -j, run parallel
 429  410          // If we're invoked as 'dmake', without DMAKE_MODE, default parallel
 430  411          // If we're invoked as 'dmake' and DMAKE_MODE is set, honour it.
 431      -        if ((strcmp(basename(s), NOCATGETS("make")) == 0) &&
      412 +        if ((strcmp(basename(s), "make") == 0) &&
 432  413              !dmake_max_jobs_specified) {
 433  414                  dmake_mode_type = serial_mode;
 434  415                  no_parallel = true;
 435  416          } else if (prop2 == NULL) {
 436  417                  /* DMAKE_MODE not defined, default based on our name */
 437  418                  char *s = strdup(argv[0]);
 438  419  
 439      -                if (strcmp(basename(s), NOCATGETS("dmake")) == 0) {
      420 +                if (strcmp(basename(s), "dmake") == 0) {
 440  421                          dmake_mode_type = parallel_mode;
 441  422                          no_parallel = false;
 442  423                  }
 443  424          } else {
 444  425                  dmake_value2 = prop2->body.macro.value;
 445      -                if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("parallel"))) {
      426 +                if (IS_EQUAL(dmake_value2->string_mb, "parallel")) {
 446  427                          dmake_mode_type = parallel_mode;
 447  428                          no_parallel = false;
 448      -                } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("serial"))) {
      429 +                } else if (IS_EQUAL(dmake_value2->string_mb, "serial")) {
 449  430                          dmake_mode_type = serial_mode;
 450  431                          no_parallel = true;
 451  432                  } else {
 452      -                        fatal(catgets(catd, 1, 307, "Unknown dmake mode argument `%s' after -m flag"), dmake_value2->string_mb);
      433 +                        fatal(gettext("Unknown dmake mode argument `%s' after -m flag"), dmake_value2->string_mb);
 453  434                  }
 454  435          }
 455  436          free(s);
 456  437      }
 457  438  
 458  439          parallel_flag = true;
 459      -        putenv(strdup(NOCATGETS("DMAKE_CHILD=TRUE")));
      440 +        putenv(strdup("DMAKE_CHILD=TRUE"));
 460  441  
 461  442  //
 462  443  // If dmake is running with -t option, set dmake_mode_type to serial.
 463  444  // This is done because doname() calls touch_command() that runs serially.
 464  445  // If we do not do that, maketool will have problems. 
 465  446  //
 466  447          if(touch) {
 467  448                  dmake_mode_type = serial_mode;
 468  449                  no_parallel = true;
 469  450          }
 470  451  
 471  452          /*
 472  453           * Check whether stdout and stderr are physically same.
 473  454           * This is in order to decide whether we need to redirect
 474  455           * stderr separately from stdout.
 475  456           * This check is performed only if __DMAKE_SEPARATE_STDERR
 476  457           * is not set. This variable may be used in order to preserve
 477  458           * the 'old' behaviour.
 478  459           */
 479  460          out_err_same = true;
 480      -        char * dmake_sep_var = getenv(NOCATGETS("__DMAKE_SEPARATE_STDERR"));
 481      -        if (dmake_sep_var == NULL || (0 != strcasecmp(dmake_sep_var, NOCATGETS("NO")))) {
      461 +        char * dmake_sep_var = getenv("__DMAKE_SEPARATE_STDERR");
      462 +        if (dmake_sep_var == NULL || (0 != strcasecmp(dmake_sep_var, "NO"))) {
 482  463                  struct stat stdout_stat;
 483  464                  struct stat stderr_stat;
 484  465                  if( (fstat(1, &stdout_stat) == 0)
 485  466                   && (fstat(2, &stderr_stat) == 0) )
 486  467                  {
 487  468                          if( (stdout_stat.st_dev != stderr_stat.st_dev)
 488  469                           || (stdout_stat.st_ino != stderr_stat.st_ino) )
 489  470                          {
 490  471                                  out_err_same = false;
 491  472                          }
↓ open down ↓ 111 lines elided ↑ open up ↑
 603  584   *              do_not_exec_rule
 604  585   *                              True if -n flag on
 605  586   *              done            The Name ".DONE", rule we run
 606  587   *              keep_state      Set if .KEEP_STATE seen
 607  588   *              parallel        True if building in parallel
 608  589   *              quest           If -q is on we do not run .DONE
 609  590   *              report_dependencies
 610  591   *                              True if -P flag on
 611  592   *              running_list    List of parallel running processes
 612  593   *              temp_file_name  The temp file is removed, if any
 613      - *              catd    the message catalog file
 614  594   */
 615  595  extern "C" void
 616  596  cleanup_after_exit(void)
 617  597  {
 618  598          Running         rp;
 619  599  
 620  600  extern long     getname_bytes_count;
 621  601  extern long     getname_names_count;
 622  602  extern long     getname_struct_count;
 623  603  extern long     freename_bytes_count;
 624  604  extern long     freename_names_count;
 625  605  extern long     freename_struct_count;
 626  606  extern long     other_alloc;
 627  607  
 628  608  extern long     env_alloc_num;
 629  609  extern long     env_alloc_bytes;
 630  610  
 631  611  
 632  612  #ifdef DMAKE_STATISTICS
 633  613  if(getname_stat) {
 634      -        printf(NOCATGETS(">>> Getname statistics:\n"));
 635      -        printf(NOCATGETS("  Allocated:\n"));
 636      -        printf(NOCATGETS("        Names: %ld\n"), getname_names_count);
 637      -        printf(NOCATGETS("      Strings: %ld Kb (%ld bytes)\n"), getname_bytes_count/1000, getname_bytes_count);
 638      -        printf(NOCATGETS("      Structs: %ld Kb (%ld bytes)\n"), getname_struct_count/1000, getname_struct_count);
 639      -        printf(NOCATGETS("  Total bytes: %ld Kb (%ld bytes)\n"), getname_struct_count/1000 + getname_bytes_count/1000, getname_struct_count + getname_bytes_count);
 640      -
 641      -        printf(NOCATGETS("\n  Unallocated: %ld\n"), freename_names_count);
 642      -        printf(NOCATGETS("        Names: %ld\n"), freename_names_count);
 643      -        printf(NOCATGETS("      Strings: %ld Kb (%ld bytes)\n"), freename_bytes_count/1000, freename_bytes_count);
 644      -        printf(NOCATGETS("      Structs: %ld Kb (%ld bytes)\n"), freename_struct_count/1000, freename_struct_count);
 645      -        printf(NOCATGETS("  Total bytes: %ld Kb (%ld bytes)\n"), freename_struct_count/1000 + freename_bytes_count/1000, freename_struct_count + freename_bytes_count);
      614 +        printf(">>> Getname statistics:\n");
      615 +        printf("  Allocated:\n");
      616 +        printf("        Names: %ld\n", getname_names_count);
      617 +        printf("      Strings: %ld Kb (%ld bytes)\n", getname_bytes_count/1000, getname_bytes_count);
      618 +        printf("      Structs: %ld Kb (%ld bytes)\n", getname_struct_count/1000, getname_struct_count);
      619 +        printf("  Total bytes: %ld Kb (%ld bytes)\n", getname_struct_count/1000 + getname_bytes_count/1000, getname_struct_count + getname_bytes_count);
      620 +
      621 +        printf("\n  Unallocated: %ld\n", freename_names_count);
      622 +        printf("        Names: %ld\n", freename_names_count);
      623 +        printf("      Strings: %ld Kb (%ld bytes)\n", freename_bytes_count/1000, freename_bytes_count);
      624 +        printf("      Structs: %ld Kb (%ld bytes)\n", freename_struct_count/1000, freename_struct_count);
      625 +        printf("  Total bytes: %ld Kb (%ld bytes)\n", freename_struct_count/1000 + freename_bytes_count/1000, freename_struct_count + freename_bytes_count);
 646  626  
 647      -        printf(NOCATGETS("\n  Total used: %ld Kb (%ld bytes)\n"), (getname_struct_count/1000 + getname_bytes_count/1000) - (freename_struct_count/1000 + freename_bytes_count/1000), (getname_struct_count + getname_bytes_count) - (freename_struct_count + freename_bytes_count));
      627 +        printf("\n  Total used: %ld Kb (%ld bytes)\n", (getname_struct_count/1000 + getname_bytes_count/1000) - (freename_struct_count/1000 + freename_bytes_count/1000), (getname_struct_count + getname_bytes_count) - (freename_struct_count + freename_bytes_count));
 648  628  
 649      -        printf(NOCATGETS("\n>>> Other:\n"));
      629 +        printf("\n>>> Other:\n");
 650  630          printf(
 651      -                NOCATGETS("       Env (%ld): %ld Kb (%ld bytes)\n"),
      631 +                "       Env (%ld): %ld Kb (%ld bytes)\n",
 652  632                  env_alloc_num,
 653  633                  env_alloc_bytes/1000,
 654  634                  env_alloc_bytes
 655  635          );
 656  636  
 657  637  }
 658  638  #endif
 659  639  
 660  640          parallel = false;
 661  641          /* If we used the SVR4_MAKE, don't build .DONE or .FAILED */
 662  642          if (!getenv(USE_SVR4_MAKE)){
 663  643              /* Build the target .DONE or .FAILED if we caught an error */
 664  644              if (!quest && !list_all_targets) {
 665  645                  Name            failed_name;
 666  646  
 667      -                MBSTOWCS(wcs_buffer, NOCATGETS(".FAILED"));
      647 +                MBSTOWCS(wcs_buffer, ".FAILED");
 668  648                  failed_name = GETNAME(wcs_buffer, FIND_LENGTH);
 669  649                  if ((exit_status != 0) && (failed_name->prop != NULL)) {
 670  650                          /*
 671  651                           * [tolik] switch DMake to serial mode
 672  652                           */
 673  653                          dmake_mode_type = serial_mode;
 674  654                          no_parallel = true;
 675  655                          (void) doname(failed_name, false, true);
 676  656                  } else {
 677  657                      if (!trace_status) {
↓ open down ↓ 53 lines elided ↑ open up ↑
 731  711                  (void) unlink(make_state_lockfile);
 732  712                  make_state_lockfile = NULL;
 733  713                  make_state_locked = false;
 734  714          }
 735  715          /* Write .make.state */
 736  716          write_state_file(1, (Boolean) 1);
 737  717  
 738  718  #if defined (TEAMWARE_MAKE_CMN) && defined (MAXJOBS_ADJUST_RFE4694000)
 739  719          job_adjust_fini();
 740  720  #endif
 741      -
 742      -#ifdef TEAMWARE_MAKE_CMN
 743      -        catclose(catd);
 744      -#endif
 745  721  }
 746  722  
 747  723  /*
 748  724   *      handle_interrupt()
 749  725   *
 750  726   *      This is where C-C traps are caught.
 751  727   *
 752  728   *      Parameters:
 753  729   *
 754  730   *      Global variables used (except DMake 1.0):
↓ open down ↓ 48 lines elided ↑ open up ↑
 803  779  /* BID_1030811 */
 804  780  /* azv 16 Oct 95 */
 805  781                  current_target->stat.time = file_no_time; 
 806  782  
 807  783                  if (exists(current_target) != file_doesnt_exist) {
 808  784                          (void) fprintf(stderr,
 809  785                                         "\n*** %s ",
 810  786                                         current_target->string_mb);
 811  787                          if (current_target->stat.is_dir) {
 812  788                                  (void) fprintf(stderr,
 813      -                                               catgets(catd, 1, 168, "not removed.\n"),
      789 +                                               gettext("not removed.\n"),
 814  790                                                 current_target->string_mb);
 815  791                          } else if (unlink(current_target->string_mb) == 0) {
 816  792                                  (void) fprintf(stderr,
 817      -                                               catgets(catd, 1, 169, "removed.\n"),
      793 +                                               gettext("removed.\n"),
 818  794                                                 current_target->string_mb);
 819  795                          } else {
 820  796                                  (void) fprintf(stderr,
 821      -                                               catgets(catd, 1, 170, "could not be removed: %s.\n"),
      797 +                                               gettext("could not be removed: %s.\n"),
 822  798                                                 current_target->string_mb,
 823  799                                                 errmsg(errno));
 824  800                          }
 825  801                  }
 826  802          }
 827  803          for (rp = running_list; rp != NULL; rp = rp->next) {
 828  804                  if (rp->state != build_running) {
 829  805                          continue;
 830  806                  }
 831  807                  if (rp->target->is_member &&
↓ open down ↓ 6 lines elided ↑ open up ↑
 838  814                      !quest &&
 839  815                      !(rp->target->stat.is_precious || all_precious)) {
 840  816  
 841  817                          rp->target->stat.time = file_no_time; 
 842  818                          if (exists(rp->target) != file_doesnt_exist) {
 843  819                                  (void) fprintf(stderr,
 844  820                                                 "\n*** %s ",
 845  821                                                 rp->target->string_mb);
 846  822                                  if (rp->target->stat.is_dir) {
 847  823                                          (void) fprintf(stderr,
 848      -                                                       catgets(catd, 1, 171, "not removed.\n"),
      824 +                                                       gettext("not removed.\n"),
 849  825                                                         rp->target->string_mb);
 850  826                                  } else if (unlink(rp->target->string_mb) == 0) {
 851  827                                          (void) fprintf(stderr,
 852      -                                                       catgets(catd, 1, 172, "removed.\n"),
      828 +                                                       gettext("removed.\n"),
 853  829                                                         rp->target->string_mb);
 854  830                                  } else {
 855  831                                          (void) fprintf(stderr,
 856      -                                                       catgets(catd, 1, 173, "could not be removed: %s.\n"),
      832 +                                                       gettext("could not be removed: %s.\n"),
 857  833                                                         rp->target->string_mb,
 858  834                                                         errmsg(errno));
 859  835                                  }
 860  836                          }
 861  837                  }
 862  838          }
 863  839  
 864  840  
 865  841          /* Have we locked .make.state or .nse_depinfo? */
 866  842          if ((make_state_lockfile != NULL) && (make_state_locked)) {
↓ open down ↓ 139 lines elided ↑ open up ↑
1006  982                                        }
1007  983                                      }
1008  984                                    }
1009  985                                  }
1010  986                          }
1011  987                  }
1012  988  
1013  989                  if (ch == '?') {
1014  990                          if (svr4) {
1015  991                                  fprintf(stderr,
1016      -                                        catgets(catd, 1, 267, "Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
      992 +                                        gettext("Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
1017  993                                  fprintf(stderr,
1018      -                                        catgets(catd, 1, 268, "              [ -j dmake_max_jobs ][ -m dmake_mode ][ -o dmake_odir ]...\n"));
      994 +                                        gettext("              [ -j dmake_max_jobs ][ -m dmake_mode ][ -o dmake_odir ]...\n"));
1019  995                                  fprintf(stderr,
1020      -                                        catgets(catd, 1, 269, "              [ -e ][ -i ][ -k ][ -n ][ -p ][ -q ][ -r ][ -s ][ -t ][ -v ]\n"));
      996 +                                        gettext("              [ -e ][ -i ][ -k ][ -n ][ -p ][ -q ][ -r ][ -s ][ -t ][ -v ]\n"));
1021  997                                  tptr = strchr(SVR4_CMD_OPTS, optopt);
1022  998                          } else {
1023  999                                  fprintf(stderr,
1024      -                                        catgets(catd, 1, 272, "Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
     1000 +                                        gettext("Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
1025 1001                                  fprintf(stderr,
1026      -                                        catgets(catd, 1, 273, "              [ -j dmake_max_jobs ][ -K statefile ][ -m dmake_mode ][ -x MODE_NAME=VALUE ][ -o dmake_odir ]...\n"));
     1002 +                                        gettext("              [ -j dmake_max_jobs ][ -K statefile ][ -m dmake_mode ][ -x MODE_NAME=VALUE ][ -o dmake_odir ]...\n"));
1027 1003                                  fprintf(stderr,
1028      -                                        catgets(catd, 1, 274, "              [ -d ][ -dd ][ -D ][ -DD ][ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -u ][ -w ]\n"));
     1004 +                                        gettext("              [ -d ][ -dd ][ -D ][ -DD ][ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -u ][ -w ]\n"));
1029 1005                                  fprintf(stderr,
1030      -                                        catgets(catd, 1, 275, "              [ -q ][ -r ][ -s ][ -S ][ -t ][ -v ][ -V ][ target... ][ macro=value... ][ \"macro +=value\"... ]\n"));
     1006 +                                        gettext("              [ -q ][ -r ][ -s ][ -S ][ -t ][ -v ][ -V ][ target... ][ macro=value... ][ \"macro +=value\"... ]\n"));
1031 1007                                  tptr = strchr(SUNPRO_CMD_OPTS, optopt);
1032 1008                          }
1033 1009                          if (!tptr) {
1034      -                                fatal(catgets(catd, 1, 279, "Unknown option `-%c'"), optopt);
     1010 +                                fatal(gettext("Unknown option `-%c'"), optopt);
1035 1011                          } else {
1036      -                                fatal(catgets(catd, 1, 280, "Missing argument after `-%c'"), optopt);
     1012 +                                fatal(gettext("Missing argument after `-%c'"), optopt);
1037 1013                          }
1038 1014                  }
1039 1015  
1040 1016  
1041 1017  
1042 1018                  makefile_next |= parse_command_option(ch);
1043 1019                  /*
1044 1020                   * If we're done processing all of the options of
1045 1021                   * ONE argument string...
1046 1022                   */
↓ open down ↓ 6 lines elided ↑ open up ↑
1053 1029                          }
1054 1030                          switch (makefile_next) {
1055 1031                          case 0:
1056 1032                                  argv[i] = NULL;
1057 1033                                  /* This shouldn't happen */
1058 1034                                  if (k) {
1059 1035                                          argv[k] = NULL;
1060 1036                                  }
1061 1037                                  break;
1062 1038                          case 1: /* -f seen */
1063      -                                argv[i] = (char *)NOCATGETS("-f");
     1039 +                                argv[i] = (char *)"-f";
1064 1040                                  break;
1065 1041                          case 2: /* -c seen */
1066      -                                argv[i] = (char *)NOCATGETS("-c");
     1042 +                                argv[i] = (char *)"-c";
1067 1043                                  break;
1068 1044                          case 4: /* -g seen */
1069      -                                argv[i] = (char *)NOCATGETS("-g");
     1045 +                                argv[i] = (char *)"-g";
1070 1046                                  break;
1071 1047                          case 8: /* -j seen */
1072      -                                argv[i] = (char *)NOCATGETS("-j");
     1048 +                                argv[i] = (char *)"-j";
1073 1049                                  break;
1074 1050                          case 16: /* -M seen */
1075      -                                argv[i] = (char *)NOCATGETS("-M");
     1051 +                                argv[i] = (char *)"-M";
1076 1052                                  break;
1077 1053                          case 32: /* -m seen */
1078      -                                argv[i] = (char *)NOCATGETS("-m");
     1054 +                                argv[i] = (char *)"-m";
1079 1055                                  break;
1080 1056                          case 128: /* -O seen */
1081      -                                argv[i] = (char *)NOCATGETS("-O");
     1057 +                                argv[i] = (char *)"-O";
1082 1058                                  break;
1083 1059                          case 256: /* -K seen */
1084      -                                argv[i] = (char *)NOCATGETS("-K");
     1060 +                                argv[i] = (char *)"-K";
1085 1061                                  break;
1086 1062                          case 512:       /* -o seen */
1087      -                                argv[i] = (char *)NOCATGETS("-o");
     1063 +                                argv[i] = (char *)"-o";
1088 1064                                  break;
1089 1065                          case 1024: /* -x seen */
1090      -                                argv[i] = (char *)NOCATGETS("-x");
     1066 +                                argv[i] = (char *)"-x";
1091 1067                                  break;
1092 1068                          default: /* > 1 of -c, f, g, j, K, M, m, O, o, x seen */
1093      -                                fatal(catgets(catd, 1, 286, "Illegal command line. More than one option requiring\nan argument given in the same argument group"));
     1069 +                                fatal(gettext("Illegal command line. More than one option requiring\nan argument given in the same argument group"));
1094 1070                          }
1095 1071  
1096 1072                          makefile_next = 0;
1097 1073                          current_optind = optind;
1098 1074                  }
1099 1075          }
1100 1076  }
1101 1077  
1102 1078  static void
1103 1079  quote_str(char *str, char *qstr)
↓ open down ↓ 129 lines elided ↑ open up ↑
1233 1209                          while (cp && *cp && !isspace(*cp)) {
1234 1210                                  if(*cp == (int) backslash_char) {
1235 1211                                          cp++;
1236 1212                                  }
1237 1213                                  cp++;
1238 1214                          }
1239 1215                  }
1240 1216          }
1241 1217          /* Allocate memory for the new MAKEFLAGS argv */
1242 1218          mf_argv = (char **) malloc((mf_argc + 1) * sizeof(char *));
1243      -        mf_argv[0] = (char *)NOCATGETS("MAKEFLAGS");
     1219 +        mf_argv[0] = (char *)"MAKEFLAGS";
1244 1220          /*
1245 1221           * Convert the MAKEFLAGS string value into a vector of char *,
1246 1222           * similar to argv.
1247 1223           */
1248 1224          cp = cp_orig;
1249 1225          for (i = 1; i < mf_argc; i++) {
1250 1226                  /* Skip white spaces */
1251 1227                  while (cp && *cp && isspace(*cp)) {
1252 1228                          cp++;
1253 1229                  }
↓ open down ↓ 266 lines elided ↑ open up ↑
1520 1496                  } else {
1521 1497                          build_unconditional = true;
1522 1498                  }
1523 1499                  return 0;
1524 1500          case 'V':                       /* SVR4 mode */
1525 1501                  svr4 = true;
1526 1502                  return 0;
1527 1503          case 'v':                       /* Version flag */
1528 1504                  if (invert_this) {
1529 1505                  } else {
1530      -                        fprintf(stdout, NOCATGETS("dmake: %s\n"), verstring);
     1506 +                        fprintf(stdout, "dmake: %s\n", verstring);
1531 1507                          exit_status = 0;
1532 1508                          exit(0);
1533 1509                  }
1534 1510                  return 0;
1535 1511          case 'w':                        /* Unconditional flag */
1536 1512                  if (invert_this) {
1537 1513                          report_cwd = false;
1538 1514                  } else {
1539 1515                          report_cwd = true;
1540 1516                  }
↓ open down ↓ 25 lines elided ↑ open up ↑
1566 1542   */
1567 1543  static void
1568 1544  setup_for_projectdir(void)
1569 1545  {
1570 1546  static char     path[MAXPATHLEN];
1571 1547  char            cwdpath[MAXPATHLEN];
1572 1548  uid_t uid;
1573 1549  int   done=0;
1574 1550  
1575 1551          /* Check if we should use PROJECTDIR when reading the SCCS dir. */
1576      -        sccs_dir_path = getenv(NOCATGETS("PROJECTDIR"));
     1552 +        sccs_dir_path = getenv("PROJECTDIR");
1577 1553          if ((sccs_dir_path != NULL) &&
1578 1554              (sccs_dir_path[0] != (int) slash_char)) {
1579 1555                  struct passwd *pwent;
1580 1556  
1581 1557               {
1582 1558                  uid = getuid();
1583 1559                  pwent = getpwuid(uid);
1584 1560                  if (pwent == NULL) {
1585      -                   fatal(catgets(catd, 1, 188, "Bogus USERID "));
     1561 +                   fatal(gettext("Bogus USERID "));
1586 1562                  }
1587 1563                  if ((pwent = getpwnam(sccs_dir_path)) == NULL) {
1588 1564                          /*empty block : it'll go & check cwd  */
1589 1565                  }
1590 1566                  else {
1591      -                  (void) sprintf(path, NOCATGETS("%s/src"), pwent->pw_dir);
     1567 +                  (void) sprintf(path, "%s/src", pwent->pw_dir);
1592 1568                    if (access(path, F_OK) == 0) {
1593 1569                          sccs_dir_path = path;
1594 1570                          done = 1;
1595 1571                    } else {
1596      -                        (void) sprintf(path, NOCATGETS("%s/source"), pwent->pw_dir);
     1572 +                        (void) sprintf(path, "%s/source", pwent->pw_dir);
1597 1573                          if (access(path, F_OK) == 0) {
1598 1574                                  sccs_dir_path = path;
1599 1575                                  done = 1;
1600 1576                          }
1601 1577                       }
1602 1578                  }
1603 1579                  if (!done) {
1604 1580                      if (getcwd(cwdpath, MAXPATHLEN - 1 )) {
1605 1581  
1606      -                       (void) sprintf(path, NOCATGETS("%s/%s"), cwdpath,sccs_dir_path);
     1582 +                       (void) sprintf(path, "%s/%s", cwdpath,sccs_dir_path);
1607 1583                         if (access(path, F_OK) == 0) {
1608 1584                                  sccs_dir_path = path;
1609 1585                                  done = 1;
1610 1586                          } else {
1611      -                                fatal(catgets(catd, 1, 189, "Bogus PROJECTDIR '%s'"), sccs_dir_path);
     1587 +                                fatal(gettext("Bogus PROJECTDIR '%s'"), sccs_dir_path);
1612 1588                          }
1613 1589                      }
1614 1590                  }
1615 1591             }
1616 1592          }
1617 1593  }
1618 1594  
1619 1595  char *
1620 1596  make_install_prefix(void)
1621 1597  {
↓ open down ↓ 181 lines elided ↑ open up ↑
1803 1779          register Name           value;
1804 1780          ASCII_Dyn_Array         makeflags_and_macro;
1805 1781          Boolean                 is_xpg4;
1806 1782  
1807 1783  /*
1808 1784   *      Remember current mode. It may be changed after reading makefile
1809 1785   *      and we will have to correct MAKEFLAGS variable.
1810 1786   */
1811 1787          is_xpg4 = posix;
1812 1788  
1813      -        MBSTOWCS(wcs_buffer, NOCATGETS("KEEP_STATE"));
     1789 +        MBSTOWCS(wcs_buffer, "KEEP_STATE");
1814 1790          keep_state_name = GETNAME(wcs_buffer, FIND_LENGTH);
1815      -        MBSTOWCS(wcs_buffer, NOCATGETS("Makefile"));
     1791 +        MBSTOWCS(wcs_buffer, "Makefile");
1816 1792          Makefile = GETNAME(wcs_buffer, FIND_LENGTH);
1817      -        MBSTOWCS(wcs_buffer, NOCATGETS("makefile"));
     1793 +        MBSTOWCS(wcs_buffer, "makefile");
1818 1794          makefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
1819      -        MBSTOWCS(wcs_buffer, NOCATGETS("s.makefile"));
     1795 +        MBSTOWCS(wcs_buffer, "s.makefile");
1820 1796          sdotmakefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
1821      -        MBSTOWCS(wcs_buffer, NOCATGETS("s.Makefile"));
     1797 +        MBSTOWCS(wcs_buffer, "s.Makefile");
1822 1798          sdotMakefile = GETNAME(wcs_buffer, FIND_LENGTH);
1823 1799  
1824 1800  /*
1825 1801   *      initialize global dependency entry for .NOT_AUTO
1826 1802   */
1827 1803          not_auto_depen->next = NULL;
1828 1804          not_auto_depen->name = not_auto;
1829 1805          not_auto_depen->automatic = not_auto_depen->stale = false;
1830 1806  
1831 1807  /*
1832 1808   *      Read internal definitions and rules.
1833 1809   */
1834 1810          if (read_trace_level > 1) {
1835 1811                  trace_reader = true;
1836 1812          }
1837 1813          if (!ignore_default_mk) {
1838 1814                  if (svr4) {
1839      -                        MBSTOWCS(wcs_buffer, NOCATGETS("svr4.make.rules"));
     1815 +                        MBSTOWCS(wcs_buffer, "svr4.make.rules");
1840 1816                          default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
1841 1817                  } else {
1842      -                        MBSTOWCS(wcs_buffer, NOCATGETS("make.rules"));
     1818 +                        MBSTOWCS(wcs_buffer, "make.rules");
1843 1819                          default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
1844 1820                  }
1845 1821                  default_makefile->stat.is_file = true;
1846 1822  
1847 1823                  (void) read_makefile(default_makefile,
1848 1824                                       true,
1849 1825                                       false,
1850 1826                                       true);
1851 1827          }
1852 1828  
1853 1829          /*
1854 1830           * If the user did not redefine the MAKE macro in the
1855 1831           * default makefile (make.rules), then we'd like to
1856 1832           * change the macro value of MAKE to be some form
1857 1833           * of argv[0] for recursive MAKE builds.
1858 1834           */
1859      -        MBSTOWCS(wcs_buffer, NOCATGETS("MAKE"));
     1835 +        MBSTOWCS(wcs_buffer, "MAKE");
1860 1836          def_make_name = GETNAME(wcs_buffer, wslen(wcs_buffer));
1861 1837          def_make_macro = get_prop(def_make_name->prop, macro_prop);
1862 1838          if ((def_make_macro != NULL) &&
1863 1839              (IS_EQUAL(def_make_macro->body.macro.value->string_mb,
1864      -                      NOCATGETS("make")))) {
     1840 +                      "make"))) {
1865 1841                  MBSTOWCS(wcs_buffer, argv_zero_string);
1866 1842                  new_make_value = GETNAME(wcs_buffer, wslen(wcs_buffer));
1867 1843                  (void) SETVAR(def_make_name,
1868 1844                                new_make_value,
1869 1845                                false);
1870 1846          }
1871 1847  
1872 1848          default_target_to_build = NULL;
1873 1849          trace_reader = false;
1874 1850  
↓ open down ↓ 111 lines elided ↑ open up ↑
1986 1962          if (build_unconditional) {
1987 1963                  append_char('u', &makeflags_string);
1988 1964                  append_char('u', &makeflags_string_posix);
1989 1965          }
1990 1966          if (report_cwd) {
1991 1967                  append_char('w', &makeflags_string);
1992 1968                  append_char('w', &makeflags_string_posix);
1993 1969          }
1994 1970          /* -c dmake_rcfile */
1995 1971          if (dmake_rcfile_specified) {
1996      -                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_RCFILE"));
     1972 +                MBSTOWCS(wcs_buffer, "DMAKE_RCFILE");
1997 1973                  dmake_rcfile = GETNAME(wcs_buffer, FIND_LENGTH);
1998 1974                  append_makeflags_string(dmake_rcfile, &makeflags_string);
1999 1975                  append_makeflags_string(dmake_rcfile, &makeflags_string_posix);
2000 1976          }
2001 1977          /* -g dmake_group */
2002 1978          if (dmake_group_specified) {
2003      -                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_GROUP"));
     1979 +                MBSTOWCS(wcs_buffer, "DMAKE_GROUP");
2004 1980                  dmake_group = GETNAME(wcs_buffer, FIND_LENGTH);
2005 1981                  append_makeflags_string(dmake_group, &makeflags_string);
2006 1982                  append_makeflags_string(dmake_group, &makeflags_string_posix);
2007 1983          }
2008 1984          /* -j dmake_max_jobs */
2009 1985          if (dmake_max_jobs_specified) {
2010      -                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MAX_JOBS"));
     1986 +                MBSTOWCS(wcs_buffer, "DMAKE_MAX_JOBS");
2011 1987                  dmake_max_jobs = GETNAME(wcs_buffer, FIND_LENGTH);
2012 1988                  append_makeflags_string(dmake_max_jobs, &makeflags_string);
2013 1989                  append_makeflags_string(dmake_max_jobs, &makeflags_string_posix);
2014 1990          }
2015 1991          /* -m dmake_mode */
2016 1992          if (dmake_mode_specified) {
2017      -                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
     1993 +                MBSTOWCS(wcs_buffer, "DMAKE_MODE");
2018 1994                  dmake_mode = GETNAME(wcs_buffer, FIND_LENGTH);
2019 1995                  append_makeflags_string(dmake_mode, &makeflags_string);
2020 1996                  append_makeflags_string(dmake_mode, &makeflags_string_posix);
2021 1997          }
2022 1998          /* -x dmake_compat_mode */
2023 1999  //      if (dmake_compat_mode_specified) {
2024      -//              MBSTOWCS(wcs_buffer, NOCATGETS("SUN_MAKE_COMPAT_MODE"));
     2000 +//              MBSTOWCS(wcs_buffer, "SUN_MAKE_COMPAT_MODE");
2025 2001  //              dmake_compat_mode = GETNAME(wcs_buffer, FIND_LENGTH);
2026 2002  //              append_makeflags_string(dmake_compat_mode, &makeflags_string);
2027 2003  //              append_makeflags_string(dmake_compat_mode, &makeflags_string_posix);
2028 2004  //      }
2029 2005          /* -x dmake_output_mode */
2030 2006          if (dmake_output_mode_specified) {
2031      -                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_OUTPUT_MODE"));
     2007 +                MBSTOWCS(wcs_buffer, "DMAKE_OUTPUT_MODE");
2032 2008                  dmake_output_mode = GETNAME(wcs_buffer, FIND_LENGTH);
2033 2009                  append_makeflags_string(dmake_output_mode, &makeflags_string);
2034 2010                  append_makeflags_string(dmake_output_mode, &makeflags_string_posix);
2035 2011          }
2036 2012          /* -o dmake_odir */
2037 2013          if (dmake_odir_specified) {
2038      -                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_ODIR"));
     2014 +                MBSTOWCS(wcs_buffer, "DMAKE_ODIR");
2039 2015                  dmake_odir = GETNAME(wcs_buffer, FIND_LENGTH);
2040 2016                  append_makeflags_string(dmake_odir, &makeflags_string);
2041 2017                  append_makeflags_string(dmake_odir, &makeflags_string_posix);
2042 2018          }
2043 2019          /* -M pmake_machinesfile */
2044 2020          if (pmake_machinesfile_specified) {
2045      -                MBSTOWCS(wcs_buffer, NOCATGETS("PMAKE_MACHINESFILE"));
     2021 +                MBSTOWCS(wcs_buffer, "PMAKE_MACHINESFILE");
2046 2022                  pmake_machinesfile = GETNAME(wcs_buffer, FIND_LENGTH);
2047 2023                  append_makeflags_string(pmake_machinesfile, &makeflags_string);
2048 2024                  append_makeflags_string(pmake_machinesfile, &makeflags_string_posix);
2049 2025          }
2050 2026          /* -R */
2051 2027          if (pmake_cap_r_specified) {
2052 2028                  append_char((int) space_char, &makeflags_string);
2053 2029                  append_char((int) hyphen_char, &makeflags_string);
2054 2030                  append_char('R', &makeflags_string);
2055 2031                  append_char((int) space_char, &makeflags_string_posix);
↓ open down ↓ 2 lines elided ↑ open up ↑
2058 2034          }
2059 2035  
2060 2036  /*
2061 2037   *      Make sure MAKEFLAGS is exported
2062 2038   */
2063 2039          maybe_append_prop(makeflags, macro_prop)->
2064 2040            body.macro.exported = true;
2065 2041  
2066 2042          if (makeflags_string.buffer.start[1] != (int) nul_char) {
2067 2043                  if (makeflags_string.buffer.start[1] != (int) space_char) {
2068      -                        MBSTOWCS(wcs_buffer, NOCATGETS("MFLAGS"));
     2044 +                        MBSTOWCS(wcs_buffer, "MFLAGS");
2069 2045                          (void) SETVAR(GETNAME(wcs_buffer, FIND_LENGTH),
2070 2046                                        GETNAME(makeflags_string.buffer.start,
2071 2047                                                FIND_LENGTH),
2072 2048                                        false);
2073 2049                  } else {
2074      -                        MBSTOWCS(wcs_buffer, NOCATGETS("MFLAGS"));
     2050 +                        MBSTOWCS(wcs_buffer, "MFLAGS");
2075 2051                          (void) SETVAR(GETNAME(wcs_buffer, FIND_LENGTH),
2076 2052                                        GETNAME(makeflags_string.buffer.start + 2,
2077 2053                                                FIND_LENGTH),
2078 2054                                        false);
2079 2055                  }
2080 2056          }
2081 2057  
2082 2058  /* 
2083 2059   *      Add command line macro to POSIX makeflags_string  
2084 2060   */
↓ open down ↓ 51 lines elided ↑ open up ↑
2136 2112                  trace_reader = true;
2137 2113          }
2138 2114  
2139 2115          for (i = 1; i < argc; i++) {
2140 2116                  if (argv[i] &&
2141 2117                      (argv[i][0] == (int) hyphen_char) &&
2142 2118                      (argv[i][1] == 'f') &&
2143 2119                      (argv[i][2] == (int) nul_char)) {
2144 2120                          argv[i] = NULL;         /* Remove -f */
2145 2121                          if (i >= argc - 1) {
2146      -                                fatal(catgets(catd, 1, 190, "No filename argument after -f flag"));
     2122 +                                fatal(gettext("No filename argument after -f flag"));
2147 2123                          }
2148 2124                          MBSTOWCS(wcs_buffer, argv[++i]);
2149 2125                          primary_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
2150 2126                          (void) read_makefile(primary_makefile, true, true, true);
2151 2127                          argv[i] = NULL;         /* Remove filename */
2152 2128                          makefile_read = true;
2153 2129                  } else if (argv[i] &&
2154 2130                             (argv[i][0] == (int) hyphen_char) &&
2155 2131                             (argv[i][1] == 'c' ||
2156 2132                              argv[i][1] == 'g' ||
↓ open down ↓ 14 lines elided ↑ open up ↑
2171 2147   *      "Makefile" if "makefile" isn't found.
2172 2148   */
2173 2149          if (!makefile_read) {
2174 2150                  (void) read_dir(dot,
2175 2151                                  (wchar_t *) NULL,
2176 2152                                  (Property) NULL,
2177 2153                                  (wchar_t *) NULL);
2178 2154              if (!posix) {
2179 2155                  if (makefile_name->stat.is_file) {
2180 2156                          if (Makefile->stat.is_file) {
2181      -                                warning(catgets(catd, 1, 310, "Both `makefile' and `Makefile' exist"));
     2157 +                                warning(gettext("Both `makefile' and `Makefile' exist"));
2182 2158                          }
2183 2159                          primary_makefile = makefile_name;
2184 2160                          makefile_read = read_makefile(makefile_name,
2185 2161                                                        false,
2186 2162                                                        false,
2187 2163                                                        true);
2188 2164                  }
2189 2165                  if (!makefile_read &&
2190 2166                      Makefile->stat.is_file) {
2191 2167                          primary_makefile = Makefile;
↓ open down ↓ 2 lines elided ↑ open up ↑
2194 2170                                                        false,
2195 2171                                                        true);
2196 2172                  }
2197 2173              } else {
2198 2174  
2199 2175                  enum sccs_stat save_m_has_sccs = NO_SCCS;
2200 2176                  enum sccs_stat save_M_has_sccs = NO_SCCS;
2201 2177  
2202 2178                  if (makefile_name->stat.is_file) {
2203 2179                          if (Makefile->stat.is_file) {
2204      -                                warning(catgets(catd, 1, 191, "Both `makefile' and `Makefile' exist"));
     2180 +                                warning(gettext("Both `makefile' and `Makefile' exist"));
2205 2181                          }
2206 2182                  }
2207 2183                  if (makefile_name->stat.is_file) {
2208 2184                          if (makefile_name->stat.has_sccs == NO_SCCS) {
2209 2185                             primary_makefile = makefile_name;
2210 2186                             makefile_read = read_makefile(makefile_name,
2211 2187                                                        false,
2212 2188                                                        false,
2213 2189                                                        true);
2214 2190                          } else {
↓ open down ↓ 89 lines elided ↑ open up ↑
2304 2280          makeflags_string.buffer.start = NULL;
2305 2281          makeflags_string_posix.buffer.start = NULL;
2306 2282  
2307 2283          if (posix) {
2308 2284                  /*
2309 2285                   * If the user did not redefine the ARFLAGS macro in the
2310 2286                   * default makefile (make.rules), then we'd like to
2311 2287                   * change the macro value of ARFLAGS to be in accordance
2312 2288                   * with "POSIX" requirements.
2313 2289                   */
2314      -                MBSTOWCS(wcs_buffer, NOCATGETS("ARFLAGS"));
     2290 +                MBSTOWCS(wcs_buffer, "ARFLAGS");
2315 2291                  name = GETNAME(wcs_buffer, wslen(wcs_buffer));
2316 2292                  macro = get_prop(name->prop, macro_prop);
2317 2293                  if ((macro != NULL) && /* Maybe (macro == NULL) || ? */
2318 2294                      (IS_EQUAL(macro->body.macro.value->string_mb,
2319      -                              NOCATGETS("rv")))) {
2320      -                        MBSTOWCS(wcs_buffer, NOCATGETS("-rv"));
     2295 +                              "rv"))) {
     2296 +                        MBSTOWCS(wcs_buffer, "-rv");
2321 2297                          value = GETNAME(wcs_buffer, wslen(wcs_buffer));
2322 2298                          (void) SETVAR(name,
2323 2299                                        value,
2324 2300                                        false);
2325 2301                  }
2326 2302          }
2327 2303  
2328 2304          if (!posix && !svr4) {
2329 2305                  set_sgs_support();
2330 2306          }
↓ open down ↓ 39 lines elided ↑ open up ↑
2370 2346                          ** one.
2371 2347                          */
2372 2348                        memcpy(&state_filename, make_state,sizeof(state_filename));
2373 2349                        state_filename.string_mb = state_file_str_mb;
2374 2350                  /* Just a kludge to avoid two slashes back to back */                   
2375 2351                        if((make_state->hash.length == 1)&&
2376 2352                                  (make_state->string_mb[0] == '/')) {
2377 2353                           make_state->hash.length = 0;
2378 2354                           make_state->string_mb[0] = '\0';
2379 2355                        }
2380      -                      sprintf(state_file_str_mb,NOCATGETS("%s%s"),
2381      -                       make_state->string_mb,NOCATGETS("/.make.state"));
     2356 +                      sprintf(state_file_str_mb,"%s%s",
     2357 +                       make_state->string_mb,"/.make.state");
2382 2358                        make_state = &state_filename;
2383 2359                          /* adjust the length to reflect the appended string */
2384 2360                        make_state->hash.length += 12;
2385 2361                     }
2386 2362                  } else { /* the file doesn't exist or no permission */
2387 2363                     char tmp_path[MAXPATHLEN];
2388 2364                     char *slashp;
2389 2365  
2390 2366                     if (slashp = strrchr(make_state->string_mb, '/')) {
2391 2367                        strncpy(tmp_path, make_state->string_mb, 
2392 2368                                  (slashp - make_state->string_mb));
2393 2369                          tmp_path[slashp - make_state->string_mb]=0;
2394 2370                        if(strlen(tmp_path)) {
2395 2371                          if(stat(tmp_path, &make_state_stat)) {
2396      -                          warning(catgets(catd, 1, 192, "directory %s for .KEEP_STATE_FILE does not exist"),tmp_path);
     2372 +                          warning(gettext("directory %s for .KEEP_STATE_FILE does not exist"),tmp_path);
2397 2373                          }
2398 2374                          if (access(tmp_path, F_OK) != 0) {
2399      -                          warning(catgets(catd, 1, 193, "can't access dir %s"),tmp_path);
     2375 +                          warning(gettext("can't access dir %s"),tmp_path);
2400 2376                          }
2401 2377                        }
2402 2378                     }
2403 2379                  }
2404 2380                  if (report_dependencies_level != 1) {
2405 2381                          Makefile_type   makefile_type_temp = makefile_type;
2406 2382                          makefile_type = reading_statefile;
2407 2383                          if (read_trace_level > 1) {
2408 2384                                  trace_reader = true;
2409 2385                          }
↓ open down ↓ 43 lines elided ↑ open up ↑
2453 2429                          argv[i] = NULL;
2454 2430                          opt_separator = i;
2455 2431                          continue;
2456 2432                  } else if ((i < opt_separator) && (argv[i][0] == (int) hyphen_char)) {
2457 2433                          switch (parse_command_option(argv[i][1])) {
2458 2434                          case 1: /* -f seen */
2459 2435                                  ++i;
2460 2436                                  continue;
2461 2437                          case 2: /* -c seen */
2462 2438                                  if (argv[i+1] == NULL) {
2463      -                                        fatal(catgets(catd, 1, 194, "No dmake rcfile argument after -c flag"));
     2439 +                                        fatal(gettext("No dmake rcfile argument after -c flag"));
2464 2440                                  }
2465      -                                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_RCFILE"));
     2441 +                                MBSTOWCS(wcs_buffer, "DMAKE_RCFILE");
2466 2442                                  name = GETNAME(wcs_buffer, FIND_LENGTH);
2467 2443                                  break;
2468 2444                          case 4: /* -g seen */
2469 2445                                  if (argv[i+1] == NULL) {
2470      -                                        fatal(catgets(catd, 1, 195, "No dmake group argument after -g flag"));
     2446 +                                        fatal(gettext("No dmake group argument after -g flag"));
2471 2447                                  }
2472      -                                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_GROUP"));
     2448 +                                MBSTOWCS(wcs_buffer, "DMAKE_GROUP");
2473 2449                                  name = GETNAME(wcs_buffer, FIND_LENGTH);
2474 2450                                  break;
2475 2451                          case 8: /* -j seen */
2476 2452                                  if (argv[i+1] == NULL) {
2477      -                                        fatal(catgets(catd, 1, 196, "No dmake max jobs argument after -j flag"));
     2453 +                                        fatal(gettext("No dmake max jobs argument after -j flag"));
2478 2454                                  }
2479      -                                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MAX_JOBS"));
     2455 +                                MBSTOWCS(wcs_buffer, "DMAKE_MAX_JOBS");
2480 2456                                  name = GETNAME(wcs_buffer, FIND_LENGTH);
2481 2457                                  break;
2482 2458                          case 16: /* -M seen */
2483 2459                                  if (argv[i+1] == NULL) {
2484      -                                        fatal(catgets(catd, 1, 323, "No pmake machinesfile argument after -M flag"));
     2460 +                                        fatal(gettext("No pmake machinesfile argument after -M flag"));
2485 2461                                  }
2486      -                                MBSTOWCS(wcs_buffer, NOCATGETS("PMAKE_MACHINESFILE"));
     2462 +                                MBSTOWCS(wcs_buffer, "PMAKE_MACHINESFILE");
2487 2463                                  name = GETNAME(wcs_buffer, FIND_LENGTH);
2488 2464                                  break;
2489 2465                          case 32: /* -m seen */
2490 2466                                  if (argv[i+1] == NULL) {
2491      -                                        fatal(catgets(catd, 1, 197, "No dmake mode argument after -m flag"));
     2467 +                                        fatal(gettext("No dmake mode argument after -m flag"));
2492 2468                                  }
2493      -                                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
     2469 +                                MBSTOWCS(wcs_buffer, "DMAKE_MODE");
2494 2470                                  name = GETNAME(wcs_buffer, FIND_LENGTH);
2495 2471                                  break;
2496 2472                          case 256: /* -K seen */
2497 2473                                  if (argv[i+1] == NULL) {
2498      -                                        fatal(catgets(catd, 1, 288, "No makestate filename argument after -K flag"));
     2474 +                                        fatal(gettext("No makestate filename argument after -K flag"));
2499 2475                                  }
2500 2476                                  MBSTOWCS(wcs_buffer, argv[i+1]);
2501 2477                                  make_state = GETNAME(wcs_buffer, FIND_LENGTH);
2502 2478                                  keep_state = true;
2503 2479                                  argv[i] = NULL;
2504 2480                                  argv[i+1] = NULL;
2505 2481                                  continue;
2506 2482                          case 512:       /* -o seen */
2507 2483                                  if (argv[i+1] == NULL) {
2508      -                                        fatal(catgets(catd, 1, 312, "No dmake output dir argument after -o flag"));
     2484 +                                        fatal(gettext("No dmake output dir argument after -o flag"));
2509 2485                                  }
2510      -                                MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_ODIR"));
     2486 +                                MBSTOWCS(wcs_buffer, "DMAKE_ODIR");
2511 2487                                  name = GETNAME(wcs_buffer, FIND_LENGTH);
2512 2488                                  break;
2513 2489                          case 1024: /* -x seen */
2514 2490                                  if (argv[i+1] == NULL) {
2515      -                                        fatal(catgets(catd, 1, 351, "No argument after -x flag"));
     2491 +                                        fatal(gettext("No argument after -x flag"));
2516 2492                                  }
2517      -                                length = strlen( NOCATGETS("SUN_MAKE_COMPAT_MODE="));
2518      -                                if (strncmp(argv[i+1], NOCATGETS("SUN_MAKE_COMPAT_MODE="), length) == 0) {
     2493 +                                length = strlen( "SUN_MAKE_COMPAT_MODE=");
     2494 +                                if (strncmp(argv[i+1], "SUN_MAKE_COMPAT_MODE=", length) == 0) {
2519 2495                                          argv[i+1] = &argv[i+1][length];
2520      -                                        MBSTOWCS(wcs_buffer, NOCATGETS("SUN_MAKE_COMPAT_MODE"));
     2496 +                                        MBSTOWCS(wcs_buffer, "SUN_MAKE_COMPAT_MODE");
2521 2497                                          name = GETNAME(wcs_buffer, FIND_LENGTH);
2522 2498                                          dmake_compat_mode_specified = dmake_add_mode_specified;
2523 2499                                          break;
2524 2500                                  }
2525      -                                length = strlen( NOCATGETS("DMAKE_OUTPUT_MODE="));
2526      -                                if (strncmp(argv[i+1], NOCATGETS("DMAKE_OUTPUT_MODE="), length) == 0) {
     2501 +                                length = strlen( "DMAKE_OUTPUT_MODE=");
     2502 +                                if (strncmp(argv[i+1], "DMAKE_OUTPUT_MODE=", length) == 0) {
2527 2503                                          argv[i+1] = &argv[i+1][length];
2528      -                                        MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_OUTPUT_MODE"));
     2504 +                                        MBSTOWCS(wcs_buffer, "DMAKE_OUTPUT_MODE");
2529 2505                                          name = GETNAME(wcs_buffer, FIND_LENGTH);
2530 2506                                          dmake_output_mode_specified = dmake_add_mode_specified;
2531 2507                                  } else {
2532      -                                        warning(catgets(catd, 1, 354, "Unknown argument `%s' after -x flag (ignored)"),
     2508 +                                        warning(gettext("Unknown argument `%s' after -x flag (ignored)"),
2533 2509                                                argv[i+1]);
2534 2510                                          argv[i] = argv[i + 1] = NULL;
2535 2511                                          continue;
2536 2512                                  }
2537 2513                                  break;
2538 2514                          default: /* Shouldn't reach here */
2539 2515                                  argv[i] = NULL;
2540 2516                                  continue;
2541 2517                          }
2542 2518                          argv[i] = NULL;
↓ open down ↓ 65 lines elided ↑ open up ↑
2608 2584  }
2609 2585  
2610 2586  /*
2611 2587   * Append the DMake option and value to the MAKEFLAGS string.
2612 2588   */
2613 2589  static void
2614 2590  append_makeflags_string(Name name, register String makeflags_string)
2615 2591  {
2616 2592          const char      *option;
2617 2593  
2618      -        if (strcmp(name->string_mb, NOCATGETS("DMAKE_GROUP")) == 0) {
2619      -                option = NOCATGETS(" -g ");
2620      -        } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_MAX_JOBS")) == 0) {
2621      -                option = NOCATGETS(" -j ");
2622      -        } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_MODE")) == 0) {
2623      -                option = NOCATGETS(" -m ");
2624      -        } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_ODIR")) == 0) {
2625      -                option = NOCATGETS(" -o ");
2626      -        } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_RCFILE")) == 0) {
2627      -                option = NOCATGETS(" -c ");
2628      -        } else if (strcmp(name->string_mb, NOCATGETS("PMAKE_MACHINESFILE")) == 0) {
2629      -                option = NOCATGETS(" -M ");
2630      -        } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_OUTPUT_MODE")) == 0) {
2631      -                option = NOCATGETS(" -x DMAKE_OUTPUT_MODE=");
2632      -        } else if (strcmp(name->string_mb, NOCATGETS("SUN_MAKE_COMPAT_MODE")) == 0) {
2633      -                option = NOCATGETS(" -x SUN_MAKE_COMPAT_MODE=");
     2594 +        if (strcmp(name->string_mb, "DMAKE_GROUP") == 0) {
     2595 +                option = " -g ";
     2596 +        } else if (strcmp(name->string_mb, "DMAKE_MAX_JOBS") == 0) {
     2597 +                option = " -j ";
     2598 +        } else if (strcmp(name->string_mb, "DMAKE_MODE") == 0) {
     2599 +                option = " -m ";
     2600 +        } else if (strcmp(name->string_mb, "DMAKE_ODIR") == 0) {
     2601 +                option = " -o ";
     2602 +        } else if (strcmp(name->string_mb, "DMAKE_RCFILE") == 0) {
     2603 +                option = " -c ";
     2604 +        } else if (strcmp(name->string_mb, "PMAKE_MACHINESFILE") == 0) {
     2605 +                option = " -M ";
     2606 +        } else if (strcmp(name->string_mb, "DMAKE_OUTPUT_MODE") == 0) {
     2607 +                option = " -x DMAKE_OUTPUT_MODE=";
     2608 +        } else if (strcmp(name->string_mb, "SUN_MAKE_COMPAT_MODE") == 0) {
     2609 +                option = " -x SUN_MAKE_COMPAT_MODE=";
2634 2610          } else {
2635      -                fatal(catgets(catd, 1, 289, "Internal error: name not recognized in append_makeflags_string()"));
     2611 +                fatal(gettext("Internal error: name not recognized in append_makeflags_string()"));
2636 2612          }
2637 2613          Property prop = maybe_append_prop(name, macro_prop);
2638 2614          if( prop == 0 || prop->body.macro.value == 0 ||
2639 2615              prop->body.macro.value->string_mb == 0 ) {
2640 2616                  return;
2641 2617          }
2642 2618          char mbs_value[MAXPATHLEN + 100];
2643 2619          strcpy(mbs_value, option);
2644 2620          strcat(mbs_value, prop->body.macro.value->string_mb);
2645 2621          MBSTOWCS(wcs_buffer, mbs_value);
↓ open down ↓ 40 lines elided ↑ open up ↑
2686 2662                  }
2687 2663                  value = (wchar_t *) wschr(name, (int) equal_char);
2688 2664  
2689 2665                  /*
2690 2666                   * Looks like there's a bug in the system, but sometimes
2691 2667                   * you can get blank lines in *environment.
2692 2668                   */
2693 2669                  if (!value) {
2694 2670                          continue;
2695 2671                  }
2696      -                MBSTOWCS(wcs_buffer2, NOCATGETS("SHELL="));
     2672 +                MBSTOWCS(wcs_buffer2, "SHELL=");
2697 2673                  if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
2698 2674                          continue;
2699 2675                  }
2700      -                MBSTOWCS(wcs_buffer2, NOCATGETS("MAKEFLAGS="));
     2676 +                MBSTOWCS(wcs_buffer2, "MAKEFLAGS=");
2701 2677                  if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
2702 2678                          report_pwd = true;
2703 2679                          /*
2704 2680                           * In POSIX mode we do not want MAKEFLAGS to be readonly.
2705 2681                           * If the MAKEFLAGS macro is subsequently set by the makefile,
2706 2682                           * it replaces the MAKEFLAGS variable currently found in the
2707 2683                           * environment.
2708 2684                           * See Assertion 50 in section 6.2.5.3 of standard P1003.3.2/D8.
2709 2685                           */
2710 2686                          if(posix) {
↓ open down ↓ 2 lines elided ↑ open up ↑
2713 2689                  }
2714 2690  
2715 2691                  /*
2716 2692                   * We ignore SUNPRO_DEPENDENCIES. This environment variable is
2717 2693                   * set by make and read by cpp which then writes info to
2718 2694                   * .make.dependency.xxx.  When make is invoked by another make
2719 2695                   * (recursive make), we don't want to read this because then
2720 2696                   * the child make will end up writing to the parent
2721 2697                   * directory's .make.state and clobbering them.
2722 2698                   */
2723      -                MBSTOWCS(wcs_buffer2, NOCATGETS("SUNPRO_DEPENDENCIES"));
     2699 +                MBSTOWCS(wcs_buffer2, "SUNPRO_DEPENDENCIES");
2724 2700                  if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
2725 2701                          continue;
2726 2702                  }
2727 2703  
2728 2704                  macro = GETNAME(name, value - name);
2729 2705                  maybe_append_prop(macro, macro_prop)->body.macro.exported =
2730 2706                    true;
2731 2707                  if ((value == NULL) || ((value + 1)[0] == (int) nul_char)) {
2732 2708                          val = setvar_daemon(macro,
2733 2709                                              (Name) NULL,
↓ open down ↓ 127 lines elided ↑ open up ↑
2861 2837                                                        false,
2862 2838                                                        false);
2863 2839                                  gather_recursive_deps();
2864 2840                                  if (/* !commands_done && */
2865 2841                                      (result == build_ok) &&
2866 2842                                      !quest &&
2867 2843                                      (report_dependencies_level == 0) /*  &&
2868 2844                                      (exists(default_target_to_build) > file_doesnt_exist)  */) {
2869 2845                                          if (posix) {
2870 2846                                                  if (!commands_done) {
2871      -                                                        (void) printf(catgets(catd, 1, 293, "`%s' is updated.\n"),
     2847 +                                                        (void) printf(gettext("`%s' is updated.\n"),
2872 2848                                                                        default_target_to_build->string_mb);
2873 2849                                                  } else {
2874 2850                                                          if (no_action_was_taken) {
2875      -                                                                (void) printf(catgets(catd, 1, 294, "`%s': no action was taken.\n"),
     2851 +                                                                (void) printf(gettext("`%s': no action was taken.\n"),
2876 2852                                                                                default_target_to_build->string_mb);
2877 2853                                                          }
2878 2854                                                  }
2879 2855                                          } else {
2880 2856                                                  default_target_to_build->stat.time = file_no_time;
2881 2857                                                  if (!commands_done &&
2882 2858                                                      (exists(default_target_to_build) > file_doesnt_exist)) {
2883      -                                                        (void) printf(catgets(catd, 1, 295, "`%s' is up to date.\n"),
     2859 +                                                        (void) printf(gettext("`%s' is up to date.\n"),
2884 2860                                                                        default_target_to_build->string_mb);
2885 2861                                                  }
2886 2862                                          }
2887 2863                                  }
2888 2864                          }
2889 2865                  }
2890 2866                  /* Now wait for all of the targets to finish running */
2891 2867                  finish_running();
2892 2868                  //              setjmp(jmpbuffer);
2893 2869                  
↓ open down ↓ 21 lines elided ↑ open up ↑
2915 2891                                  result = (Doname) default_target_to_build->state;
2916 2892                          } else {
2917 2893                                  result = doname_check(default_target_to_build,
2918 2894                                                        true,
2919 2895                                                        false,
2920 2896                                                        false);
2921 2897                          }
2922 2898                          gather_recursive_deps();
2923 2899                          if (build_failed_seen) {
2924 2900                                  build_failed_ever_seen = true;
2925      -                                warning(catgets(catd, 1, 200, "Target `%s' not remade because of errors"),
     2901 +                                warning(gettext("Target `%s' not remade because of errors"),
2926 2902                                          default_target_to_build->string_mb);
2927 2903                          }
2928 2904                          build_failed_seen = false;
2929 2905                          if (report_dependencies_level > 0) {
2930 2906                                  print_dependencies(default_target_to_build,
2931 2907                                                     get_prop(default_target_to_build->prop,
2932 2908                                                              line_prop));
2933 2909                          }
2934 2910                          default_target_to_build->stat.time =
2935 2911                            file_no_time;
↓ open down ↓ 2 lines elided ↑ open up ↑
2938 2914                                    build_dont_know;
2939 2915                          }
2940 2916                          if (!parallel &&
2941 2917                              /* !commands_done && */
2942 2918                              (result == build_ok) &&
2943 2919                              !quest &&
2944 2920                              (report_dependencies_level == 0) /*  &&
2945 2921                              (exists(default_target_to_build) > file_doesnt_exist)  */) {
2946 2922                                  if (posix) {
2947 2923                                          if (!commands_done) {
2948      -                                                (void) printf(catgets(catd, 1, 296, "`%s' is updated.\n"),
     2924 +                                                (void) printf(gettext("`%s' is updated.\n"),
2949 2925                                                                default_target_to_build->string_mb);
2950 2926                                          } else {
2951 2927                                                  if (no_action_was_taken) {
2952      -                                                        (void) printf(catgets(catd, 1, 297, "`%s': no action was taken.\n"),
     2928 +                                                        (void) printf(gettext("`%s': no action was taken.\n"),
2953 2929                                                                        default_target_to_build->string_mb);
2954 2930                                                  }
2955 2931                                          }
2956 2932                                  } else {
2957 2933                                          if (!commands_done &&
2958 2934                                              (exists(default_target_to_build) > file_doesnt_exist)) {
2959      -                                                (void) printf(catgets(catd, 1, 298, "`%s' is up to date.\n"),
     2935 +                                                (void) printf(gettext("`%s' is up to date.\n"),
2960 2936                                                                default_target_to_build->string_mb);
2961 2937                                          }
2962 2938                                  }
2963 2939                          }
2964 2940                  }
2965 2941          }
2966 2942  
2967 2943  /*
2968 2944   *      If no file arguments have been encountered,
2969 2945   *      make the first name encountered that doesnt start with a dot
2970 2946   */
2971 2947          if (!target_to_make_found) {
2972 2948                  if (default_target_to_build == NULL) {
2973      -                        fatal(catgets(catd, 1, 202, "No arguments to build"));
     2949 +                        fatal(gettext("No arguments to build"));
2974 2950                  }
2975 2951                  commands_done = false;
2976 2952                  top_level_target = get_wstring(default_target_to_build->string_mb);
2977 2953                  report_recursion(default_target_to_build);
2978 2954  
2979 2955  
2980      -                if (getenv(NOCATGETS("SPRO_EXPAND_ERRORS"))){
2981      -                        (void) printf(NOCATGETS("::(%s)\n"),
     2956 +                if (getenv("SPRO_EXPAND_ERRORS")){
     2957 +                        (void) printf("::(%s)\n",
2982 2958                                        default_target_to_build->string_mb);
2983 2959                  }
2984 2960  
2985 2961  
2986 2962                  result = doname_parallel(default_target_to_build, true, false);
2987 2963                  gather_recursive_deps();
2988 2964                  if (build_failed_seen) {
2989 2965                          build_failed_ever_seen = true;
2990      -                        warning(catgets(catd, 1, 203, "Target `%s' not remade because of errors"),
     2966 +                        warning(gettext("Target `%s' not remade because of errors"),
2991 2967                                  default_target_to_build->string_mb);
2992 2968                  }
2993 2969                  build_failed_seen = false;
2994 2970                  if (report_dependencies_level > 0) {
2995 2971                          print_dependencies(default_target_to_build,
2996 2972                                             get_prop(default_target_to_build->
2997 2973                                                      prop,
2998 2974                                                      line_prop));
2999 2975                  }
3000 2976                  default_target_to_build->stat.time = file_no_time;
3001 2977                  if (default_target_to_build->colon_splits > 0) {
3002 2978                          default_target_to_build->state = build_dont_know;
3003 2979                  }
3004 2980                  if (/* !commands_done && */
3005 2981                      (result == build_ok) &&
3006 2982                      !quest &&
3007 2983                      (report_dependencies_level == 0) /*  &&
3008 2984                      (exists(default_target_to_build) > file_doesnt_exist)  */) {
3009 2985                          if (posix) {
3010 2986                                  if (!commands_done) {
3011      -                                        (void) printf(catgets(catd, 1, 299, "`%s' is updated.\n"),
     2987 +                                        (void) printf(gettext("`%s' is updated.\n"),
3012 2988                                                        default_target_to_build->string_mb);
3013 2989                                  } else {
3014 2990                                          if (no_action_was_taken) {
3015      -                                                (void) printf(catgets(catd, 1, 300, "`%s': no action was taken.\n"),
     2991 +                                                (void) printf(gettext("`%s': no action was taken.\n"),
3016 2992                                                                default_target_to_build->string_mb);
3017 2993                                          }
3018 2994                                  }
3019 2995                          } else {
3020 2996                                  if (!commands_done &&
3021 2997                                      (exists(default_target_to_build) > file_doesnt_exist)) {
3022      -                                        (void) printf(catgets(catd, 1, 301, "`%s' is up to date.\n"),
     2998 +                                        (void) printf(gettext("`%s' is up to date.\n"),
3023 2999                                                        default_target_to_build->string_mb);
3024 3000                                  }
3025 3001                          }
3026 3002                  }
3027 3003          }
3028 3004  }
3029 3005  
3030 3006  /*
3031 3007   *      report_recursion(target)
3032 3008   *
↓ open down ↓ 156 lines elided ↑ open up ↑
3189 3165  }
3190 3166  
3191 3167  static void
3192 3168  report_dir_enter_leave(Boolean entering)
3193 3169  {
3194 3170          char    rcwd[MAXPATHLEN];
3195 3171  static  char *  mlev = NULL;
3196 3172          char *  make_level_str = NULL;
3197 3173          int     make_level_val = 0;
3198 3174  
3199      -        make_level_str = getenv(NOCATGETS("MAKELEVEL"));
     3175 +        make_level_str = getenv("MAKELEVEL");
3200 3176          if(make_level_str) {
3201 3177                  make_level_val = atoi(make_level_str);
3202 3178          }
3203 3179          if(mlev == NULL) {
3204 3180                  mlev = (char*) malloc(MAXPATHLEN);
3205 3181          }
3206 3182          if(entering) {
3207      -                sprintf(mlev, NOCATGETS("MAKELEVEL=%d"), make_level_val + 1);
     3183 +                sprintf(mlev, "MAKELEVEL=%d", make_level_val + 1);
3208 3184          } else {
3209 3185                  make_level_val--;
3210      -                sprintf(mlev, NOCATGETS("MAKELEVEL=%d"), make_level_val);
     3186 +                sprintf(mlev, "MAKELEVEL=%d", make_level_val);
3211 3187          }
3212 3188          putenv(mlev);
3213 3189  
3214 3190          if(report_cwd) {
3215 3191                  if(make_level_val <= 0) {
3216 3192                          if(entering) {
3217 3193                                  sprintf( rcwd
3218      -                                       , catgets(catd, 1, 329, "dmake: Entering directory `%s'\n")
     3194 +                                       , gettext("dmake: Entering directory `%s'\n")
3219 3195                                         , get_current_path());
3220 3196                          } else {
3221 3197                                  sprintf( rcwd
3222      -                                       , catgets(catd, 1, 331, "dmake: Leaving directory `%s'\n")
     3198 +                                       , gettext("dmake: Leaving directory `%s'\n")
3223 3199                                         , get_current_path());
3224 3200                          }
3225 3201                  } else {
3226 3202                          if(entering) {
3227 3203                                  sprintf( rcwd
3228      -                                       , catgets(catd, 1, 333, "dmake[%d]: Entering directory `%s'\n")
     3204 +                                       , gettext("dmake[%d]: Entering directory `%s'\n")
3229 3205                                         , make_level_val, get_current_path());
3230 3206                          } else {
3231 3207                                  sprintf( rcwd
3232      -                                       , catgets(catd, 1, 335, "dmake[%d]: Leaving directory `%s'\n")
     3208 +                                       , gettext("dmake[%d]: Leaving directory `%s'\n")
3233 3209                                         , make_level_val, get_current_path());
3234 3210                          }
3235 3211                  }
3236      -                printf(NOCATGETS("%s"), rcwd);
     3212 +                printf("%s", rcwd);
3237 3213          }
3238 3214  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX