summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-04-13 02:28:27 +0000
committerPaul Smith <psmith@gnu.org>1999-04-13 02:28:27 +0000
commit7f3ffd401903e04637c0e822e152e8dc632264e5 (patch)
tree97801bbe053f6f4df30cc00e0388a25ed5f0c229
parenta2ea1bd27fcf4b78f5464af76b505e0211f3341e (diff)
downloadgunmake-7f3ffd401903e04637c0e822e152e8dc632264e5.tar.gz
Clean up some logic.
-rw-r--r--main.c62
1 files changed, 30 insertions, 32 deletions
diff --git a/main.c b/main.c
index 4bae415..773c999 100644
--- a/main.c
+++ b/main.c
@@ -1564,42 +1564,40 @@ 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....");
-
- 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");
+ 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)
error (NILF, "*** Warning: Clock skew detected. Your build may be incomplete.");