summaryrefslogtreecommitdiffstats
path: root/core/main.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2012-05-22 18:29:02 -0700
committerYing Wang <wangying@google.com>2012-05-22 18:29:02 -0700
commit9ccacd7a6f27dbb38c8365b85fb07197d1fdbb29 (patch)
treed71a15ac78c57a6520016d9574c0ef26e061b773 /core/main.mk
parent4007faf4c6bb99883f6ac7a8d80a956837909ff8 (diff)
downloadbuild-9ccacd7a6f27dbb38c8365b85fb07197d1fdbb29.zip
build-9ccacd7a6f27dbb38c8365b85fb07197d1fdbb29.tar.gz
build-9ccacd7a6f27dbb38c8365b85fb07197d1fdbb29.tar.bz2
Set PWD to the absolute path of the top tree.
Previously PWD is passed in as a shell environmental variable, which does not point to top of the source tree if you run mm/mmm. That in turn breaks mm/mmm if OUT_DIR_COMMON_BASE is set to an absolute path. Change-Id: Iac99d5668aee1bbd3cb9897750afc2149bd9f973
Diffstat (limited to 'core/main.mk')
-rw-r--r--core/main.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/main.mk b/core/main.mk
index fa56b83..3c64d95 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -52,6 +52,11 @@ endif
endif
endif
+# Absolute path of the present working direcotry.
+# This overrides the shell variable $PWD, which does not necessarily points to
+# the top of the source tree, for example when "make -C" is used in m/mm/mmm.
+PWD := $(shell pwd)
+
TOP := .
TOPDIR :=