summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2017-07-24 12:08:16 +0000
committerMarc Espie <espie@cvs.openbsd.org>2017-07-24 12:08:16 +0000
commit7351334cabb14622c95b35ad12b9b0943f6387d6 (patch)
treea9aff8d4ac5ef97bfdcf8ec070b92692e5f2b690
parent73f513db6b0c30845eea8e2418b9fbfba9ed3d1c (diff)
turn stupid message into a proper warning.
noticed by Michael W. Bombardieri okay schwarze@
-rw-r--r--usr.bin/make/engine.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c
index 2b1437c3468..1dc8c9ba906 100644
--- a/usr.bin/make/engine.c
+++ b/usr.bin/make/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.53 2017/07/09 15:28:00 espie Exp $ */
+/* $OpenBSD: engine.c,v 1.54 2017/07/24 12:08:15 espie Exp $ */
/*
* Copyright (c) 2012 Marc Espie.
*
@@ -734,7 +734,7 @@ setup_engine(void)
}
static bool
-do_run_command(Job *job)
+do_run_command(Job *job, const char *pre)
{
bool silent; /* Don't print command */
bool doExecute; /* Execute the command */
@@ -752,7 +752,9 @@ do_run_command(Job *job)
/* How can we execute a null command ? we warn the user that the
* command expanded to nothing (is this the right thing to do?). */
if (*cmd == '\0') {
- Error("%s expands to empty string", cmd);
+ Parse_Error(PARSE_WARNING,
+ "'%s' expands to '' while building %s",
+ pre, job->node->name);
return false;
}
@@ -833,7 +835,7 @@ job_run_next(Job *job)
job->next_cmd = Lst_Adv(job->next_cmd);
if (fatal_errors)
Punt(NULL);
- started = do_run_command(job);
+ started = do_run_command(job, command->string);
if (started)
return false;
else