mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Namhyung Kim <namhyung@gmail.com>,
	David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Stephane Eranian <eranian@google.com>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 3/3] perf tools: Fix /etc config related installation
Date: Thu,  9 Aug 2012 16:31:53 +0200	[thread overview]
Message-ID: <1344522713-27951-4-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1344522713-27951-1-git-send-email-fweisbec@gmail.com>

From: Namhyung Kim <namhyung@gmail.com>

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>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 tools/perf/Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 84b4227..a9458b9 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -700,6 +700,7 @@ perfexecdir_SQ = $(subst ','\'',$(perfexecdir))
 template_dir_SQ = $(subst ','\'',$(template_dir))
 htmldir_SQ = $(subst ','\'',$(htmldir))
 prefix_SQ = $(subst ','\'',$(prefix))
+sysconfdir_SQ = $(subst ','\'',$(sysconfdir))
 
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 
@@ -951,7 +952,8 @@ install: all
 	$(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'
 	$(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'
 	$(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
-	$(INSTALL) -m 755 bash_completion $(DESTDIR_SQ)/etc/bash_completion.d/perf
+	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'
+	$(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
 
 install-python_ext:
 	$(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
-- 
1.7.5.4


  parent reply	other threads:[~2012-08-09 14:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 14:31 [PATCH 0/3] perf tools: Basic bash completion support v3 Frederic Weisbecker
2012-08-09 14:31 ` [PATCH 1/3] perf tools: Initial bash completion support Frederic Weisbecker
2012-08-09 16:35   ` Arnaldo Carvalho de Melo
2012-08-09 16:40     ` David Ahern
2012-08-09 17:14       ` Arnaldo Carvalho de Melo
2012-08-09 17:24         ` David Ahern
2012-08-09 17:31         ` Frederic Weisbecker
2012-08-09 18:27         ` Alan Cox
2012-08-09 19:08           ` Arnaldo Carvalho de Melo
2012-08-10 13:30             ` Frederic Weisbecker
2012-08-09 17:00     ` Frederic Weisbecker
2012-08-09 17:11       ` Arnaldo Carvalho de Melo
2012-08-09 17:13         ` Frederic Weisbecker
2012-08-21 15:38   ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2012-08-09 14:31 ` [PATCH 2/3] perf tools: Support for events bash completion Frederic Weisbecker
2012-08-21 15:39   ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2012-08-09 14:31 ` Frederic Weisbecker [this message]
2012-08-21 15:40   ` [tip:perf/core] perf tools: Fix /etc config related installation tip-bot for Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344522713-27951-4-git-send-email-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome