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