Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2001 13:10:09 -0800 (PST)
From:      Tony Finch <dot@dotat.at>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/24711: Mozilla build failure, 4-stable
Message-ID:  <200102122110.f1CLA9Q49450@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/24711; it has been noted by GNATS.

From: Tony Finch <dot@dotat.at>
To: Barney Wolff <barney@pit.databus.com>
Cc: FUJISHIMA Satsuki <sf@FreeBSD.org>,
	Kenneth W Cochran <kwc@world.std.com>, ports@FreeBSD.org,
	stable@FreeBSD.org, Tony Finch <dot@dotat.at>,
	freebsd-gnats-submit@freebsd.org
Subject: Re: ports/24711: Mozilla build failure, 4-stable
Date: Mon, 12 Feb 2001 21:07:46 +0000

 Barney Wolff <barney@pit.databus.com> wrote:
 >FUJISHIMA Satsuki wrote:
 >> Barney Wolff wrote:
 >> > 
 >> > Try anything BUT /usr/obj as WRKDIRPREFIX.  /usr/obj/ports, for
 >> > example.  I found most or all ports fail to build if that
 >> > specific directory is used.  I have no idea why.
 >> 
 >> man make and read .OBJDIR section.
 >
 >Yes I understand the significance of /usr/obj, but not why, in
 >detail, the port builds fail. In any case, if there are some specific
 >directories that cause problems, perhaps bsd.port.mk should check for
 >them and complain, rather than letting the build fail with baffling
 >errors.
 
 See PR#24711. The reason it doesn't work is that the ports system uses
 ${MAKEFILE} to name the Makefile in the work directory that should be
 used to build the port. If the port's Makefile doesn't set MAKEFILE
 then bsd.port.mk tries to set it to "${BUILD_WRKSRC}/Makefile".
 
 However, it fails because ${MAKEFILE} also happens to be a special
 variable set by make itself. It is set in a slightly complicated way
 to support separate object trees. If /usr/obj/`pwd` exists then it is
 used as the object directory, so in order to refer back to the
 original Makefile make sets MAKEFILE to "`pwd`/Makefile". If the
 object directory doesn't exist then MAKEFILE is set to just
 "Makefile".
 
 So the MAKEFILE?=${BUILD_WRKSRC}/Makefile line in bsd.port.mk is
 entirely redundant because MAKEFILE is always set by make. Most of the
 time you are lucky and things still work, *unless* an object directory
 exists, in which case make sets MAKEFILE to a value that doesn't work
 and the build explodes.
 
 The problem occurs when bsd.port.mk tries to run make inside the work
 directory. If the port didn't set MAKEFILE and the object tree exists,
 then the port ends up trying to use /usr/ports/foo/bar/Makefile to
 build the port rather than /usr/obj/usr/ports/foo/bar/work/bar-1.2.3/Makefile.
 
 Tony.
 -- 
 f.a.n.finch    fanf@covalent.net    dot@dotat.at
 FISHER: NORTHWEST 5 OR 6 DECREASING 3. SHOWERS. GOOD.
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102122110.f1CLA9Q49450>