Formerly main.c.~70~

This commit is contained in:
Roland McGrath 1993-01-25 22:16:33 +00:00
parent cf197b7550
commit c316ab7609

14
main.c
View File

@ -992,8 +992,7 @@ main (argc, argv, envp)
abort ();
}
}
if (goals == 0)
else
{
if (read_makefiles == 0)
fatal ("No targets specified and no makefile found");
@ -1430,7 +1429,7 @@ define_makeflags (all, makefile)
else if (cs->noarg_value != 0
&& (*(unsigned int *) cs->value_ptr ==
*(unsigned int *) cs->noarg_value))
ADD_FLAG (0, 0);
ADD_FLAG ("", 0); /* Optional value omitted; see below. */
else if (cs->c == 'j')
/* Special case for `-j'. */
ADD_FLAG ("1", 1);
@ -1453,7 +1452,7 @@ define_makeflags (all, makefile)
else if (cs->noarg_value != 0
&& (*(double *) cs->value_ptr
== *(double *) cs->noarg_value))
ADD_FLAG (0, 0);
ADD_FLAG ("", 0); /* Optional value omitted; see below. */
else
{
char *buf = (char *) alloca (100);
@ -1493,11 +1492,18 @@ define_makeflags (all, makefile)
/* Add the flag letter to the string. */
*p++ = flags->c;
if (flags->arg != 0)
{
/* A flag that takes an optional argument which in this case
is omitted is specified by ARG being "" and ARGLEN being 0.
We must distinguish because a following flag appended without
an intervening " -" is considered the arg for the first. */
if (flags->arglen > 0)
{
/* Add its argument too. */
*p++ = ' ';
bcopy (flags->arg, p, flags->arglen);
p += flags->arglen;
}
/* Write a following space and dash, for the next flag. */
*p++ = ' ';
*p++ = '-';