From owner-svn-src-projects@FreeBSD.ORG Thu Jul 2 23:33:35 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F9AD106564A; Thu, 2 Jul 2009 23:33:35 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1198FC12; Thu, 2 Jul 2009 23:33:35 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n62NXZD7060787; Thu, 2 Jul 2009 23:33:35 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n62NXZeM060783; Thu, 2 Jul 2009 23:33:35 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200907022333.n62NXZeM060783@svn.freebsd.org> From: John Birrell Date: Thu, 2 Jul 2009 23:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195300 - projects/jbuild/usr.bin/make X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2009 23:33:35 -0000 Author: jb Date: Thu Jul 2 23:33:34 2009 New Revision: 195300 URL: http://svn.freebsd.org/changeset/base/195300 Log: Add an extra debug level (w) to make it easier to determine what thing in the meta data caused a target to be out of date. Previously this was part of 'm', but that is very verbose. Modified: projects/jbuild/usr.bin/make/main.c projects/jbuild/usr.bin/make/make.c projects/jbuild/usr.bin/make/util.h Modified: projects/jbuild/usr.bin/make/main.c ============================================================================== --- projects/jbuild/usr.bin/make/main.c Thu Jul 2 22:52:10 2009 (r195299) +++ projects/jbuild/usr.bin/make/main.c Thu Jul 2 23:33:34 2009 (r195300) @@ -458,6 +458,11 @@ rearg: case 'v': debug |= DEBUG_VAR; break; +#ifdef MAKE_IS_BUILD + case 'w': + debug |= DEBUG_WHY; + break; +#endif default: warnx("illegal argument to d option " "-- %c", *modules); Modified: projects/jbuild/usr.bin/make/make.c ============================================================================== --- projects/jbuild/usr.bin/make/make.c Thu Jul 2 22:52:10 2009 (r195299) +++ projects/jbuild/usr.bin/make/make.c Thu Jul 2 23:33:34 2009 (r195300) @@ -350,7 +350,7 @@ Make_OODate(GNode *gn) if (stat(p, &fs) == 0 && !S_ISDIR(fs.st_mode) && fs.st_mtime > gn->mtime) { - DEBUGF(MAKE, ("File '%s' is newer than the target...", p)); + DEBUGF(WHY, ("File '%s' is newer than the target...", p)); oodate = TRUE; } break; @@ -364,13 +364,13 @@ Make_OODate(GNode *gn) */ } else if (strcmp(bufr, "CMD") == 0) { if (lnp == NULL) { - DEBUGF(MAKE, ("There were more build commands in the meta data file than there are now...")); + DEBUGF(WHY, ("There were more build commands in the meta data file than there are now...")); oodate = TRUE; } else { char *cmd = Buf_Peel(Var_Subst(lnp->datum, gn, TRUE)); if (strcmp(p, cmd) != 0) { - DEBUGF(MAKE, ("A build command has changed\n%s\nvs\n%s\n... ", p, cmd)); + DEBUGF(WHY, ("A build command has changed\n%s\nvs\n%s\n... ", p, cmd)); oodate = TRUE; } @@ -379,7 +379,7 @@ Make_OODate(GNode *gn) } else if (strcmp(bufr, "CWD") == 0) { char curdir[MAXPATHLEN]; if (strcmp(p, getcwd(curdir, sizeof(curdir))) != 0) { - DEBUGF(MAKE, ("The current working directory has changed from '%s' to '%s'.. ", p, curdir)); + DEBUGF(WHY, ("The current working directory has changed from '%s' to '%s'.. ", p, curdir)); oodate = TRUE; } } @@ -390,7 +390,7 @@ Make_OODate(GNode *gn) * data file. */ if (!oodate && lnp != NULL) { - DEBUGF(MAKE, ("There are extra build commands now that weren't in the meta data file")); + DEBUGF(WHY, ("There are extra build commands now that weren't in the meta data file")); oodate = TRUE; } Modified: projects/jbuild/usr.bin/make/util.h ============================================================================== --- projects/jbuild/usr.bin/make/util.h Thu Jul 2 22:52:10 2009 (r195299) +++ projects/jbuild/usr.bin/make/util.h Thu Jul 2 23:33:34 2009 (r195300) @@ -79,6 +79,9 @@ struct flag2str { #define DEBUG_VAR 0x0200 #define DEBUG_FOR 0x0400 #define DEBUG_LOUD 0x0800 +#ifdef MAKE_IS_BUILD +#define DEBUG_WHY 0x1000 +#endif #define DEBUG(module) (debug & CONCAT(DEBUG_,module)) #define DEBUGF(module,args) \