aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/mk
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-11-23 17:48:53 +0000
committerrsc <devnull@localhost>2003-11-23 17:48:53 +0000
commitd8b652ae6f0034a9c8c63699b98e62775f7831db (patch)
treebf3a155559a522d909f5e2f754fa415ed54b9b51 /src/cmd/mk
parentb3161d97b017728799c72fba3563d32126b72d49 (diff)
downloadplan9port-d8b652ae6f0034a9c8c63699b98e62775f7831db.tar.gz
plan9port-d8b652ae6f0034a9c8c63699b98e62775f7831db.tar.bz2
plan9port-d8b652ae6f0034a9c8c63699b98e62775f7831db.zip
print current directory in "don't know how to make" errors.
Diffstat (limited to 'src/cmd/mk')
-rw-r--r--src/cmd/mk/mk.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cmd/mk/mk.c b/src/cmd/mk/mk.c
index 26b8a976..37eb3511 100644
--- a/src/cmd/mk/mk.c
+++ b/src/cmd/mk/mk.c
@@ -60,6 +60,14 @@ unpretend(Node *n)
n->time = 0;
}
+static char*
+dir(void)
+{
+ static char buf[1024];
+
+ return getcwd(buf, sizeof buf);
+}
+
int
work(Node *node, Node *p, Arc *parc)
{
@@ -90,7 +98,7 @@ work(Node *node, Node *p, Arc *parc)
/* consider no prerequsite case */
if(node->prereqs == 0){
if(node->time == 0){
- fprint(2, "mk: don't know how to make '%s'\n", node->name);
+ fprint(2, "mk: don't know how to make '%s' in %s\n", node->name, dir());
if(kflag){
node->flags |= BEINGMADE;
runerrs++;