From owner-freebsd-questions@FreeBSD.ORG Sun Jun 9 17:33:10 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 55963C16 for ; Sun, 9 Jun 2013 17:33:10 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail07.adl2.internode.on.net (ipmail07.adl2.internode.on.net [IPv6:2001:44b8:8060:ff02:300:1:2:7]) by mx1.freebsd.org (Postfix) with ESMTP id DA5E5161B for ; Sun, 9 Jun 2013 17:33:09 +0000 (UTC) Received: from ppp247-71.static.internode.on.net (HELO leader.local) ([203.122.247.71]) by ipmail07.adl2.internode.on.net with ESMTP; 10 Jun 2013 03:03:08 +0930 Message-ID: <51B4BC53.40307@ShaneWare.Biz> Date: Mon, 10 Jun 2013 03:03:07 +0930 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130516 Thunderbird/17.0.6 MIME-Version: 1.0 To: Matthias Apitz Subject: Re: /etc/make.conf && CURDIR References: <20130609141611.GA17649@La-Habana> In-Reply-To: <20130609141611.GA17649@La-Habana> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2013 17:33:10 -0000 On 09/06/2013 23:46, Matthias Apitz wrote: > > Hello, > > I have the kernel sources not in /usr/src/sys, but elsewhere; I can > not get set correctly SYSDIR via /etc/make.conf for some ports (or > other values like USE_GCC, ...); > > if I have in /etc/make.conf these lines: > > .if ${.CURDIR:M*/multimedia/cuse4bsd-kmod*} > SYSDIR=/usr/home/guru/head/src/sys > .endif > > it works, but if I let away the '*' in the line, i.e. > > .if ${.CURDIR:M*/multimedia/cuse4bsd-kmod} > SYSDIR=/usr/home/guru/head/src/sys > .endif > > the 'make' asks me to set SYSDIR: > > # make clean install ... building shared library libcuse4bsd.so.1 > gzip -cn cuse4bsd.3 > cuse4bsd.3.gz make -f > /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4bsd-kmod-0.1.27/Makefile.kmod > all "/usr/share/mk/bsd.kmod.mk", line 12: Unable to locate the kernel > source tree. Set SYSDIR to override. *** [all] Error code 1 > > Why is this? Thanks. The system runs 10-CUR r250588 i386. > You'll find the trailing asterix is a wildcard to match any sub dirs. When building CURDIR only contains multimedia/cuse4bsd-kmod - CURDIR will be something like /usr/ports/multimedia/cuse4bsd-kmod/work/cuse4-bsd-kmod-0.1.27/ The pre and post * matches all paths with multimedia/cuse4bsd-kmod in them - usually pretty unique when building within the ports dirs.