On Thu, Feb 6, 2014 at 11:24 AM, Gregory Szorc <g...@mozilla.com> wrote:
> On 2/6/14, 11:21 AM, Dave Townsend wrote: > >> On Thu, Feb 6, 2014 at 10:57 AM, Gregory Szorc <g...@mozilla.com >> <mailto:g...@mozilla.com>> wrote: >> >> On 2/6/14, 9:23 AM, Dave Townsend wrote: >> >> I assume the second section is actually "getcwd() not in objdir >> but is >> in srcdir"? >> >> >> Yes. >> >> >> I'm crazy enough to want to be able to call mach when getcwd() >> isn't >> either the objdir or srcdir. I have many of both and use various >> environment flags to say which is active currently. Perhaps it's >> implicit, but I don't see the option to use the directory that >> mach is >> in to find the srcdir, that would work fine for me and solve the >> need >> for my current scripts to change directory just to call mach. >> >> >> mach needs to "bind" to a source directory because it needs to load >> Python files from it. The "mach" script at the root of the checkout >> (which can be symlinked or even copied to your heart's content) has >> a mechanism for discovering the source directory. It then calls a >> routine in the source directory which completes the bootstrap process. >> >> If no source directory can be found, the mach script aborts. This >> commonly happens if you run |mach| outside a source directory. >> >> We /can/ add a facility for discovering source directories when >> "mach" is not inside of one. If someone says it is a hard workflow >> requirement, I reckon it will be implemented somehow. >> >> >> I think perhaps I wasn't clear. I'd expect "getcwd() not in objdir nor >> srcdir" to have as the first option "look for the srcdir based on the >> location of the called mach script". So I can do "<srcdir>/mach" and >> have it work, or an alias to mach or something else. >> > > No, you were clear. I forgot to answer that part of the question. > > mach looks at argv[0] as a possible srcdir location. Or at least it should. > > It doesn't right now. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform