[PATCH 147/161] tools/perf/build: Fix non-existent build directory handling

From: Arnaldo Carvalho de Melo
Date: Mon Oct 14 2013 - 16:17:25 EST


From: Ingo Molnar <mingo@xxxxxxxxxx>

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 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
--
1.8.1.4

--
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/