summaryrefslogtreecommitdiffstats
path: root/project
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-09-16 20:53:45 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-09-16 20:53:45 +0000
commite3556c886203636c2339c439ddfda0c0207798cd (patch)
tree69431be711ecf030f66a0ce8349d3adf298fc043 /project
parent49e3aba2d9960b387f11998999e4f3cbb5a99f7e (diff)
downloadbuildroot-novena-e3556c886203636c2339c439ddfda0c0207798cd.tar.gz
buildroot-novena-e3556c886203636c2339c439ddfda0c0207798cd.zip
Makefile: support relative paths for out of tree builds
And complain if the output directory cannot be created.
Diffstat (limited to 'project')
-rw-r--r--project/Makefile.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/project/Makefile.in b/project/Makefile.in
index 034b1fa6c..6aa1d43e9 100644
--- a/project/Makefile.in
+++ b/project/Makefile.in
@@ -30,7 +30,8 @@ TAR_OPTIONS=$(subst ",, $(BR2_TAR_OPTIONS)) -xf
BASE_DIR:=$(shell pwd)
ifdef O
ifeq ("$(origin O)", "command line")
-BASE_DIR := $(O)
+BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
+$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
endif
endif