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