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 31KB

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