bin/178819: bmake w/ WRKDIRPEFIX=/tmp breaks Ports Collection

Tijl Coosemans tijl at coosemans.org
Thu Sep 5 19:39:57 UTC 2013


On Thu, 5 Sep 2013 11:57:58 -0700 Simon J. Gerraty wrote:
> 
> On Thu, 5 Sep 2013 17:59:36 +0000, Alexey Dokuchaev writes:
> >Yes, I've seen the fresh import; will test it tomorrow.  I'm not sure what
> >is the problem, but "ports should be able to control the value of MAKEFILE
> >as desired" looks strange.  MAKEFILE is one of the standard bsd.port.mk's
> 
> bmake treats MAKEFILE the same way old sysV make did, it gets set to the 
> name of the [mM]akefile read.
> This is obviously something fmake never did, and ports relies on being
> able to set the variable.

fmake does set it. It goes something like this:

1) the port makefiles are all named Makefile so fmake sets
   MAKEFILE=Makefile. With bmake this is sometimes an absolute path.
2) bsd.port.mk has MAKEFILE?=Makefile which doesn't do anything under
   both fmake and bmake because it's already defined.
3) bsd.port.mk runs something like "cd ${WRKSRC} && make -f ${MAKEFILE}"
   This fails with bmake if MAKEFILE happens to be an absolute path
   pointing to the port makefile (instead of the source code makefile).
   With fmake this only works by accident.

bsd.port.mk should not try to reuse MAKEFILE like this. I once looked
into renaming this variable to MAKE_FILE but that affects many ports.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-bugs/attachments/20130905/41ce57d0/attachment.sig>


More information about the freebsd-bugs mailing list