]> granicus.if.org Git - strace/blob - Makefile.am
Add i18n support
[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 # Copyright (c) 2002-2018 The strace developers.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions
12 # are met:
13 # 1. Redistributions of source code must retain the above copyright
14 #    notice, this list of conditions and the following disclaimer.
15 # 2. Redistributions in binary form must reproduce the above copyright
16 #    notice, this list of conditions and the following disclaimer in the
17 #    documentation and/or other materials provided with the distribution.
18 # 3. The name of the author may not be used to endorse or promote products
19 #    derived from this software without specific prior written permission.
20 #
21 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32 if HAVE_M32_RUNTIME
33 TESTS_M32 = tests-m32
34 endif
35 if HAVE_MX32_RUNTIME
36 TESTS_MX32 = tests-mx32
37 endif
38 SUBDIRS = . tests $(TESTS_M32) $(TESTS_MX32)
39
40 bin_PROGRAMS = strace
41 man_MANS = strace.1 strace-log-merge.1
42 bin_SCRIPTS = strace-graph strace-log-merge
43
44 OS              = linux
45 # ARCH is `i386', `m68k', `sparc', etc.
46 ARCH            = @arch@
47
48 READELF         = @READELF@
49
50 ACLOCAL_AMFLAGS = -I m4
51 AM_CFLAGS = $(WARN_CFLAGS)
52 AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
53               -I$(srcdir)/$(OS)/$(ARCH) \
54               -I$(builddir)/$(OS) \
55               -I$(srcdir)/$(OS) \
56               -I$(builddir) \
57               -I$(srcdir)
58
59 AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD)
60 AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS)
61
62 include xlat/Makemodule.am
63
64 strace_CPPFLAGS = $(AM_CPPFLAGS)
65 strace_CFLAGS = $(AM_CFLAGS)
66 strace_LDFLAGS =
67 strace_LDADD = libstrace.a $(clock_LIBS) $(timer_LIBS)
68 noinst_LIBRARIES = libstrace.a
69
70 libstrace_a_CPPFLAGS = $(strace_CPPFLAGS)
71 libstrace_a_CFLAGS = $(strace_CFLAGS)
72 libstrace_a_SOURCES =   \
73         fetch_indirect_syscall_args.c \
74         fstatfs.c \
75         fstatfs64.c \
76         getpagesize.c \
77         ipc.c \
78         sigreturn.c     \
79         socketcall.c \
80         statfs.c \
81         statfs64.c \
82         sync_file_range.c \
83         sync_file_range2.c \
84         upeek.c         \
85         upoke.c         \
86         # end of libstrace_a_SOURCES
87
88 strace_SOURCES =        \
89         access.c        \
90         affinity.c      \
91         aio.c           \
92         alpha.c         \
93         arch_defs.h     \
94         basic_filters.c \
95         bind.c          \
96         bjm.c           \
97         block.c         \
98         bpf.c           \
99         bpf_filter.c    \
100         bpf_filter.h    \
101         bpf_fprog.h     \
102         bpf_seccomp_filter.c \
103         bpf_sock_filter.c \
104         btrfs.c         \
105         cacheflush.c    \
106         capability.c    \
107         caps0.h         \
108         caps1.h         \
109         chdir.c         \
110         chmod.c         \
111         clone.c         \
112         copy_file_range.c \
113         count.c         \
114         defs.h          \
115         delay.c         \
116         delay.h         \
117         desc.c          \
118         dirent.c        \
119         dirent64.c      \
120         dm.c            \
121         dyxlat.c        \
122         empty.h         \
123         epoll.c         \
124         error_prints.c  \
125         error_prints.h  \
126         evdev.c         \
127         evdev_mpers.c   \
128         eventfd.c       \
129         execve.c        \
130         fadvise.c       \
131         fallocate.c     \
132         fanotify.c      \
133         fchownat.c      \
134         fcntl.c         \
135         fetch_bpf_fprog.c \
136         fetch_struct_flock.c \
137         fetch_struct_keyctl_kdf_params.c \
138         fetch_struct_mmsghdr.c \
139         fetch_struct_msghdr.c \
140         fetch_struct_stat.c \
141         fetch_struct_stat64.c \
142         fetch_struct_statfs.c \
143         file_handle.c   \
144         file_ioctl.c    \
145         filter_qualify.c \
146         filter.h        \
147         flock.c         \
148         flock.h         \
149         fs_x_ioctl.c    \
150         futex.c         \
151         gcc_compat.h    \
152         get_robust_list.c \
153         getcpu.c        \
154         getcwd.c        \
155         getrandom.c     \
156         hdio.c          \
157         hostname.c      \
158         inotify.c       \
159         io.c            \
160         ioctl.c         \
161         ioperm.c        \
162         iopl.c          \
163         ioprio.c        \
164         ipc_defs.h      \
165         ipc_msg.c       \
166         ipc_msgctl.c    \
167         ipc_sem.c       \
168         ipc_shm.c       \
169         ipc_shmctl.c    \
170         kcmp.c          \
171         kernel_types.h  \
172         kexec.c         \
173         keyctl.c        \
174         keyctl_kdf_params.h \
175         kvm.c           \
176         largefile_wrappers.h \
177         ldt.c           \
178         link.c          \
179         linux/asm_stat.h \
180         linux/x32/asm_stat.h \
181         linux/x86_64/asm_stat.h \
182         listen.c        \
183         lookup_dcookie.c \
184         loop.c          \
185         lseek.c         \
186         macros.h        \
187         mem.c           \
188         membarrier.c    \
189         memfd_create.c  \
190         mknod.c         \
191         mmap_cache.c    \
192         mmap_cache.h    \
193         mmsghdr.c       \
194         mount.c         \
195         mpers_type.h    \
196         mq.c            \
197         msghdr.c        \
198         msghdr.h        \
199         mtd.c           \
200         native_defs.h   \
201         negated_errno.h \
202         net.c           \
203         netlink.c       \
204         netlink.h       \
205         netlink_crypto.c \
206         netlink_sock_diag.h \
207         netlink_inet_diag.c \
208         netlink_netfilter.c \
209         netlink_netlink_diag.c \
210         netlink_packet_diag.c \
211         netlink_route.c \
212         netlink_route.h \
213         netlink_selinux.c \
214         netlink_smc_diag.c \
215         netlink_sock_diag.c \
216         netlink_unix_diag.c \
217         nlattr.c        \
218         nlattr.h        \
219         nsfs.c          \
220         nsfs.h          \
221         nsig.h          \
222         numa.c          \
223         number_set.c    \
224         number_set.h    \
225         oldstat.c       \
226         open.c          \
227         or1k_atomic.c   \
228         pathtrace.c     \
229         perf.c          \
230         perf_event_struct.h \
231         personality.c   \
232         pkeys.c         \
233         poll.c          \
234         prctl.c         \
235         print_dev_t.c   \
236         print_group_req.c \
237         print_fields.h  \
238         print_ifindex.c \
239         print_mq_attr.c \
240         print_msgbuf.c  \
241         print_sg_req_info.c \
242         print_sigevent.c \
243         print_statfs.c  \
244         print_struct_stat.c \
245         print_time.c    \
246         print_timespec.c \
247         print_timeval.c \
248         print_timex.c   \
249         printmode.c     \
250         printrusage.c   \
251         printsiginfo.c  \
252         printsiginfo.h  \
253         process.c       \
254         process_vm.c    \
255         ptp.c           \
256         ptrace.h        \
257         quota.c         \
258         readahead.c     \
259         readlink.c      \
260         reboot.c        \
261         regs.h          \
262         renameat.c      \
263         resource.c      \
264         retval.c        \
265         retval.h        \
266         riscv.c         \
267         rt_sigframe.c   \
268         rt_sigreturn.c  \
269         rtc.c           \
270         rtnl_addr.c     \
271         rtnl_addrlabel.c \
272         rtnl_dcb.c      \
273         rtnl_link.c     \
274         rtnl_mdb.c      \
275         rtnl_neigh.c    \
276         rtnl_neightbl.c \
277         rtnl_netconf.c  \
278         rtnl_nsid.c     \
279         rtnl_route.c    \
280         rtnl_rule.c     \
281         rtnl_tc.c       \
282         rtnl_tc_action.c \
283         s390.c          \
284         sched.c         \
285         sched_attr.h    \
286         scsi.c          \
287         seccomp.c       \
288         sendfile.c      \
289         sg_io_v3.c      \
290         sg_io_v4.c      \
291         shutdown.c      \
292         sigaltstack.c   \
293         sigevent.h      \
294         signal.c        \
295         signalfd.c      \
296         sock.c          \
297         sockaddr.c      \
298         socketutils.c   \
299         sparc.c         \
300         sram_alloc.c    \
301         stat.c          \
302         stat.h          \
303         stat64.c        \
304         statfs.c        \
305         statfs.h        \
306         statx.c         \
307         statx.h         \
308         strace.c        \
309         string_to_uint.h \
310         string_to_uint.c \
311         swapon.c        \
312         syscall.c       \
313         sysctl.c        \
314         sysent.h        \
315         sysent_shorthand_defs.h \
316         sysent_shorthand_undefs.h \
317         sysinfo.c       \
318         syslog.c        \
319         sysmips.c       \
320         term.c          \
321         time.c          \
322         times.c         \
323         trace_event.h   \
324         truncate.c      \
325         ubi.c           \
326         ucopy.c         \
327         uid.c           \
328         uid16.c         \
329         umask.c         \
330         umount.c        \
331         uname.c         \
332         userfaultfd.c   \
333         ustat.c         \
334         util.c          \
335         utime.c         \
336         utimes.c        \
337         v4l2.c          \
338         wait.c          \
339         xattr.c         \
340         xlat.c          \
341         xlat.h          \
342         xmalloc.c       \
343         xmalloc.h       \
344         xstring.h       \
345         # end of strace_SOURCES
346
347 if USE_LIBUNWIND
348 strace_SOURCES += unwind.c
349 strace_CPPFLAGS += $(libunwind_CPPFLAGS)
350 strace_LDFLAGS += $(libunwind_LDFLAGS)
351 strace_LDADD += $(libunwind_LIBS)
352 if USE_DEMANGLE
353 strace_CPPFLAGS += $(libiberty_CPPFLAGS)
354 strace_LDFLAGS += $(libiberty_LDFLAGS)
355 strace_LDADD += $(libiberty_LIBS)
356 endif
357 endif
358
359 @CODE_COVERAGE_RULES@
360 CODE_COVERAGE_BRANCH_COVERAGE = 1
361 CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
362         --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
363 CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
364 strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
365 strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
366 strace_LDADD += $(CODE_COVERAGE_LIBS)
367
368 # Enable this to get link map generated
369 #strace_LDFLAGS += -Wl,-Map=strace.mapfile
370
371 EXTRA_DIST =                            \
372         $(man_MANS)                     \
373         .version                        \
374         COPYING                         \
375         CREDITS                         \
376         ChangeLog                       \
377         ChangeLog-CVS                   \
378         README-linux-ptrace             \
379         debian/changelog                \
380         debian/compat                   \
381         debian/control                  \
382         debian/copyright                \
383         debian/rules                    \
384         debian/source/format            \
385         debian/strace-udeb.install      \
386         debian/strace.docs              \
387         debian/strace.examples          \
388         debian/strace.install           \
389         debian/strace.manpages          \
390         debian/strace64.install         \
391         debian/strace64.manpages        \
392         debian/watch                    \
393         generate_sen.sh                 \
394         ioctl_iocdef.c                  \
395         ioctlsort.c                     \
396         linux/32/ioctls_inc.h           \
397         linux/32/ioctls_inc_align16.h   \
398         linux/32/ioctls_inc_align32.h   \
399         linux/32/ioctls_inc_align64.h   \
400         linux/32/syscallent.h           \
401         linux/64/ioctls_inc.h           \
402         linux/64/syscallent.h           \
403         linux/aarch64/arch_defs_.h      \
404         linux/aarch64/arch_regs.c       \
405         linux/aarch64/arch_regs.h       \
406         linux/aarch64/arch_rt_sigframe.c        \
407         linux/aarch64/arch_sigreturn.c  \
408         linux/aarch64/errnoent1.h       \
409         linux/aarch64/get_error.c       \
410         linux/aarch64/get_scno.c        \
411         linux/aarch64/get_syscall_args.c        \
412         linux/aarch64/ioctls_arch0.h    \
413         linux/aarch64/ioctls_arch1.h    \
414         linux/aarch64/ioctls_inc0.h     \
415         linux/aarch64/ioctls_inc1.h     \
416         linux/aarch64/nr_prefix.c       \
417         linux/aarch64/raw_syscall.h     \
418         linux/aarch64/set_error.c       \
419         linux/aarch64/set_scno.c        \
420         linux/aarch64/shuffle_scno.c    \
421         linux/aarch64/signalent1.h      \
422         linux/aarch64/syscallent.h      \
423         linux/aarch64/syscallent1.h     \
424         linux/alpha/arch_defs_.h        \
425         linux/alpha/arch_getrval2.c     \
426         linux/alpha/arch_regs.c         \
427         linux/alpha/arch_regs.h         \
428         linux/alpha/arch_rt_sigframe.c  \
429         linux/alpha/arch_sigreturn.c    \
430         linux/alpha/errnoent.h          \
431         linux/alpha/get_error.c         \
432         linux/alpha/get_scno.c          \
433         linux/alpha/get_syscall_args.c  \
434         linux/alpha/get_syscall_result.c        \
435         linux/alpha/ioctls_arch0.h      \
436         linux/alpha/ioctls_inc0.h       \
437         linux/alpha/raw_syscall.h       \
438         linux/alpha/set_error.c         \
439         linux/alpha/set_scno.c          \
440         linux/alpha/signalent.h         \
441         linux/alpha/syscallent.h        \
442         linux/alpha/userent.h           \
443         linux/arc/arch_regs.c           \
444         linux/arc/arch_regs.h           \
445         linux/arc/arch_rt_sigframe.c    \
446         linux/arc/get_error.c           \
447         linux/arc/get_scno.c            \
448         linux/arc/get_syscall_args.c    \
449         linux/arc/ioctls_arch0.h        \
450         linux/arc/ioctls_inc0.h         \
451         linux/arc/raw_syscall.h         \
452         linux/arc/set_error.c           \
453         linux/arc/set_scno.c            \
454         linux/arc/syscallent.h          \
455         linux/arch_defs_.h              \
456         linux/arch_kvm.c                \
457         linux/arch_regs.h               \
458         linux/arch_sigreturn.c          \
459         linux/arm/arch_defs_.h          \
460         linux/arm/arch_regs.c           \
461         linux/arm/arch_regs.h           \
462         linux/arm/arch_rt_sigframe.c    \
463         linux/arm/arch_sigreturn.c      \
464         linux/arm/get_error.c           \
465         linux/arm/get_scno.c            \
466         linux/arm/get_syscall_args.c    \
467         linux/arm/ioctls_arch0.h        \
468         linux/arm/ioctls_inc0.h         \
469         linux/arm/nr_prefix.c           \
470         linux/arm/raw_syscall.h         \
471         linux/arm/set_error.c           \
472         linux/arm/set_scno.c            \
473         linux/arm/shuffle_scno.c        \
474         linux/arm/syscallent.h          \
475         linux/arm/userent.h             \
476         linux/avr32/arch_regs.c         \
477         linux/avr32/arch_regs.h         \
478         linux/avr32/arch_rt_sigframe.c  \
479         linux/avr32/get_error.c         \
480         linux/avr32/get_scno.c          \
481         linux/avr32/get_syscall_args.c  \
482         linux/avr32/ioctls_arch0.h      \
483         linux/avr32/ioctls_inc0.h       \
484         linux/avr32/raw_syscall.h       \
485         linux/avr32/set_error.c         \
486         linux/avr32/set_scno.c          \
487         linux/avr32/syscallent.h        \
488         linux/avr32/userent.h           \
489         linux/bfin/arch_defs_.h         \
490         linux/bfin/arch_regs.c          \
491         linux/bfin/arch_rt_sigframe.c   \
492         linux/bfin/get_error.c          \
493         linux/bfin/get_scno.c           \
494         linux/bfin/get_syscall_args.c   \
495         linux/bfin/get_syscall_result.c \
496         linux/bfin/ioctls_arch0.h       \
497         linux/bfin/ioctls_inc0.h        \
498         linux/bfin/raw_syscall.h        \
499         linux/bfin/rt_sigframe.h        \
500         linux/bfin/set_error.c          \
501         linux/bfin/set_scno.c           \
502         linux/bfin/syscallent.h         \
503         linux/bfin/userent.h            \
504         linux/dummy.h                   \
505         linux/errnoent.h                \
506         linux/getregs_old.h             \
507         linux/hppa/arch_defs_.h         \
508         linux/hppa/arch_regs.c          \
509         linux/hppa/arch_regs.h          \
510         linux/hppa/arch_rt_sigframe.c   \
511         linux/hppa/errnoent.h           \
512         linux/hppa/get_error.c          \
513         linux/hppa/get_scno.c           \
514         linux/hppa/get_syscall_args.c   \
515         linux/hppa/get_syscall_result.c \
516         linux/hppa/ioctls_arch0.h       \
517         linux/hppa/ioctls_inc0.h        \
518         linux/hppa/raw_syscall.h        \
519         linux/hppa/rt_sigframe.h        \
520         linux/hppa/set_error.c          \
521         linux/hppa/set_scno.c           \
522         linux/hppa/signalent.h          \
523         linux/hppa/syscallent.h         \
524         linux/i386/arch_kvm.c           \
525         linux/i386/arch_defs_.h         \
526         linux/i386/arch_regs.c          \
527         linux/i386/arch_regs.h          \
528         linux/i386/arch_rt_sigframe.c   \
529         linux/i386/arch_sigreturn.c     \
530         linux/i386/get_error.c          \
531         linux/i386/get_scno.c           \
532         linux/i386/get_syscall_args.c   \
533         linux/i386/ioctls_arch0.h       \
534         linux/i386/ioctls_inc0.h        \
535         linux/i386/raw_syscall.h        \
536         linux/i386/rt_sigframe.h        \
537         linux/i386/set_error.c          \
538         linux/i386/set_scno.c           \
539         linux/i386/syscallent.h         \
540         linux/i386/userent.h            \
541         linux/i386/userent0.h           \
542         linux/ia64/arch_defs_.h         \
543         linux/ia64/arch_getrval2.c      \
544         linux/ia64/arch_regs.c          \
545         linux/ia64/arch_regs.h          \
546         linux/ia64/arch_rt_sigframe.c   \
547         linux/ia64/get_error.c          \
548         linux/ia64/get_scno.c           \
549         linux/ia64/get_syscall_args.c   \
550         linux/ia64/ioctls_arch0.h       \
551         linux/ia64/ioctls_inc0.h        \
552         linux/ia64/raw_syscall.h        \
553         linux/ia64/rt_sigframe.h        \
554         linux/ia64/set_error.c          \
555         linux/ia64/set_scno.c           \
556         linux/ia64/syscallent.h         \
557         linux/ia64/userent.h            \
558         linux/inet_diag.h               \
559         linux/m68k/arch_defs_.h         \
560         linux/m68k/arch_regs.c          \
561         linux/m68k/arch_regs.h          \
562         linux/m68k/arch_rt_sigframe.c   \
563         linux/m68k/arch_sigreturn.c     \
564         linux/m68k/get_error.c          \
565         linux/m68k/get_scno.c           \
566         linux/m68k/get_syscall_args.c   \
567         linux/m68k/ioctls_arch0.h       \
568         linux/m68k/ioctls_inc0.h        \
569         linux/m68k/raw_syscall.h        \
570         linux/m68k/rt_sigframe.h        \
571         linux/m68k/set_error.c          \
572         linux/m68k/set_scno.c           \
573         linux/m68k/syscallent.h         \
574         linux/m68k/userent.h            \
575         linux/metag/arch_regs.c         \
576         linux/metag/arch_regs.h         \
577         linux/metag/arch_rt_sigframe.c  \
578         linux/metag/get_error.c         \
579         linux/metag/get_scno.c          \
580         linux/metag/get_syscall_args.c  \
581         linux/metag/ioctls_arch0.h      \
582         linux/metag/ioctls_inc0.h       \
583         linux/metag/raw_syscall.h       \
584         linux/metag/set_error.c         \
585         linux/metag/set_scno.c          \
586         linux/metag/syscallent.h        \
587         linux/microblaze/arch_defs_.h   \
588         linux/microblaze/arch_regs.c    \
589         linux/microblaze/arch_rt_sigframe.c     \
590         linux/microblaze/arch_sigreturn.c       \
591         linux/microblaze/get_error.c    \
592         linux/microblaze/get_scno.c     \
593         linux/microblaze/get_syscall_args.c     \
594         linux/microblaze/get_syscall_result.c   \
595         linux/microblaze/ioctls_arch0.h \
596         linux/microblaze/ioctls_inc0.h  \
597         linux/microblaze/raw_syscall.h  \
598         linux/microblaze/set_error.c    \
599         linux/microblaze/set_scno.c     \
600         linux/microblaze/syscallent.h   \
601         linux/microblaze/userent.h      \
602         linux/mips/arch_defs_.h         \
603         linux/mips/arch_getrval2.c      \
604         linux/mips/arch_regs.c          \
605         linux/mips/arch_regs.h          \
606         linux/mips/arch_rt_sigframe.c   \
607         linux/mips/arch_sigreturn.c     \
608         linux/mips/errnoent.h           \
609         linux/mips/genstub.sh           \
610         linux/mips/get_error.c          \
611         linux/mips/get_scno.c           \
612         linux/mips/get_syscall_args.c   \
613         linux/mips/ioctls_arch0.h       \
614         linux/mips/ioctls_inc0.h        \
615         linux/mips/raw_syscall.h        \
616         linux/mips/rt_sigframe.h        \
617         linux/mips/set_error.c          \
618         linux/mips/set_scno.c           \
619         linux/mips/signalent.h          \
620         linux/mips/syscallent-compat.h  \
621         linux/mips/syscallent-n32.h     \
622         linux/mips/syscallent-n64.h     \
623         linux/mips/syscallent-o32.h     \
624         linux/mips/syscallent.h         \
625         linux/mips/userent.h            \
626         linux/netlink_diag.h            \
627         linux/nios2/arch_defs_.h        \
628         linux/nios2/arch_regs.c         \
629         linux/nios2/arch_regs.h         \
630         linux/nios2/arch_rt_sigframe.c  \
631         linux/nios2/get_error.c         \
632         linux/nios2/get_scno.c          \
633         linux/nios2/get_syscall_args.c  \
634         linux/nios2/ioctls_arch0.h      \
635         linux/nios2/ioctls_inc0.h       \
636         linux/nios2/raw_syscall.h       \
637         linux/nios2/set_error.c         \
638         linux/nios2/set_scno.c          \
639         linux/nios2/syscallent.h        \
640         linux/nr_prefix.c               \
641         linux/or1k/arch_regs.c          \
642         linux/or1k/arch_regs.h          \
643         linux/or1k/arch_rt_sigframe.c   \
644         linux/or1k/get_error.c          \
645         linux/or1k/get_scno.c           \
646         linux/or1k/get_syscall_args.c   \
647         linux/or1k/ioctls_arch0.h       \
648         linux/or1k/ioctls_inc0.h        \
649         linux/or1k/raw_syscall.h        \
650         linux/or1k/set_error.c          \
651         linux/or1k/set_scno.c           \
652         linux/or1k/syscallent.h         \
653         linux/or1k/userent.h            \
654         linux/packet_diag.h             \
655         linux/powerpc/arch_defs_.h      \
656         linux/powerpc/arch_regs.c       \
657         linux/powerpc/arch_regs.h       \
658         linux/powerpc/arch_rt_sigframe.c        \
659         linux/powerpc/arch_sigreturn.c  \
660         linux/powerpc/errnoent.h        \
661         linux/powerpc/get_error.c       \
662         linux/powerpc/get_scno.c        \
663         linux/powerpc/get_syscall_args.c        \
664         linux/powerpc/getregs_old.c     \
665         linux/powerpc/getregs_old.h     \
666         linux/powerpc/ioctls_arch0.h    \
667         linux/powerpc/ioctls_inc0.h     \
668         linux/powerpc/raw_syscall.h     \
669         linux/powerpc/set_error.c       \
670         linux/powerpc/set_scno.c        \
671         linux/powerpc/syscallent.h      \
672         linux/powerpc/userent.h         \
673         linux/powerpc64/arch_defs_.h    \
674         linux/powerpc64/arch_regs.c     \
675         linux/powerpc64/arch_regs.h     \
676         linux/powerpc64/arch_rt_sigframe.c      \
677         linux/powerpc64/arch_sigreturn.c        \
678         linux/powerpc64/errnoent.h      \
679         linux/powerpc64/errnoent1.h     \
680         linux/powerpc64/get_error.c     \
681         linux/powerpc64/get_scno.c      \
682         linux/powerpc64/get_syscall_args.c      \
683         linux/powerpc64/getregs_old.c   \
684         linux/powerpc64/getregs_old.h   \
685         linux/powerpc64/ioctls_arch0.h  \
686         linux/powerpc64/ioctls_arch1.h  \
687         linux/powerpc64/ioctls_inc0.h   \
688         linux/powerpc64/ioctls_inc1.h   \
689         linux/powerpc64/raw_syscall.h   \
690         linux/powerpc64/rt_sigframe.h   \
691         linux/powerpc64/set_error.c     \
692         linux/powerpc64/set_scno.c      \
693         linux/powerpc64/signalent1.h    \
694         linux/powerpc64/syscallent.h    \
695         linux/powerpc64/syscallent1.h   \
696         linux/powerpc64/userent.h       \
697         linux/raw_syscall.h             \
698         linux/riscv/arch_defs_.h        \
699         linux/riscv/arch_regs.c         \
700         linux/riscv/arch_regs.h         \
701         linux/riscv/arch_rt_sigframe.c  \
702         linux/riscv/errnoent1.h         \
703         linux/riscv/get_error.c         \
704         linux/riscv/get_scno.c          \
705         linux/riscv/get_syscall_args.c  \
706         linux/riscv/ioctls_arch0.h      \
707         linux/riscv/ioctls_arch1.h      \
708         linux/riscv/ioctls_inc0.h       \
709         linux/riscv/ioctls_inc1.h       \
710         linux/riscv/raw_syscall.h       \
711         linux/riscv/set_error.c         \
712         linux/riscv/set_scno.c          \
713         linux/riscv/signalent1.h        \
714         linux/riscv/syscallent.h        \
715         linux/riscv/syscallent1.h       \
716         linux/rt_sigframe.h             \
717         linux/s390/arch_defs_.h         \
718         linux/s390/arch_regs.c          \
719         linux/s390/arch_regs.h          \
720         linux/s390/arch_rt_sigframe.c   \
721         linux/s390/arch_sigreturn.c     \
722         linux/s390/get_error.c          \
723         linux/s390/get_scno.c           \
724         linux/s390/get_syscall_args.c   \
725         linux/s390/ioctls_arch0.h       \
726         linux/s390/ioctls_inc0.h        \
727         linux/s390/raw_syscall.h        \
728         linux/s390/rt_sigframe.h        \
729         linux/s390/set_error.c          \
730         linux/s390/set_scno.c           \
731         linux/s390/syscallent.h         \
732         linux/s390/userent.h            \
733         linux/s390/userent0.h           \
734         linux/s390/userent1.h           \
735         linux/s390x/arch_defs_.h        \
736         linux/s390x/arch_regs.c         \
737         linux/s390x/arch_regs.h         \
738         linux/s390x/arch_rt_sigframe.c  \
739         linux/s390x/arch_sigreturn.c    \
740         linux/s390x/errnoent1.h         \
741         linux/s390x/get_error.c         \
742         linux/s390x/get_scno.c          \
743         linux/s390x/get_syscall_args.c  \
744         linux/s390x/ioctls_arch0.h      \
745         linux/s390x/ioctls_arch1.h      \
746         linux/s390x/ioctls_inc0.h       \
747         linux/s390x/ioctls_inc1.h       \
748         linux/s390x/raw_syscall.h       \
749         linux/s390x/rt_sigframe.h       \
750         linux/s390x/set_error.c         \
751         linux/s390x/set_scno.c          \
752         linux/s390x/signalent1.h        \
753         linux/s390x/syscallent.h        \
754         linux/s390x/syscallent1.h       \
755         linux/s390x/userent.h           \
756         linux/sh/arch_defs_.h           \
757         linux/sh/arch_getrval2.c        \
758         linux/sh/arch_regs.c            \
759         linux/sh/arch_rt_sigframe.c     \
760         linux/sh/get_error.c            \
761         linux/sh/get_scno.c             \
762         linux/sh/get_syscall_args.c     \
763         linux/sh/get_syscall_result.c   \
764         linux/sh/ioctls_arch0.h         \
765         linux/sh/ioctls_inc0.h          \
766         linux/sh/raw_syscall.h          \
767         linux/sh/set_error.c            \
768         linux/sh/set_scno.c             \
769         linux/sh/syscallent.h           \
770         linux/sh/userent.h              \
771         linux/sh/userent0.h             \
772         linux/sh64/arch_defs_.h         \
773         linux/sh64/arch_regs.c          \
774         linux/sh64/arch_regs.h          \
775         linux/sh64/arch_rt_sigframe.c   \
776         linux/sh64/get_error.c          \
777         linux/sh64/get_scno.c           \
778         linux/sh64/get_syscall_args.c   \
779         linux/sh64/get_syscall_result.c \
780         linux/sh64/ioctls_arch0.h       \
781         linux/sh64/ioctls_inc0.h        \
782         linux/sh64/raw_syscall.h        \
783         linux/sh64/rt_sigframe.h        \
784         linux/sh64/set_error.c          \
785         linux/sh64/set_scno.c           \
786         linux/sh64/syscallent.h         \
787         linux/sh64/userent.h            \
788         linux/shuffle_scno.c            \
789         linux/signalent.h               \
790         linux/smc_diag.h                \
791         linux/sock_diag.h               \
792         linux/sparc/arch_defs_.h        \
793         linux/sparc/arch_getrval2.c     \
794         linux/sparc/arch_regs.c         \
795         linux/sparc/arch_regs.h         \
796         linux/sparc/arch_rt_sigframe.c  \
797         linux/sparc/arch_sigreturn.c    \
798         linux/sparc/errnoent.h          \
799         linux/sparc/get_error.c         \
800         linux/sparc/get_scno.c          \
801         linux/sparc/get_syscall_args.c  \
802         linux/sparc/ioctls_arch0.h      \
803         linux/sparc/ioctls_inc0.h       \
804         linux/sparc/raw_syscall.h       \
805         linux/sparc/rt_sigframe.h       \
806         linux/sparc/set_error.c         \
807         linux/sparc/set_scno.c          \
808         linux/sparc/signalent.h         \
809         linux/sparc/syscallent.h        \
810         linux/sparc/userent.h           \
811         linux/sparc64/arch_defs_.h      \
812         linux/sparc64/arch_getrval2.c   \
813         linux/sparc64/arch_regs.c       \
814         linux/sparc64/arch_regs.h       \
815         linux/sparc64/arch_rt_sigframe.c        \
816         linux/sparc64/arch_sigreturn.c  \
817         linux/sparc64/errnoent.h        \
818         linux/sparc64/errnoent1.h       \
819         linux/sparc64/get_error.c       \
820         linux/sparc64/get_scno.c        \
821         linux/sparc64/get_syscall_args.c        \
822         linux/sparc64/ioctls_arch0.h    \
823         linux/sparc64/ioctls_arch1.h    \
824         linux/sparc64/ioctls_inc0.h     \
825         linux/sparc64/ioctls_inc1.h     \
826         linux/sparc64/raw_syscall.h     \
827         linux/sparc64/rt_sigframe.h     \
828         linux/sparc64/set_error.c       \
829         linux/sparc64/set_scno.c        \
830         linux/sparc64/signalent.h       \
831         linux/sparc64/signalent1.h      \
832         linux/sparc64/syscallent.h      \
833         linux/sparc64/syscallent1.h     \
834         linux/sparc64/userent.h         \
835         linux/subcall.h                 \
836         linux/syscall.h                 \
837         linux/tile/arch_defs_.h         \
838         linux/tile/arch_regs.c          \
839         linux/tile/arch_regs.h          \
840         linux/tile/arch_rt_sigframe.c   \
841         linux/tile/arch_sigreturn.c     \
842         linux/tile/errnoent1.h          \
843         linux/tile/get_error.c          \
844         linux/tile/get_scno.c           \
845         linux/tile/get_syscall_args.c   \
846         linux/tile/ioctls_arch0.h       \
847         linux/tile/ioctls_arch1.h       \
848         linux/tile/ioctls_inc0.h        \
849         linux/tile/ioctls_inc1.h        \
850         linux/tile/raw_syscall.h        \
851         linux/tile/rt_sigframe.h        \
852         linux/tile/set_error.c          \
853         linux/tile/set_scno.c           \
854         linux/tile/signalent1.h         \
855         linux/tile/syscallent.h         \
856         linux/tile/syscallent1.h        \
857         linux/tile/userent.h            \
858         linux/unix_diag.h               \
859         linux/userent.h                 \
860         linux/userent0.h                \
861         linux/x32/arch_defs_.h          \
862         linux/x32/arch_kvm.c            \
863         linux/x32/arch_regs.c           \
864         linux/x32/arch_regs.h           \
865         linux/x32/arch_rt_sigframe.c    \
866         linux/x32/arch_sigreturn.c      \
867         linux/x32/errnoent1.h           \
868         linux/x32/get_error.c           \
869         linux/x32/get_scno.c            \
870         linux/x32/get_syscall_args.c    \
871         linux/x32/ioctls_arch0.h        \
872         linux/x32/ioctls_arch1.h        \
873         linux/x32/ioctls_inc0.h         \
874         linux/x32/ioctls_inc1.h         \
875         linux/x32/raw_syscall.h         \
876         linux/x32/rt_sigframe.h         \
877         linux/x32/set_error.c           \
878         linux/x32/set_scno.c            \
879         linux/x32/shuffle_scno.c        \
880         linux/x32/signalent1.h          \
881         linux/x32/syscallent.h          \
882         linux/x32/syscallent1.h         \
883         linux/x32/userent.h             \
884         linux/x86_64/arch_defs_.h       \
885         linux/x86_64/arch_kvm.c         \
886         linux/x86_64/arch_regs.c        \
887         linux/x86_64/arch_regs.h        \
888         linux/x86_64/arch_rt_sigframe.c \
889         linux/x86_64/arch_sigreturn.c   \
890         linux/x86_64/errnoent1.h        \
891         linux/x86_64/errnoent2.h        \
892         linux/x86_64/get_error.c        \
893         linux/x86_64/get_scno.c         \
894         linux/x86_64/get_syscall_args.c \
895         linux/x86_64/getregs_old.c      \
896         linux/x86_64/getregs_old.h      \
897         linux/x86_64/ioctls_arch0.h     \
898         linux/x86_64/ioctls_arch1.h     \
899         linux/x86_64/ioctls_arch2.h     \
900         linux/x86_64/ioctls_inc0.h      \
901         linux/x86_64/ioctls_inc1.h      \
902         linux/x86_64/ioctls_inc2.h      \
903         linux/x86_64/raw_syscall.h      \
904         linux/x86_64/rt_sigframe.h      \
905         linux/x86_64/set_error.c        \
906         linux/x86_64/set_scno.c         \
907         linux/x86_64/shuffle_scno.c     \
908         linux/x86_64/signalent1.h       \
909         linux/x86_64/signalent2.h       \
910         linux/x86_64/syscallent.h       \
911         linux/x86_64/syscallent1.h      \
912         linux/x86_64/syscallent2.h      \
913         linux/x86_64/userent.h          \
914         linux/xtensa/arch_regs.c        \
915         linux/xtensa/arch_rt_sigframe.c \
916         linux/xtensa/get_error.c        \
917         linux/xtensa/get_scno.c         \
918         linux/xtensa/get_syscall_args.c \
919         linux/xtensa/get_syscall_result.c       \
920         linux/xtensa/ioctls_arch0.h     \
921         linux/xtensa/ioctls_inc0.h      \
922         linux/xtensa/raw_syscall.h      \
923         linux/xtensa/set_error.c        \
924         linux/xtensa/set_scno.c         \
925         linux/xtensa/syscallent.h       \
926         linux/xtensa/userent.h          \
927         mpers.awk                       \
928         mpers.sh                        \
929         mpers_test.sh                   \
930         mpers_xlat.h                    \
931         scno.head                       \
932         strace-graph                    \
933         strace-log-merge                \
934         strace.spec                     \
935         $(XLAT_INPUT_FILES)             \
936         $(XLAT_HEADER_FILES)            \
937         xlat/gen.sh                     \
938         # end of EXTRA_DIST
939
940 .PHONY: check-valgrind-local
941 check-valgrind-local:
942
943 .PHONY: srpm
944 srpm: dist-xz
945         rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
946
947 $(srcdir)/.version:
948         $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
949
950 strace_SOURCES_c = \
951         $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES))
952
953 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
954         for f in $^; do \
955                 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
956         done | sort -u > $@
957
958 syscallent_names = subcall.h syscallent.h syscallent1.h \
959                    syscallent-n32.h syscallent-n64.h syscallent-o32.h
960 syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
961 syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
962
963 sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
964         for f in $^; do cat -- $$f; done | \
965                 $(srcdir)/generate_sen.sh > $@
966
967 dist-hook:
968         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
969         ${AM_V_GEN}echo $(COPYRIGHT_YEAR) > $(distdir)/.year
970         ${AM_V_GEN}echo $(MANPAGE_DATE) > $(distdir)/.strace.1.in.date
971
972 today = $(shell date +%Y-%m-%d)
973 version_regexp = $(subst .,\.,$(VERSION))
974 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
975
976 news-check: NEWS
977         $(AM_V_GEN)if head -1 $< |                              \
978           grep -x $(news_check_regexp) >/dev/null; then         \
979                 :;                                              \
980         else                                                    \
981                 echo >&2 '$<: check failed';                    \
982                 exit 1;                                         \
983         fi
984
985 ioctlsort_CC = $(CC_FOR_BUILD)
986 ioctlsort_DEFS = $(DEFS)
987 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
988 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
989 ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
990 ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
991
992 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
993 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
994 ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h)))
995
996 ioctl_redefs%.h: ioctlent%.h ioctlent0.h
997         sort $< > $<-t
998         sort ioctlent0.h | comm -23 $<-t - | \
999                 sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
1000                 > $@-t
1001         rm -f $<-t
1002         mv $@-t $@
1003
1004 ioctlent%.h: ioctlsort%
1005         ./$< > $@
1006
1007 # Need to pick up <linux/ioctl.h> definitions *for host* while compiling
1008 # ioctlsort *for build*, hence this magic.
1009 ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c
1010         $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
1011                 $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@
1012
1013 ioctl_iocdef.h: ioctl_iocdef.i
1014         sed -n 's/^DEFINE HOST/#define /p' $< > $@
1015
1016 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
1017         $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
1018
1019 ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c
1020         $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
1021
1022 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
1023         cat $^ > $@
1024
1025 BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
1026                 native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
1027 CLEANFILES    = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
1028                 ioctl_iocdef.h ioctl_iocdef.i \
1029                 native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
1030 DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
1031
1032 include scno.am
1033
1034 $(strace_OBJECTS): scno.h
1035
1036 # defines mpers_source_files
1037 include mpers.am
1038 srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
1039 mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i)
1040
1041 mpers_NAME =
1042 mpers_PREFIX = $(mpers_NAME)_
1043 mpers_DEFS = $(DEFS)
1044 mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
1045 mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
1046 mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
1047 libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS
1048 libmpers_CFLAGS = $(strace_CFLAGS)
1049
1050 # mpers targets
1051
1052 mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
1053         for f in $^; do \
1054                 READELF="$(READELF)" \
1055                 CC="$(CC)" \
1056                 CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
1057                 CPP="$(CPP)" \
1058                 CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
1059                 $(srcdir)/mpers.sh $(mpers_NAME) $(mpers_CC_FLAGS) $$f || exit; \
1060         done
1061         > $@
1062
1063 m%_type_defs.h: $(srcdir_mpers_source_files)
1064         for f in $^; do \
1065                 sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
1066         done > $@-t
1067         echo '#undef MPERS_PRINTER_NAME' >> $@-t
1068         echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
1069         echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
1070         echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t
1071         mv $@-t $@
1072
1073 m%_funcs.h: $(srcdir_mpers_source_files)
1074         for f in $^; do \
1075                 sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
1076         done > $@-t && \
1077         echo '#include "sys_func.h"' >> $@-t
1078         mv $@-t $@
1079
1080 # printers
1081
1082 %.c.mpers.i: $(srcdir)/%.c
1083         $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@
1084
1085 mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$
1086
1087 printers.h: $(mpers_preproc_files)
1088         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
1089         echo 'typedef struct {' >> $@-t
1090         for f in $^; do \
1091                 sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
1092                 || exit; \
1093         done >> $@-t
1094         echo '} struct_printers;' >> $@-t
1095         echo 'extern const struct_printers *printers;' >> $@-t
1096         echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
1097         mv $@-t $@
1098
1099 %_printer_decls.h: $(mpers_preproc_files)
1100         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
1101         for f in $^; do \
1102                 sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
1103                 || exit; \
1104         done >> $@-t
1105         mv $@-t $@
1106
1107 %_printer_defs.h: $(mpers_preproc_files)
1108         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
1109         for f in $^; do \
1110                 sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \
1111                 || exit; \
1112         done >> $@-t
1113         mv $@-t $@
1114
1115 native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
1116
1117 if HAVE_M32_MPERS
1118
1119 strace_LDADD += libmpers-m32.a
1120 noinst_LIBRARIES += libmpers-m32.a
1121 libmpers_m32_a_SOURCES = $(mpers_source_files)
1122 libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
1123 libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS)
1124 mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
1125
1126 BUILT_SOURCES += $(mpers_m32_targets)
1127 CLEANFILES    += $(mpers_m32_targets)
1128
1129 $(mpers_m32_targets): mpers_NAME = m32
1130 $(mpers_m32_targets): mpers_CC_FLAGS = @cc_flags_m32@
1131
1132 endif # HAVE_M32_MPERS
1133
1134 if HAVE_MX32_MPERS
1135
1136 strace_LDADD += libmpers-mx32.a
1137 noinst_LIBRARIES += libmpers-mx32.a
1138 libmpers_mx32_a_SOURCES = $(mpers_source_files)
1139 libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
1140 libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS)
1141 mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
1142
1143 BUILT_SOURCES += $(mpers_mx32_targets)
1144 CLEANFILES    += $(mpers_mx32_targets)
1145
1146 $(mpers_mx32_targets): mpers_NAME = mx32
1147 $(mpers_mx32_targets): mpers_CC_FLAGS = @cc_flags_mx32@
1148
1149 endif # HAVE_MX32_MPERS
1150
1151 clean-local:
1152         -rm -rf mpers-m32 mpers-mx32
1153
1154 if MAINTAINER_MODE
1155
1156 gen_changelog_start_date = 2009-07-08 20:00
1157 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
1158                      $(srcdir)/.version
1159         @rm -f $@.new
1160         (cd $(srcdir); \
1161          ./gitlog-to-changelog --append-dot \
1162            --since='$(gen_changelog_start_date)'; \
1163          echo; echo; echo 'See ChangeLog-CVS for older changes.' \
1164         ) > $@.new
1165         chmod 444 $@.new
1166         mv -f $@.new $@
1167
1168 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
1169                    $(srcdir)/Makefile.in $(srcdir)/.version
1170         $(AM_V_GEN)                                                     \
1171         (                                                               \
1172           cd $(srcdir);                                                 \
1173           sed '/^##/,$$d' CREDITS.in;                                   \
1174           sed -n '1,/^##>/d; s/   */\t/; s/^./&/p' CREDITS.in           \
1175             | maint/gen-contributors-list.sh - -e HEAD --initial        \
1176             | sed 's/\t/ /g; s/^/\t/'                                   \
1177         ) > $@-t && mv $@-t $@
1178
1179 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
1180
1181 endif