summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2014-03-23 16:21:51 +0100
committerLuboš Luňák <l.lunak@collabora.com>2014-04-23 18:50:20 +0200
commit2bf2bc2c7f257a818f3f723780690450f1a22c50 (patch)
treecdd1642dfd5e3e6631049ac607134e01ea3ec996 /solenv
parent129f9c4c39b37eaddbd51838627973744854bdf9 (diff)
make it possible to do 'make -C sw/' even with builddir!=srcdir
The change in partial_build.mk assumes all the Makefile's using it are in builddir/<module>/ or builddir/external/<module> , these are differentiated by checking for ../External_module.mk . Change-Id: Iddc8fa2ec0842f181780f7491cf5a2244efd014a
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/partial_build.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk
index 68e807b97615..4d5e1db89b7d 100644
--- a/solenv/gbuild/partial_build.mk
+++ b/solenv/gbuild/partial_build.mk
@@ -22,7 +22,10 @@ gb_Side:=host
endif
ifeq (,$(BUILDDIR))
-BUILDDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))../..
+gb_partial_build__makefile_dir=$(dir $(abspath $(firstword $(MAKEFILE_LIST))))
+BUILDDIR := $(if $(wildcard $(gb_partial_build__makefile_dir)../Module_external.mk), \
+ $(gb_partial_build__makefile_dir)../.., \
+ $(gb_partial_build__makefile_dir)..)
endif
ifeq ($(BUILD_TYPE),)