On Wed, 30 Nov 2011, Aleksej Saushev wrote:
.OBJDIR handling is one of the wartiest parts of make. By the time mk.conf is parsed, make has already decided which .OBJDIR to use.This is not the case, proof follows. # Evidence 1. # /tmp/test.mk .if $(.OBJDIR) == $(.CURDIR) .OBJDIR: /tmp .endif all:; echo $(.OBJDIR)
Before make parses that .if line, it has already decided which .OBJDIR to use. Yes, you can change it later, and I even said so in an earlier draft of my message, but then decided to delete it as irrelevant to my point, and because I didn't feel like a digression into why that also has problems.
--apb (Alan Barrett)