diff options
author | Namhyung Kim <namhyung@gmail.com> | 2012-08-09 10:31:53 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-09 14:59:40 -0400 |
commit | b25085be457b4292a563c0bf2fab2ef5b7bb3c45 (patch) | |
tree | 9bc1e89223680bfc7a4ec78ea1b308d85bb35480 | |
parent | a3277d2d5a0d5d9492993ab68af8a8dc96760dd1 (diff) |
perf tools: Fix /etc config related installation
Fix missing /etc/bash_completion.d directory creation, otherwise
the installation fails miserably on systems that don't have bash
completion installed yet or on specific target:
$ make DESTDIR=/tmp/junk-perf O=/tmp/pbuild -C tools/perf/ install
...
install -m 755 bash_completion /tmp/junk-perf/etc/bash_completion.d/perf
install: cannot create regular file
`/tmp/junk-perf/etc/bash_completion.d/perf': No such file or directory
make: *** [install] Error 1
make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
Also use sysconfdir variable instead of the hardcoded /etc to handle
overriden conf directory.
Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1344522713-27951-4-git-send-email-fweisbec@gmail.com
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 84b422786949..a9458b9dd7b8 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -700,6 +700,7 @@ perfexecdir_SQ = $(subst ','\'',$(perfexecdir)) | |||
700 | template_dir_SQ = $(subst ','\'',$(template_dir)) | 700 | template_dir_SQ = $(subst ','\'',$(template_dir)) |
701 | htmldir_SQ = $(subst ','\'',$(htmldir)) | 701 | htmldir_SQ = $(subst ','\'',$(htmldir)) |
702 | prefix_SQ = $(subst ','\'',$(prefix)) | 702 | prefix_SQ = $(subst ','\'',$(prefix)) |
703 | sysconfdir_SQ = $(subst ','\'',$(sysconfdir)) | ||
703 | 704 | ||
704 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) | 705 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) |
705 | 706 | ||
@@ -951,7 +952,8 @@ install: all | |||
951 | $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' | 952 | $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' |
952 | $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' | 953 | $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' |
953 | $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' | 954 | $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' |
954 | $(INSTALL) -m 755 bash_completion $(DESTDIR_SQ)/etc/bash_completion.d/perf | 955 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' |
956 | $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' | ||
955 | 957 | ||
956 | install-python_ext: | 958 | install-python_ext: |
957 | $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' | 959 | $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' |