Subject: Re: parent directory search for make(1)
To: None <>
From: Christos Zoulas <>
List: tech-toolchain
Date: 01/30/2004 16:12:39
In article <>,
Chuck Cranor <> wrote:
>    i'm working on a project where we want use NetBSD make(1) as
>the main build tool.   since this project will run on multiple 
>platforms, i'm using Simon Gerraty's portable bmake package (see 
> ) which is based on 
>NetBSD make.
>    one thing we'd like to have is all of make's macros live within
>the base of our local CVS source tree rather than outside of it (e.g.
>we don't want to use /usr/share/mk).  in order for this to work, our 
>build environment needs a way to walk up the directory tree looking 
>for (giving up if it reaches "/" without finding it).
>    there are a couple of ways to add this search in.  currently
>i'm using a small patch to make that adds this semantic to MAKESYSPATH.
>[patch included below]   basically, it uses a magic path string of
>".../" to access the parent directory search.   then the locally
>compiled bmake has its default MAKESYSPATH set to ".../mk/"
>which causes it to look for "mk/", then "../mk/", then
>"../../mk/", etc. until it finds it or reaches the root of
>the filesystem without finding it.
>    in discussing it with Simon, he suggests another approach is
>to put the directory search in a wrapper script that dynamically
>determines the location of "" and invokes make with that
>directory passed in (either via "-m" or $MAKESYSPATH).
>    it seems like having this feature in NetBSD make itself would
>be useful(?).  it isn't clear if it would be better to put it in
>make itself (like i did) or add a new make wrapper script to the
>NetBSD source tree that would do the search.  anyone have any
>helpful thoughts on this?

I don't like much the `.../' but I cannot think of something better?
maybe starting with `*'? Otherwise looks fine to me, commit it.