Skip to content

Commit

Permalink
envsetup: set OUT_DIR to an absolute path always
Browse files Browse the repository at this point in the history
OUT_DIR was set to $(TOPDIR)out previously,
but $(TOPDIR) was null, so it was a relative path.
This broke releasetools, inline kernel building, etc
since they require absolute paths.
Fix it so that it is set to $(shell readlink -f .)/out
if $(TOPDIR) is null.

Also remove hacks which checked if (OUT_DIR) was out
and changed it to $(ANDROID_BUILD_TOP)/out to workaround
the aforementioned problem.

Change-Id: I459a3b1325a1bbea0565cd73f6acf160d4ed9b39
  • Loading branch information
chirayudesai authored and andi34 committed Sep 17, 2016
1 parent a5563bc commit 98f9f80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/envsetup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,12 @@ endif

ifeq (,$(strip $(OUT_DIR)))
ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
ifneq ($(TOPDIR),)
OUT_DIR := $(TOPDIR)out
else
OUT_DIR := $(shell readlink -f .)/out
endif
else
OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
endif
endif
Expand Down

0 comments on commit 98f9f80

Please sign in to comment.