]> granicus.if.org Git - strace/blob - Makefile.am
net: move fallback definitions of SOL_* constants to xlat/
[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
26 include xlat/Makemodule.am
27
28 strace_SOURCES =        \
29         access.c        \
30         affinity.c      \
31         aio.c           \
32         bjm.c           \
33         block.c         \
34         cacheflush.c    \
35         capability.c    \
36         caps0.h         \
37         caps1.h         \
38         chdir.c         \
39         chmod.c         \
40         clone.c         \
41         count.c         \
42         desc.c          \
43         dirent.c        \
44         evdev.c         \
45         execve.c        \
46         exit.c          \
47         fadvise.c       \
48         fallocate.c     \
49         fanotify.c      \
50         fchownat.c      \
51         file.c          \
52         futex.c         \
53         get_robust_list.c \
54         getcpu.c        \
55         getcwd.c        \
56         getrandom.c     \
57         hostname.c      \
58         inotify.c       \
59         io.c            \
60         ioctl.c         \
61         ioprio.c        \
62         ipc.c           \
63         kexec.c         \
64         keyctl.c        \
65         ldt.c           \
66         link.c          \
67         loop.c          \
68         lseek.c         \
69         mem.c           \
70         mknod.c         \
71         mount.c         \
72         mtd.c           \
73         net.c           \
74         open.c          \
75         or1k_atomic.c   \
76         pathtrace.c     \
77         personality.c   \
78         prctl.c         \
79         printmode.c     \
80         printsiginfo.c  \
81         printstat.h     \
82         process.c       \
83         process_vm.c    \
84         ptp.c           \
85         ptrace.h        \
86         quota.c         \
87         readahead.c     \
88         readlink.c      \
89         reboot.c        \
90         regs.h          \
91         renameat.c      \
92         resource.c      \
93         sched.c         \
94         scsi.c          \
95         seccomp.c       \
96         sigaltstack.c   \
97         signal.c        \
98         sigreturn.c     \
99         sock.c          \
100         socketutils.c   \
101         sram_alloc.c    \
102         statfs.c        \
103         strace.c        \
104         stream.c        \
105         swapon.c        \
106         sync_file_range.c \
107         syscall.c       \
108         sysctl.c        \
109         sysinfo.c       \
110         syslog.c        \
111         sysmips.c       \
112         term.c          \
113         time.c          \
114         truncate.c      \
115         uid.c           \
116         uid16.c         \
117         umask.c         \
118         umount.c        \
119         uname.c         \
120         util.c          \
121         utime.c         \
122         utimes.c        \
123         v4l2.c          \
124         vsprintf.c      \
125         wait.c          \
126         xattr.c         \
127         xmalloc.c
128
129 if USE_LIBUNWIND
130 strace_SOURCES += unwind.c
131 strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
132 strace_LDFLAGS = $(libunwind_LDFLAGS)
133 strace_LDADD = $(libunwind_LIBS)
134 else
135 strace_CPPFLAGS = $(AM_CPPFLAGS)
136 endif
137
138 noinst_HEADERS = defs.h
139 # Enable this to get link map generated
140 #strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
141
142 EXTRA_DIST =                            \
143         $(man_MANS)                     \
144         .version                        \
145         COPYING                         \
146         CREDITS                         \
147         ChangeLog                       \
148         ChangeLog-CVS                   \
149         README-linux-ptrace             \
150         debian/changelog                \
151         debian/compat                   \
152         debian/control                  \
153         debian/copyright                \
154         debian/rules                    \
155         debian/source/format            \
156         debian/strace-udeb.install      \
157         debian/strace.docs              \
158         debian/strace.examples          \
159         debian/strace.install           \
160         debian/strace.manpages          \
161         debian/strace64.install         \
162         debian/strace64.manpages        \
163         debian/watch                    \
164         errnoent.sh                     \
165         ioctlsort.c                     \
166         linux/32/ioctls_inc.h           \
167         linux/32/ioctls_inc_align32.h   \
168         linux/32/ioctls_inc_align64.h   \
169         linux/32/syscallent.h           \
170         linux/64/ioctls_inc.h           \
171         linux/64/syscallent.h           \
172         linux/aarch64/arch_regs.c       \
173         linux/aarch64/arch_regs.h       \
174         linux/aarch64/arch_sigreturn.c  \
175         linux/aarch64/errnoent1.h       \
176         linux/aarch64/get_error.c       \
177         linux/aarch64/get_scno.c        \
178         linux/aarch64/get_syscall_args.c\
179         linux/aarch64/ioctls_arch0.h    \
180         linux/aarch64/ioctls_arch1.h    \
181         linux/aarch64/ioctls_inc0.h     \
182         linux/aarch64/ioctls_inc1.h     \
183         linux/aarch64/print_pc.c        \
184         linux/aarch64/signalent1.h      \
185         linux/aarch64/syscallent.h      \
186         linux/aarch64/syscallent1.h     \
187         linux/alpha/arch_getrval2.c     \
188         linux/alpha/arch_regs.c         \
189         linux/alpha/arch_regs.h         \
190         linux/alpha/arch_sigreturn.c    \
191         linux/alpha/errnoent.h          \
192         linux/alpha/get_error.c         \
193         linux/alpha/get_scno.c          \
194         linux/alpha/get_syscall_args.c  \
195         linux/alpha/get_syscall_result.c\
196         linux/alpha/ioctls_arch0.h      \
197         linux/alpha/ioctls_inc0.h       \
198         linux/alpha/print_pc.c          \
199         linux/alpha/signalent.h         \
200         linux/alpha/syscallent.h        \
201         linux/alpha/userent.h           \
202         linux/arc/arch_regs.c           \
203         linux/arc/get_error.c           \
204         linux/arc/get_scno.c            \
205         linux/arc/get_syscall_args.c    \
206         linux/arc/ioctls_arch0.h        \
207         linux/arc/ioctls_inc0.h         \
208         linux/arc/print_pc.c            \
209         linux/arc/syscallent.h          \
210         linux/arch_regs.h               \
211         linux/arch_sigreturn.c          \
212         linux/arm/arch_regs.c           \
213         linux/arm/arch_regs.h           \
214         linux/arm/arch_sigreturn.c      \
215         linux/arm/get_error.c           \
216         linux/arm/get_scno.c            \
217         linux/arm/get_syscall_args.c    \
218         linux/arm/ioctls_arch0.h        \
219         linux/arm/ioctls_inc0.h         \
220         linux/arm/print_pc.c            \
221         linux/arm/syscallent.h          \
222         linux/arm/userent.h             \
223         linux/avr32/arch_regs.c         \
224         linux/avr32/get_error.c         \
225         linux/avr32/get_scno.c          \
226         linux/avr32/get_syscall_args.c  \
227         linux/avr32/ioctls_arch0.h      \
228         linux/avr32/ioctls_inc0.h       \
229         linux/avr32/print_pc.c          \
230         linux/avr32/syscallent.h        \
231         linux/avr32/userent.h           \
232         linux/bfin/arch_regs.c          \
233         linux/bfin/get_error.c          \
234         linux/bfin/get_scno.c           \
235         linux/bfin/get_syscall_args.c   \
236         linux/bfin/get_syscall_result.c \
237         linux/bfin/ioctls_arch0.h       \
238         linux/bfin/ioctls_inc0.h        \
239         linux/bfin/print_pc.c           \
240         linux/bfin/syscallent.h         \
241         linux/bfin/userent.h            \
242         linux/crisv10/arch_regs.c       \
243         linux/crisv10/arch_sigreturn.c  \
244         linux/crisv10/get_error.c       \
245         linux/crisv10/get_scno.c        \
246         linux/crisv10/get_syscall_args.c        \
247         linux/crisv10/get_syscall_result.c      \
248         linux/crisv10/print_pc.c        \
249         linux/crisv10/userent.h         \
250         linux/crisv32/arch_regs.c       \
251         linux/crisv32/arch_sigreturn.c  \
252         linux/crisv32/get_error.c       \
253         linux/crisv32/get_scno.c        \
254         linux/crisv32/get_syscall_args.c        \
255         linux/crisv32/get_syscall_result.c      \
256         linux/crisv32/print_pc.c        \
257         linux/crisv32/userent.h         \
258         linux/dummy.h                   \
259         linux/errnoent.h                \
260         linux/hppa/arch_regs.c          \
261         linux/hppa/arch_regs.h          \
262         linux/hppa/errnoent.h           \
263         linux/hppa/get_error.c          \
264         linux/hppa/get_scno.c           \
265         linux/hppa/get_syscall_args.c   \
266         linux/hppa/get_syscall_result.c \
267         linux/hppa/ioctls_arch0.h       \
268         linux/hppa/ioctls_inc0.h        \
269         linux/hppa/print_pc.c           \
270         linux/hppa/signalent.h          \
271         linux/hppa/syscallent.h         \
272         linux/i386/arch_regs.c          \
273         linux/i386/arch_regs.h          \
274         linux/i386/arch_sigreturn.c     \
275         linux/i386/get_error.c          \
276         linux/i386/get_scno.c           \
277         linux/i386/get_syscall_args.c   \
278         linux/i386/ioctls_arch0.h       \
279         linux/i386/ioctls_inc0.h        \
280         linux/i386/print_pc.c           \
281         linux/i386/syscallent.h         \
282         linux/i386/userent.h            \
283         linux/i386/userent0.h           \
284         linux/ia64/arch_getrval2.c      \
285         linux/ia64/arch_regs.c          \
286         linux/ia64/arch_regs.h          \
287         linux/ia64/arch_sigreturn.c     \
288         linux/ia64/get_error.c          \
289         linux/ia64/get_scno.c           \
290         linux/ia64/get_syscall_args.c   \
291         linux/ia64/ioctls_arch0.h       \
292         linux/ia64/ioctls_inc0.h        \
293         linux/ia64/print_pc.c           \
294         linux/ia64/syscallent.h         \
295         linux/ia64/userent.h            \
296         linux/inet_diag.h               \
297         linux/m68k/arch_regs.c          \
298         linux/m68k/arch_sigreturn.c     \
299         linux/m68k/get_error.c          \
300         linux/m68k/get_scno.c           \
301         linux/m68k/get_syscall_args.c   \
302         linux/m68k/get_syscall_result.c \
303         linux/m68k/ioctls_arch0.h       \
304         linux/m68k/ioctls_inc0.h        \
305         linux/m68k/print_pc.c           \
306         linux/m68k/syscallent.h         \
307         linux/m68k/userent.h            \
308         linux/metag/arch_regs.c         \
309         linux/metag/get_error.c         \
310         linux/metag/get_scno.c          \
311         linux/metag/get_syscall_args.c  \
312         linux/metag/ioctls_arch0.h      \
313         linux/metag/ioctls_inc0.h       \
314         linux/metag/print_pc.c          \
315         linux/metag/syscallent.h        \
316         linux/microblaze/arch_regs.c    \
317         linux/microblaze/arch_sigreturn.c       \
318         linux/microblaze/get_error.c    \
319         linux/microblaze/get_scno.c     \
320         linux/microblaze/get_syscall_args.c     \
321         linux/microblaze/get_syscall_result.c   \
322         linux/microblaze/ioctls_arch0.h \
323         linux/microblaze/ioctls_inc0.h  \
324         linux/microblaze/print_pc.c     \
325         linux/microblaze/syscallent.h   \
326         linux/microblaze/userent.h      \
327         linux/mips/arch_getrval2.c      \
328         linux/mips/arch_regs.c          \
329         linux/mips/arch_regs.h          \
330         linux/mips/arch_sigreturn.c     \
331         linux/mips/errnoent.h           \
332         linux/mips/genstub.sh           \
333         linux/mips/get_error.c          \
334         linux/mips/get_scno.c           \
335         linux/mips/get_syscall_args.c   \
336         linux/mips/ioctls_arch0.h       \
337         linux/mips/ioctls_inc0.h        \
338         linux/mips/print_pc.c           \
339         linux/mips/signalent.h          \
340         linux/mips/syscallent-compat.h  \
341         linux/mips/syscallent-n32.h     \
342         linux/mips/syscallent-n64.h     \
343         linux/mips/syscallent-o32.h     \
344         linux/mips/syscallent.h         \
345         linux/mips/userent.h            \
346         linux/mtd-abi.h                 \
347         linux/nios2/arch_regs.c         \
348         linux/nios2/get_error.c         \
349         linux/nios2/get_scno.c          \
350         linux/nios2/get_syscall_args.c  \
351         linux/nios2/ioctls_arch0.h      \
352         linux/nios2/ioctls_inc0.h       \
353         linux/nios2/print_pc.c          \
354         linux/nios2/syscallent.h        \
355         linux/or1k/arch_regs.c          \
356         linux/or1k/get_error.c          \
357         linux/or1k/get_scno.c           \
358         linux/or1k/get_syscall_args.c   \
359         linux/or1k/ioctls_arch0.h       \
360         linux/or1k/ioctls_inc0.h        \
361         linux/or1k/print_pc.c           \
362         linux/or1k/syscallent.h         \
363         linux/or1k/userent.h            \
364         linux/personality.h             \
365         linux/powerpc/arch_regs.c       \
366         linux/powerpc/arch_regs.h       \
367         linux/powerpc/arch_sigreturn.c  \
368         linux/powerpc/errnoent.h        \
369         linux/powerpc/get_error.c       \
370         linux/powerpc/get_scno.c        \
371         linux/powerpc/get_syscall_args.c        \
372         linux/powerpc/getregs_old.c     \
373         linux/powerpc/ioctls_arch0.h    \
374         linux/powerpc/ioctls_inc0.h     \
375         linux/powerpc/print_pc.c        \
376         linux/powerpc/syscallent.h      \
377         linux/powerpc/userent.h         \
378         linux/powerpc64/arch_regs.c     \
379         linux/powerpc64/arch_regs.h     \
380         linux/powerpc64/arch_sigreturn.c        \
381         linux/powerpc64/errnoent.h      \
382         linux/powerpc64/errnoent1.h     \
383         linux/powerpc64/get_error.c     \
384         linux/powerpc64/get_scno.c      \
385         linux/powerpc64/get_syscall_args.c      \
386         linux/powerpc64/getregs_old.c   \
387         linux/powerpc64/ioctls_arch0.h  \
388         linux/powerpc64/ioctls_arch1.h  \
389         linux/powerpc64/ioctls_inc0.h   \
390         linux/powerpc64/ioctls_inc1.h   \
391         linux/powerpc64/print_pc.c      \
392         linux/powerpc64/signalent1.h    \
393         linux/powerpc64/syscallent.h    \
394         linux/powerpc64/syscallent1.h   \
395         linux/powerpc64/userent.h       \
396         linux/ptp_clock.h               \
397         linux/s390/arch_regs.c          \
398         linux/s390/arch_regs.h          \
399         linux/s390/arch_sigreturn.c     \
400         linux/s390/get_error.c          \
401         linux/s390/get_scno.c           \
402         linux/s390/get_syscall_args.c   \
403         linux/s390/ioctls_arch0.h       \
404         linux/s390/ioctls_inc0.h        \
405         linux/s390/print_pc.c           \
406         linux/s390/syscallent.h         \
407         linux/s390/userent.h            \
408         linux/s390/userent0.h           \
409         linux/s390/userent1.h           \
410         linux/s390x/arch_regs.c         \
411         linux/s390x/arch_regs.h         \
412         linux/s390x/arch_sigreturn.c    \
413         linux/s390x/get_error.c         \
414         linux/s390x/get_scno.c          \
415         linux/s390x/get_syscall_args.c  \
416         linux/s390x/ioctls_arch0.h      \
417         linux/s390x/ioctls_inc0.h       \
418         linux/s390x/print_pc.c          \
419         linux/s390x/syscallent.h        \
420         linux/s390x/userent.h           \
421         linux/sh/arch_getrval2.c        \
422         linux/sh/arch_regs.c            \
423         linux/sh/get_error.c            \
424         linux/sh/get_scno.c             \
425         linux/sh/get_syscall_args.c     \
426         linux/sh/get_syscall_result.c   \
427         linux/sh/ioctls_arch0.h         \
428         linux/sh/ioctls_inc0.h          \
429         linux/sh/print_pc.c             \
430         linux/sh/syscallent.h           \
431         linux/sh/userent.h              \
432         linux/sh/userent0.h             \
433         linux/sh64/arch_regs.c          \
434         linux/sh64/arch_regs.h          \
435         linux/sh64/get_error.c          \
436         linux/sh64/get_scno.c           \
437         linux/sh64/get_syscall_args.c   \
438         linux/sh64/get_syscall_result.c \
439         linux/sh64/ioctls_arch0.h       \
440         linux/sh64/ioctls_inc0.h        \
441         linux/sh64/print_pc.c           \
442         linux/sh64/syscallent.h         \
443         linux/sh64/userent.h            \
444         linux/signalent.h               \
445         linux/sock_diag.h               \
446         linux/sparc/arch_getrval2.c     \
447         linux/sparc/arch_regs.c         \
448         linux/sparc/arch_regs.h         \
449         linux/sparc/arch_sigreturn.c    \
450         linux/sparc/errnoent.h          \
451         linux/sparc/gen.pl              \
452         linux/sparc/get_error.c         \
453         linux/sparc/get_scno.c          \
454         linux/sparc/get_syscall_args.c  \
455         linux/sparc/ioctls_arch0.h      \
456         linux/sparc/ioctls_inc0.h       \
457         linux/sparc/print_pc.c          \
458         linux/sparc/signalent.h         \
459         linux/sparc/syscallent.h        \
460         linux/sparc/userent.h           \
461         linux/sparc64/arch_getrval2.c   \
462         linux/sparc64/arch_regs.c       \
463         linux/sparc64/arch_regs.h       \
464         linux/sparc64/arch_sigreturn.c  \
465         linux/sparc64/errnoent.h        \
466         linux/sparc64/errnoent1.h       \
467         linux/sparc64/get_error.c       \
468         linux/sparc64/get_scno.c        \
469         linux/sparc64/get_syscall_args.c\
470         linux/sparc64/ioctls_arch0.h    \
471         linux/sparc64/ioctls_arch1.h    \
472         linux/sparc64/ioctls_inc0.h     \
473         linux/sparc64/ioctls_inc1.h     \
474         linux/sparc64/print_pc.c        \
475         linux/sparc64/signalent.h       \
476         linux/sparc64/signalent1.h      \
477         linux/sparc64/syscallent.h      \
478         linux/sparc64/syscallent1.h     \
479         linux/sparc64/userent.h         \
480         linux/subcall.h                 \
481         linux/syscall.h                 \
482         linux/tile/arch_regs.c          \
483         linux/tile/arch_regs.h          \
484         linux/tile/arch_sigreturn.c     \
485         linux/tile/errnoent1.h          \
486         linux/tile/get_error.c          \
487         linux/tile/get_scno.c           \
488         linux/tile/get_syscall_args.c   \
489         linux/tile/ioctls_arch0.h       \
490         linux/tile/ioctls_arch1.h       \
491         linux/tile/ioctls_inc0.h        \
492         linux/tile/ioctls_inc1.h        \
493         linux/tile/print_pc.c           \
494         linux/tile/signalent1.h         \
495         linux/tile/syscallent.h         \
496         linux/tile/syscallent1.h        \
497         linux/tile/userent.h            \
498         linux/ubi-user.h                \
499         linux/unix_diag.h               \
500         linux/userent.h                 \
501         linux/userent0.h                \
502         linux/x32/arch_regs.c           \
503         linux/x32/arch_regs.h           \
504         linux/x32/arch_sigreturn.c      \
505         linux/x32/errnoent1.h           \
506         linux/x32/get_error.c           \
507         linux/x32/get_scno.c            \
508         linux/x32/get_syscall_args.c    \
509         linux/x32/ioctls_arch0.h        \
510         linux/x32/ioctls_arch1.h        \
511         linux/x32/ioctls_inc0.h         \
512         linux/x32/ioctls_inc1.h         \
513         linux/x32/print_pc.c            \
514         linux/x32/signalent1.h          \
515         linux/x32/syscallent.h          \
516         linux/x32/syscallent1.h         \
517         linux/x32/userent.h             \
518         linux/x86_64/arch_regs.c        \
519         linux/x86_64/arch_regs.h        \
520         linux/x86_64/arch_sigreturn.c   \
521         linux/x86_64/errnoent1.h        \
522         linux/x86_64/errnoent2.h        \
523         linux/x86_64/gentab.pl          \
524         linux/x86_64/get_error.c        \
525         linux/x86_64/get_scno.c         \
526         linux/x86_64/get_syscall_args.c \
527         linux/x86_64/getregs_old.c      \
528         linux/x86_64/ioctls_arch0.h     \
529         linux/x86_64/ioctls_arch1.h     \
530         linux/x86_64/ioctls_arch2.h     \
531         linux/x86_64/ioctls_inc0.h      \
532         linux/x86_64/ioctls_inc1.h      \
533         linux/x86_64/ioctls_inc2.h      \
534         linux/x86_64/print_pc.c         \
535         linux/x86_64/signalent1.h       \
536         linux/x86_64/signalent2.h       \
537         linux/x86_64/syscallent.h       \
538         linux/x86_64/syscallent1.h      \
539         linux/x86_64/syscallent2.h      \
540         linux/x86_64/userent.h          \
541         linux/xtensa/arch_regs.c        \
542         linux/xtensa/get_error.c        \
543         linux/xtensa/get_scno.c         \
544         linux/xtensa/get_syscall_args.c \
545         linux/xtensa/get_syscall_result.c       \
546         linux/xtensa/ioctls_arch0.h     \
547         linux/xtensa/ioctls_inc0.h      \
548         linux/xtensa/print_pc.c         \
549         linux/xtensa/syscallent.h       \
550         linux/xtensa/userent.h          \
551         maint/ioctls_gen.sh             \
552         maint/ioctls_hex.sh             \
553         maint/ioctls_sym.sh             \
554         maint/print_ioctlent.c          \
555         signalent.sh                    \
556         strace-graph                    \
557         strace-log-merge                \
558         strace.spec                     \
559         syscallent.sh                   \
560         $(XLAT_INPUT_FILES)             \
561         $(XLAT_HEADER_FILES)            \
562         xlat/gen.sh                     \
563         xlate.el
564
565 .PHONY: srpm
566 srpm: dist-xz
567         rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
568
569 BUILT_SOURCES = .version sys_func.h
570
571 $(srcdir)/.version:
572         $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
573
574 strace_SOURCES_c = $(filter %.c,$(strace_SOURCES))
575
576 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
577         for f in $^; do \
578                 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
579         done | sort -u > $@
580
581 dist-hook:
582         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
583
584 today = $(shell date +%Y-%m-%d)
585 version_regexp = $(subst .,\.,$(VERSION))
586 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
587
588 news-check: NEWS
589         $(AM_V_GEN)if head -1 $< |                              \
590           grep -x $(news_check_regexp) >/dev/null; then         \
591                 :;                                              \
592         else                                                    \
593                 echo >&2 '$<: check failed';                    \
594                 exit 1;                                         \
595         fi
596
597 ioctlsort_CC = $(CC_FOR_BUILD)
598 ioctlsort_DEFS = $(DEFS)
599 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
600 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
601 ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
602 ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
603
604 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
605 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
606 BUILT_SOURCES += $(ioctlent_h)
607 CLEANFILES = sys_func.h $(ioctlent_h)
608
609 ioctlent%.h: ioctlsort%
610         ./$< > $@
611
612 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
613         $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
614
615 ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
616         $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
617
618 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
619         cat $^ > $@
620
621 if MAINTAINER_MODE
622
623 gen_changelog_start_date = 2009-07-08 20:00
624 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
625                      $(srcdir)/.version
626         @rm -f $@.new
627         (cd $(srcdir); \
628          ./gitlog-to-changelog --append-dot \
629            --since='$(gen_changelog_start_date)'; \
630          echo; echo; echo 'See ChangeLog-CVS for older changes.' \
631         ) > $@.new
632         chmod 444 $@.new
633         mv -f $@.new $@
634
635 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
636                    $(srcdir)/Makefile.in $(srcdir)/.version
637         $(AM_V_GEN)                                                     \
638         (                                                               \
639           cd $(srcdir);                                                 \
640           sed '/^##/,$$d' CREDITS.in;                                   \
641           { sed -n '1,/^##>/d; s/  \+/\t/; s/^./&/p' CREDITS.in;        \
642             git log --pretty=format:'%aN        %aE';                   \
643           } | LC_ALL=C sort -u                                          \
644             | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}';             \
645         ) > $@-t && mv $@-t $@
646
647 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
648
649 endif