Idea for Mk/Uses snippet

Kimmo Paasiala kpaasial at gmail.com
Thu Aug 1 11:59:12 UTC 2013


On Thu, Aug 1, 2013 at 2:03 PM, Kimmo Paasiala <kpaasial at 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


More information about the freebsd-ports mailing list