From: Ingo Molnar Date: Wed, 9 Oct 2013 15:00:23 +0000 (+0200) Subject: tools/perf/build: Fix non-existent build directory handling X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3fb66335e13ef7426affe9efa48c08857202c1cb;p=linux-beck.git tools/perf/build: Fix non-existent build directory handling Arnaldo reported that non-existent build directories were not recognized properly. The reason is readlink failure causing 'O' to become empty. Solve it by passing through the 'O' variable unmodified if readlink fails. Reported-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20131009150023.GA10167@gmail.com Signed-off-by: Ingo Molnar Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 5aa3d040bbf3..914704495166 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -34,7 +34,7 @@ endif # Only pass canonical directory names as the output directory: # ifneq ($(O),) - FULL_O := $(shell readlink -f $(O)) + FULL_O := $(shell readlink -f $(O) || echo $(O)) endif define print_msg