[Buildroot] [PATCH 3/5] By default, put the output in an output/ directory
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Mon Sep 7 22:09:51 UTC 2009
Instead of putting all the build-related stuff as a mess in the
Buildroot sources, group them in an output/ directory.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
Makefile | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 61c2b80..1fe9351 100644
--- a/Makefile
+++ b/Makefile
@@ -217,8 +217,6 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
# Buildroot supports building out of tree similarly to the Linux kernel.
# To use, add O= to the make command line (make O=/tmp/build)
-BASE_DIR:=$(shell pwd)
-ifdef O
ifeq ("$(origin O)", "command line")
BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
@@ -228,7 +226,8 @@ $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
# forwards command line variable definitions those packages get very
# confused. Fix this by telling make to not do so
MAKEOVERRIDES =
-endif
+else
+BASE_DIR := $(shell mkdir -p output && cd output && pwd)
endif
TOPDIR_PREFIX:=$(call qstrip,$(BR2_TOPDIR_PREFIX))_
--
1.6.0.4
More information about the buildroot
mailing list