Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 2014 13:03:47 -0700
From:      NGie Cooper <yaneurabeya@gmail.com>
To:        Will Andrews <will@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r272282 - head/share/mk
Message-ID:  <CAGHfRMB81gj1k3UPLR0yd7StGBmJPUG1eXRLsVYxbxEqnoSECg@mail.gmail.com>
In-Reply-To: <201409291505.s8TF5Nhh066884@svn.freebsd.org>
References:  <201409291505.s8TF5Nhh066884@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 29, 2014 at 8:05 AM, Will Andrews <will@freebsd.org> wrote:
> Author: will
> Date: Mon Sep 29 15:05:23 2014
> New Revision: 272282
> URL: http://svnweb.freebsd.org/changeset/base/272282
>
> Log:
>   Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR.
>   This will only take effect if PORTSDIR is not set, as previously supported.
>
>   Use .if exists(), for four specific possibilities relative to .CURDIR:
>   ., .., ../.., and ../../..  The fourth possibility is primarily in case
>   ports ever grows a third level.  If none of these paths exist, fall back to
>   the old default of /usr/ports.
>
>   This removes the need to set PORTSDIR explicitly (or via wrapper script) if
>   one is running out of a ports tree that is not in /usr/ports, but in a
>   home directory.
>
>   Reviewed by:  bapt, bdrewery (older version)
>   CR:           D799
>   MFC after:    1 week
>   Sponsored by: Spectra Logic
>
> Modified:
>   head/share/mk/bsd.port.mk
>   head/share/mk/bsd.port.subdir.mk

This change seems like it introduces a lot of unnecessary complexity
in lieu of someone setting PORTSDIR to the root of their ports tree in
the environment.

Why isn't it using a for-loop by the way?

Thanks!



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