summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2007-11-14 19:41:08 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2007-11-19 10:41:00 +0100
commit7b498d9838e68eb0b58450ec54ed968e7848c8e0 (patch)
treef223018a0ab54fbc8b6213565f9b3a883dfef075 /common
parent981499dd40764941023214f38b8613ae9e08b27c (diff)
downloadbarebox-7b498d9838e68eb0b58450ec54ed968e7848c8e0.tar.gz
barebox-7b498d9838e68eb0b58450ec54ed968e7848c8e0.tar.xz
[makesystem] reworked default environment handling
This patch improves the default environment handling, now the makesystem bails out if the default environment path is empty or points to an invalid directory (with activated default environment). It also fixes this error: find: invalid predicate `' Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/Makefile17
1 files changed, 8 insertions, 9 deletions
diff --git a/common/Makefile b/common/Makefile
index 11d4ae5166..33d302c222 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -19,14 +19,13 @@ obj-y += memsize.o
obj-$(CONFIG_MODULES) += module.o
extra-$(CONFIG_MODULES) += module.lds
-ifdef CONFIG_DEFAULT_ENVIRONMENT_PATH
-
-startup.o: include/uboot_default_env.h
-
-include/uboot_default_env.h: $(shell find $(CONFIG_DEFAULT_ENVIRONMENT_PATH) -type f)
- $(Q)scripts/ubootenv -s $(CONFIG_DEFAULT_ENVIRONMENT_PATH) uboot_default_env
- $(Q)cat uboot_default_env | scripts/bin2c default_environment > $@
-
+ifdef CONFIG_DEFAULT_ENVIRONMENT
+$(obj)/startup.o: include/uboot_default_env.h
$(obj)/env.o: include/uboot_default_env.h
-endif
+ENV_FILES := $(shell find $(CONFIG_DEFAULT_ENVIRONMENT_PATH))
+endif # ifdef CONFIG_DEFAULT_ENVIRONMENT
+
+include/uboot_default_env.h: $(ENV_FILES)
+ $(Q)scripts/ubootenv -s $(CONFIG_DEFAULT_ENVIRONMENT_PATH) | \
+ scripts/bin2c default_environment > $@