From owner-svn-src-projects@FreeBSD.ORG  Fri Sep  4 01:44:31 2009
Return-Path: <owner-svn-src-projects@FreeBSD.ORG>
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 8551B106568B;
	Fri,  4 Sep 2009 01:44:31 +0000 (UTC)
	(envelope-from rodrigc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 752AF8FC12;
	Fri,  4 Sep 2009 01:44:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n841iV9n050356;
	Fri, 4 Sep 2009 01:44:31 GMT (envelope-from rodrigc@svn.freebsd.org)
Received: (from rodrigc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n841iVWd050354;
	Fri, 4 Sep 2009 01:44:31 GMT (envelope-from rodrigc@svn.freebsd.org)
Message-Id: <200909040144.n841iVWd050354@svn.freebsd.org>
From: Craig Rodrigues <rodrigc@FreeBSD.org>
Date: Fri, 4 Sep 2009 01:44:31 +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: r196806 - projects/jbuild/usr.bin/jbuild
X-BeenThere: svn-src-projects@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the src &quot; projects&quot;
	tree" <svn-src-projects.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-projects>, 
	<mailto:svn-src-projects-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-projects>
List-Post: <mailto:svn-src-projects@freebsd.org>
List-Help: <mailto:svn-src-projects-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-projects>, 
	<mailto:svn-src-projects-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 04 Sep 2009 01:44:31 -0000

Author: rodrigc
Date: Fri Sep  4 01:44:31 2009
New Revision: 196806
URL: http://svn.freebsd.org/changeset/base/196806

Log:
  Delete descriptions for MAKEOBJDIRPREFIX, MAKEOBJDIR variables.
  Re-write description for .OBJDIR variable.
  Add descriptions for .SRCTOP, .SRCREL, .OBJROOT variables.

Modified:
  projects/jbuild/usr.bin/jbuild/jbuild.1

Modified: projects/jbuild/usr.bin/jbuild/jbuild.1
==============================================================================
--- projects/jbuild/usr.bin/jbuild/jbuild.1	Fri Sep  4 01:24:27 2009	(r196805)
+++ projects/jbuild/usr.bin/jbuild/jbuild.1	Fri Sep  4 01:44:31 2009	(r196806)
@@ -574,50 +574,12 @@ to the canonical path given by
 .Xr getcwd 3 .
 .It Va .OBJDIR
 A path to the directory where the targets are built.
-At startup,
-.Nm
-searches for an alternate directory to place target files.
-It will attempt to change into this special directory
-and will search this directory for makefiles
-not found in the current directory.
-The following directories are tried in order:
-.Pp
-.Bl -enum -compact
-.It
-${MAKEOBJDIRPREFIX}/`pwd`
-.It
-${MAKEOBJDIR}
-.It
-obj.${MACHINE}
-.It
-obj
-.It
-/usr/obj/`pwd`
-.El
-.Pp
-The first directory that
-.Nm
-successfully changes into is used.
-If either
-.Ev MAKEOBJDIRPREFIX
-or
-.Ev MAKEOBJDIR
-is set in the environment but
-.Nm
-is unable to change into the corresponding directory,
-then the current directory is used
-without checking the remainder of the list.
-If they are undefined and
-.Nm
-is unable to change into any of the remaining three directories,
-then the current directory is used.
-Note, that
-.Ev MAKEOBJDIRPREFIX
-and
-.Ev MAKEOBJDIR
-must be environment variables and should not be set on
-.Nm Ns 's
-command line.
+This path is set to
+.Va ${.SRCTOP}/../obj/${MACHINE}/${.SRCREL} .
+Each machine-specific object directory uses the name set by
+the
+.Va MACHINE
+variable.
 .Pp
 The
 .Nm
@@ -625,6 +587,29 @@ utility sets
 .Va .OBJDIR
 to the canonical path given by
 .Xr getcwd 3 .
+.It Va .OBJROOT
+A path set to the value of
+.Va ${.SRCTOP}/../obj .
+.It Va .SRCTOP
+When
+.Nm
+is invoked, the current directory is determined by
+.Xr getcwd 3 .
+From the current directory,
+.Nm
+walks up the directory hierarchy.  When
+.Pa bld/sys.mk
+is found,
+.Nm
+sets
+.Va .SRCTOP
+to the value of the current directory and stops. 
+.It Va .SRCREL
+A path set to the value of 
+.Va .CURDIR
+with
+.Va .SRCTOP
+stripped off.
 .It Va .MAKEFILE_LIST
 As
 .Nm
@@ -1651,10 +1636,18 @@ The
 utility uses the following environment variables, if they exist:
 .Ev MACHINE ,
 .Ev MAKE ,
-.Ev MAKEFLAGS ,
-.Ev MAKEOBJDIR ,
 and
-.Ev MAKEOBJDIRPREFIX .
+.Ev MAKEFLAGS .
+.Pp
+When
+.Nm
+is invoked, the
+.Ev PATH
+in the environment is ignored, and
+is instead set to "/bin:/sbin:/usr/bin:/usr/sbin".  This
+.Ev PATH
+is then used by all processes spawned by
+.Nm .
 .Sh FILES
 .Bl -tag -width /usr/share/doc/psd/12.make -compact
 .It Pa .depend
@@ -1667,14 +1660,10 @@ list of dependencies
 object directory
 .It Pa sys.mk
 system makefile
-.It Pa /usr/share/mk
+.It Pa ${.SRCTOP}/bld
 default system makefile directory
 .It Pa /usr/share/doc/psd/12.make
 PMake tutorial
-.It Pa /usr/obj
-default
-.Ev MAKEOBJDIRPREFIX
-directory.
 .It Pa /etc/make.conf
 default path to
 .Xr make.conf 5
@@ -1721,10 +1710,6 @@ in
 .Fx 7.1 .
 .
 .Sh BUGS
-The determination of
-.Va .OBJDIR
-is contorted to the point of absurdity.
-.Pp
 In the presence of several
 .Ic .MAIN
 special targets,