[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100419100058.6f1457dd.randy.dunlap@oracle.com>
Date: Mon, 19 Apr 2010 10:00:58 -0700
From: Randy Dunlap <randy.dunlap@...cle.com>
To: lkml <linux-kernel@...r.kernel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Subject: trace-cmd: make Makefile rpm-friendly
From: Randy Dunlap <randy.dunlap@...cle.com>
Update Makefile to support rpmbuild DESTDIR usage.
Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
Makefile | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- trace-cmd-0.7.0.orig/Makefile
+++ trace-cmd-0.7.0/Makefile
@@ -18,10 +18,11 @@ AR = $(CROSS_COMPILE)ar
EXT = -std=gnu99
INSTALL = install
+DESTDIR =
prefix ?= /usr/local
bindir_relative = bin
-bindir = $(prefix)/$(bindir_relative)
-man_dir = $(prefix)/share/man
+bindir = $(DESTDIR)/$(prefix)/$(bindir_relative)
+man_dir = $(DESTDIR)/$(prefix)/share/man
man_dir_SQ = '$(subst ','\'',$(man_dir))'
export man_dir man_dir_SQ INSTALL
@@ -29,7 +30,7 @@ export man_dir man_dir_SQ INSTALL
ifeq ($(prefix),$(HOME))
plugin_dir = $(HOME)/.trace-cmd/plugins
else
-plugin_dir = $(prefix)/share/trace-cmd/plugins
+plugin_dir = $(DESTDIR)/$(prefix)/share/trace-cmd/plugins
PLUGIN_DIR = -DPLUGIN_DIR=$(plugin_dir)
PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists