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