sh: Work with make a little better:
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 15 Jul 2012 07:50:18 +0000 (00:50 -0700)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 15 Jul 2012 07:50:18 +0000 (00:50 -0700)
commitd4cbceabb29d9260ddd7f3ea00646cc8c8969ba9
treefe1a420a1425f4899e99065aee4a47b82d3bc4d5
parent0a84332e41187b2fb4b0ef0e4817093676131d5c
sh: Work with make a little better:

1.  Avoid a cd back into ${.CURDIR} to run mkbuiltins when we know make
    will first cd into ${.OBJDIR}. Keep the cwd to what make sets it to.
2.  Don't tell mkbuiltins where to write to (= ${.OBJDIR}), but where to
    get sources from (= ${.CURDIR}). This to compensate for point 1.

This fixes a problem with bmake's mk files that optimize ${.OBJDIR} to
expand to "." after changing cwd, not taking into account that the
target is pretty much undoing that and not getting the full path to the
object tree anymore.

Obtained-from:  FreeBSD 235927
bin/sh/Makefile
bin/sh/mkbuiltins