diff options
author | Pawel Moll <pawel.moll@arm.com> | 2015-07-28 10:10:13 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-28 12:03:49 -0400 |
commit | 0927beeca5f9d1a7978f8da9c9d28647859816d3 (patch) | |
tree | 3b49187d588b34c6847ae2c67ab22945a67f82c0 /tools/perf | |
parent | 5497628576a3c5f3dbab224fa5a5d027f43d8b50 (diff) |
perf tools: Fix test build error when bindir contains double slash
When building with a prefix ending with a slash, for example:
$ make prefix=/usr/local/
one of the perf tests fail to compile due to BUILD_STR macro mishandling
bindir_SQ string containing with two slashes:
-DBINDIR="BUILD_STR(/usr/local//bin)"
with the following error:
CC tests/attr.o
tests/attr.c: In function ‘test__attr’:
tests/attr.c:168:50: error: expected ‘)’ before ‘;’ token
snprintf(path_perf, PATH_MAX, "%s/perf", BINDIR);
^
tests/attr.c:176:1: error: expected ‘;’ before ‘}’ token
}
^
tests/attr.c:176:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
This patch works around the problem by "cleaning" the bindir string
using make's abspath function.
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1438092613-21014-1-git-send-email-pawel.moll@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/config/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 094ddaee104c..d31fac19c30b 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -638,7 +638,7 @@ ifndef DESTDIR | |||
638 | prefix ?= $(HOME) | 638 | prefix ?= $(HOME) |
639 | endif | 639 | endif |
640 | bindir_relative = bin | 640 | bindir_relative = bin |
641 | bindir = $(prefix)/$(bindir_relative) | 641 | bindir = $(abspath $(prefix)/$(bindir_relative)) |
642 | mandir = share/man | 642 | mandir = share/man |
643 | infodir = share/info | 643 | infodir = share/info |
644 | perfexecdir = libexec/perf-core | 644 | perfexecdir = libexec/perf-core |