summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2008-07-03 10:57:26 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2008-07-03 11:26:25 +0200
commitb2e60b9eab4d791959ef03da6950f17d2bd349e3 (patch)
tree79380c5898dec873fd38bd96f7293706d196ad2d /Makefile
parentb972a4531f09bb988f80da04846e33688805bac5 (diff)
downloadbarebox-b2e60b9eab4d791959ef03da6950f17d2bd349e3.tar.gz
barebox-b2e60b9eab4d791959ef03da6950f17d2bd349e3.tar.xz
[kbuild] fix out of tree build problem with environment handling
This patch fixes the out of tree build, which was broken in 7b498d9838e68eb0b58450ec54ed968e7848c8e0. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 16 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 30516ce413..40f4366831 100644
--- a/Makefile
+++ b/Makefile
@@ -4,22 +4,6 @@ SUBLEVEL = 0
EXTRAVERSION =-rc5-git
NAME = Amissive Actinocutious Kiwi
-#
-# sanity checks for check default environemnt
-#
-ifdef CONFIG_DEFAULT_ENVIRONMENT
-
-ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"")
-$(error default environment path empty))
-endif
-
-saved-env_path := $(CONFIG_DEFAULT_ENVIRONMENT_PATH)
-CONFIG_DEFAULT_ENVIRONMENT_PATH := $(shell cd $(CONFIG_DEFAULT_ENVIRONMENT_PATH) && /bin/pwd)
-$(if $(CONFIG_DEFAULT_ENVIRONMENT_PATH),, \
- $(error default environment path $(saved-env_path) does not exist))
-
-endif # ifdef CONFIG_DEFAULT_ENVIRONMENT
-
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
# More info can be located in ./README
@@ -1245,3 +1229,19 @@ Makefile: ;
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable se we can use it in if_changed and friends.
.PHONY: $(PHONY)
+
+#
+# sanity checks for check default environemnt
+#
+ifdef CONFIG_DEFAULT_ENVIRONMENT
+
+ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"")
+$(error default environment path empty))
+endif
+
+saved-env_path := $(CONFIG_DEFAULT_ENVIRONMENT_PATH)
+CONFIG_DEFAULT_ENVIRONMENT_PATH := $(shell cd $(if $(filter /%,$(CONFIG_DEFAULT_ENVIRONMENT_PATH)),,$(srctree)/)$(CONFIG_DEFAULT_ENVIRONMENT_PATH) && /bin/pwd)
+$(if $(CONFIG_DEFAULT_ENVIRONMENT_PATH),, \
+ $(error default environment path $(saved-env_path) does not exist))
+
+endif # ifdef CONFIG_DEFAULT_ENVIRONMENT