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