commit | af9887a8175386d1980e11cc3d22e59deb7f86bc | [log] [tgz] |
---|---|---|
author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | Fri Jul 17 03:45:14 2015 +0900 |
committer | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | Fri Jul 17 03:45:14 2015 +0900 |
tree | 21c45bf522570215c3c95f240d3ef55d713f1c04 | |
parent | eb0e5f96c5b12a8414d5f1555897cfa11ddc5dbb [diff] [blame] |
[C++] Change directory to Android's code root in ninja.sh Also emit version info to the shell script.
diff --git a/ninja.cc b/ninja.cc index fef2a3a..c3cdc9c 100644 --- a/ninja.cc +++ b/ninja.cc
@@ -431,6 +431,9 @@ if (shell->empty()) shell = make_shared<string>("/bin/sh"); fprintf(fp, "#!%s\n", shell->c_str()); + fprintf(fp, "# Generated by kati %s\n", kGitVersion); + fprintf(fp, "\n"); + fprintf(fp, "cd $(dirname \"$0\")\n"); for (const auto& p : ev_->exports()) { if (p.second) {