perf tools: Fix /etc config related installation
authorNamhyung Kim <namhyung@gmail.com>
Thu, 9 Aug 2012 14:31:53 +0000 (16:31 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 9 Aug 2012 18:59:40 +0000 (15:59 -0300)
commitb25085be457b4292a563c0bf2fab2ef5b7bb3c45
tree9bc1e89223680bfc7a4ec78ea1b308d85bb35480
parenta3277d2d5a0d5d9492993ab68af8a8dc96760dd1
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>
tools/perf/Makefile