Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Aug 2013 14:59:11 +0300
From:      Kimmo Paasiala <kpaasial@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   Re: Idea for Mk/Uses snippet
Message-ID:  <CA%2B7WWSed93Pghj6ygRW%2BUjbMUPeRZ95KvxtmBuvqkMjTNkCEgQ@mail.gmail.com>
In-Reply-To: <CA%2B7WWSe6KhTfLtG68UFjtDa13TfLGLJZJ933Hr82JxhSyD5bcA@mail.gmail.com>
References:  <CA%2B7WWSe6KhTfLtG68UFjtDa13TfLGLJZJ933Hr82JxhSyD5bcA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 1, 2013 at 2:03 PM, Kimmo Paasiala <kpaasial@gmail.com> wrote:
> There are quite a few ports that require system sources to be present
> at /usr/src.
>
> Would it make sense to create Mk/Uses snippet (for example named as
> Mk/Uses/system-sources) that checks for let's say /usr/src/Makefile
> and throws an error if the file is not present?
>
> A port that requires the system sources to be present (for example
> sysutils/lsof) could then just say:
>
> USES= ... system-sources ..
>
> What do you think?
>
> -Kimmo

Something as simple as this:

.if !defined(_INCLUDE_USES_SYSTEM_SOURCES_MK)
_INCLUDE_USES_SYSTEM_SOURCES_MK= yes


.if !exists(${SRC_BASE}/Makefile)
IGNORE= This port requires the system sources installed at ${SRC_BASE}
.endif

.endif

Is there still a need to check for kernel sources separately? I would
imagine that everyone checks out the whole src tree now.

-Kimmo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B7WWSed93Pghj6ygRW%2BUjbMUPeRZ95KvxtmBuvqkMjTNkCEgQ>