Makefile 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. uname_M := $(shell uname -m 2>/dev/null || echo not)
  2. ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
  3. -e s/arm.*/arm/ -e s/sa110/arm/ \
  4. -e s/s390x/s390/ -e s/parisc64/parisc/ \
  5. -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
  6. -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
  7. NO_PERF_REGS := 1
  8. CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)
  9. # Additional ARCH settings for x86
  10. ifeq ($(ARCH),i386)
  11. override ARCH := x86
  12. NO_PERF_REGS := 0
  13. LIBUNWIND_LIBS = -lunwind -lunwind-x86
  14. endif
  15. ifeq ($(ARCH),x86_64)
  16. override ARCH := x86
  17. IS_X86_64 := 0
  18. ifeq (, $(findstring m32,$(CFLAGS)))
  19. IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1)
  20. endif
  21. ifeq (${IS_X86_64}, 1)
  22. RAW_ARCH := x86_64
  23. CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT
  24. ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S
  25. endif
  26. NO_PERF_REGS := 0
  27. LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
  28. endif
  29. ifeq ($(NO_PERF_REGS),0)
  30. CFLAGS += -DHAVE_PERF_REGS_SUPPORT
  31. endif
  32. ifeq ($(src-perf),)
  33. src-perf := $(srctree)/tools/perf
  34. endif
  35. ifeq ($(obj-perf),)
  36. obj-perf := $(OUTPUT)
  37. endif
  38. ifneq ($(obj-perf),)
  39. obj-perf := $(abspath $(obj-perf))/
  40. endif
  41. LIB_INCLUDE := $(srctree)/tools/lib/
  42. # include ARCH specific config
  43. -include $(src-perf)/arch/$(ARCH)/Makefile
  44. include $(src-perf)/config/utilities.mak
  45. ifeq ($(call get-executable,$(FLEX)),)
  46. dummy := $(error Error: $(FLEX) is missing on this system, please install it)
  47. endif
  48. ifeq ($(call get-executable,$(BISON)),)
  49. dummy := $(error Error: $(BISON) is missing on this system, please install it)
  50. endif
  51. # Treat warnings as errors unless directed not to
  52. ifneq ($(WERROR),0)
  53. CFLAGS += -Werror
  54. endif
  55. ifeq ("$(origin DEBUG)", "command line")
  56. PERF_DEBUG = $(DEBUG)
  57. endif
  58. ifndef PERF_DEBUG
  59. CFLAGS += -O6
  60. endif
  61. ifdef PARSER_DEBUG
  62. PARSER_DEBUG_BISON := -t
  63. PARSER_DEBUG_FLEX := -d
  64. CFLAGS += -DPARSER_DEBUG
  65. endif
  66. CFLAGS += -fno-omit-frame-pointer
  67. CFLAGS += -ggdb3
  68. CFLAGS += -funwind-tables
  69. CFLAGS += -Wall
  70. CFLAGS += -Wextra
  71. CFLAGS += -std=gnu99
  72. EXTLIBS = -lelf -lpthread -lrt -lm -ldl
  73. ifneq ($(OUTPUT),)
  74. OUTPUT_FEATURES = $(OUTPUT)config/feature-checks/
  75. $(shell mkdir -p $(OUTPUT_FEATURES))
  76. endif
  77. feature_check = $(eval $(feature_check_code))
  78. define feature_check_code
  79. feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) LDFLAGS=$(LDFLAGS) -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0)
  80. endef
  81. feature_set = $(eval $(feature_set_code))
  82. define feature_set_code
  83. feature-$(1) := 1
  84. endef
  85. #
  86. # Build the feature check binaries in parallel, ignore errors, ignore return value and suppress output:
  87. #
  88. #
  89. # Note that this is not a complete list of all feature tests, just
  90. # those that are typically built on a fully configured system.
  91. #
  92. # [ Feature tests not mentioned here have to be built explicitly in
  93. # the rule that uses them - an example for that is the 'bionic'
  94. # feature check. ]
  95. #
  96. CORE_FEATURE_TESTS = \
  97. backtrace \
  98. dwarf \
  99. fortify-source \
  100. glibc \
  101. gtk2 \
  102. gtk2-infobar \
  103. libaudit \
  104. libbfd \
  105. libelf \
  106. libelf-getphdrnum \
  107. libelf-mmap \
  108. libnuma \
  109. libperl \
  110. libpython \
  111. libpython-version \
  112. libslang \
  113. libunwind \
  114. on-exit \
  115. stackprotector \
  116. stackprotector-all \
  117. volatile-register-var
  118. #
  119. # So here we detect whether test-all was rebuilt, to be able
  120. # to skip the print-out of the long features list if the file
  121. # existed before and after it was built:
  122. #
  123. ifeq ($(wildcard $(OUTPUT)config/feature-checks/test-all),)
  124. test-all-failed := 1
  125. else
  126. test-all-failed := 0
  127. endif
  128. #
  129. # Special fast-path for the 'all features are available' case:
  130. #
  131. $(call feature_check,all,$(MSG))
  132. #
  133. # Just in case the build freshly failed, make sure we print the
  134. # feature matrix:
  135. #
  136. ifeq ($(feature-all), 0)
  137. test-all-failed := 1
  138. endif
  139. ifeq ($(test-all-failed),1)
  140. $(info )
  141. $(info Auto-detecting system features:)
  142. endif
  143. ifeq ($(feature-all), 1)
  144. #
  145. # test-all.c passed - just set all the core feature flags to 1:
  146. #
  147. $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_set,$(feat)))
  148. else
  149. $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) LDFLAGS=$(LDFLAGS) -i -j -C config/feature-checks $(CORE_FEATURE_TESTS) >/dev/null 2>&1)
  150. $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_check,$(feat)))
  151. endif
  152. #
  153. # Print the result of the feature test:
  154. #
  155. feature_print = $(eval $(feature_print_code)) $(info $(MSG))
  156. define feature_print_code
  157. ifeq ($(feature-$(1)), 1)
  158. MSG = $(shell printf '...%30s: [ \033[32mon\033[m ]' $(1))
  159. else
  160. MSG = $(shell printf '...%30s: [ \033[31mOFF\033[m ]' $(1))
  161. endif
  162. endef
  163. #
  164. # Only print out our features if we rebuilt the testcases or if a test failed:
  165. #
  166. ifeq ($(test-all-failed), 1)
  167. $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_print,$(feat)))
  168. $(info )
  169. endif
  170. ifeq ($(feature-stackprotector-all), 1)
  171. CFLAGS += -fstack-protector-all
  172. endif
  173. ifeq ($(feature-stackprotector), 1)
  174. CFLAGS += -Wstack-protector
  175. endif
  176. ifeq ($(feature-volatile-register-var), 1)
  177. CFLAGS += -Wvolatile-register-var
  178. endif
  179. ifndef PERF_DEBUG
  180. ifeq ($(feature-fortify-source), 1)
  181. CFLAGS += -D_FORTIFY_SOURCE=2
  182. endif
  183. endif
  184. CFLAGS += -I$(src-perf)/util/include
  185. CFLAGS += -I$(src-perf)/arch/$(ARCH)/include
  186. CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi
  187. CFLAGS += -I$(srctree)/arch/$(ARCH)/include
  188. CFLAGS += -I$(srctree)/include/uapi
  189. CFLAGS += -I$(srctree)/include
  190. # $(obj-perf) for generated common-cmds.h
  191. # $(obj-perf)/util for generated bison/flex headers
  192. ifneq ($(OUTPUT),)
  193. CFLAGS += -I$(obj-perf)/util
  194. CFLAGS += -I$(obj-perf)
  195. endif
  196. CFLAGS += -I$(src-perf)/util
  197. CFLAGS += -I$(src-perf)
  198. CFLAGS += -I$(LIB_INCLUDE)
  199. CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  200. ifndef NO_BIONIC
  201. $(feature_check,bionic)
  202. ifeq ($(feature-bionic), 1)
  203. BIONIC := 1
  204. EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
  205. EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
  206. endif
  207. endif
  208. ifdef NO_LIBELF
  209. NO_DWARF := 1
  210. NO_DEMANGLE := 1
  211. NO_LIBUNWIND := 1
  212. else
  213. ifeq ($(feature-libelf), 0)
  214. ifeq ($(feature-glibc), 1)
  215. LIBC_SUPPORT := 1
  216. endif
  217. ifeq ($(BIONIC),1)
  218. LIBC_SUPPORT := 1
  219. endif
  220. ifeq ($(LIBC_SUPPORT),1)
  221. msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev);
  222. NO_LIBELF := 1
  223. NO_DWARF := 1
  224. NO_DEMANGLE := 1
  225. else
  226. msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
  227. endif
  228. else
  229. # for linking with debug library, run like:
  230. # make DEBUG=1 LIBDW_DIR=/opt/libdw/
  231. ifdef LIBDW_DIR
  232. LIBDW_CFLAGS := -I$(LIBDW_DIR)/include
  233. LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib
  234. endif
  235. ifneq ($(feature-dwarf), 1)
  236. msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev);
  237. NO_DWARF := 1
  238. endif # Dwarf support
  239. endif # libelf support
  240. endif # NO_LIBELF
  241. ifndef NO_LIBELF
  242. CFLAGS += -DHAVE_LIBELF_SUPPORT
  243. FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
  244. ifeq ($(feature-libelf-mmap), 1)
  245. CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
  246. endif
  247. ifeq ($(feature-libelf-getphdrnum), 1)
  248. CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT
  249. endif
  250. # include ARCH specific config
  251. -include $(src-perf)/arch/$(ARCH)/Makefile
  252. ifndef NO_DWARF
  253. ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined)
  254. msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled);
  255. NO_DWARF := 1
  256. else
  257. CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
  258. LDFLAGS += $(LIBDW_LDFLAGS)
  259. EXTLIBS += -lelf -ldw
  260. endif # PERF_HAVE_DWARF_REGS
  261. endif # NO_DWARF
  262. endif # NO_LIBELF
  263. ifndef NO_LIBELF
  264. CFLAGS += -DHAVE_LIBELF_SUPPORT
  265. ifeq ($(feature-libelf-mmap), 1)
  266. CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
  267. endif
  268. endif # NO_LIBELF
  269. # There's only x86 (both 32 and 64) support for CFI unwind so far
  270. ifneq ($(ARCH),x86)
  271. NO_LIBUNWIND := 1
  272. endif
  273. ifndef NO_LIBUNWIND
  274. #
  275. # For linking with debug library, run like:
  276. #
  277. # make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
  278. #
  279. ifdef LIBUNWIND_DIR
  280. LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include
  281. LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib
  282. endif
  283. ifneq ($(feature-libunwind), 1)
  284. msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
  285. NO_LIBUNWIND := 1
  286. endif
  287. endif
  288. ifndef NO_LIBUNWIND
  289. CFLAGS += -DHAVE_LIBUNWIND_SUPPORT
  290. EXTLIBS += $(LIBUNWIND_LIBS)
  291. CFLAGS += $(LIBUNWIND_CFLAGS)
  292. LDFLAGS += $(LIBUNWIND_LDFLAGS)
  293. endif
  294. ifndef NO_LIBAUDIT
  295. ifneq ($(feature-libaudit), 1)
  296. msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev);
  297. NO_LIBAUDIT := 1
  298. else
  299. CFLAGS += -DHAVE_LIBAUDIT_SUPPORT
  300. EXTLIBS += -laudit
  301. endif
  302. endif
  303. ifdef NO_NEWT
  304. NO_SLANG=1
  305. endif
  306. ifndef NO_SLANG
  307. ifneq ($(feature-libslang), 1)
  308. msg := $(warning slang not found, disables TUI support. Please install slang-devel or libslang-dev);
  309. NO_SLANG := 1
  310. else
  311. # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
  312. CFLAGS += -I/usr/include/slang
  313. CFLAGS += -DHAVE_SLANG_SUPPORT
  314. EXTLIBS += -lslang
  315. endif
  316. endif
  317. ifndef NO_GTK2
  318. FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
  319. ifneq ($(feature-gtk2), 1)
  320. msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev);
  321. NO_GTK2 := 1
  322. else
  323. ifeq ($(feature-gtk2-infobar), 1)
  324. CFLAGS += -DHAVE_GTK_INFO_BAR_SUPPORT
  325. endif
  326. CFLAGS += -DHAVE_GTK2_SUPPORT
  327. CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null)
  328. EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
  329. endif
  330. endif
  331. grep-libs = $(filter -l%,$(1))
  332. strip-libs = $(filter-out -l%,$(1))
  333. ifdef NO_LIBPERL
  334. CFLAGS += -DNO_LIBPERL
  335. else
  336. PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
  337. PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
  338. PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
  339. PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
  340. FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
  341. ifneq ($(feature-libperl), 1)
  342. CFLAGS += -DNO_LIBPERL
  343. NO_LIBPERL := 1
  344. else
  345. LDFLAGS += $(PERL_EMBED_LDFLAGS)
  346. EXTLIBS += $(PERL_EMBED_LIBADD)
  347. endif
  348. endif
  349. disable-python = $(eval $(disable-python_code))
  350. define disable-python_code
  351. CFLAGS += -DNO_LIBPYTHON
  352. $(if $(1),$(warning No $(1) was found))
  353. $(warning Python support will not be built)
  354. NO_LIBPYTHON := 1
  355. endef
  356. override PYTHON := \
  357. $(call get-executable-or-default,PYTHON,python)
  358. ifndef PYTHON
  359. $(call disable-python,python interpreter)
  360. else
  361. PYTHON_WORD := $(call shell-wordify,$(PYTHON))
  362. ifdef NO_LIBPYTHON
  363. $(call disable-python)
  364. else
  365. override PYTHON_CONFIG := \
  366. $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON)-config)
  367. ifndef PYTHON_CONFIG
  368. $(call disable-python,python-config tool)
  369. else
  370. PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
  371. PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
  372. PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
  373. PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
  374. PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
  375. FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
  376. ifneq ($(feature-libpython), 1)
  377. $(call disable-python,Python.h (for Python 2.x))
  378. else
  379. ifneq ($(feature-libpython-version), 1)
  380. $(warning Python 3 is not yet supported; please set)
  381. $(warning PYTHON and/or PYTHON_CONFIG appropriately.)
  382. $(warning If you also have Python 2 installed, then)
  383. $(warning try something like:)
  384. $(warning $(and ,))
  385. $(warning $(and ,) make PYTHON=python2)
  386. $(warning $(and ,))
  387. $(warning Otherwise, disable Python support entirely:)
  388. $(warning $(and ,))
  389. $(warning $(and ,) make NO_LIBPYTHON=1)
  390. $(warning $(and ,))
  391. $(error $(and ,))
  392. else
  393. LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
  394. EXTLIBS += $(PYTHON_EMBED_LIBADD)
  395. LANG_BINDINGS += $(obj-perf)python/perf.so
  396. endif
  397. endif
  398. endif
  399. endif
  400. endif
  401. ifdef NO_DEMANGLE
  402. CFLAGS += -DNO_DEMANGLE
  403. else
  404. ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
  405. EXTLIBS += -liberty
  406. CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
  407. else
  408. ifeq ($(feature-libbfd), 1)
  409. EXTLIBS += -lbfd
  410. else
  411. $(feature_check,liberty)
  412. ifeq ($(feature-liberty), 1)
  413. EXTLIBS += -lbfd -liberty
  414. else
  415. $(feature_check,liberty-z)
  416. ifeq ($(feature-liberty-z), 1)
  417. EXTLIBS += -lbfd -liberty -lz
  418. else
  419. $(feature_check,cplus-demangle)
  420. ifeq ($(feature-cplus-demangle), 1)
  421. EXTLIBS += -liberty
  422. CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
  423. else
  424. msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling)
  425. CFLAGS += -DNO_DEMANGLE
  426. endif
  427. endif
  428. endif
  429. endif
  430. endif
  431. endif
  432. ifndef NO_ON_EXIT
  433. ifeq ($(feature-on-exit), 1)
  434. CFLAGS += -DHAVE_ON_EXIT_SUPPORT
  435. endif
  436. endif
  437. ifndef NO_BACKTRACE
  438. ifeq ($(feature-backtrace), 1)
  439. CFLAGS += -DHAVE_BACKTRACE_SUPPORT
  440. endif
  441. endif
  442. ifndef NO_LIBNUMA
  443. ifeq ($(feature-libnuma), 0)
  444. msg := $(warning No numa.h found, disables 'perf bench numa mem' benchmark, please install numa-libs-devel or libnuma-dev);
  445. NO_LIBNUMA := 1
  446. else
  447. CFLAGS += -DHAVE_LIBNUMA_SUPPORT
  448. EXTLIBS += -lnuma
  449. endif
  450. endif
  451. # Among the variables below, these:
  452. # perfexecdir
  453. # template_dir
  454. # mandir
  455. # infodir
  456. # htmldir
  457. # ETC_PERFCONFIG (but not sysconfdir)
  458. # can be specified as a relative path some/where/else;
  459. # this is interpreted as relative to $(prefix) and "perf" at
  460. # runtime figures out where they are based on the path to the executable.
  461. # This can help installing the suite in a relocatable way.
  462. # Make the path relative to DESTDIR, not to prefix
  463. ifndef DESTDIR
  464. prefix = $(HOME)
  465. endif
  466. bindir_relative = bin
  467. bindir = $(prefix)/$(bindir_relative)
  468. mandir = share/man
  469. infodir = share/info
  470. perfexecdir = libexec/perf-core
  471. sharedir = $(prefix)/share
  472. template_dir = share/perf-core/templates
  473. htmldir = share/doc/perf-doc
  474. ifeq ($(prefix),/usr)
  475. sysconfdir = /etc
  476. ETC_PERFCONFIG = $(sysconfdir)/perfconfig
  477. else
  478. sysconfdir = $(prefix)/etc
  479. ETC_PERFCONFIG = etc/perfconfig
  480. endif
  481. lib = lib
  482. # Shell quote (do not use $(call) to accommodate ancient setups);
  483. ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG))
  484. DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
  485. bindir_SQ = $(subst ','\'',$(bindir))
  486. mandir_SQ = $(subst ','\'',$(mandir))
  487. infodir_SQ = $(subst ','\'',$(infodir))
  488. perfexecdir_SQ = $(subst ','\'',$(perfexecdir))
  489. template_dir_SQ = $(subst ','\'',$(template_dir))
  490. htmldir_SQ = $(subst ','\'',$(htmldir))
  491. prefix_SQ = $(subst ','\'',$(prefix))
  492. sysconfdir_SQ = $(subst ','\'',$(sysconfdir))
  493. ifneq ($(filter /%,$(firstword $(perfexecdir))),)
  494. perfexec_instdir = $(perfexecdir)
  495. else
  496. perfexec_instdir = $(prefix)/$(perfexecdir)
  497. endif
  498. perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir))