From owner-freebsd-emulation@FreeBSD.ORG Wed Oct 26 20:21:42 2005 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3803B16A44E; Wed, 26 Oct 2005 20:21:42 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F06F43D53; Wed, 26 Oct 2005 20:21:35 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j9QKLXa2063591; Wed, 26 Oct 2005 23:21:33 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 64559-04-3; Wed, 26 Oct 2005 23:21:31 +0300 (EEST) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j9QKHhdE063425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Oct 2005 23:17:44 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id j9QKHjvp060301; Wed, 26 Oct 2005 23:17:45 +0300 (EEST) (envelope-from ru) Date: Wed, 26 Oct 2005 23:17:45 +0300 From: Ruslan Ermilov To: Norikatsu Shigemura Message-ID: <20051026201745.GB68470@ip.net.ua> References: <20051025215759.25681b85.nork@FreeBSD.org> <20051026224839.bfa3920b.nork@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: <20051026224839.bfa3920b.nork@FreeBSD.org> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: freebsd-emulation@FreeBSD.org, Warner Losh Subject: Re: kqemu-kmod port X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2005 20:21:42 -0000 --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Oct 26, 2005 at 10:48:39PM +0900, Norikatsu Shigemura wrote: > Hi ru! >=20 > On Tue, 25 Oct 2005 21:57:59 +0900 > Norikatsu Shigemura wrote: > > Hi qemu maintainer and users! > > I want kqemu only port to make buildkernel with PORTS_MODULES. > > I tested that make buildworld PORTS_MODULES=3Demulators/qemu, > > but no good. So I decided to make kqemu-kmod port.>=20 > > If I commit following port, I'll remove kqemu related code > > from emulators/qemu/Makefile and add dependency on kqemu-kmod. >=20 > > http://people.freebsd.org/~nork/kqemu-kmod.shar >=20 > I'll try to make buildworld with abobe expremental ports: > # make -j1 buildkernel PORTS_MODULES=3Dlocal/kqemu-kmod >=20 > But I contacted a problem like following lines: >=20 > cd ${PORTSDIR:-/usr/ports}/local/kqemu-kmod; SYSDIR=3D /usr/obj/usr/src/m= ake.i386/make -B all > =3D=3D=3D> Building for kqemu-kmod-0.7.2 > "/usr/src/share/mk/bsd.kmod.mk", line 12: "can't find kernel source tree" > *** Error code 1 >=20 > Stop in /usr/ports/local/kqemu-kmod. > *** Error code 1 > 1 error > *** Error code 2 > 1 error > *** Error code 2 > 1 error >=20 > Do you have any idea for fix? >=20 Warner created this feature only to fit one case: where you build kernel =66rom its canonical place, /usr/src/sys//compile/, then ${.CURDIR}/../../../ will match the the correct SYSDIR. The below patch makes it work in all cases. If $S is absolute, it's used, otherwise ${.CURDIR}/$S is used: # pwd /usr/obj/usr/src/sys/HAMMER # make -V S -V PORTSMODULESENV -DPORTS_MODULES /usr/src/sys SYSDIR=3D/usr/src/sys # pwd /sys/amd64/compile/GENERIC # make -V S -V PORTSMODULESENV -DPORTS_MODULES =2E./../.. SYSDIR=3D/usr/src/sys/amd64/compile/GENERIC/../../.. %%% Index: kern.post.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/conf/kern.post.mk,v retrieving revision 1.86 diff -u -r1.86 kern.post.mk --- kern.post.mk 25 Oct 2005 09:05:07 -0000 1.86 +++ kern.post.mk 26 Oct 2005 20:10:52 -0000 @@ -29,11 +29,7 @@ =20 # Handle out of tree ports=20 .if !defined(NO_MODULES) && defined(PORTS_MODULES) -.for _dir in ${.CURDIR}/../../.. -.if !defined(SYSDIR) && exists(${_dir}/kern/) -SYSDIR=3D ${_dir} -.endif -.endfor +SYSDIR?=3D ${S:C;^[^/];${.CURDIR}/&;} PORTSMODULESENV=3DSYSDIR=3D${SYSDIR} .for __target in all install reinstall clean ${__target}: ports-${__target} %%% Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDX+RpqRfpzJluFF4RAtoBAJ9P7QspwdMJMA2Zepxn3mDpHRwBCQCeL3om bgy5jHOmI7dGweMQRuqtDCk= =44Ke -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--