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