summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-12-15 20:24:34 (GMT)
committerEvan Martin <martine@danga.com>2011-12-15 20:24:34 (GMT)
commitca46af55eb61373b92e49e936a65a465ed277f51 (patch)
tree14fb022f1fc79cdae1b732c28486a1a9a7efef04 /src
parent283282d6123a49c50efc6382e8082ced6bf6d268 (diff)
downloadNinja-ca46af55eb61373b92e49e936a65a465ed277f51.zip
Ninja-ca46af55eb61373b92e49e936a65a465ed277f51.tar.gz
Ninja-ca46af55eb61373b92e49e936a65a465ed277f51.tar.bz2
print 'entering directory' when -C is used
This allows Emacs to track what directory you're in. Patch from Ami Fischman <fischman@chromium.org>.
Diffstat (limited to 'src')
-rw-r--r--src/ninja.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 18b3980..873bc6e 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -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