aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-03-17 19:56:01 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-05-29 07:59:54 -0400
commitcd1c39f2c43701340ac287df5f306833533c8a7e (patch)
tree6fa49710918a9151f71acb366257b35aa05a9245 /tools/perf
parent58a0abd7375fb41223a96f632f1450ec04ce6ff9 (diff)
perf tools: Move paths config into config/Makefile
Moving paths config into config/Makefile. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1369398928-9809-17-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Makefile58
-rw-r--r--tools/perf/config/Makefile52
2 files changed, 52 insertions, 58 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 11525ac18bde..240bf8861d7b 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -99,39 +99,6 @@ ifeq ($(config),1)
99include config/Makefile 99include config/Makefile
100endif 100endif
101 101
102# Among the variables below, these:
103# perfexecdir
104# template_dir
105# mandir
106# infodir
107# htmldir
108# ETC_PERFCONFIG (but not sysconfdir)
109# can be specified as a relative path some/where/else;
110# this is interpreted as relative to $(prefix) and "perf" at
111# runtime figures out where they are based on the path to the executable.
112# This can help installing the suite in a relocatable way.
113
114# Make the path relative to DESTDIR, not to prefix
115ifndef DESTDIR
116prefix = $(HOME)
117endif
118bindir_relative = bin
119bindir = $(prefix)/$(bindir_relative)
120mandir = share/man
121infodir = share/info
122perfexecdir = libexec/perf-core
123sharedir = $(prefix)/share
124template_dir = share/perf-core/templates
125htmldir = share/doc/perf-doc
126ifeq ($(prefix),/usr)
127sysconfdir = /etc
128ETC_PERFCONFIG = $(sysconfdir)/perfconfig
129else
130sysconfdir = $(prefix)/etc
131ETC_PERFCONFIG = etc/perfconfig
132endif
133lib = lib
134
135export prefix bindir sharedir sysconfdir 102export prefix bindir sharedir sysconfdir
136 103
137# sparse is architecture-neutral, which means that we need to tell it 104# sparse is architecture-neutral, which means that we need to tell it
@@ -555,23 +522,6 @@ endif
555endif # MAKECMDGOALS != tags 522endif # MAKECMDGOALS != tags
556endif # MAKECMDGOALS != clean 523endif # MAKECMDGOALS != clean
557 524
558# Shell quote (do not use $(call) to accommodate ancient setups);
559
560ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG))
561
562DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
563bindir_SQ = $(subst ','\'',$(bindir))
564bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
565mandir_SQ = $(subst ','\'',$(mandir))
566infodir_SQ = $(subst ','\'',$(infodir))
567perfexecdir_SQ = $(subst ','\'',$(perfexecdir))
568template_dir_SQ = $(subst ','\'',$(template_dir))
569htmldir_SQ = $(subst ','\'',$(htmldir))
570prefix_SQ = $(subst ','\'',$(prefix))
571sysconfdir_SQ = $(subst ','\'',$(sysconfdir))
572
573SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
574
575LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group 525LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group
576 526
577ALL_CFLAGS += $(BASIC_CFLAGS) 527ALL_CFLAGS += $(BASIC_CFLAGS)
@@ -580,7 +530,6 @@ ALL_LDFLAGS += $(BASIC_LDFLAGS)
580 530
581export INSTALL SHELL_PATH 531export INSTALL SHELL_PATH
582 532
583
584### Build rules 533### Build rules
585 534
586SHELL = $(SHELL_PATH) 535SHELL = $(SHELL_PATH)
@@ -822,13 +771,6 @@ check: $(OUTPUT)common-cmds.h
822 771
823### Installation rules 772### Installation rules
824 773
825ifneq ($(filter /%,$(firstword $(perfexecdir))),)
826perfexec_instdir = $(perfexecdir)
827else
828perfexec_instdir = $(prefix)/$(perfexecdir)
829endif
830perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir))
831
832install-bin: all 774install-bin: all
833 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' 775 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
834 $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' 776 $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 124c344bb23c..506c47976861 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -390,3 +390,55 @@ ifndef NO_LIBNUMA
390 EXTLIBS += -lnuma 390 EXTLIBS += -lnuma
391 endif 391 endif
392endif 392endif
393
394# Among the variables below, these:
395# perfexecdir
396# template_dir
397# mandir
398# infodir
399# htmldir
400# ETC_PERFCONFIG (but not sysconfdir)
401# can be specified as a relative path some/where/else;
402# this is interpreted as relative to $(prefix) and "perf" at
403# runtime figures out where they are based on the path to the executable.
404# This can help installing the suite in a relocatable way.
405
406# Make the path relative to DESTDIR, not to prefix
407ifndef DESTDIR
408prefix = $(HOME)
409endif
410bindir_relative = bin
411bindir = $(prefix)/$(bindir_relative)
412mandir = share/man
413infodir = share/info
414perfexecdir = libexec/perf-core
415sharedir = $(prefix)/share
416template_dir = share/perf-core/templates
417htmldir = share/doc/perf-doc
418ifeq ($(prefix),/usr)
419sysconfdir = /etc
420ETC_PERFCONFIG = $(sysconfdir)/perfconfig
421else
422sysconfdir = $(prefix)/etc
423ETC_PERFCONFIG = etc/perfconfig
424endif
425lib = lib
426
427# Shell quote (do not use $(call) to accommodate ancient setups);
428ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG))
429DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
430bindir_SQ = $(subst ','\'',$(bindir))
431mandir_SQ = $(subst ','\'',$(mandir))
432infodir_SQ = $(subst ','\'',$(infodir))
433perfexecdir_SQ = $(subst ','\'',$(perfexecdir))
434template_dir_SQ = $(subst ','\'',$(template_dir))
435htmldir_SQ = $(subst ','\'',$(htmldir))
436prefix_SQ = $(subst ','\'',$(prefix))
437sysconfdir_SQ = $(subst ','\'',$(sysconfdir))
438
439ifneq ($(filter /%,$(firstword $(perfexecdir))),)
440perfexec_instdir = $(perfexecdir)
441else
442perfexec_instdir = $(prefix)/$(perfexecdir)
443endif
444perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir))