Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Output Entering/Leaving messages for objdir whe...



details:   https://anonhg.NetBSD.org/src/rev/c15518eb1149
branches:  trunk
changeset: 810668:c15518eb1149
user:      sjg <sjg%NetBSD.org@localhost>
date:      Thu Sep 10 17:15:11 2015 +0000

description:
Output Entering/Leaving messages for objdir when != srcdir and -w flag
This helps ensure Emacs can find source of error.

Reviewed by: christos

diffstat:

 usr.bin/make/main.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (63 lines):

diff -r 48986eca6336 -r c15518eb1149 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Thu Sep 10 16:21:48 2015 +0000
+++ b/usr.bin/make/main.c       Thu Sep 10 17:15:11 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $   */
+/*     $NetBSD: main.c,v 1.233 2015/09/10 17:15:11 sjg Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.233 2015/09/10 17:15:11 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.233 2015/09/10 17:15:11 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -168,6 +168,7 @@
 Boolean                        queryFlag;      /* -q flag */
 Boolean                        touchFlag;      /* -t flag */
 Boolean                        enterFlag;      /* -w flag */
+Boolean                        enterFlagObj;   /* -w and objdir != srcdir */
 Boolean                        ignoreErrors;   /* -i flag */
 Boolean                        beSilent;       /* -s flag */
 Boolean                        oldVars;        /* variable substitution style */
@@ -710,6 +711,8 @@
                        setenv("PWD", objdir, 1);
                        Dir_InitDot();
                        rc = TRUE;
+                       if (enterFlag && strcmp(objdir, curdir) != 0)
+                               enterFlagObj = TRUE;
                }
        }
 
@@ -1231,6 +1234,9 @@
            doing_depend = FALSE;
        }
 
+       if (enterFlagObj)
+               printf("%s: Entering directory `%s'\n", progname, objdir);
+       
        MakeMode(NULL);
 
        Var_Append("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1), VAR_GLOBAL);
@@ -1372,6 +1378,8 @@
 
        Trace_Log(MAKEEND, 0);
 
+       if (enterFlagObj)
+               printf("%s: Leaving directory `%s'\n", progname, objdir);
        if (enterFlag)
                printf("%s: Leaving directory `%s'\n", progname, curdir);
 



Home | Main Index | Thread Index | Old Index