lkml.org 
[lkml]   [2015]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] trace-cmd: Makefile: Determine install in lib or lib64
From 89ca0b6a2c278435d16e1f23ac7cd355553515f9 Mon Sep 17 00:00:00 
2001
From: Jon Stanley <jonstanley@gmail.com>
Date: Fri, 13 Nov 2015 15:22:58 +0100
Subject: [PATCH] trace-cmd: Makefile: Determine whether to install to lib or
lib64

Determine whether an arch is 64 or 32 bit in order to determine
whether to install to lib or lib64

Original patch from Jon Stanley found in Fedora git repo, modified to
omit extraneous parts and simplifiy it a bit.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 507af59bef69..8459204346fa 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,12 @@ $(call allow-override,AR,$(CROSS_COMPILE)ar)
EXT = -std=gnu99
INSTALL = install

+# figure out what arch we are on and install to right place
+ARCH = $(shell getconf LONG_BIT)
+LIBDIR_32 = lib
+LIBDIR_64 = lib64
+LIBDIR=$(LIBDIR_$(ARCH))
+
# Use DESTDIR for installing into a different root directory.
# This is useful for building a package. The program will be
# installed in this directory as if it was the root directory.
@@ -47,7 +53,7 @@ html_install = $(prefix)/share/kernelshark/html
html_install_SQ = '$(subst ','\'',$(html_install))'
img_install = $(prefix)/share/kernelshark/html/images
img_install_SQ = '$(subst ','\'',$(img_install))'
-libdir ?= lib
+libdir ?= $(LIBDIR)

export man_dir man_dir_SQ html_install html_install_SQ INSTALL
export img_install img_install_SQ
--
2.4.3


\
 
 \ /
  Last update: 2015-11-13 17:01    [W:0.041 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site