diff options
Diffstat (limited to 'usr.bin/make/compat.c')
-rw-r--r-- | usr.bin/make/compat.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 2ec3c7c..a9e8970 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -101,13 +101,13 @@ CompatInterrupt (signo) int signo; { GNode *gn; - + if ((curTarg != NILGNODE) && !Targ_Precious (curTarg)) { char *p1; char *file = Var_Value (TARGET, curTarg, &p1); struct stat st; - if (!noExecute && lstat(file, &st) != -1 && !S_ISDIR(st.st_mode) && + if (!noExecute && lstat(file, &st) != -1 && !S_ISDIR(st.st_mode) && unlink(file) != -1) { printf ("*** %s removed\n", file); } @@ -164,7 +164,7 @@ CompatRunCommand (cmdp, gnp) char *cmd = (char *) cmdp; GNode *gn = (GNode *) gnp; - /* + /* * Avoid clobbered variable warnings by forcing the compiler * to ``unregister'' variables */ @@ -184,7 +184,7 @@ CompatRunCommand (cmdp, gnp) * command? In any case, we warn the user that the command expanded to * nothing (is this the right thing to do?). */ - + if (*cmdStart == '\0') { free(cmdStart); Error("%s expands to empty string", cmd); @@ -213,7 +213,7 @@ CompatRunCommand (cmdp, gnp) while (isspace((unsigned char)*cmd)) cmd++; - + /* * Search for meta characters in the command. If there are no meta * characters, there's no need to execute a shell to execute the @@ -239,7 +239,7 @@ CompatRunCommand (cmdp, gnp) if (noExecute) { return (0); } - + if (*cp != '\0') { /* * If *cp isn't the null character, we hit a "meta" character and @@ -264,7 +264,7 @@ CompatRunCommand (cmdp, gnp) av = brk_string(cmd, &argc, TRUE); av += 1; } - + local = TRUE; /* @@ -286,7 +286,7 @@ CompatRunCommand (cmdp, gnp) } free(cmdStart); Lst_Replace (cmdNode, (ClientData) NULL); - + /* * The child is off and running. Now all we can do is wait... */ @@ -297,7 +297,7 @@ CompatRunCommand (cmdp, gnp) break; } } - + if (stat > -1) { if (WIFSTOPPED(reason)) { status = reason.w_stopval; /* stopped */ @@ -309,9 +309,9 @@ CompatRunCommand (cmdp, gnp) } else { status = reason.w_termsig; /* signaled */ printf ("*** Signal %d", status); - } + } + - if (!WIFEXITED(reason) || (status != 0)) { if (errCheck) { gn->made = ERROR; @@ -388,7 +388,7 @@ CompatMake (gnp, pgnp) if (p1) free(p1); } - + /* * All the children were made ok. Now cmtime contains the modification * time of the newest child, we need to find out if we exist and when @@ -422,7 +422,7 @@ CompatMake (gnp, pgnp) * Make_DoAllVar(). */ Make_DoAllVar(gn); - + /* * Alter our type to tell if errors should be ignored or things * should not be printed so CompatRunCommand knows what to do. @@ -563,7 +563,7 @@ CompatMake (gnp, pgnp) return (0); } - + /*- *----------------------------------------------------------------------- * Compat_Run -- |