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