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