summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJon Ringle <jon@ringle.org>2011-03-22 02:57:08 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-23 09:46:29 +0100
commite9831a681745c48969b2f6c84356a00785cd7580 (patch)
treec077b52ed2d5226df856a4872ca8fbc984f3e227 /common
parent79c78016c1260b2cd28eceeedee299d48ca9e180 (diff)
downloadbarebox-e9831a681745c48969b2f6c84356a00785cd7580.tar.gz
barebox-e9831a681745c48969b2f6c84356a00785cd7580.tar.xz
defaultenv: fix empty CONFIG_DEFAULT_ENVIRONMENT_PATH
if CONFIG_DEFAULT_ENVIRONMENT_PATH="" then $(DEFAULT_ENVIRONMENT_PATH) expands to 'defaultenv "" ' The "" would cause every single file found in $(srctree) to be included in $(ENV_FILES). This would then cause scripts/mod/sumversions.c to get recompiled using $(CC) and fail compilation if $(CC) points to a newlib cross compiler Signed-off-by: Jon Ringle <jon@ringle.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/Makefile b/common/Makefile
index 98c9d36c12..6cc61435d5 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -31,9 +31,11 @@ ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_GENERIC),y)
DEFAULT_ENVIRONMENT_PATH = "defaultenv"
endif
+ifneq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"")
DEFAULT_ENVIRONMENT_PATH += $(CONFIG_DEFAULT_ENVIRONMENT_PATH)
+endif
-ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f {} \;; done)
+ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f '{}' \;; done)
endif # ifdef CONFIG_DEFAULT_ENVIRONMENT