summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-11-26 01:35:05 +0000
committerRoland McGrath <roland@redhat.com>1995-11-26 01:35:05 +0000
commit808f1c1cd231bf732b3da60c741059c82da5ff6d (patch)
tree1c84f4b5054f0e75ea0684f3d54eb585e77d65b4
parent06021f945fc68dfc174204cdb6e1cf665ca01875 (diff)
downloadgunmake-808f1c1cd231bf732b3da60c741059c82da5ff6d.tar.gz
(message): Take new arg PREFIX. Print "make: " only if nonzero.
-rw-r--r--misc.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/misc.c b/misc.c
index d093bce..a27c240 100644
--- a/misc.c
+++ b/misc.c
@@ -174,15 +174,25 @@ concat (s1, s2, s3)
/* Print a message on stdout. */
void
-message (s1, s2, s3, s4, s5, s6)
+message (prefix, s1, s2, s3, s4, s5, s6)
+ int prefix;
char *s1, *s2, *s3, *s4, *s5, *s6;
{
- if (makelevel == 0)
- printf ("%s: ", program);
- else
- printf ("%s[%u]: ", program, makelevel);
- printf (s1, s2, s3, s4, s5, s6);
- putchar ('\n');
+ log_working_directory (1);
+
+ if (s1 != 0)
+ {
+ if (prefix)
+ {
+ if (makelevel == 0)
+ printf ("%s: ", program);
+ else
+ printf ("%s[%u]: ", program, makelevel);
+ }
+ printf (s1, s2, s3, s4, s5, s6);
+ putchar ('\n');
+ }
+
fflush (stdout);
}
@@ -193,6 +203,8 @@ void
fatal (s1, s2, s3, s4, s5, s6)
char *s1, *s2, *s3, *s4, *s5, *s6;
{
+ log_working_directory (1);
+
if (makelevel == 0)
fprintf (stderr, "%s: *** ", program);
else
@@ -211,6 +223,8 @@ void
error (s1, s2, s3, s4, s5, s6)
char *s1, *s2, *s3, *s4, *s5, *s6;
{
+ log_working_directory (1);
+
if (makelevel == 0)
fprintf (stderr, "%s: ", program);
else
@@ -226,6 +240,8 @@ makefile_error (file, lineno, s1, s2, s3, s4, s5, s6)
unsigned int lineno;
char *s1, *s2, *s3, *s4, *s5, *s6;
{
+ log_working_directory (1);
+
fprintf (stderr, "%s:%u: ", file, lineno);
fprintf (stderr, s1, s2, s3, s4, s5, s6);
putc ('\n', stderr);
@@ -238,6 +254,8 @@ makefile_fatal (file, lineno, s1, s2, s3, s4, s5, s6)
unsigned int lineno;
char *s1, *s2, *s3, *s4, *s5, *s6;
{
+ log_working_directory (1);
+
fprintf (stderr, "%s:%u: *** ", file, lineno);
fprintf (stderr, s1, s2, s3, s4, s5, s6);
fputs (". Stop.\n", stderr);