Print this page
make: unifdef for REDIRECT_ERR (defined)
@@ -847,11 +847,11 @@
mktemp(mbstring);
stdout_file = strdup(mbstring);
stderr_file = NULL;
-#if defined (TEAMWARE_MAKE_CMN) && defined(REDIRECT_ERR)
+#if defined (TEAMWARE_MAKE_CMN)
if (!out_err_same) {
(void) sprintf(mbstring,
NOCATGETS("%s/dmake.stderr.%d.%d.XXXXXX"),
tmpdir,
getpid(),
@@ -1467,11 +1467,11 @@
}
(void) unlink(rp->stdout_file);
retmem_mb(rp->stdout_file);
rp->stdout_file = NULL;
}
-#if defined(REDIRECT_ERR)
+
if (!out_err_same && (rp->stderr_file != NULL)) {
if (stat(rp->stderr_file, &out_buf) < 0) {
fatal(catgets(catd, 1, 130, "stat of %s failed: %s"),
rp->stderr_file,
errmsg(errno));
@@ -1482,11 +1482,10 @@
}
(void) unlink(rp->stderr_file);
retmem_mb(rp->stderr_file);
rp->stderr_file = NULL;
}
-#endif
}
check_state(rp->temp_file);
if (rp->temp_file != NULL) {
free_name(rp->temp_file);
}
@@ -2032,19 +2031,15 @@
errmsg(errno));
break;
case 0: /* Child */
/* To control the processed targets list is not the child's business */
running_list = NULL;
-#if defined(REDIRECT_ERR)
if(out_err_same) {
redirect_io(stdout_file, (char*)NULL);
} else {
redirect_io(stdout_file, stderr_file);
}
-#else
- redirect_io(stdout_file, (char*)NULL);
-#endif
for (commands = commands;
(*commands != (char *)NULL);
commands++) {
silent_flag = silent;
ignore = false;