[kernel] r18127 - dists/trunk/linux-tools/debian/build/tools/perf

Bastian Blank waldi at alioth.debian.org
Mon Sep 26 11:50:16 UTC 2011


Author: waldi
Date: Mon Sep 26 11:50:12 2011
New Revision: 18127

Log:
debian/build/tools/perf/Makefile: Produce and check kernel arch.

Modified:
   dists/trunk/linux-tools/debian/build/tools/perf/Makefile

Modified: dists/trunk/linux-tools/debian/build/tools/perf/Makefile
==============================================================================
--- dists/trunk/linux-tools/debian/build/tools/perf/Makefile	Mon Sep 26 01:43:25 2011	(r18126)
+++ dists/trunk/linux-tools/debian/build/tools/perf/Makefile	Mon Sep 26 11:50:12 2011	(r18127)
@@ -2,9 +2,45 @@
 
 include ../../Makefile.inc
 
+DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+
+ifeq ($(DEB_HOST_ARCH_CPU),amd64)
+  KERNEL_ARCH_PERF = x86
+else ifeq ($(DEB_HOST_ARCH_CPU),arm)
+  KERNEL_ARCH_PERF = arm
+else ifeq ($(DEB_HOST_ARCH_CPU),i386)
+  KERNEL_ARCH_PERF = x86
+else ifeq ($(DEB_HOST_ARCH_CPU),powerpc)
+  KERNEL_ARCH_PERF = powerpc
+else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64)
+  KERNEL_ARCH_PERF = powerpc
+else ifeq ($(DEB_HOST_ARCH_CPU),s390)
+  KERNEL_ARCH_PERF = s390
+else ifeq ($(DEB_HOST_ARCH_CPU),s390x)
+  KERNEL_ARCH_PERF = s390x
+else ifeq ($(DEB_HOST_ARCH_CPU),sh4)
+  KERNEL_ARCH_PERF = sh
+else ifeq ($(DEB_HOST_ARCH_CPU),sparc)
+  KERNEL_ARCH_PERF = sparc
+else ifeq ($(DEB_HOST_ARCH_CPU),sparc64)
+  KERNEL_ARCH_PERF = sparc
+endif
+
+MAKE_PERF := $(MAKE) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error
+
+$(warning $(KERNEL_ARCH_PERF))
+$(warning $(DEB_HOST_ARCH_CPU))
+
 all:
+ifdef KERNEL_ARCH_PERF
 	-mkdir out
-	make -C $(top_srcdir)/tools/perf O=$(CURDIR)/out
+	+$(MAKE_PERF)
+endif
+
+install:
+ifdef KERNEL_ARCH_PERF
+	+$(MAKE_PERF) install install-man
+endif
 
 clean:
 	rm -rf out



More information about the Kernel-svn-changes mailing list