[tip:perf/core] tools/perf/build: Fix non-existent build directory handling
From: tip-bot for Ingo Molnar
Date: Tue Oct 15 2013 - 01:34:16 EST
Commit-ID: 3fb66335e13ef7426affe9efa48c08857202c1cb
Gitweb: http://git.kernel.org/tip/3fb66335e13ef7426affe9efa48c08857202c1cb
Author: Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Wed, 9 Oct 2013 17:00:23 +0200
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Mon, 14 Oct 2013 10:29:05 -0300
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 <acme@xxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/20131009150023.GA10167@xxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 5aa3d04..9147044 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/