Date: Thu, 1 Aug 2013 17:24:52 +0300 From: Kimmo Paasiala <kpaasial@gmail.com> To: freebsd-ports@freebsd.org Subject: Re: Idea for Mk/Uses snippet Message-ID: <CA%2B7WWScNMsC9BzKLHPf_hTPqh6fN1FFBqjPD51DStJ8K_rRgYQ@mail.gmail.com> In-Reply-To: <CA%2B7WWSed93Pghj6ygRW%2BUjbMUPeRZ95KvxtmBuvqkMjTNkCEgQ@mail.gmail.com> References: <CA%2B7WWSe6KhTfLtG68UFjtDa13TfLGLJZJ933Hr82JxhSyD5bcA@mail.gmail.com> <CA%2B7WWSed93Pghj6ygRW%2BUjbMUPeRZ95KvxtmBuvqkMjTNkCEgQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 1, 2013 at 2:59 PM, Kimmo Paasiala <kpaasial@gmail.com> wrote: > 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 Ok, I hadn't read the porter's handbook before I wrote the above and the handbook suggests that kernel sources should be checked as: .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel sources to be installed .endif Do ports actually depend on the full system sources or is it just the kernel sources part under ${SRC_BASE}/sys ? If it's only the kernelt this could still be turned into Mk/Uses/kernel-sources.mk snippet to avoid repeating the above for every port that needs the kernel sources. -Kimmo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B7WWScNMsC9BzKLHPf_hTPqh6fN1FFBqjPD51DStJ8K_rRgYQ>