svn commit: r186678 - head/usr.sbin/mergemaster

Doug Barton dougb at FreeBSD.org
Thu Jan 1 23:29:22 PST 2009


Sam Leffler wrote:
> Doug Barton wrote:
>> Sam Leffler wrote:
>>  
>>> Doug Barton wrote:
>>>    
>>>>   1. Switch to using the top level (e.g., /usr/src) Makefile, and
>>>> specify
>>>>   that we should use the *.mk files from the source directory
>>>> instead of
>>>>   the installed versions. [1][2] This allows easier cross builds and
>>>>   simplifies (or in some cases permits) upgrading.
>>>>         
>>> I believe you changed the meaning of the -m flag so it now requires a
>>> pathname to the src tree and not src/etc.  This breaks existing
>>> usage. In the PR I filed there was a follow-on patch from Bjoern that
>>> amended
>>> my suggestion to instead add a -M option to set the source tree.  I
>>> thought that was an improvement over my hack.  In lieu of that you might
>>> want to examine the pathname supplied to -m to try to provide backwards
>>> compatibility by stripping any /etc suffix on the path.
>>>     
>>
>> The version in bin/96528 from ru had a better fix for this issue, but
>> thanks for thinking of it. :)
>>
>>   
> That's nice to know.  Unfortunately what's in HEAD doesn't seem to work
> for my cross-install setup.  Did you test using the recipe in my PR?  I
> am debugging; could be a local problem.

I finally got this to work, but the problem wasn't with mergemaster.
Turns out that bsd.obj.mk is not taking ${TARGET} into account in the
same way that src/Makefile.inc1 does. I'm sending the following patch
to -hackers for discussion:

Index: bsd.obj.mk
===================================================================
--- bsd.obj.mk	(revision 186676)
+++ bsd.obj.mk	(working copy)
@@ -43,7 +43,7 @@
 .include <bsd.own.mk>

 .if defined(MAKEOBJDIRPREFIX)
-CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
+CANONICALOBJDIR:=${OBJTREE}${.CURDIR}
 .else
 CANONICALOBJDIR:=/usr/obj${.CURDIR}
 .endif

Meanwhile you can work around the problem with sendmail (which is the
only thing mergemaster installs that cares) by setting
WITHOUT_SENDMAIL in /etc/src.conf.

hth,

Doug

-- 

    This .signature sanitized for your protection



More information about the svn-src-head mailing list