Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.am 30KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181
  1. # Automake input for strace.
  2. #
  3. # Copyright (c) 2002-2009 Roland McGrath <roland@redhat.com>
  4. # Copyright (c) 2006-2016 Dmitry V. Levin <ldv@altlinux.org>
  5. # Copyright (c) 2008-2015 Mike Frysinger <vapier@gentoo.org>
  6. # Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
  7. # Copyright (c) 2002-2018 The strace developers.
  8. # All rights reserved.
  9. #
  10. # SPDX-License-Identifier: LGPL-2.1-or-later
  11. if HAVE_M32_RUNTIME
  12. TESTS_M32 = tests-m32
  13. endif
  14. if HAVE_MX32_RUNTIME
  15. TESTS_MX32 = tests-mx32
  16. endif
  17. SUBDIRS = . tests $(TESTS_M32) $(TESTS_MX32)
  18. bin_PROGRAMS = strace
  19. man_MANS = strace.1 strace-log-merge.1
  20. bin_SCRIPTS = strace-graph strace-log-merge
  21. OS = linux
  22. # ARCH is `i386', `m68k', `sparc', etc.
  23. ARCH = @arch@
  24. READELF = @READELF@
  25. ACLOCAL_AMFLAGS = -I m4
  26. AM_CFLAGS = $(WARN_CFLAGS)
  27. AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
  28. -I$(srcdir)/$(OS)/$(ARCH) \
  29. -I$(builddir)/$(OS) \
  30. -I$(srcdir)/$(OS) \
  31. -I$(builddir) \
  32. -I$(srcdir)
  33. AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD)
  34. AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS)
  35. include xlat/Makemodule.am
  36. strace_CPPFLAGS = $(AM_CPPFLAGS)
  37. strace_CFLAGS = $(AM_CFLAGS)
  38. strace_LDFLAGS =
  39. strace_LDADD = libstrace.a $(clock_LIBS) $(timer_LIBS)
  40. noinst_LIBRARIES = libstrace.a
  41. libstrace_a_CPPFLAGS = $(strace_CPPFLAGS)
  42. libstrace_a_CFLAGS = $(strace_CFLAGS)
  43. libstrace_a_SOURCES = \
  44. fetch_indirect_syscall_args.c \
  45. fstatfs.c \
  46. fstatfs64.c \
  47. getpagesize.c \
  48. ipc.c \
  49. mmap_cache.c \
  50. mmap_cache.h \
  51. sigreturn.c \
  52. socketcall.c \
  53. statfs.c \
  54. statfs64.c \
  55. sync_file_range.c \
  56. sync_file_range2.c \
  57. upeek.c \
  58. upoke.c \
  59. # end of libstrace_a_SOURCES
  60. strace_SOURCES = \
  61. access.c \
  62. affinity.c \
  63. aio.c \
  64. alpha.c \
  65. arch_defs.h \
  66. aux_children.c \
  67. aux_children.h \
  68. basic_filters.c \
  69. bind.c \
  70. bjm.c \
  71. block.c \
  72. bpf.c \
  73. bpf_attr.h \
  74. bpf_filter.c \
  75. bpf_filter.h \
  76. bpf_fprog.h \
  77. bpf_seccomp_filter.c \
  78. bpf_sock_filter.c \
  79. btrfs.c \
  80. cacheflush.c \
  81. capability.c \
  82. caps0.h \
  83. caps1.h \
  84. chdir.c \
  85. chmod.c \
  86. clone.c \
  87. copy_file_range.c \
  88. count.c \
  89. defs.h \
  90. delay.c \
  91. delay.h \
  92. desc.c \
  93. dirent.c \
  94. dirent64.c \
  95. dm.c \
  96. dyxlat.c \
  97. empty.h \
  98. epoll.c \
  99. error_prints.c \
  100. error_prints.h \
  101. evdev.c \
  102. evdev_mpers.c \
  103. eventfd.c \
  104. execve.c \
  105. f_owner_ex.h \
  106. fadvise.c \
  107. fallocate.c \
  108. fanotify.c \
  109. fchownat.c \
  110. fcntl.c \
  111. fetch_bpf_fprog.c \
  112. fetch_struct_flock.c \
  113. fetch_struct_keyctl_kdf_params.c \
  114. fetch_struct_mmsghdr.c \
  115. fetch_struct_msghdr.c \
  116. fetch_struct_stat.c \
  117. fetch_struct_stat64.c \
  118. fetch_struct_statfs.c \
  119. fetch_struct_xfs_quotastat.c \
  120. file_handle.c \
  121. file_ioctl.c \
  122. filter.h \
  123. filter_qualify.c \
  124. flock.c \
  125. flock.h \
  126. fs_x_ioctl.c \
  127. futex.c \
  128. gcc_compat.h \
  129. get_personality.c \
  130. get_personality.h \
  131. get_robust_list.c \
  132. getcpu.c \
  133. getcwd.c \
  134. getrandom.c \
  135. hdio.c \
  136. hostname.c \
  137. inotify.c \
  138. inotify_ioctl.c \
  139. io.c \
  140. ioctl.c \
  141. ioperm.c \
  142. iopl.c \
  143. ioprio.c \
  144. ipc_defs.h \
  145. ipc_msg.c \
  146. ipc_msgctl.c \
  147. ipc_sem.c \
  148. ipc_shm.c \
  149. ipc_shmctl.c \
  150. kcmp.c \
  151. kernel_types.h \
  152. kexec.c \
  153. keyctl.c \
  154. keyctl_kdf_params.h \
  155. kill_save_errno.h \
  156. kvm.c \
  157. largefile_wrappers.h \
  158. ldt.c \
  159. link.c \
  160. linux/asm_stat.h \
  161. linux/x32/asm_stat.h \
  162. linux/x86_64/asm_stat.h \
  163. list.h \
  164. listen.c \
  165. lookup_dcookie.c \
  166. loop.c \
  167. lseek.c \
  168. macros.h \
  169. mem.c \
  170. membarrier.c \
  171. memfd_create.c \
  172. mknod.c \
  173. mmap_notify.c \
  174. mmap_notify.h \
  175. mmsghdr.c \
  176. mount.c \
  177. mpers_type.h \
  178. mq.c \
  179. msghdr.c \
  180. msghdr.h \
  181. mtd.c \
  182. native_defs.h \
  183. nbd_ioctl.c \
  184. negated_errno.h \
  185. net.c \
  186. netlink.c \
  187. netlink.h \
  188. netlink_crypto.c \
  189. netlink_inet_diag.c \
  190. netlink_kobject_uevent.c \
  191. netlink_kobject_uevent.h \
  192. netlink_netfilter.c \
  193. netlink_netlink_diag.c \
  194. netlink_packet_diag.c \
  195. netlink_route.c \
  196. netlink_route.h \
  197. netlink_selinux.c \
  198. netlink_smc_diag.c \
  199. netlink_sock_diag.c \
  200. netlink_sock_diag.h \
  201. netlink_unix_diag.c \
  202. nlattr.c \
  203. nlattr.h \
  204. nsfs.c \
  205. nsfs.h \
  206. nsig.h \
  207. numa.c \
  208. number_set.c \
  209. number_set.h \
  210. oldstat.c \
  211. open.c \
  212. or1k_atomic.c \
  213. pathtrace.c \
  214. perf.c \
  215. perf_event_struct.h \
  216. perf_ioctl.c \
  217. personality.c \
  218. pkeys.c \
  219. poll.c \
  220. prctl.c \
  221. print_aio_sigset.c \
  222. print_dev_t.c \
  223. print_fields.h \
  224. print_group_req.c \
  225. print_ifindex.c \
  226. print_instruction_pointer.c \
  227. print_kernel_version.c \
  228. print_mac.c \
  229. print_mq_attr.c \
  230. print_msgbuf.c \
  231. print_sg_req_info.c \
  232. print_sigevent.c \
  233. print_statfs.c \
  234. print_struct_stat.c \
  235. print_time.c \
  236. print_timespec.c \
  237. print_timeval.c \
  238. print_timex.c \
  239. print_utils.h \
  240. printmode.c \
  241. printrusage.c \
  242. printsiginfo.c \
  243. printsiginfo.h \
  244. process.c \
  245. process_vm.c \
  246. ptp.c \
  247. ptrace.h \
  248. ptrace_backend.c \
  249. ptrace_backend.h \
  250. ptrace_syscall_info.c \
  251. ptrace_syscall_info.h \
  252. ptrace_wait_data.h \
  253. quota.c \
  254. random_ioctl.c \
  255. readahead.c \
  256. readlink.c \
  257. reboot.c \
  258. regs.h \
  259. renameat.c \
  260. resource.c \
  261. retval.c \
  262. retval.h \
  263. riscv.c \
  264. rt_sigframe.c \
  265. rt_sigreturn.c \
  266. rtc.c \
  267. rtnl_addr.c \
  268. rtnl_addrlabel.c \
  269. rtnl_dcb.c \
  270. rtnl_link.c \
  271. rtnl_mdb.c \
  272. rtnl_neigh.c \
  273. rtnl_neightbl.c \
  274. rtnl_netconf.c \
  275. rtnl_nsid.c \
  276. rtnl_route.c \
  277. rtnl_rule.c \
  278. rtnl_tc.c \
  279. rtnl_tc_action.c \
  280. s390.c \
  281. sched.c \
  282. sched_attr.h \
  283. scsi.c \
  284. seccomp.c \
  285. sendfile.c \
  286. sg_io_v3.c \
  287. sg_io_v4.c \
  288. shutdown.c \
  289. sigaltstack.c \
  290. sigevent.h \
  291. signal.c \
  292. signalfd.c \
  293. sock.c \
  294. sockaddr.c \
  295. socketutils.c \
  296. sparc.c \
  297. sram_alloc.c \
  298. stat.c \
  299. stat.h \
  300. stat64.c \
  301. statfs.c \
  302. statfs.h \
  303. static_assert.h \
  304. statx.c \
  305. statx.h \
  306. strace.c \
  307. string_to_uint.c \
  308. string_to_uint.h \
  309. swapon.c \
  310. syscall.c \
  311. sysctl.c \
  312. sysent.h \
  313. sysent_shorthand_defs.h \
  314. sysent_shorthand_undefs.h \
  315. sysinfo.c \
  316. syslog.c \
  317. sysmips.c \
  318. tcb_wait_data.h \
  319. term.c \
  320. time.c \
  321. times.c \
  322. trace_event.h \
  323. tracing_backend.c \
  324. tracing_backend.h \
  325. truncate.c \
  326. ubi.c \
  327. ucopy.c \
  328. uid.c \
  329. uid16.c \
  330. umask.c \
  331. umount.c \
  332. uname.c \
  333. userfaultfd.c \
  334. ustat.c \
  335. util.c \
  336. utime.c \
  337. utimes.c \
  338. v4l2.c \
  339. wait.c \
  340. wait.h \
  341. xattr.c \
  342. xfs_quota_stat.h \
  343. xlat.c \
  344. xlat.h \
  345. xmalloc.c \
  346. xmalloc.h \
  347. xstring.h \
  348. $(strace_SOURCES_check) \
  349. # end of strace_SOURCES
  350. strace_SOURCES_check = bpf_attr_check.c
  351. if ENABLE_STACKTRACE
  352. strace_SOURCES += unwind.c unwind.h
  353. if USE_LIBDW
  354. strace_SOURCES += unwind-libdw.c
  355. strace_CPPFLAGS += $(libdw_CPPFLAGS)
  356. strace_CFLAGS += $(libdw_CFLAGS)
  357. strace_LDFLAGS += $(libdw_LDFLAGS)
  358. strace_LDADD += $(libdw_LIBS)
  359. endif
  360. if USE_LIBUNWIND
  361. strace_SOURCES += unwind-libunwind.c
  362. strace_CPPFLAGS += $(libunwind_CPPFLAGS)
  363. strace_LDFLAGS += $(libunwind_LDFLAGS)
  364. strace_LDADD += $(libunwind_LIBS)
  365. endif
  366. if USE_DEMANGLE
  367. strace_CPPFLAGS += $(libiberty_CPPFLAGS)
  368. strace_LDFLAGS += $(libiberty_LDFLAGS)
  369. strace_LDADD += $(libiberty_LIBS)
  370. endif
  371. endif
  372. @CODE_COVERAGE_RULES@
  373. CODE_COVERAGE_BRANCH_COVERAGE = 1
  374. CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
  375. --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
  376. CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
  377. strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
  378. strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
  379. strace_LDADD += $(CODE_COVERAGE_LIBS)
  380. # Enable this to get link map generated
  381. #strace_LDFLAGS += -Wl,-Map=strace.mapfile
  382. EXTRA_DIST = \
  383. $(man_MANS) \
  384. .version \
  385. COPYING \
  386. CREDITS \
  387. ChangeLog \
  388. ChangeLog-CVS \
  389. LGPL-2.1-or-later \
  390. README-configure \
  391. README-linux-ptrace \
  392. debian/changelog \
  393. debian/compat \
  394. debian/control \
  395. debian/copyright \
  396. debian/rules \
  397. debian/source/format \
  398. debian/strace-udeb.install \
  399. debian/strace.docs \
  400. debian/strace.examples \
  401. debian/strace.install \
  402. debian/strace.manpages \
  403. debian/strace64.install \
  404. debian/strace64.manpages \
  405. debian/watch \
  406. gen_bpf_attr_check.sh \
  407. generate_sen.sh \
  408. ioctl_iocdef.c \
  409. ioctlsort.c \
  410. linux/32/ioctls_inc.h \
  411. linux/32/ioctls_inc_align16.h \
  412. linux/32/ioctls_inc_align32.h \
  413. linux/32/ioctls_inc_align64.h \
  414. linux/32/syscallent.h \
  415. linux/64/ioctls_inc.h \
  416. linux/64/syscallent.h \
  417. linux/aarch64/arch_defs_.h \
  418. linux/aarch64/arch_get_personality.c \
  419. linux/aarch64/arch_regs.c \
  420. linux/aarch64/arch_sigreturn.c \
  421. linux/aarch64/get_error.c \
  422. linux/aarch64/get_scno.c \
  423. linux/aarch64/get_syscall_args.c \
  424. linux/aarch64/ioctls_arch0.h \
  425. linux/aarch64/ioctls_arch1.h \
  426. linux/aarch64/ioctls_inc0.h \
  427. linux/aarch64/ioctls_inc1.h \
  428. linux/aarch64/nr_prefix.c \
  429. linux/aarch64/raw_syscall.h \
  430. linux/aarch64/set_error.c \
  431. linux/aarch64/set_scno.c \
  432. linux/aarch64/shuffle_scno.c \
  433. linux/aarch64/syscallent.h \
  434. linux/aarch64/syscallent1.h \
  435. linux/alpha/arch_defs_.h \
  436. linux/alpha/arch_getrval2.c \
  437. linux/alpha/arch_regs.c \
  438. linux/alpha/arch_sigreturn.c \
  439. linux/alpha/errnoent.h \
  440. linux/alpha/get_error.c \
  441. linux/alpha/get_scno.c \
  442. linux/alpha/get_syscall_args.c \
  443. linux/alpha/get_syscall_result.c \
  444. linux/alpha/ioctls_arch0.h \
  445. linux/alpha/ioctls_inc0.h \
  446. linux/alpha/raw_syscall.h \
  447. linux/alpha/set_error.c \
  448. linux/alpha/set_scno.c \
  449. linux/alpha/signalent.h \
  450. linux/alpha/syscallent.h \
  451. linux/alpha/userent.h \
  452. linux/arc/arch_regs.c \
  453. linux/arc/get_error.c \
  454. linux/arc/get_scno.c \
  455. linux/arc/get_syscall_args.c \
  456. linux/arc/ioctls_arch0.h \
  457. linux/arc/ioctls_inc0.h \
  458. linux/arc/raw_syscall.h \
  459. linux/arc/set_error.c \
  460. linux/arc/set_scno.c \
  461. linux/arc/syscallent.h \
  462. linux/arch_defs_.h \
  463. linux/arch_kvm.c \
  464. linux/arch_regs.h \
  465. linux/arch_rt_sigframe.c \
  466. linux/arch_sigreturn.c \
  467. linux/arm/arch_defs_.h \
  468. linux/arm/arch_regs.c \
  469. linux/arm/arch_sigreturn.c \
  470. linux/arm/get_error.c \
  471. linux/arm/get_scno.c \
  472. linux/arm/get_syscall_args.c \
  473. linux/arm/ioctls_arch0.h \
  474. linux/arm/ioctls_inc0.h \
  475. linux/arm/nr_prefix.c \
  476. linux/arm/raw_syscall.h \
  477. linux/arm/set_error.c \
  478. linux/arm/set_scno.c \
  479. linux/arm/shuffle_scno.c \
  480. linux/arm/syscallent.h \
  481. linux/arm/userent.h \
  482. linux/avr32/arch_regs.c \
  483. linux/avr32/get_error.c \
  484. linux/avr32/get_scno.c \
  485. linux/avr32/get_syscall_args.c \
  486. linux/avr32/ioctls_arch0.h \
  487. linux/avr32/ioctls_inc0.h \
  488. linux/avr32/raw_syscall.h \
  489. linux/avr32/set_error.c \
  490. linux/avr32/set_scno.c \
  491. linux/avr32/syscallent.h \
  492. linux/avr32/userent.h \
  493. linux/bfin/arch_defs_.h \
  494. linux/bfin/arch_regs.c \
  495. linux/bfin/get_error.c \
  496. linux/bfin/get_scno.c \
  497. linux/bfin/get_syscall_args.c \
  498. linux/bfin/get_syscall_result.c \
  499. linux/bfin/ioctls_arch0.h \
  500. linux/bfin/ioctls_inc0.h \
  501. linux/bfin/raw_syscall.h \
  502. linux/bfin/rt_sigframe.h \
  503. linux/bfin/set_error.c \
  504. linux/bfin/set_scno.c \
  505. linux/bfin/syscallent.h \
  506. linux/bfin/userent.h \
  507. linux/check_scno.c \
  508. linux/dummy.h \
  509. linux/errnoent.h \
  510. linux/getregs_old.h \
  511. linux/hppa/arch_defs_.h \
  512. linux/hppa/arch_regs.c \
  513. linux/hppa/arch_rt_sigframe.c \
  514. linux/hppa/errnoent.h \
  515. linux/hppa/get_error.c \
  516. linux/hppa/get_scno.c \
  517. linux/hppa/get_syscall_args.c \
  518. linux/hppa/get_syscall_result.c \
  519. linux/hppa/ioctls_arch0.h \
  520. linux/hppa/ioctls_inc0.h \
  521. linux/hppa/raw_syscall.h \
  522. linux/hppa/rt_sigframe.h \
  523. linux/hppa/set_error.c \
  524. linux/hppa/set_scno.c \
  525. linux/hppa/signalent.h \
  526. linux/hppa/syscallent.h \
  527. linux/hppa/userent.h \
  528. linux/i386/arch_defs_.h \
  529. linux/i386/arch_kvm.c \
  530. linux/i386/arch_regs.c \
  531. linux/i386/arch_rt_sigframe.c \
  532. linux/i386/arch_sigreturn.c \
  533. linux/i386/get_error.c \
  534. linux/i386/get_scno.c \
  535. linux/i386/get_syscall_args.c \
  536. linux/i386/ioctls_arch0.h \
  537. linux/i386/ioctls_inc0.h \
  538. linux/i386/raw_syscall.h \
  539. linux/i386/rt_sigframe.h \
  540. linux/i386/set_error.c \
  541. linux/i386/set_scno.c \
  542. linux/i386/syscallent.h \
  543. linux/i386/userent.h \
  544. linux/i386/userent0.h \
  545. linux/ia64/arch_defs_.h \
  546. linux/ia64/arch_getrval2.c \
  547. linux/ia64/arch_regs.c \
  548. linux/ia64/arch_regs.h \
  549. linux/ia64/arch_rt_sigframe.c \
  550. linux/ia64/get_error.c \
  551. linux/ia64/get_scno.c \
  552. linux/ia64/get_syscall_args.c \
  553. linux/ia64/ioctls_arch0.h \
  554. linux/ia64/ioctls_inc0.h \
  555. linux/ia64/raw_syscall.h \
  556. linux/ia64/rt_sigframe.h \
  557. linux/ia64/set_error.c \
  558. linux/ia64/set_scno.c \
  559. linux/ia64/syscallent.h \
  560. linux/ia64/userent.h \
  561. linux/inet_diag.h \
  562. linux/m68k/arch_defs_.h \
  563. linux/m68k/arch_regs.c \
  564. linux/m68k/arch_rt_sigframe.c \
  565. linux/m68k/arch_sigreturn.c \
  566. linux/m68k/get_error.c \
  567. linux/m68k/get_scno.c \
  568. linux/m68k/get_syscall_args.c \
  569. linux/m68k/ioctls_arch0.h \
  570. linux/m68k/ioctls_inc0.h \
  571. linux/m68k/raw_syscall.h \
  572. linux/m68k/rt_sigframe.h \
  573. linux/m68k/set_error.c \
  574. linux/m68k/set_scno.c \
  575. linux/m68k/syscallent.h \
  576. linux/m68k/userent.h \
  577. linux/metag/arch_regs.c \
  578. linux/metag/arch_rt_sigframe.c \
  579. linux/metag/get_error.c \
  580. linux/metag/get_scno.c \
  581. linux/metag/get_syscall_args.c \
  582. linux/metag/ioctls_arch0.h \
  583. linux/metag/ioctls_inc0.h \
  584. linux/metag/raw_syscall.h \
  585. linux/metag/set_error.c \
  586. linux/metag/set_scno.c \
  587. linux/metag/syscallent.h \
  588. linux/microblaze/arch_defs_.h \
  589. linux/microblaze/arch_regs.c \
  590. linux/microblaze/arch_sigreturn.c \
  591. linux/microblaze/get_error.c \
  592. linux/microblaze/get_scno.c \
  593. linux/microblaze/get_syscall_args.c \
  594. linux/microblaze/get_syscall_result.c \
  595. linux/microblaze/ioctls_arch0.h \
  596. linux/microblaze/ioctls_inc0.h \
  597. linux/microblaze/raw_syscall.h \
  598. linux/microblaze/set_error.c \
  599. linux/microblaze/set_scno.c \
  600. linux/microblaze/syscallent.h \
  601. linux/microblaze/userent.h \
  602. linux/mips/arch_defs_.h \
  603. linux/mips/arch_getrval2.c \
  604. linux/mips/arch_regs.c \
  605. linux/mips/arch_sigreturn.c \
  606. linux/mips/errnoent.h \
  607. linux/mips/genstub.sh \
  608. linux/mips/get_error.c \
  609. linux/mips/get_scno.c \
  610. linux/mips/get_syscall_args.c \
  611. linux/mips/ioctls_arch0.h \
  612. linux/mips/ioctls_inc0.h \
  613. linux/mips/raw_syscall.h \
  614. linux/mips/rt_sigframe.h \
  615. linux/mips/set_error.c \
  616. linux/mips/set_scno.c \
  617. linux/mips/signalent.h \
  618. linux/mips/syscallent-compat.h \
  619. linux/mips/syscallent-n32.h \
  620. linux/mips/syscallent-n64.h \
  621. linux/mips/syscallent-o32.h \
  622. linux/mips/syscallent.h \
  623. linux/mips/userent.h \
  624. linux/netlink_diag.h \
  625. linux/nios2/arch_defs_.h \
  626. linux/nios2/arch_regs.c \
  627. linux/nios2/get_error.c \
  628. linux/nios2/get_scno.c \
  629. linux/nios2/get_syscall_args.c \
  630. linux/nios2/ioctls_arch0.h \
  631. linux/nios2/ioctls_inc0.h \
  632. linux/nios2/raw_syscall.h \
  633. linux/nios2/set_error.c \
  634. linux/nios2/set_scno.c \
  635. linux/nios2/syscallent.h \
  636. linux/nr_prefix.c \
  637. linux/or1k/arch_regs.c \
  638. linux/or1k/get_error.c \
  639. linux/or1k/get_scno.c \
  640. linux/or1k/get_syscall_args.c \
  641. linux/or1k/ioctls_arch0.h \
  642. linux/or1k/ioctls_inc0.h \
  643. linux/or1k/raw_syscall.h \
  644. linux/or1k/set_error.c \
  645. linux/or1k/set_scno.c \
  646. linux/or1k/syscallent.h \
  647. linux/or1k/userent.h \
  648. linux/packet_diag.h \
  649. linux/powerpc/arch_defs_.h \
  650. linux/powerpc/arch_regs.c \
  651. linux/powerpc/arch_rt_sigframe.c \
  652. linux/powerpc/arch_sigreturn.c \
  653. linux/powerpc/errnoent.h \
  654. linux/powerpc/get_error.c \
  655. linux/powerpc/get_scno.c \
  656. linux/powerpc/get_syscall_args.c \
  657. linux/powerpc/getregs_old.c \
  658. linux/powerpc/getregs_old.h \
  659. linux/powerpc/ioctls_arch0.h \
  660. linux/powerpc/ioctls_inc0.h \
  661. linux/powerpc/raw_syscall.h \
  662. linux/powerpc/set_error.c \
  663. linux/powerpc/set_scno.c \
  664. linux/powerpc/syscallent.h \
  665. linux/powerpc/userent.h \
  666. linux/powerpc64/arch_defs_.h \
  667. linux/powerpc64/arch_get_personality.c \
  668. linux/powerpc64/arch_regs.c \
  669. linux/powerpc64/arch_rt_sigframe.c \
  670. linux/powerpc64/arch_sigreturn.c \
  671. linux/powerpc64/errnoent.h \
  672. linux/powerpc64/get_error.c \
  673. linux/powerpc64/get_scno.c \
  674. linux/powerpc64/get_syscall_args.c \
  675. linux/powerpc64/getregs_old.c \
  676. linux/powerpc64/getregs_old.h \
  677. linux/powerpc64/ioctls_arch0.h \
  678. linux/powerpc64/ioctls_arch1.h \
  679. linux/powerpc64/ioctls_inc0.h \
  680. linux/powerpc64/ioctls_inc1.h \
  681. linux/powerpc64/raw_syscall.h \
  682. linux/powerpc64/rt_sigframe.h \
  683. linux/powerpc64/set_error.c \
  684. linux/powerpc64/set_scno.c \
  685. linux/powerpc64/syscallent.h \
  686. linux/powerpc64/syscallent1.h \
  687. linux/powerpc64/userent.h \
  688. linux/ptrace_pokeuser.c \
  689. linux/raw_syscall.h \
  690. linux/riscv/arch_defs_.h \
  691. linux/riscv/arch_get_personality.c \
  692. linux/riscv/arch_regs.c \
  693. linux/riscv/get_error.c \
  694. linux/riscv/get_scno.c \
  695. linux/riscv/get_syscall_args.c \
  696. linux/riscv/ioctls_arch0.h \
  697. linux/riscv/ioctls_arch1.h \
  698. linux/riscv/ioctls_inc0.h \
  699. linux/riscv/ioctls_inc1.h \
  700. linux/riscv/raw_syscall.h \
  701. linux/riscv/set_error.c \
  702. linux/riscv/set_scno.c \
  703. linux/riscv/syscallent.h \
  704. linux/riscv/syscallent1.h \
  705. linux/rt_sigframe.h \
  706. linux/s390/arch_defs_.h \
  707. linux/s390/arch_regs.c \
  708. linux/s390/arch_sigreturn.c \
  709. linux/s390/get_error.c \
  710. linux/s390/get_scno.c \
  711. linux/s390/get_syscall_args.c \
  712. linux/s390/ioctls_arch0.h \
  713. linux/s390/ioctls_inc0.h \
  714. linux/s390/raw_syscall.h \
  715. linux/s390/rt_sigframe.h \
  716. linux/s390/set_error.c \
  717. linux/s390/set_scno.c \
  718. linux/s390/syscallent.h \
  719. linux/s390/userent.h \
  720. linux/s390/userent0.h \
  721. linux/s390/userent1.h \
  722. linux/s390x/arch_defs_.h \
  723. linux/s390x/arch_get_personality.c \
  724. linux/s390x/arch_regs.c \
  725. linux/s390x/arch_sigreturn.c \
  726. linux/s390x/get_error.c \
  727. linux/s390x/get_scno.c \
  728. linux/s390x/get_syscall_args.c \
  729. linux/s390x/ioctls_arch0.h \
  730. linux/s390x/ioctls_arch1.h \
  731. linux/s390x/ioctls_inc0.h \
  732. linux/s390x/ioctls_inc1.h \
  733. linux/s390x/raw_syscall.h \
  734. linux/s390x/rt_sigframe.h \
  735. linux/s390x/set_error.c \
  736. linux/s390x/set_scno.c \
  737. linux/s390x/syscallent.h \
  738. linux/s390x/syscallent1.h \
  739. linux/s390x/userent.h \
  740. linux/sh/arch_defs_.h \
  741. linux/sh/arch_getrval2.c \
  742. linux/sh/arch_regs.c \
  743. linux/sh/get_error.c \
  744. linux/sh/get_scno.c \
  745. linux/sh/get_syscall_args.c \
  746. linux/sh/get_syscall_result.c \
  747. linux/sh/ioctls_arch0.h \
  748. linux/sh/ioctls_inc0.h \
  749. linux/sh/raw_syscall.h \
  750. linux/sh/set_error.c \
  751. linux/sh/set_scno.c \
  752. linux/sh/syscallent.h \
  753. linux/sh/userent.h \
  754. linux/sh/userent0.h \
  755. linux/sh64/arch_defs_.h \
  756. linux/sh64/arch_regs.c \
  757. linux/sh64/arch_regs.h \
  758. linux/sh64/get_error.c \
  759. linux/sh64/get_scno.c \
  760. linux/sh64/get_syscall_args.c \
  761. linux/sh64/get_syscall_result.c \
  762. linux/sh64/ioctls_arch0.h \
  763. linux/sh64/ioctls_inc0.h \
  764. linux/sh64/raw_syscall.h \
  765. linux/sh64/rt_sigframe.h \
  766. linux/sh64/set_error.c \
  767. linux/sh64/set_scno.c \
  768. linux/sh64/syscallent.h \
  769. linux/sh64/userent.h \
  770. linux/shuffle_scno.c \
  771. linux/signal.h.in \
  772. linux/signalent.h \
  773. linux/smc_diag.h \
  774. linux/sock_diag.h \
  775. linux/sparc/arch_defs_.h \
  776. linux/sparc/arch_getrval2.c \
  777. linux/sparc/arch_regs.c \
  778. linux/sparc/arch_sigreturn.c \
  779. linux/sparc/errnoent.h \
  780. linux/sparc/get_error.c \
  781. linux/sparc/get_scno.c \
  782. linux/sparc/get_syscall_args.c \
  783. linux/sparc/ioctls_arch0.h \
  784. linux/sparc/ioctls_inc0.h \
  785. linux/sparc/raw_syscall.h \
  786. linux/sparc/rt_sigframe.h \
  787. linux/sparc/set_error.c \
  788. linux/sparc/set_scno.c \
  789. linux/sparc/signalent.h \
  790. linux/sparc/syscallent.h \
  791. linux/sparc/userent.h \
  792. linux/sparc64/arch_defs_.h \
  793. linux/sparc64/arch_get_personality.c \
  794. linux/sparc64/arch_getrval2.c \
  795. linux/sparc64/arch_regs.c \
  796. linux/sparc64/arch_rt_sigframe.c \
  797. linux/sparc64/arch_sigreturn.c \
  798. linux/sparc64/errnoent.h \
  799. linux/sparc64/get_error.c \
  800. linux/sparc64/get_scno.c \
  801. linux/sparc64/get_syscall_args.c \
  802. linux/sparc64/ioctls_arch0.h \
  803. linux/sparc64/ioctls_arch1.h \
  804. linux/sparc64/ioctls_inc0.h \
  805. linux/sparc64/ioctls_inc1.h \
  806. linux/sparc64/raw_syscall.h \
  807. linux/sparc64/rt_sigframe.h \
  808. linux/sparc64/set_error.c \
  809. linux/sparc64/set_scno.c \
  810. linux/sparc64/signalent.h \
  811. linux/sparc64/syscallent.h \
  812. linux/sparc64/syscallent1.h \
  813. linux/sparc64/userent.h \
  814. linux/subcall.h \
  815. linux/syscall.h \
  816. linux/tile/arch_defs_.h \
  817. linux/tile/arch_get_personality.c \
  818. linux/tile/arch_regs.c \
  819. linux/tile/arch_sigreturn.c \
  820. linux/tile/get_error.c \
  821. linux/tile/get_scno.c \
  822. linux/tile/get_syscall_args.c \
  823. linux/tile/ioctls_arch0.h \
  824. linux/tile/ioctls_arch1.h \
  825. linux/tile/ioctls_inc0.h \
  826. linux/tile/ioctls_inc1.h \
  827. linux/tile/raw_syscall.h \
  828. linux/tile/rt_sigframe.h \
  829. linux/tile/set_error.c \
  830. linux/tile/set_scno.c \
  831. linux/tile/syscallent.h \
  832. linux/tile/syscallent1.h \
  833. linux/tile/userent.h \
  834. linux/unix_diag.h \
  835. linux/userent.h \
  836. linux/userent0.h \
  837. linux/x32/arch_defs_.h \
  838. linux/x32/arch_get_personality.c \
  839. linux/x32/arch_kvm.c \
  840. linux/x32/arch_regs.c \
  841. linux/x32/arch_regs.h \
  842. linux/x32/arch_rt_sigframe.c \
  843. linux/x32/arch_sigreturn.c \
  844. linux/x32/check_scno.c \
  845. linux/x32/get_error.c \
  846. linux/x32/get_scno.c \
  847. linux/x32/get_syscall_args.c \
  848. linux/x32/ioctls_arch0.h \
  849. linux/x32/ioctls_arch1.h \
  850. linux/x32/ioctls_inc0.h \
  851. linux/x32/ioctls_inc1.h \
  852. linux/x32/ptrace_pokeuser.c \
  853. linux/x32/raw_syscall.h \
  854. linux/x32/rt_sigframe.h \
  855. linux/x32/set_error.c \
  856. linux/x32/set_scno.c \
  857. linux/x32/shuffle_scno.c \
  858. linux/x32/syscallent.h \
  859. linux/x32/syscallent1.h \
  860. linux/x32/userent.h \
  861. linux/x86_64/arch_defs_.h \
  862. linux/x86_64/arch_get_personality.c \
  863. linux/x86_64/arch_kvm.c \
  864. linux/x86_64/arch_regs.c \
  865. linux/x86_64/arch_regs.h \
  866. linux/x86_64/arch_rt_sigframe.c \
  867. linux/x86_64/arch_sigreturn.c \
  868. linux/x86_64/get_error.c \
  869. linux/x86_64/get_scno.c \
  870. linux/x86_64/get_syscall_args.c \
  871. linux/x86_64/getregs_old.c \
  872. linux/x86_64/getregs_old.h \
  873. linux/x86_64/ioctls_arch0.h \
  874. linux/x86_64/ioctls_arch1.h \
  875. linux/x86_64/ioctls_arch2.h \
  876. linux/x86_64/ioctls_inc0.h \
  877. linux/x86_64/ioctls_inc1.h \
  878. linux/x86_64/ioctls_inc2.h \
  879. linux/x86_64/raw_syscall.h \
  880. linux/x86_64/rt_sigframe.h \
  881. linux/x86_64/set_error.c \
  882. linux/x86_64/set_scno.c \
  883. linux/x86_64/shuffle_scno.c \
  884. linux/x86_64/syscallent.h \
  885. linux/x86_64/syscallent1.h \
  886. linux/x86_64/syscallent2.h \
  887. linux/x86_64/userent.h \
  888. linux/xtensa/arch_regs.c \
  889. linux/xtensa/get_error.c \
  890. linux/xtensa/get_scno.c \
  891. linux/xtensa/get_syscall_args.c \
  892. linux/xtensa/get_syscall_result.c \
  893. linux/xtensa/ioctls_arch0.h \
  894. linux/xtensa/ioctls_inc0.h \
  895. linux/xtensa/raw_syscall.h \
  896. linux/xtensa/set_error.c \
  897. linux/xtensa/set_scno.c \
  898. linux/xtensa/syscallent.h \
  899. linux/xtensa/userent.h \
  900. mpers.awk \
  901. mpers.sh \
  902. mpers_test.sh \
  903. mpers_xlat.h \
  904. scno.head \
  905. strace-graph \
  906. strace-log-merge \
  907. strace.spec \
  908. $(XLAT_INPUT_FILES) \
  909. $(XLAT_HEADER_FILES) \
  910. xlat/gen.sh \
  911. # end of EXTRA_DIST
  912. .PHONY: check-valgrind-local
  913. check-valgrind-local:
  914. .PHONY: srpm
  915. srpm: dist-xz
  916. rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
  917. $(srcdir)/.version:
  918. $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
  919. bpf_attr_check.c: $(srcdir)/bpf_attr.h $(srcdir)/gen_bpf_attr_check.sh
  920. D="$(D)" \
  921. $(srcdir)/gen_bpf_attr_check.sh $< > $@-t && mv $@-t $@
  922. strace_SOURCES_c = \
  923. $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES))
  924. sys_func_h_sources = $(filter-out $(strace_SOURCES_check),$(strace_SOURCES_c))
  925. sys_func.h: $(patsubst %,$(srcdir)/%,$(sys_func_h_sources))
  926. for f in $^; do \
  927. sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
  928. done | sort -u > $@
  929. syscallent_names = subcall.h syscallent.h syscallent1.h \
  930. syscallent-n32.h syscallent-n64.h syscallent-o32.h
  931. syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
  932. syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
  933. sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
  934. for f in $^; do cat -- $$f; done | \
  935. D="$(D)" \
  936. $(srcdir)/generate_sen.sh > $@
  937. dist-hook:
  938. $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
  939. ${AM_V_GEN}echo $(COPYRIGHT_YEAR) > $(distdir)/.year
  940. ${AM_V_GEN}echo $(MANPAGE_DATE) > $(distdir)/.strace.1.in.date
  941. today = $(shell LC_TIME=C date -u +%Y-%m-%d)
  942. version_regexp = $(subst .,\.,$(VERSION))
  943. news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
  944. news-check: NEWS
  945. $(AM_V_GEN)if head -1 $< | \
  946. grep -x $(news_check_regexp) >/dev/null; then \
  947. :; \
  948. else \
  949. echo >&2 '$<: check failed'; \
  950. exit 1; \
  951. fi
  952. ioctlsort_CC = $(CC_FOR_BUILD)
  953. ioctlsort_DEFS = $(DEFS)
  954. ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
  955. ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
  956. ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
  957. ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
  958. ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
  959. ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
  960. ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h)))
  961. ioctl_redefs%.h: ioctlent%.h ioctlent0.h
  962. sort $< > $<-t
  963. sort ioctlent0.h | comm -23 $<-t - | \
  964. sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
  965. > $@-t
  966. rm -f $<-t
  967. mv $@-t $@
  968. ioctlent%.h: ioctlsort%
  969. ./$< > $@
  970. # Need to pick up <linux/ioctl.h> definitions *for host* while compiling
  971. # ioctlsort *for build*, hence this magic.
  972. ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c
  973. $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
  974. $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@
  975. ioctl_iocdef.h: ioctl_iocdef.i
  976. sed -n 's/^DEFINE HOST/#define /p' $< > $@
  977. ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
  978. $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
  979. ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c
  980. $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
  981. ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
  982. cat $^ > $@
  983. BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
  984. bpf_attr_check.c native_printer_decls.h native_printer_defs.h \
  985. printers.h sen.h sys_func.h .version
  986. CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
  987. ioctl_iocdef.h ioctl_iocdef.i \
  988. bpf_attr_check.c native_printer_decls.h native_printer_defs.h \
  989. printers.h sen.h sys_func.h
  990. DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h linux/linux/signal.h
  991. include scno.am
  992. $(strace_OBJECTS): scno.h
  993. # defines mpers_source_files
  994. include mpers.am
  995. srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
  996. mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i)
  997. mpers_NAME =
  998. mpers_PREFIX = $(mpers_NAME)_
  999. mpers_DEFS = $(DEFS)
  1000. mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
  1001. mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
  1002. mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
  1003. libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS
  1004. libmpers_CFLAGS = $(strace_CFLAGS)
  1005. # mpers targets
  1006. mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
  1007. for f in $^; do \
  1008. D="$(D)" \
  1009. READELF="$(READELF)" \
  1010. CC="$(CC)" \
  1011. CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
  1012. CPP="$(CPP)" \
  1013. CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
  1014. $(srcdir)/mpers.sh $(mpers_NAME) $(mpers_CC_FLAGS) $$f || exit; \
  1015. done
  1016. > $@
  1017. m%_type_defs.h: $(srcdir_mpers_source_files)
  1018. for f in $^; do \
  1019. sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
  1020. done > $@-t
  1021. echo '#undef MPERS_PRINTER_NAME' >> $@-t
  1022. echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
  1023. echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
  1024. echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t
  1025. mv $@-t $@
  1026. m%_funcs.h: $(srcdir_mpers_source_files)
  1027. for f in $^; do \
  1028. sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
  1029. done > $@-t && \
  1030. echo '#include "sys_func.h"' >> $@-t
  1031. mv $@-t $@
  1032. # printers
  1033. %.c.mpers.i: $(srcdir)/%.c
  1034. $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@
  1035. mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$
  1036. printers.h: $(mpers_preproc_files)
  1037. echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
  1038. echo 'typedef struct {' >> $@-t
  1039. for f in $^; do \
  1040. sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
  1041. || exit; \
  1042. done >> $@-t
  1043. echo '} struct_printers;' >> $@-t
  1044. echo 'extern const struct_printers *printers;' >> $@-t
  1045. echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
  1046. mv $@-t $@
  1047. %_printer_decls.h: $(mpers_preproc_files)
  1048. echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
  1049. for f in $^; do \
  1050. sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
  1051. || exit; \
  1052. done >> $@-t
  1053. mv $@-t $@
  1054. %_printer_defs.h: $(mpers_preproc_files)
  1055. echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
  1056. for f in $^; do \
  1057. sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \
  1058. || exit; \
  1059. done >> $@-t
  1060. mv $@-t $@
  1061. native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
  1062. if HAVE_M32_MPERS
  1063. strace_LDADD += libmpers-m32.a
  1064. noinst_LIBRARIES += libmpers-m32.a
  1065. libmpers_m32_a_SOURCES = $(mpers_source_files)
  1066. libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
  1067. libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS)
  1068. mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
  1069. BUILT_SOURCES += $(mpers_m32_targets)
  1070. CLEANFILES += $(mpers_m32_targets)
  1071. $(mpers_m32_targets): mpers_NAME = m32
  1072. $(mpers_m32_targets): mpers_CC_FLAGS = @cc_flags_m32@
  1073. endif # HAVE_M32_MPERS
  1074. if HAVE_MX32_MPERS
  1075. strace_LDADD += libmpers-mx32.a
  1076. noinst_LIBRARIES += libmpers-mx32.a
  1077. libmpers_mx32_a_SOURCES = $(mpers_source_files)
  1078. libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
  1079. libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS)
  1080. mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
  1081. BUILT_SOURCES += $(mpers_mx32_targets)
  1082. CLEANFILES += $(mpers_mx32_targets)
  1083. $(mpers_mx32_targets): mpers_NAME = mx32
  1084. $(mpers_mx32_targets): mpers_CC_FLAGS = @cc_flags_mx32@
  1085. endif # HAVE_MX32_MPERS
  1086. clean-local:
  1087. -rm -rf mpers-m32 mpers-mx32
  1088. if MAINTAINER_MODE
  1089. gen_changelog_start_date = 2009-07-08 20:00
  1090. $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
  1091. $(srcdir)/.version
  1092. @rm -f $@.new
  1093. (cd $(srcdir); \
  1094. ./gitlog-to-changelog --append-dot \
  1095. --since='$(gen_changelog_start_date)'; \
  1096. echo; echo; echo 'See ChangeLog-CVS for older changes.' \
  1097. ) > $@.new
  1098. chmod 444 $@.new
  1099. mv -f $@.new $@
  1100. $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
  1101. $(srcdir)/Makefile.in $(srcdir)/.version
  1102. $(AM_V_GEN) \
  1103. ( \
  1104. D="$(D)"; \
  1105. export D; \
  1106. cd $(srcdir); \
  1107. sed '/^##/,$$d' CREDITS.in; \
  1108. sed -n '1,/^##>/d; s/ */\t/; s/^./&/p' CREDITS.in \
  1109. | maint/gen-contributors-list.sh - -e HEAD --initial \
  1110. | sed 's/\t/ /g; s/^/\t/' \
  1111. ) > $@-t && mv $@-t $@
  1112. export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
  1113. endif