]> granicus.if.org Git - strace/blob - Makefile.am
oldstat: change address argument type from unsigned long to kernel_ureg_t
[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         numa.c          \
174         oldstat.c       \
175         open.c          \
176         or1k_atomic.c   \
177         pathtrace.c     \
178         perf.c          \
179         perf_event_struct.h \
180         personality.c   \
181         pkeys.c         \
182         poll.c          \
183         prctl.c         \
184         print_mq_attr.c \
185         print_msgbuf.c  \
186         print_sigevent.c \
187         print_statfs.c  \
188         print_struct_stat.c \
189         print_time.c    \
190         print_timespec.c \
191         print_timeval.c \
192         print_timex.c   \
193         printmode.c     \
194         printrusage.c   \
195         printsiginfo.c  \
196         printsiginfo.h  \
197         process.c       \
198         process_vm.c    \
199         ptp.c           \
200         ptrace.h        \
201         qualify.c       \
202         quota.c         \
203         readahead.c     \
204         readlink.c      \
205         reboot.c        \
206         regs.h          \
207         renameat.c      \
208         resource.c      \
209         rtc.c           \
210         sched.c         \
211         scsi.c          \
212         seccomp.c       \
213         seccomp_fprog.h \
214         sendfile.c      \
215         sigaltstack.c   \
216         sigevent.h      \
217         signal.c        \
218         signalfd.c      \
219         sigreturn.c     \
220         sock.c          \
221         sockaddr.c      \
222         socketutils.c   \
223         sram_alloc.c    \
224         stat.c          \
225         stat.h          \
226         stat64.c        \
227         statfs.c        \
228         statfs.h        \
229         strace.c        \
230         swapon.c        \
231         syscall.c       \
232         sysctl.c        \
233         sysinfo.c       \
234         syslog.c        \
235         sysmips.c       \
236         term.c          \
237         time.c          \
238         times.c         \
239         truncate.c      \
240         ubi.c           \
241         uid.c           \
242         uid16.c         \
243         umask.c         \
244         umount.c        \
245         uname.c         \
246         userfaultfd.c   \
247         util.c          \
248         utime.c         \
249         utimes.c        \
250         v4l2.c          \
251         vsprintf.c      \
252         wait.c          \
253         xattr.c         \
254         xlat.h          \
255         xmalloc.c       \
256         # end of strace_SOURCES
257
258 if USE_LIBUNWIND
259 strace_SOURCES += unwind.c
260 strace_CPPFLAGS += $(libunwind_CPPFLAGS)
261 strace_LDFLAGS += $(libunwind_LDFLAGS)
262 strace_LDADD += $(libunwind_LIBS)
263 endif
264
265 @CODE_COVERAGE_RULES@
266 CODE_COVERAGE_BRANCH_COVERAGE = 1
267 CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
268         --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
269 CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
270 strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
271 strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
272 strace_LDADD += $(CODE_COVERAGE_LDFLAGS)
273
274 # Enable this to get link map generated
275 #strace_LDFLAGS += -Wl,-Map=strace.mapfile
276
277 EXTRA_DIST =                            \
278         $(man_MANS)                     \
279         .version                        \
280         COPYING                         \
281         CREDITS                         \
282         ChangeLog                       \
283         ChangeLog-CVS                   \
284         README-linux-ptrace             \
285         debian/changelog                \
286         debian/compat                   \
287         debian/control                  \
288         debian/copyright                \
289         debian/rules                    \
290         debian/source/format            \
291         debian/strace-udeb.install      \
292         debian/strace.docs              \
293         debian/strace.examples          \
294         debian/strace.install           \
295         debian/strace.manpages          \
296         debian/strace64.install         \
297         debian/strace64.manpages        \
298         debian/watch                    \
299         errnoent.sh                     \
300         generate_sen.sh                 \
301         ioctlsort.c                     \
302         linux/32/ioctls_inc.h           \
303         linux/32/ioctls_inc_align16.h   \
304         linux/32/ioctls_inc_align32.h   \
305         linux/32/ioctls_inc_align64.h   \
306         linux/32/syscallent.h           \
307         linux/64/ioctls_inc.h           \
308         linux/64/syscallent.h           \
309         linux/aarch64/arch_regs.c       \
310         linux/aarch64/arch_regs.h       \
311         linux/aarch64/arch_sigreturn.c  \
312         linux/aarch64/errnoent1.h       \
313         linux/aarch64/get_error.c       \
314         linux/aarch64/get_scno.c        \
315         linux/aarch64/get_syscall_args.c\
316         linux/aarch64/ioctls_arch0.h    \
317         linux/aarch64/ioctls_arch1.h    \
318         linux/aarch64/ioctls_inc0.h     \
319         linux/aarch64/ioctls_inc1.h     \
320         linux/aarch64/set_error.c       \
321         linux/aarch64/set_scno.c        \
322         linux/aarch64/signalent1.h      \
323         linux/aarch64/syscallent.h      \
324         linux/aarch64/syscallent1.h     \
325         linux/alpha/arch_getrval2.c     \
326         linux/alpha/arch_regs.c         \
327         linux/alpha/arch_regs.h         \
328         linux/alpha/arch_sigreturn.c    \
329         linux/alpha/errnoent.h          \
330         linux/alpha/get_error.c         \
331         linux/alpha/get_scno.c          \
332         linux/alpha/get_syscall_args.c  \
333         linux/alpha/get_syscall_result.c\
334         linux/alpha/ioctls_arch0.h      \
335         linux/alpha/ioctls_inc0.h       \
336         linux/alpha/set_error.c         \
337         linux/alpha/set_scno.c          \
338         linux/alpha/signalent.h         \
339         linux/alpha/syscallent.h        \
340         linux/alpha/userent.h           \
341         linux/arc/arch_regs.c           \
342         linux/arc/get_error.c           \
343         linux/arc/get_scno.c            \
344         linux/arc/get_syscall_args.c    \
345         linux/arc/ioctls_arch0.h        \
346         linux/arc/ioctls_inc0.h         \
347         linux/arc/set_error.c           \
348         linux/arc/set_scno.c            \
349         linux/arc/syscallent.h          \
350         linux/arch_regs.h               \
351         linux/arch_sigreturn.c          \
352         linux/arm/arch_regs.c           \
353         linux/arm/arch_regs.h           \
354         linux/arm/arch_sigreturn.c      \
355         linux/arm/get_error.c           \
356         linux/arm/get_scno.c            \
357         linux/arm/get_syscall_args.c    \
358         linux/arm/ioctls_arch0.h        \
359         linux/arm/ioctls_inc0.h         \
360         linux/arm/set_error.c           \
361         linux/arm/set_scno.c            \
362         linux/arm/syscallent.h          \
363         linux/arm/userent.h             \
364         linux/avr32/arch_regs.c         \
365         linux/avr32/get_error.c         \
366         linux/avr32/get_scno.c          \
367         linux/avr32/get_syscall_args.c  \
368         linux/avr32/ioctls_arch0.h      \
369         linux/avr32/ioctls_inc0.h       \
370         linux/avr32/set_error.c         \
371         linux/avr32/set_scno.c          \
372         linux/avr32/syscallent.h        \
373         linux/avr32/userent.h           \
374         linux/bfin/arch_regs.c          \
375         linux/bfin/get_error.c          \
376         linux/bfin/get_scno.c           \
377         linux/bfin/get_syscall_args.c   \
378         linux/bfin/get_syscall_result.c \
379         linux/bfin/ioctls_arch0.h       \
380         linux/bfin/ioctls_inc0.h        \
381         linux/bfin/set_error.c          \
382         linux/bfin/set_scno.c           \
383         linux/bfin/syscallent.h         \
384         linux/bfin/userent.h            \
385         linux/crisv10/arch_regs.c       \
386         linux/crisv10/arch_sigreturn.c  \
387         linux/crisv10/get_error.c       \
388         linux/crisv10/get_scno.c        \
389         linux/crisv10/get_syscall_args.c        \
390         linux/crisv10/get_syscall_result.c      \
391         linux/crisv10/set_error.c       \
392         linux/crisv10/set_scno.c        \
393         linux/crisv10/syscallent.h      \
394         linux/crisv10/userent.h         \
395         linux/crisv32/arch_regs.c       \
396         linux/crisv32/arch_sigreturn.c  \
397         linux/crisv32/get_error.c       \
398         linux/crisv32/get_scno.c        \
399         linux/crisv32/get_syscall_args.c        \
400         linux/crisv32/get_syscall_result.c      \
401         linux/crisv32/set_error.c       \
402         linux/crisv32/set_scno.c        \
403         linux/crisv32/syscallent.h      \
404         linux/crisv32/userent.h         \
405         linux/dummy.h                   \
406         linux/errnoent.h                \
407         linux/getregs_old.h             \
408         linux/hppa/arch_regs.c          \
409         linux/hppa/arch_regs.h          \
410         linux/hppa/errnoent.h           \
411         linux/hppa/get_error.c          \
412         linux/hppa/get_scno.c           \
413         linux/hppa/get_syscall_args.c   \
414         linux/hppa/get_syscall_result.c \
415         linux/hppa/ioctls_arch0.h       \
416         linux/hppa/ioctls_inc0.h        \
417         linux/hppa/set_error.c          \
418         linux/hppa/set_scno.c           \
419         linux/hppa/signalent.h          \
420         linux/hppa/syscallent.h         \
421         linux/i386/arch_regs.c          \
422         linux/i386/arch_regs.h          \
423         linux/i386/arch_sigreturn.c     \
424         linux/i386/get_error.c          \
425         linux/i386/get_scno.c           \
426         linux/i386/get_syscall_args.c   \
427         linux/i386/ioctls_arch0.h       \
428         linux/i386/ioctls_inc0.h        \
429         linux/i386/set_error.c          \
430         linux/i386/set_scno.c           \
431         linux/i386/syscallent.h         \
432         linux/i386/userent.h            \
433         linux/i386/userent0.h           \
434         linux/ia64/arch_getrval2.c      \
435         linux/ia64/arch_regs.c          \
436         linux/ia64/arch_regs.h          \
437         linux/ia64/arch_sigreturn.c     \
438         linux/ia64/get_error.c          \
439         linux/ia64/get_scno.c           \
440         linux/ia64/get_syscall_args.c   \
441         linux/ia64/ioctls_arch0.h       \
442         linux/ia64/ioctls_inc0.h        \
443         linux/ia64/set_error.c          \
444         linux/ia64/set_scno.c           \
445         linux/ia64/syscallent.h         \
446         linux/ia64/userent.h            \
447         linux/inet_diag.h               \
448         linux/m68k/arch_regs.c          \
449         linux/m68k/arch_regs.h          \
450         linux/m68k/arch_sigreturn.c     \
451         linux/m68k/get_error.c          \
452         linux/m68k/get_scno.c           \
453         linux/m68k/get_syscall_args.c   \
454         linux/m68k/ioctls_arch0.h       \
455         linux/m68k/ioctls_inc0.h        \
456         linux/m68k/set_error.c          \
457         linux/m68k/set_scno.c           \
458         linux/m68k/syscallent.h         \
459         linux/m68k/userent.h            \
460         linux/metag/arch_regs.c         \
461         linux/metag/get_error.c         \
462         linux/metag/get_scno.c          \
463         linux/metag/get_syscall_args.c  \
464         linux/metag/ioctls_arch0.h      \
465         linux/metag/ioctls_inc0.h       \
466         linux/metag/set_error.c         \
467         linux/metag/set_scno.c          \
468         linux/metag/syscallent.h        \
469         linux/microblaze/arch_regs.c    \
470         linux/microblaze/arch_sigreturn.c       \
471         linux/microblaze/get_error.c    \
472         linux/microblaze/get_scno.c     \
473         linux/microblaze/get_syscall_args.c     \
474         linux/microblaze/get_syscall_result.c   \
475         linux/microblaze/ioctls_arch0.h \
476         linux/microblaze/ioctls_inc0.h  \
477         linux/microblaze/set_error.c    \
478         linux/microblaze/set_scno.c     \
479         linux/microblaze/syscallent.h   \
480         linux/microblaze/userent.h      \
481         linux/mips/arch_getrval2.c      \
482         linux/mips/arch_regs.c          \
483         linux/mips/arch_regs.h          \
484         linux/mips/arch_sigreturn.c     \
485         linux/mips/errnoent.h           \
486         linux/mips/genstub.sh           \
487         linux/mips/get_error.c          \
488         linux/mips/get_scno.c           \
489         linux/mips/get_syscall_args.c   \
490         linux/mips/ioctls_arch0.h       \
491         linux/mips/ioctls_inc0.h        \
492         linux/mips/set_error.c          \
493         linux/mips/set_scno.c           \
494         linux/mips/signalent.h          \
495         linux/mips/syscallent-compat.h  \
496         linux/mips/syscallent-n32.h     \
497         linux/mips/syscallent-n64.h     \
498         linux/mips/syscallent-o32.h     \
499         linux/mips/syscallent.h         \
500         linux/mips/userent.h            \
501         linux/mtd-abi.h                 \
502         linux/netlink_diag.h            \
503         linux/nios2/arch_regs.c         \
504         linux/nios2/get_error.c         \
505         linux/nios2/get_scno.c          \
506         linux/nios2/get_syscall_args.c  \
507         linux/nios2/ioctls_arch0.h      \
508         linux/nios2/ioctls_inc0.h       \
509         linux/nios2/set_error.c         \
510         linux/nios2/set_scno.c          \
511         linux/nios2/syscallent.h        \
512         linux/or1k/arch_regs.c          \
513         linux/or1k/get_error.c          \
514         linux/or1k/get_scno.c           \
515         linux/or1k/get_syscall_args.c   \
516         linux/or1k/ioctls_arch0.h       \
517         linux/or1k/ioctls_inc0.h        \
518         linux/or1k/set_error.c          \
519         linux/or1k/set_scno.c           \
520         linux/or1k/syscallent.h         \
521         linux/or1k/userent.h            \
522         linux/personality.h             \
523         linux/powerpc/arch_regs.c       \
524         linux/powerpc/arch_regs.h       \
525         linux/powerpc/arch_sigreturn.c  \
526         linux/powerpc/errnoent.h        \
527         linux/powerpc/get_error.c       \
528         linux/powerpc/get_scno.c        \
529         linux/powerpc/get_syscall_args.c        \
530         linux/powerpc/getregs_old.c     \
531         linux/powerpc/getregs_old.h     \
532         linux/powerpc/ioctls_arch0.h    \
533         linux/powerpc/ioctls_inc0.h     \
534         linux/powerpc/set_error.c       \
535         linux/powerpc/set_scno.c        \
536         linux/powerpc/syscallent.h      \
537         linux/powerpc/userent.h         \
538         linux/powerpc64/arch_regs.c     \
539         linux/powerpc64/arch_regs.h     \
540         linux/powerpc64/arch_sigreturn.c        \
541         linux/powerpc64/errnoent.h      \
542         linux/powerpc64/errnoent1.h     \
543         linux/powerpc64/get_error.c     \
544         linux/powerpc64/get_scno.c      \
545         linux/powerpc64/get_syscall_args.c      \
546         linux/powerpc64/getregs_old.c   \
547         linux/powerpc64/getregs_old.h   \
548         linux/powerpc64/ioctls_arch0.h  \
549         linux/powerpc64/ioctls_arch1.h  \
550         linux/powerpc64/ioctls_inc0.h   \
551         linux/powerpc64/ioctls_inc1.h   \
552         linux/powerpc64/set_error.c     \
553         linux/powerpc64/set_scno.c      \
554         linux/powerpc64/signalent1.h    \
555         linux/powerpc64/syscallent.h    \
556         linux/powerpc64/syscallent1.h   \
557         linux/powerpc64/userent.h       \
558         linux/ptp_clock.h               \
559         linux/riscv/arch_regs.c         \
560         linux/riscv/errnoent1.h         \
561         linux/riscv/get_error.c         \
562         linux/riscv/get_scno.c          \
563         linux/riscv/get_syscall_args.c  \
564         linux/riscv/ioctls_arch0.h      \
565         linux/riscv/ioctls_arch1.h      \
566         linux/riscv/ioctls_inc0.h       \
567         linux/riscv/ioctls_inc1.h       \
568         linux/riscv/set_error.c         \
569         linux/riscv/set_scno.c          \
570         linux/riscv/signalent1.h        \
571         linux/riscv/syscallent.h        \
572         linux/riscv/syscallent1.h       \
573         linux/s390/arch_regs.c          \
574         linux/s390/arch_regs.h          \
575         linux/s390/arch_sigreturn.c     \
576         linux/s390/get_error.c          \
577         linux/s390/get_scno.c           \
578         linux/s390/get_syscall_args.c   \
579         linux/s390/ioctls_arch0.h       \
580         linux/s390/ioctls_inc0.h        \
581         linux/s390/set_error.c          \
582         linux/s390/set_scno.c           \
583         linux/s390/syscallent.h         \
584         linux/s390/userent.h            \
585         linux/s390/userent0.h           \
586         linux/s390/userent1.h           \
587         linux/s390x/arch_regs.c         \
588         linux/s390x/arch_regs.h         \
589         linux/s390x/arch_sigreturn.c    \
590         linux/s390x/get_error.c         \
591         linux/s390x/get_scno.c          \
592         linux/s390x/get_syscall_args.c  \
593         linux/s390x/ioctls_arch0.h      \
594         linux/s390x/ioctls_inc0.h       \
595         linux/s390x/set_error.c         \
596         linux/s390x/set_scno.c          \
597         linux/s390x/syscallent.h        \
598         linux/s390x/userent.h           \
599         linux/sh/arch_getrval2.c        \
600         linux/sh/arch_regs.c            \
601         linux/sh/get_error.c            \
602         linux/sh/get_scno.c             \
603         linux/sh/get_syscall_args.c     \
604         linux/sh/get_syscall_result.c   \
605         linux/sh/ioctls_arch0.h         \
606         linux/sh/ioctls_inc0.h          \
607         linux/sh/set_error.c            \
608         linux/sh/set_scno.c             \
609         linux/sh/syscallent.h           \
610         linux/sh/userent.h              \
611         linux/sh/userent0.h             \
612         linux/sh64/arch_regs.c          \
613         linux/sh64/arch_regs.h          \
614         linux/sh64/get_error.c          \
615         linux/sh64/get_scno.c           \
616         linux/sh64/get_syscall_args.c   \
617         linux/sh64/get_syscall_result.c \
618         linux/sh64/ioctls_arch0.h       \
619         linux/sh64/ioctls_inc0.h        \
620         linux/sh64/set_error.c          \
621         linux/sh64/set_scno.c           \
622         linux/sh64/syscallent.h         \
623         linux/sh64/userent.h            \
624         linux/signalent.h               \
625         linux/sock_diag.h               \
626         linux/sparc/arch_getrval2.c     \
627         linux/sparc/arch_regs.c         \
628         linux/sparc/arch_regs.h         \
629         linux/sparc/arch_sigreturn.c    \
630         linux/sparc/errnoent.h          \
631         linux/sparc/gen.pl              \
632         linux/sparc/get_error.c         \
633         linux/sparc/get_scno.c          \
634         linux/sparc/get_syscall_args.c  \
635         linux/sparc/ioctls_arch0.h      \
636         linux/sparc/ioctls_inc0.h       \
637         linux/sparc/set_error.c         \
638         linux/sparc/set_scno.c          \
639         linux/sparc/signalent.h         \
640         linux/sparc/syscallent.h        \
641         linux/sparc/userent.h           \
642         linux/sparc64/arch_getrval2.c   \
643         linux/sparc64/arch_regs.c       \
644         linux/sparc64/arch_regs.h       \
645         linux/sparc64/arch_sigreturn.c  \
646         linux/sparc64/errnoent.h        \
647         linux/sparc64/errnoent1.h       \
648         linux/sparc64/get_error.c       \
649         linux/sparc64/get_scno.c        \
650         linux/sparc64/get_syscall_args.c\
651         linux/sparc64/ioctls_arch0.h    \
652         linux/sparc64/ioctls_arch1.h    \
653         linux/sparc64/ioctls_inc0.h     \
654         linux/sparc64/ioctls_inc1.h     \
655         linux/sparc64/set_error.c       \
656         linux/sparc64/set_scno.c        \
657         linux/sparc64/signalent.h       \
658         linux/sparc64/signalent1.h      \
659         linux/sparc64/syscallent.h      \
660         linux/sparc64/syscallent1.h     \
661         linux/sparc64/userent.h         \
662         linux/subcall.h                 \
663         linux/syscall.h                 \
664         linux/tile/arch_regs.c          \
665         linux/tile/arch_regs.h          \
666         linux/tile/arch_sigreturn.c     \
667         linux/tile/errnoent1.h          \
668         linux/tile/get_error.c          \
669         linux/tile/get_scno.c           \
670         linux/tile/get_syscall_args.c   \
671         linux/tile/ioctls_arch0.h       \
672         linux/tile/ioctls_arch1.h       \
673         linux/tile/ioctls_inc0.h        \
674         linux/tile/ioctls_inc1.h        \
675         linux/tile/set_error.c          \
676         linux/tile/set_scno.c           \
677         linux/tile/signalent1.h         \
678         linux/tile/syscallent.h         \
679         linux/tile/syscallent1.h        \
680         linux/tile/userent.h            \
681         linux/ubi-user.h                \
682         linux/unix_diag.h               \
683         linux/userent.h                 \
684         linux/userent0.h                \
685         linux/x32/arch_regs.c           \
686         linux/x32/arch_regs.h           \
687         linux/x32/arch_sigreturn.c      \
688         linux/x32/errnoent1.h           \
689         linux/x32/get_error.c           \
690         linux/x32/get_scno.c            \
691         linux/x32/get_syscall_args.c    \
692         linux/x32/ioctls_arch0.h        \
693         linux/x32/ioctls_arch1.h        \
694         linux/x32/ioctls_inc0.h         \
695         linux/x32/ioctls_inc1.h         \
696         linux/x32/set_error.c           \
697         linux/x32/set_scno.c            \
698         linux/x32/signalent1.h          \
699         linux/x32/syscallent.h          \
700         linux/x32/syscallent1.h         \
701         linux/x32/userent.h             \
702         linux/x86_64/arch_regs.c        \
703         linux/x86_64/arch_regs.h        \
704         linux/x86_64/arch_sigreturn.c   \
705         linux/x86_64/errnoent1.h        \
706         linux/x86_64/errnoent2.h        \
707         linux/x86_64/gentab.pl          \
708         linux/x86_64/get_error.c        \
709         linux/x86_64/get_scno.c         \
710         linux/x86_64/get_syscall_args.c \
711         linux/x86_64/getregs_old.c      \
712         linux/x86_64/getregs_old.h      \
713         linux/x86_64/ioctls_arch0.h     \
714         linux/x86_64/ioctls_arch1.h     \
715         linux/x86_64/ioctls_arch2.h     \
716         linux/x86_64/ioctls_inc0.h      \
717         linux/x86_64/ioctls_inc1.h      \
718         linux/x86_64/ioctls_inc2.h      \
719         linux/x86_64/set_error.c        \
720         linux/x86_64/set_scno.c         \
721         linux/x86_64/signalent1.h       \
722         linux/x86_64/signalent2.h       \
723         linux/x86_64/syscallent.h       \
724         linux/x86_64/syscallent1.h      \
725         linux/x86_64/syscallent2.h      \
726         linux/x86_64/userent.h          \
727         linux/xtensa/arch_regs.c        \
728         linux/xtensa/get_error.c        \
729         linux/xtensa/get_scno.c         \
730         linux/xtensa/get_syscall_args.c \
731         linux/xtensa/get_syscall_result.c       \
732         linux/xtensa/ioctls_arch0.h     \
733         linux/xtensa/ioctls_inc0.h      \
734         linux/xtensa/set_error.c        \
735         linux/xtensa/set_scno.c         \
736         linux/xtensa/syscallent.h       \
737         linux/xtensa/userent.h          \
738         maint/ioctls_gen.sh             \
739         maint/ioctls_hex.sh             \
740         maint/ioctls_sym.sh             \
741         maint/print_ioctlent.c          \
742         mpers.awk                       \
743         mpers.sh                        \
744         mpers_test.sh                   \
745         mpers_xlat.h                    \
746         signalent.sh                    \
747         strace-graph                    \
748         strace-log-merge                \
749         strace.spec                     \
750         syscallent.sh                   \
751         $(XLAT_INPUT_FILES)             \
752         $(XLAT_HEADER_FILES)            \
753         xlat/gen.sh                     \
754         xlate.el
755
756 .PHONY: check-valgrind-local
757 check-valgrind-local:
758
759 .PHONY: srpm
760 srpm: dist-xz
761         rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
762
763 $(srcdir)/.version:
764         $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
765
766 strace_SOURCES_c = \
767         $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES))
768
769 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
770         for f in $^; do \
771                 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
772         done | sort -u > $@
773
774 syscallent_names = subcall.h syscallent.h syscallent1.h \
775                    syscallent-n32.h syscallent-n64.h syscallent-o32.h
776 syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
777 syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
778
779 sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
780         for f in $^; do cat -- $$f; done | \
781                 $(srcdir)/generate_sen.sh > $@
782
783 dist-hook:
784         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
785
786 today = $(shell date +%Y-%m-%d)
787 version_regexp = $(subst .,\.,$(VERSION))
788 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
789
790 news-check: NEWS
791         $(AM_V_GEN)if head -1 $< |                              \
792           grep -x $(news_check_regexp) >/dev/null; then         \
793                 :;                                              \
794         else                                                    \
795                 echo >&2 '$<: check failed';                    \
796                 exit 1;                                         \
797         fi
798
799 ioctlsort_CC = $(CC_FOR_BUILD)
800 ioctlsort_DEFS = $(DEFS)
801 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
802 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
803 ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
804 ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
805
806 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
807 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
808 ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h)))
809
810 ioctl_redefs%.h: ioctlent%.h ioctlent0.h
811         sort $< > $<-t
812         sort ioctlent0.h | comm -23 $<-t - | \
813                 sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
814                 > $@-t
815         rm -f $<-t
816         mv $@-t $@
817
818 ioctlent%.h: ioctlsort%
819         ./$< > $@
820
821 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
822         $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
823
824 ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
825         $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
826
827 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
828         cat $^ > $@
829
830 BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
831                 native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
832 CLEANFILES    = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
833                 native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
834 DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
835
836 # defines mpers_source_files
837 include mpers.am
838 srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
839 mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i)
840
841 mpers_NAME =
842 mpers_PREFIX = $(mpers_NAME)_
843 mpers_DEFS = $(DEFS)
844 mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
845 mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
846 mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
847 libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS
848 libmpers_CFLAGS = $(strace_CFLAGS)
849
850 # mpers targets
851
852 mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
853         for f in $^; do \
854                 CC="$(CC)" CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
855                 CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
856                 $(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
857         done
858         > $@
859
860 m%_type_defs.h: $(srcdir_mpers_source_files)
861         for f in $^; do \
862                 sed -r -n 's/^#include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
863         done > $@-t
864         echo '#undef MPERS_PRINTER_NAME' >> $@-t
865         echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
866         echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
867         echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t
868         mv $@-t $@
869
870 m%_funcs.h: $(srcdir_mpers_source_files)
871         for f in $^; do \
872                 sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
873         done > $@-t && \
874         echo '#include "sys_func.h"' >> $@-t
875         mv $@-t $@
876
877 # printers
878
879 %.c.mpers.i: $(srcdir)/%.c
880         $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@
881
882 mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$
883
884 printers.h: $(mpers_preproc_files)
885         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
886         echo 'typedef struct {' >> $@-t
887         for f in $^; do \
888                 sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
889                 || exit; \
890         done >> $@-t
891         echo '} struct_printers;' >> $@-t
892         echo 'extern const struct_printers *printers;' >> $@-t
893         echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
894         mv $@-t $@
895
896 %_printer_decls.h: $(mpers_preproc_files)
897         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
898         for f in $^; do \
899                 sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
900                 || exit; \
901         done >> $@-t
902         mv $@-t $@
903
904 %_printer_defs.h: $(mpers_preproc_files)
905         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
906         for f in $^; do \
907                 sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \
908                 || exit; \
909         done >> $@-t
910         mv $@-t $@
911
912 native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
913
914 if HAVE_M32_MPERS
915
916 strace_LDADD += libmpers-m32.a
917 noinst_LIBRARIES += libmpers-m32.a
918 libmpers_m32_a_SOURCES = $(mpers_source_files)
919 libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
920 libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS)
921 mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
922
923 BUILT_SOURCES += $(mpers_m32_targets)
924 CLEANFILES    += $(mpers_m32_targets)
925
926 $(mpers_m32_targets): mpers_NAME = m32
927
928 endif # HAVE_M32_MPERS
929
930 if HAVE_MX32_MPERS
931
932 strace_LDADD += libmpers-mx32.a
933 noinst_LIBRARIES += libmpers-mx32.a
934 libmpers_mx32_a_SOURCES = $(mpers_source_files)
935 libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
936 libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS)
937 mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
938
939 BUILT_SOURCES += $(mpers_mx32_targets)
940 CLEANFILES    += $(mpers_mx32_targets)
941
942 $(mpers_mx32_targets): mpers_NAME = mx32
943
944 endif # HAVE_MX32_MPERS
945
946 clean-local:
947         -rm -rf mpers-m32 mpers-mx32
948
949 if MAINTAINER_MODE
950
951 gen_changelog_start_date = 2009-07-08 20:00
952 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
953                      $(srcdir)/.version
954         @rm -f $@.new
955         (cd $(srcdir); \
956          ./gitlog-to-changelog --append-dot \
957            --since='$(gen_changelog_start_date)'; \
958          echo; echo; echo 'See ChangeLog-CVS for older changes.' \
959         ) > $@.new
960         chmod 444 $@.new
961         mv -f $@.new $@
962
963 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
964                    $(srcdir)/Makefile.in $(srcdir)/.version
965         $(AM_V_GEN)                                                     \
966         (                                                               \
967           cd $(srcdir);                                                 \
968           sed '/^##/,$$d' CREDITS.in;                                   \
969           { sed -n '1,/^##>/d; s/   */\t/; s/^./&/p' CREDITS.in;        \
970             git log --pretty=format:'%aN        %aE';                   \
971           } | LC_ALL=C sort -u                                          \
972             | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}';             \
973         ) > $@-t && mv $@-t $@
974
975 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
976
977 endif