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/commands.c

    r225 r287  
    4040/* Set FILE's automatic variables up.  */
    4141
    42 static void
     42void
    4343set_file_variables (struct file *file)
    4444{
     45  struct dep *d;
    4546  char *at, *percent, *star, *less;
    4647
     
    107108  star = file->stem;
    108109
    109   /* $< is the first dependency.  */
    110   less = file->deps != 0 ? dep_name (file->deps) : "";
     110  /* $< is the first not order-only dependency.  */
     111  less = "";
     112  for (d = file->deps; d != 0; d = d->next)
     113    if (!d->ignore_mtime)
     114      {
     115        less = dep_name (d);
     116        break;
     117      }
    111118
    112119  if (file->cmds == default_file->cmds)
     
    136143    char *qp;
    137144    char *bp;
    138     struct dep *d;
    139145    unsigned int len;
    140146
     
    343349            break;
    344350          }
    345       if (!(flags & COMMANDS_RECURSE))
    346         {
    347           unsigned int len = strlen (p);
    348           if (sindex (p, len, "$(MAKE)", 7) != 0
    349               || sindex (p, len, "${MAKE}", 7) != 0)
    350             flags |= COMMANDS_RECURSE;
    351         }
     351
     352      /* If no explicit '+' was given, look for MAKE variable references.  */
     353      if (!(flags & COMMANDS_RECURSE)
     354          && (strstr (p, "$(MAKE)") != 0 || strstr (p, "${MAKE}") != 0))
     355        flags |= COMMANDS_RECURSE;
     356
    352357#ifdef CONFIG_WITH_KMK_BUILTIN
     358      /* check if kmk builtin command */
    353359      if (!strncmp(p, "kmk_builtin_", sizeof("kmk_builtin_") - 1))
    354           flags |= COMMANDS_BUILTIN;
     360        flags |= COMMANDS_BUILTIN;
    355361#endif
    356362
     
    486492#endif
    487493
     494#ifdef WINDOWS32
     495  /* Cannot call W32_kill with a pid (it needs a handle) */
     496  exit (EXIT_FAILURE);
     497#else
    488498  /* Signal the same code; this time it will really be fatal.  The signal
    489499     will be unblocked when we return and arrive then to kill us.  */
    490500  if (kill (getpid (), sig) < 0)
    491501    pfatal_with_name ("kill");
     502#endif /* not WINDOWS32 */
    492503#endif /* not Amiga */
    493504#endif /* not __MSDOS__  */
Note: See TracChangeset for help on using the changeset viewer.