[RFC] adding a variable to .mk and Makefile.inc1 to point to top of the FreeBSD source tree

Garrett Cooper yanegomi at gmail.com
Tue May 7 20:27:25 UTC 2013


On Tue, May 7, 2013 at 1:12 PM, Xin Li <delphij at delphij.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> On 05/07/13 13:05, Garrett Cooper wrote:
> > Hi, A common pattern that I've seen at Isilon and something else
> > that I've wanted to have for a while is the ability to designate
> > where the top of a source tree was. This is important and helpful
> > when dealing with source files that build upon each other or depend
> > on sources located in other sections of the tree; contrib stuff
> > needs to set .PATH appropriately to point to sources at the top of
> > the tree, sys stuff is riddled with S= in order to point to where
> > /sys, etc lives, we build upon FreeBSD within an expected directory
> > structure as well. I haven't come up with a name, but was wondering
> > if this was a good idea, and if so does anyone have any outstanding
> > patches for this that can be pushed into FreeBSD?
>
> Is there anything wrong with the current '../../' approach?
>

    Not in particular, other than our variable (ISI_TOP) is used in
referencing ${.CURDIR} and ${.OBJDIR}, and it's easy to make mistakes if
you goof up the dot-dots. With a properly defined directory like that it
makes things unambiguous in my mind and with a proper name it makes pathing
more intuitive than it currently is. Besides, it would make some other
things cleaner, like the dot-dot magic that config(8), etc does.
Thanks!
-Garrett


More information about the freebsd-arch mailing list