Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2017 18:19:25 -0500
From:      Kurt Lidl <lidl@FreeBSD.org>
To:        rgrimes@FreeBSD.org, Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        Ngie Cooper <ngie@FreeBSD.org>, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org
Subject:   Re: svn commit: r314654 - in head/cddl: lib/drti lib/libavl lib/libctf lib/libdtrace lib/libnvpair lib/libumem lib/libuutil lib/libzfs lib/libzfs_core lib/libzpool sbin/zfs sbin/zpool usr.bin/ctfconver...
Message-ID:  <c6c9075b-f592-4d64-5e9e-9f6f1343b6cd@FreeBSD.org>
In-Reply-To: <201703042039.v24KdcDE078734@pdx.rh.CN85.dnsmgr.net>
References:  <201703042039.v24KdcDE078734@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/4/17 3:39 PM, Rodney W. Grimes wrote:

> Idk, maybe I am to personally attached to the relative paths.. cause I
> had a major part in helping them all to work, or perhaps its my been
> burned by absolute paths that had to be reworked too many times in
> my past.  But my gutt is telling me this change is Bad(tm).
>

At my prior job, where we ended up starting off with a bunch of userland
programs in a repository, we had a variable that was set to get you
to the top of the source tree.  It was set in ../Makefile.inc, so if
one just used ".include <bsd.prog.mk>" in the Makefile, one got
the variable "for free", as the stock bsd.prog.mk file would include
the ../Makefile.inc by default.

While there were maintenance issues with this scheme, I ultimately
ended up coding up something similar to the SRCTOP for our purposes,
once we decided to start moving programs around in the tree.

I think one of the big issues with relative locations of other resources
in the tree is that one has to encode two pieces of information in
the Makefiles.  Both the location of the program being compiled (so
it can find the top), and the location of the resource that is being
accessed (so the compile can walk down the tree to find whatever is
being referenced).

With something like SRCTOP, only the second piece of information needs
to be encoded in the Makefile.  I think that eliminating half of the
information about how to find the external resources is actually a good
thing.

-Kurt




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c6c9075b-f592-4d64-5e9e-9f6f1343b6cd>