diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2009-07-31 10:24:32 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2009-09-16 20:32:54 +0200 |
commit | a07d6b9d56955bfe0165b5f4ea6d3ed7a92ecff6 (patch) | |
tree | e8a5b9f38e7beb8035a66a4ccc921cdc8844403d | |
parent | 18183726d4ab327b217a9ead3a8e88cb434257f6 (diff) | |
download | buildroot-novena-a07d6b9d56955bfe0165b5f4ea6d3ed7a92ecff6.tar.gz buildroot-novena-a07d6b9d56955bfe0165b5f4ea6d3ed7a92ecff6.zip |
By default, put the output in an output/ directory
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@free-electrons.com>
-rw-r--r-- | Makefile | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -217,21 +217,18 @@ ZCAT:=$(call qstrip,$(BR2_ZCAT)) BZCAT:=$(call qstrip,$(BR2_BZCAT)) 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)) - +ifneq ("$(origin O)", "command line") +O:=output +else # other packages might also support Linux-style out of tree builds # with the O=<dir> syntax (E.G. Busybox does). As make automatically # forwards command line variable definitions those packages get very # confused. Fix this by telling make to not do so MAKEOVERRIDES = endif -endif + +BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd) +$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist)) TOPDIR_PREFIX:=$(call qstrip,$(BR2_TOPDIR_PREFIX))_ TOPDIR_SUFFIX:=_$(call qstrip,$(BR2_TOPDIR_SUFFIX)) |