Commit 9e4a6648 authored by Borislav Petkov's avatar Borislav Petkov Committed by Arnaldo Carvalho de Melo

perf tools: Correct Makefile.include

It looks at O= and adjusts the $(OUTPUT) variable based on what the
output directory will be. However, when O is defined but empty, it
wrongly becomes the user's $HOME dir which is not what we want. So check
it is not empty before working with it further.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1361374353-30385-4-git-send-email-bp@alien8.deSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent a50e4333
ifneq ($(O),)
ifeq ($(origin O), command line) ifeq ($(origin O), command line)
dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),) dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
ABSOLUTE_O := $(shell cd $(O) ; pwd) ABSOLUTE_O := $(shell cd $(O) ; pwd)
...@@ -7,9 +8,10 @@ ifeq ($(objtree),) ...@@ -7,9 +8,10 @@ ifeq ($(objtree),)
objtree := $(O) objtree := $(O)
endif endif
endif endif
endif
ifneq ($(OUTPUT),)
# check that the output directory actually exists # check that the output directory actually exists
ifneq ($(OUTPUT),)
OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment