Date: Wed, 12 May 2004 15:51:33 +0200 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/66566: [PATCH] bsd.port.mk: fix build when /usr/obj/usr/ports exists Message-ID: <40A22BE5.50902@fillmore-labs.com> Resent-Message-ID: <200405121400.i4CE0XtM037370@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 66566 >Category: ports >Synopsis: [PATCH] bsd.port.mk: fix build when /usr/obj/usr/ports exists >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed May 12 07:00:33 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Oliver Eikemeier >Release: FreeBSD 4.10-STABLE i386 >Organization: Fillmore Labs - http://www.fillmore-labs.com >Environment: System: FreeBSD nuuk.fillmore-labs.com 4.10-STABLE >Description: Many ports do not compile if /usr/obj/${WRKDIRPREFIX}${PORTSDIR} exist, because they are not prepared for the peculiarities of BSD make(1). Basically most problems stem from the fact that the current working directory is not .CURDIR when one in a list of directories exist. bsd.port.mk tries to work around this by doing cd ${.CURDIR} && ${MAKE} ... every time, see the man page of make(1) for more information. Gnu make doesn't show the behaviour, so setting USE_GMAKE is a workaround, but somewhat wastful in terms of dependencies. This patch immunizes ports against erratic make(1) behaviour if USE_OBJDIR is not set. While we are here, it is more than about time to fix PR 30331. Perhaps a migration period where MAKE_FILE and MAKEFILE both exist and are accepted is appropriate? >How-To-Repeat: cd /usr/ports/net/rsync mkdir -p "/usr/obj`make -VBUILD_WRKSRC`" make clean all make USE_GMAKE=yes clean all >Fix: Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.488 diff -u -r1.488 bsd.port.mk --- bsd.port.mk 19 Apr 2004 23:39:52 -0000 1.488 +++ bsd.port.mk 12 May 2004 13:17:04 -0000 @@ -1221,6 +1244,12 @@ PLIST_SUB+= PORTDOCS="" .endif +.if !defined(USE_GMAKE) && !defined(USE_OBJDIR) +CONFIGURE_ENV+= MAKEOBJDIRPREFIX=/nonexistent_objdir +SCRIPTS_ENV+= MAKEOBJDIRPREFIX=/nonexistent_objdir +MAKE_ENV+= MAKEOBJDIRPREFIX=/nonexistent_objdir +.endif + CONFIGURE_SHELL?= ${SH} MAKE_SHELL?= ${SH} >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40A22BE5.50902>