Date: Thu, 12 Sep 2013 01:17:55 +0400 From: Lev Serebryakov <lev@FreeBSD.org> To: John-Mark Gurney <jmg@funkthat.com> Cc: freebsd-current@freebsd.org Subject: Re: Chicken and egg problem when building (third-party) kernel modules with <bsd.kmod.mk> -- how to solve? Message-ID: <899884661.20130912011755@serebryakov.spb.ru> In-Reply-To: <20130911165346.GA68682@funkthat.com> References: <1510067821.20130911173716@serebryakov.spb.ru> <20130911165346.GA68682@funkthat.com>
index | next in thread | previous in thread | raw e-mail
Hello, John-Mark.
You wrote 11 сентября 2013 г., 20:53:46:
>> It is good idea to set KERNBUILDDIR when build module. But to set it you
>> need to know ${.OBJDIR} from ${SYSDIR} and ${SYSDIR} is set in bsd.kmod.mk,
>> which should be included last (after defining KERNBUILDDIR).
>>
>> How this loop could be broken?
JMG> If you need to build it stand alone, you still need the opt_*.h files
I'm speaking about making port with kernel module, but this port is using
bsd.*.mk infrastructure by itself.
JMG> from the kernel you are going to run it with, and that directory is
JMG> what you need to set KERNBUILDDIR...
KERNBUILDDIR could be set automagically with:
KERNBUILDROOT!= make -C ${SYSDIR} -V .OBJDIR
KERNNAME!= uname -i
.if exists(${KERNBUILDROOT}/${KERNNAME}/opt_global.h) && !defined(KERNBUILDDIR)
KERNBUILDDIR:=${KERNBUILDROOT}/${KERNNAME}
.endif
But here is problem, which I'm speaking about: it should go BEFORE
<bsd.kmod.mk> but it needs to use ${SYSDIR}.
--
// Black Lion AKA Lev Serebryakov <lev@FreeBSD.org>
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?899884661.20130912011755>
