OSDN Git Service

Set PWD to the absolute path of the top tree.
authorYing Wang <wangying@google.com>
Wed, 23 May 2012 01:29:02 +0000 (18:29 -0700)
committerYing Wang <wangying@google.com>
Wed, 23 May 2012 01:29:02 +0000 (18:29 -0700)
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

core/main.mk

index fa56b83..3c64d95 100644 (file)
@@ -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 :=