Changeset 1699 for trunk/src


Ignore:
Timestamp:
Sep 2, 2008, 3:45:50 AM (17 years ago)
Author:
bird
Message:

kmk / $(commands* ): Check for empty name to prevent lookup_file from asserting, print error and return. Print error message when detecting recursion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/function.c

    r1698 r1699  
    36523652
    36533653  if (recursive)
    3654     return variable_buffer_output (o, "recursive", sizeof ("recursive") - 1);
     3654    {
     3655      error (reading_file, _("$(%s ) was invoked recursivly"), funcname);
     3656      return variable_buffer_output (o, "recursive", sizeof ("recursive") - 1);
     3657    }
     3658  if (*argv[0] == '\0')
     3659    {
     3660      error (reading_file, _("$(%s ) was invoked with an empty target name"), funcname);
     3661      return o;
     3662    }
    36553663  recursive = 1;
    3656 
     3664 
    36573665  file = lookup_file (argv[0]);
    36583666  if (file && file->cmds)
     
    38143822          else
    38153823            o = p;
    3816         }
     3824        } /* for each command line */
    38173825    }
    38183826  /* else FIXME: bitch about it? */
Note: See TracChangeset for help on using the changeset viewer.