Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754907AbbKMPv1 (ORCPT ); Fri, 13 Nov 2015 10:51:27 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36511 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754295AbbKMPv0 (ORCPT ); Fri, 13 Nov 2015 10:51:26 -0500 Date: Fri, 13 Nov 2015 16:51:17 +0100 (CET) From: John Kacur X-X-Sender: jkacur@riemann To: Steven Rostedt cc: LKML Subject: [PATCH] trace-cmd: Makefile: Determine install in lib or lib64 Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1748 Lines: 52 >From 89ca0b6a2c278435d16e1f23ac7cd355553515f9 Mon Sep 17 00:00:00 2001 From: Jon Stanley 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/