Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2013 03:03:07 +0930
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: /etc/make.conf && CURDIR
Message-ID:  <51B4BC53.40307@ShaneWare.Biz>
In-Reply-To: <20130609141611.GA17649@La-Habana>
References:  <20130609141611.GA17649@La-Habana>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51B4BC53.40307>