aboutsummaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-06-22 18:22:30 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-06-22 18:22:30 +0900
commitb74b890feb1a0248b6c3e421c656247741efba05 (patch)
treeefdb8267f892036a1af1d02ded658f8f5756217a /main.cc
parentc22fdb49c772760574b7b7969242e15dea30993d (diff)
downloadandroid_build_kati-b74b890feb1a0248b6c3e421c656247741efba05.tar.gz
android_build_kati-b74b890feb1a0248b6c3e421c656247741efba05.tar.bz2
android_build_kati-b74b890feb1a0248b6c3e421c656247741efba05.zip
[C++] Implement $(MAKEFILE_LIST)
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.cc b/main.cc
index e77a240..c9e8de4 100644
--- a/main.cc
+++ b/main.cc
@@ -134,6 +134,10 @@ static int Run(const vector<StringPiece>& targets,
}
ev->set_is_bootstrap(false);
+ vars->Assign("MAKEFILE_LIST",
+ new SimpleVar(make_shared<string>(
+ StringPrintf(" %s", g_makefile)), "file"));
+
Makefile* mk = cache_mgr->ReadMakefile(g_makefile);
for (AST* ast : mk->asts()) {
LOG("%s", ast->DebugString().c_str());