Changeset 287 for trunk/src/gmake/main.c


Ignore:
Timestamp:
May 17, 2005, 1:34:55 AM (20 years ago)
Author:
bird
Message:

join + optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/main.c

    r218 r287  
    11/* Argument parsing and main program of GNU Make.
    22Copyright (C) 1988, 1989, 1990, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
    3 2002, 2003 Free Software Foundation, Inc.
     32002, 2003, 2005 Free Software Foundation, Inc.
    44This file is part of GNU Make.
    55
     
    3636#ifdef WINDOWS32
    3737#include <windows.h>
     38#include <io.h>
    3839#include "pathstuff.h"
    3940#endif
     
    4445#ifdef HAVE_FCNTL_H
    4546# include <fcntl.h>
     47#endif
     48
     49#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
     50# define SET_STACK_SIZE
     51#endif
     52
     53#ifdef SET_STACK_SIZE
     54# include <sys/resource.h>
    4655#endif
    4756
     
    186195int default_keep_going_flag = 0;
    187196
     197/* Nonzero means check symlink mtimes.  */
     198
     199int check_symlink_flag = 0;
     200
    188201/* Nonzero means print directory before starting and when done (-w).  */
    189202
     
    207220unsigned int job_slots = 1;
    208221unsigned int default_job_slots = 1;
     222static unsigned int master_job_slots = 0;
    209223
    210224/* Value of job_slots that means no limit.  */
     
    260274
    261275int always_make_flag = 0;
     276
     277/* If nonzero, we're in the "try to rebuild makefiles" phase.  */
     278
     279int rebuilding_makefiles = 0;
     280
     281/* Remember the original value of the SHELL variable, from the environment.  */
     282
     283struct variable shell_var;
     284
    262285
    263286
     
    301324                              Don't start multiple jobs unless load is below N.\n"),
    302325    N_("\
     326  -L, --check-symlink-times   Use the latest mtime between symlinks and target.\n"),
     327    N_("\
    303328  -n, --just-print, --dry-run, --recon\n\
    304329                              Don't actually run any commands; just print them.\n"),
     
    348373#endif
    349374    { 'e', flag, (char *) &env_overrides, 1, 1, 0, 0, 0,
    350         "environment-overrides", },
     375      "environment-overrides", },
    351376    { 'f', string, (char *) &makefiles, 0, 0, 0, 0, 0, "file" },
    352377    { 'h', flag, (char *) &print_usage_flag, 0, 0, 0, 0, 0, "help" },
    353378    { 'i', flag, (char *) &ignore_errors_flag, 1, 1, 0, 0, 0,
    354         "ignore-errors" },
     379      "ignore-errors" },
    355380    { 'I', string, (char *) &include_directories, 1, 1, 0, 0, 0,
    356         "include-dir" },
     381      "include-dir" },
    357382    { 'j', positive_int, (char *) &job_slots, 1, 1, 0, (char *) &inf_jobs,
    358         (char *) &default_job_slots, "jobs" },
     383      (char *) &default_job_slots, "jobs" },
    359384    { CHAR_MAX+2, string, (char *) &jobserver_fds, 1, 1, 0, 0, 0,
    360         "jobserver-fds" },
     385      "jobserver-fds" },
    361386    { 'k', flag, (char *) &keep_going_flag, 1, 1, 0, 0,
    362         (char *) &default_keep_going_flag, "keep-going" },
     387      (char *) &default_keep_going_flag, "keep-going" },
    363388#ifndef NO_FLOAT
    364389    { 'l', floating, (char *) &max_load_average, 1, 1, 0,
    365         (char *) &default_load_average, (char *) &default_load_average,
    366         "load-average" },
     390      (char *) &default_load_average, (char *) &default_load_average,
     391      "load-average" },
    367392#else
    368393    { 'l', positive_int, (char *) &max_load_average, 1, 1, 0,
    369         (char *) &default_load_average, (char *) &default_load_average,
    370         "load-average" },
    371 #endif
     394      (char *) &default_load_average, (char *) &default_load_average,
     395      "load-average" },
     396#endif
     397    { 'L', flag, (char *) &check_symlink_flag, 1, 1, 0, 0, 0,
     398      "check-symlink-times" },
    372399    { 'm', ignore, 0, 0, 0, 0, 0, 0, 0 },
    373400    { 'n', flag, (char *) &just_print_flag, 1, 1, 1, 0, 0, "just-print" },
    374401    { 'o', string, (char *) &old_files, 0, 0, 0, 0, 0, "old-file" },
    375402    { 'p', flag, (char *) &print_data_base_flag, 1, 1, 0, 0, 0,
    376         "print-data-base" },
     403      "print-data-base" },
    377404    { 'q', flag, (char *) &question_flag, 1, 1, 1, 0, 0, "question" },
    378405    { 'r', flag, (char *) &no_builtin_rules_flag, 1, 1, 0, 0, 0,
    379406      "no-builtin-rules" },
    380407    { 'R', flag, (char *) &no_builtin_variables_flag, 1, 1, 0, 0, 0,
    381         "no-builtin-variables" },
     408      "no-builtin-variables" },
    382409    { 's', flag, (char *) &silent_flag, 1, 1, 0, 0, 0, "silent" },
    383410    { 'S', flag_off, (char *) &keep_going_flag, 1, 1, 0, 0,
     
    386413    { 'v', flag, (char *) &print_version_flag, 1, 1, 0, 0, 0, "version" },
    387414    { 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0,
    388         "print-directory" },
     415      "print-directory" },
    389416    { CHAR_MAX+3, flag, (char *) &inhibit_print_directory_flag, 1, 1, 0, 0, 0,
    390         "no-print-directory" },
     417      "no-print-directory" },
    391418    { 'W', string, (char *) &new_files, 0, 0, 0, 0, 0, "what-if" },
    392419    { CHAR_MAX+4, flag, (char *) &warn_undefined_variables_flag, 1, 1, 0, 0, 0,
    393         "warn-undefined-variables" },
     420      "warn-undefined-variables" },
    394421    { 0 }
    395422  };
     
    446473
    447474struct file *default_goal_file;
     475
     476/* Pointer to the value of the .DEFAULT_GOAL special
     477   variable.  */
     478char ** default_goal_name;
    448479
    449480/* Pointer to structure for the file .DEFAULT
     
    551582/* Toggle -d on receipt of SIGUSR1.  */
    552583
     584#ifdef SIGUSR1
    553585static RETSIGTYPE
    554586debug_signal_handler (int sig UNUSED)
     
    556588  db_level = db_level ? DB_NONE : DB_BASIC;
    557589}
     590#endif
    558591
    559592static void
     
    701734{
    702735  int sh_found = 0;
    703   char* search_token;
     736  char *search_token;
     737  char *tokend;
    704738  PATH_VAR(sh_path);
    705739  extern char *default_shell;
     
    710744    search_token = token;
    711745
    712   if (!no_default_sh_exe &&
    713       (token == NULL || !strcmp(search_token, default_shell))) {
     746
     747  /* If the user explicitly requests the DOS cmd shell, obey that request.
     748     However, make sure that's what they really want by requiring the value
     749     of SHELL either equal, or have a final path element of, "cmd" or
     750     "cmd.exe" case-insensitive.  */
     751  tokend = search_token + strlen (search_token) - 3;
     752  if (((tokend == search_token
     753        || (tokend > search_token
     754            && (tokend[-1] == '/' || tokend[-1] == '\\')))
     755       && !strcmpi (tokend, "cmd"))
     756      || ((tokend - 4 == search_token
     757           || (tokend - 4 > search_token
     758               && (tokend[-5] == '/' || tokend[-5] == '\\')))
     759          && !strcmpi (tokend - 4, "cmd.exe"))) {
     760    batch_mode_shell = 1;
     761    unixy_shell = 0;
     762    sh_found = 0;
     763  } else if (!no_default_sh_exe &&
     764             (token == NULL || !strcmp (search_token, default_shell))) {
    714765    /* no new information, path already set or known */
    715766    sh_found = 1;
     
    723774  } else {
    724775    char *p;
    725     struct variable *v = lookup_variable ("Path", 4);
    726 
    727     /*
    728      * Search Path for shell
    729      */
     776    struct variable *v = lookup_variable ("PATH", 4);
     777
     778    /* Search Path for shell */
    730779    if (v && v->value) {
    731780      char *ep;
     
    846895  struct file *f;
    847896  int i;
     897  int makefile_status = MAKE_SUCCESS;
    848898  char **p;
    849899  struct dep *read_makefiles;
     
    858908  unixy_shell = 0;
    859909  no_default_sh_exe = 1;
     910#endif
     911
     912#ifdef SET_STACK_SIZE
     913 /* Get rid of any avoidable limit on stack size.  */
     914  {
     915    struct rlimit rlim;
     916
     917    /* Set the stack limit huge so that alloca does not fail.  */
     918    if (getrlimit (RLIMIT_STACK, &rlim) == 0)
     919      {
     920        rlim.rlim_cur = rlim.rlim_max;
     921        setrlimit (RLIMIT_STACK, &rlim);
     922      }
     923  }
    860924#endif
    861925
     
    9831047        program = argv[0] + 1;
    9841048#endif
     1049#ifdef WINDOWS32
     1050      if (program == 0)
     1051        {
     1052          /* Extract program from full path */
     1053          int argv0_len;
     1054          char *p = strrchr (argv[0], '\\');
     1055          if (!p)
     1056            p = argv[0];
     1057          argv0_len = strlen(p);
     1058          if (argv0_len > 4
     1059              && streq (&p[argv0_len - 4], ".exe"))
     1060            {
     1061              /* Remove .exe extension */
     1062              p[argv0_len - 4] = '\0';
     1063              /* Increment past the initial '\' */
     1064              program = p + 1;
     1065            }
     1066        }
     1067#endif
    9851068      if (program == 0)
    9861069        program = argv[0];
     
    10031086    {
    10041087#ifdef  HAVE_GETCWD
    1005       perror_with_name ("getcwd: ", "");
     1088      perror_with_name ("getcwd", "");
    10061089#else
    10071090      error (NILF, "getwd: %s", current_directory);
     
    10191102  /* Initialize the special variables.  */
    10201103  define_variable (".VARIABLES", 10, "", o_default, 0)->special = 1;
    1021   /* define_variable (".TARGETS", 8, "", o_default, 0); */
     1104  /* define_variable (".TARGETS", 8, "", o_default, 0)->special = 1; */
     1105
     1106  /* Set up .FEATURES */
     1107  define_variable (".FEATURES", 9,
     1108                   "target-specific order-only second-expansion",
     1109                   o_default, 0);
     1110#ifdef MAKE_JOBSERVER
     1111  do_variable_definition (NILF, ".FEATURES", "jobserver",
     1112                          o_default, f_append, 0);
     1113#endif
     1114#ifdef MAKE_SYMLINKS
     1115  do_variable_definition (NILF, ".FEATURES", "check-symlink",
     1116                          o_default, f_append, 0);
     1117#endif
    10221118
    10231119  /* Read in variables from the environment.  It is important that this be
     
    10281124  for (i = 0; envp[i] != 0; ++i)
    10291125    {
    1030       int do_not_define;
    1031       register char *ep = envp[i];
    1032 
    1033       /* by default, everything gets defined and exported */
    1034       do_not_define = 0;
    1035 
    1036       while (*ep != '=')
     1126      int do_not_define = 0;
     1127      char *ep = envp[i];
     1128
     1129      while (*ep != '\0' && *ep != '=')
    10371130        ++ep;
    10381131#ifdef WINDOWS32
    10391132      if (!unix_path && strneq(envp[i], "PATH=", 5))
    10401133        unix_path = ep+1;
    1041       else if (!windows32_path && !strnicmp(envp[i], "Path=", 5)) {
     1134      else if (!strnicmp(envp[i], "Path=", 5)) {
    10421135        do_not_define = 1; /* it gets defined after loop exits */
    1043         windows32_path = ep+1;
     1136        if (!windows32_path)
     1137          windows32_path = ep+1;
    10441138      }
    10451139#endif
     
    10481142         the same.  */
    10491143      if (!do_not_define)
    1050         define_variable (envp[i], (unsigned int) (ep - envp[i]),
    1051                          ep + 1, o_env, 1)
    1052         /* Force exportation of every variable culled from the environment.
    1053            We used to rely on target_environment's v_default code to do this.
    1054            But that does not work for the case where an environment variable
    1055            is redefined in a makefile with `override'; it should then still
    1056            be exported, because it was originally in the environment.  */
    1057         ->export = v_export;
     1144        {
     1145          struct variable *v;
     1146
     1147          v = define_variable (envp[i], (unsigned int) (ep - envp[i]),
     1148                               ep + 1, o_env, 1);
     1149          /* Force exportation of every variable culled from the environment.
     1150             We used to rely on target_environment's v_default code to do this.
     1151             But that does not work for the case where an environment variable
     1152             is redefined in a makefile with `override'; it should then still
     1153             be exported, because it was originally in the environment.  */
     1154          v->export = v_export;
     1155
     1156          /* Another wrinkle is that POSIX says the value of SHELL set in the
     1157             makefile should not change the value of SHELL given to
     1158             subprocesses, which seems silly to me but...  */
     1159          if (strncmp (envp[i], "SHELL=", 6) == 0)
     1160            {
     1161#ifndef __MSDOS__
     1162              v->export = v_noexport;
     1163#endif
     1164              shell_var.name = "SHELL";
     1165              shell_var.value = xstrdup (ep + 1);
     1166            }
     1167        }
    10581168    }
    10591169#ifdef WINDOWS32
    1060     /*
    1061      * Make sure that this particular spelling of 'Path' is available
     1170    /* If we didn't find a correctly spelled PATH we define PATH as
     1171     * either the first mispelled value or an empty string
    10621172     */
    1063     if (windows32_path)
    1064       define_variable("Path", 4, windows32_path, o_env, 1)->export = v_export;
    1065     else if (unix_path)
    1066       define_variable("Path", 4, unix_path, o_env, 1)->export = v_export;
    1067     else
    1068       define_variable("Path", 4, "", o_env, 1)->export = v_export;
    1069 
    1070     /*
    1071      * PATH defaults to Path iff PATH not found and Path is found.
    1072      */
    1073     if (!unix_path && windows32_path)
    1074       define_variable("PATH", 4, windows32_path, o_env, 1)->export = v_export;
     1173    if (!unix_path)
     1174      define_variable("PATH", 4,
     1175                      windows32_path ? windows32_path : "",
     1176                      o_env, 1)->export = v_export;
    10751177#endif
    10761178#else /* For Amiga, read the ENV: device, ignoring all dirs */
     
    12421344      {
    12431345        char *dir = directories->list[i];
     1346        char *expanded = 0;
    12441347        if (dir[0] == '~')
    12451348          {
    1246             char *expanded = tilde_expand (dir);
     1349            expanded = tilde_expand (dir);
    12471350            if (expanded != 0)
    12481351              dir = expanded;
    12491352          }
     1353#ifdef WINDOWS32
     1354        /* WINDOWS32 chdir() doesn't work if the directory has a trailing '/'
     1355           But allow -C/ just in case someone wants that.  */
     1356        {
     1357          char *p = dir + strlen (dir) - 1;
     1358          while (p > dir && (p[0] == '/' || p[0] == '\\'))
     1359            --p;
     1360          p[1] = '\0';
     1361        }
     1362#endif
    12501363        if (chdir (dir) < 0)
    12511364          pfatal_with_name (dir);
    1252         if (dir != directories->list[i])
    1253           free (dir);
     1365        if (expanded)
     1366          free (expanded);
    12541367      }
    12551368
     
    13061419        {
    13071420#ifdef  HAVE_GETCWD
    1308           perror_with_name ("getcwd: ", "");
     1421          perror_with_name ("getcwd", "");
    13091422#else
    13101423          error (NILF, "getwd: %s", current_directory);
     
    13731486            if (outfile == 0)
    13741487              pfatal_with_name (_("fopen (temporary file)"));
    1375             while (!feof (stdin))
     1488            while (!feof (stdin) && ! ferror (stdin))
    13761489              {
    13771490                char buf[2048];
     
    14531566  define_default_variables ();
    14541567
     1568  default_file = enter_file (".DEFAULT");
     1569
     1570  {
     1571    struct variable *v = define_variable (".DEFAULT_GOAL", 13, "", o_file, 0);
     1572    default_goal_name = &v->value;
     1573  }
     1574
    14551575  /* Read all the makefiles.  */
    1456 
    1457   default_file = enter_file (".DEFAULT");
    14581576
    14591577  read_makefiles
     
    15851703         want job_slots to be 0 to indicate we're using the jobserver.  */
    15861704
     1705      master_job_slots = job_slots;
     1706
    15871707      while (--job_slots)
    15881708        {
     
    16041724      jobserver_fds->idx = 1;
    16051725      jobserver_fds->max = 1;
     1726    }
     1727#endif
     1728
     1729#ifndef MAKE_SYMLINKS
     1730  if (check_symlink_flag)
     1731    {
     1732      error (NILF, _("Symbolic links not supported: disabling -L."));
     1733      check_symlink_flag = 0;
    16061734    }
    16071735#endif
     
    16731801      int nargc = argc;
    16741802      int orig_db_level = db_level;
     1803      int status;
    16751804
    16761805      if (! ISDB (DB_MAKEFILES))
     
    17331862      define_makeflags (1, 1);
    17341863
    1735       switch (update_goal_chain (read_makefiles, 1))
     1864      rebuilding_makefiles = 1;
     1865      status = update_goal_chain (read_makefiles);
     1866      rebuilding_makefiles = 0;
     1867
     1868      switch (status)
    17361869        {
    17371870        case 1:
     
    17821915                        any_remade |= (mtime != NONEXISTENT_MTIME
    17831916                                       && mtime != makefile_mtimes[i]);
     1917                        makefile_status = MAKE_FAILURE;
    17841918                      }
    17851919                  }
     
    18712005#ifndef _AMIGA
    18722006          for (p = environ; *p != 0; ++p)
    1873             if ((*p)[MAKELEVEL_LENGTH] == '='
    1874                 && strneq (*p, MAKELEVEL_NAME, MAKELEVEL_LENGTH))
     2007            if (strneq (*p, MAKELEVEL_NAME, MAKELEVEL_LENGTH)
     2008                && (*p)[MAKELEVEL_LENGTH] == '=')
    18752009              {
    18762010                /* The SGI compiler apparently can't understand
     
    19272061            int pid;
    19282062            int status;
    1929             pid = child_execute_job(0, 1, nargv, environ, NULL);
     2063            pid = child_execute_job (0, 1, nargv, environ, NULL);
    19302064
    19312065            /* is this loop really necessary? */
    19322066            do {
    1933               pid = wait(&status);
    1934             } while(pid <= 0);
     2067              pid = wait (&status);
     2068            } while (pid <= 0);
    19352069            /* use the exit code of the child process */
    1936             exit(WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE);
     2070            exit (WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE);
    19372071          }
    19382072#else
     
    19482082
    19492083      db_level = orig_db_level;
     2084
     2085      /* Free the makefile mtimes (if we allocated any).  */
     2086      if (makefile_mtimes)
     2087        free ((char *) makefile_mtimes);
    19502088    }
    19512089
     
    19642102    if (goals == 0)
    19652103      {
    1966         if (default_goal_file != 0)
    1967           {
    1968             goals = (struct dep *) xmalloc (sizeof (struct dep));
    1969             goals->next = 0;
    1970             goals->name = 0;
     2104        if (**default_goal_name != '\0')
     2105          {
     2106            if (default_goal_file == 0 ||
     2107                strcmp (*default_goal_name, default_goal_file->name) != 0)
     2108              {
     2109                default_goal_file = lookup_file (*default_goal_name);
     2110
     2111                /* In case user set .DEFAULT_GOAL to a non-existent target
     2112                   name let's just enter this name into the table and let
     2113                   the standard logic sort it out. */
     2114                if (default_goal_file == 0)
     2115                  {
     2116                    struct nameseq *ns;
     2117                    char *p = *default_goal_name;
     2118
     2119                    ns = multi_glob (
     2120                      parse_file_seq (&p, '\0', sizeof (struct nameseq), 1),
     2121                      sizeof (struct nameseq));
     2122
     2123                    /* .DEFAULT_GOAL should contain one target. */
     2124                    if (ns->next != 0)
     2125                      fatal (NILF, _(".DEFAULT_GOAL contains more than one target"));
     2126
     2127                    default_goal_file = enter_file (ns->name);
     2128
     2129                    ns->name = 0; /* It was reused by enter_file(). */
     2130                    free_ns_chain (ns);
     2131                  }
     2132              }
     2133
     2134            goals = (struct dep *) xmalloc (sizeof (struct dep));
     2135            goals->next = 0;
     2136            goals->name = 0;
    19712137            goals->ignore_mtime = 0;
    1972             goals->file = default_goal_file;
    1973           }
     2138            goals->need_2nd_expansion = 0;
     2139            goals->file = default_goal_file;
     2140          }
    19742141      }
    19752142    else
    19762143      lastgoal->next = 0;
     2144
    19772145
    19782146    if (!goals)
     
    19882156    DB (DB_BASIC, (_("Updating goal targets....\n")));
    19892157
    1990     switch (update_goal_chain (goals, 0))
     2158    switch (update_goal_chain (goals))
    19912159    {
    19922160      case -1:
     
    19942162      case 0:
    19952163        /* Updated successfully.  */
    1996         status = MAKE_SUCCESS;
     2164        status = makefile_status;
    19972165        break;
    19982166      case 1:
     
    20982266  if (v != 0)
    20992267    {
    2100       /* It is indeed a variable definition.  Record a pointer to
    2101          the variable for later use in define_makeflags.  */
    2102       struct command_variable *cv
    2103         = (struct command_variable *) xmalloc (sizeof (*cv));
    2104       cv->variable = v;
    2105       cv->next = command_variables;
    2106       command_variables = cv;
     2268      /* It is indeed a variable definition.  If we don't already have this
     2269         one, record a pointer to the variable for later use in
     2270         define_makeflags.  */
     2271      struct command_variable *cv;
     2272
     2273      for (cv = command_variables; cv != 0; cv = cv->next)
     2274        if (cv->variable == v)
     2275          break;
     2276
     2277      if (! cv) {
     2278        cv = (struct command_variable *) xmalloc (sizeof (*cv));
     2279        cv->variable = v;
     2280        cv->next = command_variables;
     2281        command_variables = cv;
     2282      }
    21072283    }
    21082284  else if (! env)
     
    21272303      lastgoal->file = f;
    21282304      lastgoal->ignore_mtime = 0;
     2305      lastgoal->need_2nd_expansion = 0;
    21292306
    21302307      {
     
    27752952  if (!dying)
    27762953    {
     2954      char token = '+';
    27772955      int err;
    27782956
     
    27942972      if (print_data_base_flag)
    27952973        print_data_base ();
     2974
     2975      /* Sanity: have we written all our jobserver tokens back?  If our
     2976         exit status is 2 that means some kind of syntax error; we might not
     2977         have written all our tokens so do that now.  If tokens are left
     2978         after any other error code, that's bad.  */
     2979
     2980      if (job_fds[0] != -1 && jobserver_tokens)
     2981        {
     2982          if (status != 2)
     2983            error (NILF,
     2984                   "INTERNAL: Exiting with %u jobserver tokens (should be 0)!",
     2985                   jobserver_tokens);
     2986          else
     2987            while (jobserver_tokens--)
     2988              {
     2989                int r;
     2990
     2991                EINTRLOOP (r, write (job_fds[1], &token, 1));
     2992                if (r != 1)
     2993                  perror_with_name ("write", "");
     2994              }
     2995        }
     2996
     2997
     2998      /* Sanity: If we're the master, were all the tokens written back?  */
     2999
     3000      if (master_job_slots)
     3001        {
     3002          /* We didn't write one for ourself, so start at 1.  */
     3003          unsigned int tcnt = 1;
     3004
     3005          /* Close the write side, so the read() won't hang.  */
     3006          close (job_fds[1]);
     3007
     3008          while ((err = read (job_fds[0], &token, 1)) == 1)
     3009            ++tcnt;
     3010
     3011          if (tcnt != master_job_slots)
     3012            error (NILF,
     3013                   "INTERNAL: Exiting with %u jobserver tokens available; should be %u!",
     3014                   tcnt, master_job_slots);
     3015        }
    27963016
    27973017      /* Try to move back to the original directory.  This is essential on
     
    28593079        printf (_("%s[%u]: Leaving directory `%s'\n"),
    28603080                program, makelevel, starting_directory);
     3081
     3082  /* Flush stdout to be sure this comes before any stderr output.  */
     3083  fflush (stdout);
    28613084}
Note: See TracChangeset for help on using the changeset viewer.