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