print 'entering directory' when -C is used

This allows Emacs to track what directory you're in.

Patch from Ami Fischman <fischman@chromium.org>.
This commit is contained in:
Evan Martin 2011-12-15 12:24:34 -08:00
parent 283282d612
commit ca46af55eb

View File

@ -526,6 +526,10 @@ int main(int argc, char** argv) {
argc -= optind;
if (working_dir) {
// The formatting of this string, complete with funny quotes, is
// so Emacs can properly identify that the cwd has changed for
// subsequent commands.
printf("ninja: Entering directory `%s'\n", working_dir);
#ifdef _WIN32
if (_chdir(working_dir) < 0) {
#else