mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-02-11 14:52:19 +00:00
Clean up some logic.
This commit is contained in:
parent
a2ea1bd27f
commit
7f3ffd4019
1 changed files with 30 additions and 32 deletions
62
main.c
62
main.c
|
@ -1564,41 +1564,39 @@ int main (int argc, char ** argv)
|
||||||
else
|
else
|
||||||
lastgoal->next = 0;
|
lastgoal->next = 0;
|
||||||
|
|
||||||
if (goals != 0)
|
if (!goals)
|
||||||
{
|
{
|
||||||
/* Update the goals. */
|
if (read_makefiles == 0)
|
||||||
|
fatal (NILF, "No targets specified and no makefile found");
|
||||||
|
|
||||||
if (debug_flag)
|
fatal (NILF, "No targets");
|
||||||
puts ("Updating goal targets....");
|
}
|
||||||
|
|
||||||
switch (update_goal_chain (goals, 0))
|
/* Update the goals. */
|
||||||
{
|
|
||||||
case -1:
|
if (debug_flag)
|
||||||
/* Nothing happened. */
|
puts ("Updating goal targets....");
|
||||||
case 0:
|
|
||||||
/* Updated successfully. */
|
switch (update_goal_chain (goals, 0))
|
||||||
status = EXIT_SUCCESS;
|
{
|
||||||
break;
|
case -1:
|
||||||
case 2:
|
/* Nothing happened. */
|
||||||
/* Updating failed. POSIX.2 specifies exit status >1 for this;
|
case 0:
|
||||||
but in VMS, there is only success and failure. */
|
/* Updated successfully. */
|
||||||
status = EXIT_FAILURE ? 2 : EXIT_FAILURE;
|
status = EXIT_SUCCESS;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
/* We are under -q and would run some commands. */
|
/* Updating failed. POSIX.2 specifies exit status >1 for this;
|
||||||
status = EXIT_FAILURE;
|
but in VMS, there is only success and failure. */
|
||||||
break;
|
status = EXIT_FAILURE ? 2 : EXIT_FAILURE;
|
||||||
default:
|
break;
|
||||||
abort ();
|
case 1:
|
||||||
}
|
/* We are under -q and would run some commands. */
|
||||||
}
|
status = EXIT_FAILURE;
|
||||||
else
|
break;
|
||||||
{
|
default:
|
||||||
if (read_makefiles == 0)
|
abort ();
|
||||||
fatal (NILF, "No targets specified and no makefile found");
|
}
|
||||||
else
|
|
||||||
fatal (NILF, "No targets");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we detected some clock skew, generate one last warning */
|
/* If we detected some clock skew, generate one last warning */
|
||||||
if (clock_skew_detected)
|
if (clock_skew_detected)
|
||||||
|
|
Loading…
Reference in a new issue