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