diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-14 19:41:08 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-19 10:41:00 +0100 |
commit | 7b498d9838e68eb0b58450ec54ed968e7848c8e0 (patch) | |
tree | f223018a0ab54fbc8b6213565f9b3a883dfef075 /Makefile | |
parent | 981499dd40764941023214f38b8613ae9e08b27c (diff) | |
download | barebox-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 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -4,6 +4,22 @@ SUBLEVEL = 0 EXTRAVERSION =-git NAME = Homicidal Dwarf Hamster +# +# 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 |