mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-02-11 06:42:02 +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
|
||||
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)
|
||||
puts ("Updating goal targets....");
|
||||
fatal (NILF, "No targets");
|
||||
}
|
||||
|
||||
switch (update_goal_chain (goals, 0))
|
||||
{
|
||||
case -1:
|
||||
/* Nothing happened. */
|
||||
case 0:
|
||||
/* Updated successfully. */
|
||||
status = EXIT_SUCCESS;
|
||||
break;
|
||||
case 2:
|
||||
/* Updating failed. POSIX.2 specifies exit status >1 for this;
|
||||
but in VMS, there is only success and failure. */
|
||||
status = EXIT_FAILURE ? 2 : EXIT_FAILURE;
|
||||
break;
|
||||
case 1:
|
||||
/* We are under -q and would run some commands. */
|
||||
status = EXIT_FAILURE;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (read_makefiles == 0)
|
||||
fatal (NILF, "No targets specified and no makefile found");
|
||||
else
|
||||
fatal (NILF, "No targets");
|
||||
}
|
||||
/* Update the goals. */
|
||||
|
||||
if (debug_flag)
|
||||
puts ("Updating goal targets....");
|
||||
|
||||
switch (update_goal_chain (goals, 0))
|
||||
{
|
||||
case -1:
|
||||
/* Nothing happened. */
|
||||
case 0:
|
||||
/* Updated successfully. */
|
||||
status = EXIT_SUCCESS;
|
||||
break;
|
||||
case 2:
|
||||
/* Updating failed. POSIX.2 specifies exit status >1 for this;
|
||||
but in VMS, there is only success and failure. */
|
||||
status = EXIT_FAILURE ? 2 : EXIT_FAILURE;
|
||||
break;
|
||||
case 1:
|
||||
/* We are under -q and would run some commands. */
|
||||
status = EXIT_FAILURE;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* If we detected some clock skew, generate one last warning */
|
||||
if (clock_skew_detected)
|
||||
|
|
Loading…
Reference in a new issue