build: only use a build in $SKETCHBOOK for px4

for others it is more convenient to use /tmp, as quite a few scripts
rely on this
This commit is contained in:
Andrew Tridgell 2013-08-26 23:03:39 +10:00
parent a295a01bbc
commit 699e188110
1 changed files with 8 additions and 0 deletions

View File

@ -64,7 +64,15 @@ endif
# Work out where we are going to be building things
#
TMPDIR ?= /tmp
ifneq ($(findstring px4, $(MAKECMDGOALS)),)
# when building px4 we need all sources to be inside the sketchbook directory
# as the NuttX build system relies on it
BUILDROOT := $(SKETCHBOOK)/Build.$(SKETCH)
else
BUILDROOT := $(abspath $(TMPDIR)/$(SKETCH).build)
endif
ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
# Workaround a $(abspath ) bug on cygwin
ifeq ($(BUILDROOT),)