Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 13:58:40 +0100
From:      martijn <mlina@dds.nl>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: WRKDIRPREFIX problem
Message-ID:  <20011126125840.GA57608@drain.ietsvaags.xs4all.nl>
In-Reply-To: <20011125151839.E93796@xor.obsecurity.org>
References:  <20011122174015.GA79172@drain.ietsvaags.xs4all.nl> <20011125151839.E93796@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Once upon a Sun, Nov 25 2001, Kris Kennaway hit keys in the following order:
> On Thu, Nov 22, 2001 at 06:40:15PM +0100, Martijn Lina wrote:
> > hi,
> > 
> > today i cvsupped to the latest 4.4-STABLE branch and something with
> > /usr/bin/make has changed, i think. My ports dir gets mounted via NFS, and
> > therefor i use WRKDIRPREFIX=/usr/obj to be able to build parallel on several
> > machines (and that's a good thing when doing a make clean). Somehow MAKEFILE is
> > set to the full path within the ports collection, instead of to the place in
> > WRKDIRPREFIX. I made diff to fix it, but it might break all ports that set
> > MAKEFILE.
> > 
> > maybe there's something i overlooked though...
> 
> I think I've seen this too..I'll test your patch.

Just looked at it again, and i think renaming all occurences of MAKEFILE to
MAKE_FILE will suffice. My patch was a diff after a few very confusing hours
trying to figure out what went wrong ;) it might be easy to rename all the
ports using MAKEFILE, but i don't think it's possible to put a warning in
bsd.port.mk about this rename... maybe before make calls a submake, comparing
${MAKEFILE} with ${.CURDIR}/Makefil and if it differs generate a warning.

here's a new and better patch implementing all this.

martijn

--- bsd.port.mk.orig	Mon Nov 26 13:56:08 2001
+++ bsd.port.mk	Mon Nov 26 13:55:23 2001
@@ -992,8 +992,11 @@
 .endif
 MD5_FILE?=		${MASTERDIR}/distinfo
 
+.if ${MAKEFILE} != "Makefile"
+MAKE_FILE=	${MAKEFILE}
+.endif
 MAKE_FLAGS?=	-f
-MAKEFILE?=		Makefile
+MAKE_FILE?=		Makefile
 MAKE_ENV+=		PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
 
 .if ${OSVERSION} < 500016
@@ -1886,9 +1889,9 @@
 .if !target(do-build)
 do-build:
 .if defined(USE_GMAKE)
-	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
+	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKE_FILE} ${MAKE_ARGS} ${ALL_TARGET})
 .else
-	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
+	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKE_FILE} ${MAKE_ARGS} ${ALL_TARGET})
 .endif
 .endif
 
@@ -1897,14 +1900,14 @@
 .if !target(do-install)
 do-install:
 .if defined(USE_GMAKE)
-	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
+	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKE_FILE} ${MAKE_ARGS} ${INSTALL_TARGET})
 .if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
-	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install.man)
+	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKE_FILE} ${MAKE_ARGS} install.man)
 .endif
 .else defined(USE_GMAKE)
-	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
+	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKE_FILE} ${MAKE_ARGS} ${INSTALL_TARGET})
 .if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
-	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install.man)
+	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKE_FILE} ${MAKE_ARGS} install.man)
 .endif
 .endif
 .endif
@@ -2101,6 +2104,10 @@
 
 .if !target(fetch)
 fetch:	pre-everything
+.if ${MAKEFILE} != "Makefile"
+	@${ECHO_MSG} "===>	Waring: This port uses MAKEFILE which should be renamed to MAKE_FILE."
+	@${ECHO_MSG} "		MAKEFILE is set to ${MAKEFILE}."
+.endif
 	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-fetch
 .endif

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?20011126125840.GA57608>