1 # Automake input for strace.
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>
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in the
16 # documentation and/or other materials provided with the distribution.
17 # 3. The name of the author may not be used to endorse or promote products
18 # derived from this software without specific prior written permission.
20 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 TESTS_MX32 = tests-mx32
37 SUBDIRS = tests $(TESTS_M32) $(TESTS_MX32)
41 bin_SCRIPTS = strace-graph strace-log-merge
44 # ARCH is `i386', `m68k', `sparc', etc.
47 ACLOCAL_AMFLAGS = -I m4
48 AM_CFLAGS = $(WARN_CFLAGS)
49 AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
50 -I$(srcdir)/$(OS)/$(ARCH) \
56 AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD)
57 AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS)
59 include xlat/Makemodule.am
61 strace_CPPFLAGS = $(AM_CPPFLAGS)
62 strace_CFLAGS = $(AM_CFLAGS)
64 strace_LDADD = libstrace.a
65 noinst_LIBRARIES = libstrace.a
67 libstrace_a_CPPFLAGS = $(strace_CPPFLAGS)
68 libstrace_a_CFLAGS = $(strace_CFLAGS)
69 libstrace_a_SOURCES = \
80 # end of libstrace_a_SOURCES
115 fetch_seccomp_fprog.c \
116 fetch_struct_flock.c \
117 fetch_struct_mmsghdr.c \
118 fetch_struct_msghdr.c \
119 fetch_struct_stat.c \
120 fetch_struct_stat64.c \
121 fetch_struct_statfs.c \
154 linux/x32/asm_stat.h \
155 linux/x86_64/asm_stat.h \
180 perf_event_struct.h \
188 print_sg_req_info.c \
191 print_struct_stat.c \
263 # end of strace_SOURCES
266 strace_SOURCES += unwind.c
267 strace_CPPFLAGS += $(libunwind_CPPFLAGS)
268 strace_LDFLAGS += $(libunwind_LDFLAGS)
269 strace_LDADD += $(libunwind_LIBS)
272 @CODE_COVERAGE_RULES@
273 CODE_COVERAGE_BRANCH_COVERAGE = 1
274 CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
275 --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
276 CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
277 strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
278 strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
279 strace_LDADD += $(CODE_COVERAGE_LDFLAGS)
281 # Enable this to get link map generated
282 #strace_LDFLAGS += -Wl,-Map=strace.mapfile
291 README-linux-ptrace \
297 debian/source/format \
298 debian/strace-udeb.install \
300 debian/strace.examples \
301 debian/strace.install \
302 debian/strace.manpages \
303 debian/strace64.install \
304 debian/strace64.manpages \
310 linux/32/ioctls_inc.h \
311 linux/32/ioctls_inc_align16.h \
312 linux/32/ioctls_inc_align32.h \
313 linux/32/ioctls_inc_align64.h \
314 linux/32/syscallent.h \
315 linux/64/ioctls_inc.h \
316 linux/64/syscallent.h \
317 linux/aarch64/arch_regs.c \
318 linux/aarch64/arch_regs.h \
319 linux/aarch64/arch_sigreturn.c \
320 linux/aarch64/errnoent1.h \
321 linux/aarch64/get_error.c \
322 linux/aarch64/get_scno.c \
323 linux/aarch64/get_syscall_args.c\
324 linux/aarch64/ioctls_arch0.h \
325 linux/aarch64/ioctls_arch1.h \
326 linux/aarch64/ioctls_inc0.h \
327 linux/aarch64/ioctls_inc1.h \
328 linux/aarch64/set_error.c \
329 linux/aarch64/set_scno.c \
330 linux/aarch64/signalent1.h \
331 linux/aarch64/syscallent.h \
332 linux/aarch64/syscallent1.h \
333 linux/alpha/arch_getrval2.c \
334 linux/alpha/arch_regs.c \
335 linux/alpha/arch_regs.h \
336 linux/alpha/arch_sigreturn.c \
337 linux/alpha/errnoent.h \
338 linux/alpha/get_error.c \
339 linux/alpha/get_scno.c \
340 linux/alpha/get_syscall_args.c \
341 linux/alpha/get_syscall_result.c\
342 linux/alpha/ioctls_arch0.h \
343 linux/alpha/ioctls_inc0.h \
344 linux/alpha/set_error.c \
345 linux/alpha/set_scno.c \
346 linux/alpha/signalent.h \
347 linux/alpha/syscallent.h \
348 linux/alpha/userent.h \
349 linux/arc/arch_regs.c \
350 linux/arc/arch_regs.h \
351 linux/arc/get_error.c \
352 linux/arc/get_scno.c \
353 linux/arc/get_syscall_args.c \
354 linux/arc/ioctls_arch0.h \
355 linux/arc/ioctls_inc0.h \
356 linux/arc/set_error.c \
357 linux/arc/set_scno.c \
358 linux/arc/syscallent.h \
360 linux/arch_sigreturn.c \
361 linux/arm/arch_regs.c \
362 linux/arm/arch_regs.h \
363 linux/arm/arch_sigreturn.c \
364 linux/arm/get_error.c \
365 linux/arm/get_scno.c \
366 linux/arm/get_syscall_args.c \
367 linux/arm/ioctls_arch0.h \
368 linux/arm/ioctls_inc0.h \
369 linux/arm/set_error.c \
370 linux/arm/set_scno.c \
371 linux/arm/syscallent.h \
372 linux/arm/userent.h \
373 linux/avr32/arch_regs.c \
374 linux/avr32/arch_regs.h \
375 linux/avr32/get_error.c \
376 linux/avr32/get_scno.c \
377 linux/avr32/get_syscall_args.c \
378 linux/avr32/ioctls_arch0.h \
379 linux/avr32/ioctls_inc0.h \
380 linux/avr32/set_error.c \
381 linux/avr32/set_scno.c \
382 linux/avr32/syscallent.h \
383 linux/avr32/userent.h \
384 linux/bfin/arch_regs.c \
385 linux/bfin/get_error.c \
386 linux/bfin/get_scno.c \
387 linux/bfin/get_syscall_args.c \
388 linux/bfin/get_syscall_result.c \
389 linux/bfin/ioctls_arch0.h \
390 linux/bfin/ioctls_inc0.h \
391 linux/bfin/set_error.c \
392 linux/bfin/set_scno.c \
393 linux/bfin/syscallent.h \
394 linux/bfin/userent.h \
395 linux/crisv10/arch_regs.c \
396 linux/crisv10/arch_sigreturn.c \
397 linux/crisv10/get_error.c \
398 linux/crisv10/get_scno.c \
399 linux/crisv10/get_syscall_args.c \
400 linux/crisv10/get_syscall_result.c \
401 linux/crisv10/set_error.c \
402 linux/crisv10/set_scno.c \
403 linux/crisv10/syscallent.h \
404 linux/crisv10/userent.h \
405 linux/crisv32/arch_regs.c \
406 linux/crisv32/arch_sigreturn.c \
407 linux/crisv32/get_error.c \
408 linux/crisv32/get_scno.c \
409 linux/crisv32/get_syscall_args.c \
410 linux/crisv32/get_syscall_result.c \
411 linux/crisv32/set_error.c \
412 linux/crisv32/set_scno.c \
413 linux/crisv32/syscallent.h \
414 linux/crisv32/userent.h \
417 linux/getregs_old.h \
418 linux/hppa/arch_regs.c \
419 linux/hppa/arch_regs.h \
420 linux/hppa/errnoent.h \
421 linux/hppa/get_error.c \
422 linux/hppa/get_scno.c \
423 linux/hppa/get_syscall_args.c \
424 linux/hppa/get_syscall_result.c \
425 linux/hppa/ioctls_arch0.h \
426 linux/hppa/ioctls_inc0.h \
427 linux/hppa/set_error.c \
428 linux/hppa/set_scno.c \
429 linux/hppa/signalent.h \
430 linux/hppa/syscallent.h \
431 linux/i386/arch_regs.c \
432 linux/i386/arch_regs.h \
433 linux/i386/arch_sigreturn.c \
434 linux/i386/get_error.c \
435 linux/i386/get_scno.c \
436 linux/i386/get_syscall_args.c \
437 linux/i386/ioctls_arch0.h \
438 linux/i386/ioctls_inc0.h \
439 linux/i386/set_error.c \
440 linux/i386/set_scno.c \
441 linux/i386/syscallent.h \
442 linux/i386/userent.h \
443 linux/i386/userent0.h \
444 linux/ia64/arch_getrval2.c \
445 linux/ia64/arch_regs.c \
446 linux/ia64/arch_regs.h \
447 linux/ia64/arch_sigreturn.c \
448 linux/ia64/get_error.c \
449 linux/ia64/get_scno.c \
450 linux/ia64/get_syscall_args.c \
451 linux/ia64/ioctls_arch0.h \
452 linux/ia64/ioctls_inc0.h \
453 linux/ia64/set_error.c \
454 linux/ia64/set_scno.c \
455 linux/ia64/syscallent.h \
456 linux/ia64/userent.h \
458 linux/m68k/arch_regs.c \
459 linux/m68k/arch_regs.h \
460 linux/m68k/arch_sigreturn.c \
461 linux/m68k/get_error.c \
462 linux/m68k/get_scno.c \
463 linux/m68k/get_syscall_args.c \
464 linux/m68k/ioctls_arch0.h \
465 linux/m68k/ioctls_inc0.h \
466 linux/m68k/set_error.c \
467 linux/m68k/set_scno.c \
468 linux/m68k/syscallent.h \
469 linux/m68k/userent.h \
470 linux/metag/arch_regs.c \
471 linux/metag/arch_regs.h \
472 linux/metag/get_error.c \
473 linux/metag/get_scno.c \
474 linux/metag/get_syscall_args.c \
475 linux/metag/ioctls_arch0.h \
476 linux/metag/ioctls_inc0.h \
477 linux/metag/set_error.c \
478 linux/metag/set_scno.c \
479 linux/metag/syscallent.h \
480 linux/microblaze/arch_regs.c \
481 linux/microblaze/arch_sigreturn.c \
482 linux/microblaze/get_error.c \
483 linux/microblaze/get_scno.c \
484 linux/microblaze/get_syscall_args.c \
485 linux/microblaze/get_syscall_result.c \
486 linux/microblaze/ioctls_arch0.h \
487 linux/microblaze/ioctls_inc0.h \
488 linux/microblaze/set_error.c \
489 linux/microblaze/set_scno.c \
490 linux/microblaze/syscallent.h \
491 linux/microblaze/userent.h \
492 linux/mips/arch_getrval2.c \
493 linux/mips/arch_regs.c \
494 linux/mips/arch_regs.h \
495 linux/mips/arch_sigreturn.c \
496 linux/mips/errnoent.h \
497 linux/mips/genstub.sh \
498 linux/mips/get_error.c \
499 linux/mips/get_scno.c \
500 linux/mips/get_syscall_args.c \
501 linux/mips/ioctls_arch0.h \
502 linux/mips/ioctls_inc0.h \
503 linux/mips/set_error.c \
504 linux/mips/set_scno.c \
505 linux/mips/signalent.h \
506 linux/mips/syscallent-compat.h \
507 linux/mips/syscallent-n32.h \
508 linux/mips/syscallent-n64.h \
509 linux/mips/syscallent-o32.h \
510 linux/mips/syscallent.h \
511 linux/mips/userent.h \
513 linux/netlink_diag.h \
514 linux/nios2/arch_regs.c \
515 linux/nios2/get_error.c \
516 linux/nios2/get_scno.c \
517 linux/nios2/get_syscall_args.c \
518 linux/nios2/ioctls_arch0.h \
519 linux/nios2/ioctls_inc0.h \
520 linux/nios2/set_error.c \
521 linux/nios2/set_scno.c \
522 linux/nios2/syscallent.h \
523 linux/or1k/arch_regs.c \
524 linux/or1k/get_error.c \
525 linux/or1k/get_scno.c \
526 linux/or1k/get_syscall_args.c \
527 linux/or1k/ioctls_arch0.h \
528 linux/or1k/ioctls_inc0.h \
529 linux/or1k/set_error.c \
530 linux/or1k/set_scno.c \
531 linux/or1k/syscallent.h \
532 linux/or1k/userent.h \
533 linux/personality.h \
534 linux/powerpc/arch_regs.c \
535 linux/powerpc/arch_regs.h \
536 linux/powerpc/arch_sigreturn.c \
537 linux/powerpc/errnoent.h \
538 linux/powerpc/get_error.c \
539 linux/powerpc/get_scno.c \
540 linux/powerpc/get_syscall_args.c \
541 linux/powerpc/getregs_old.c \
542 linux/powerpc/getregs_old.h \
543 linux/powerpc/ioctls_arch0.h \
544 linux/powerpc/ioctls_inc0.h \
545 linux/powerpc/set_error.c \
546 linux/powerpc/set_scno.c \
547 linux/powerpc/syscallent.h \
548 linux/powerpc/userent.h \
549 linux/powerpc64/arch_regs.c \
550 linux/powerpc64/arch_regs.h \
551 linux/powerpc64/arch_sigreturn.c \
552 linux/powerpc64/errnoent.h \
553 linux/powerpc64/errnoent1.h \
554 linux/powerpc64/get_error.c \
555 linux/powerpc64/get_scno.c \
556 linux/powerpc64/get_syscall_args.c \
557 linux/powerpc64/getregs_old.c \
558 linux/powerpc64/getregs_old.h \
559 linux/powerpc64/ioctls_arch0.h \
560 linux/powerpc64/ioctls_arch1.h \
561 linux/powerpc64/ioctls_inc0.h \
562 linux/powerpc64/ioctls_inc1.h \
563 linux/powerpc64/set_error.c \
564 linux/powerpc64/set_scno.c \
565 linux/powerpc64/signalent1.h \
566 linux/powerpc64/syscallent.h \
567 linux/powerpc64/syscallent1.h \
568 linux/powerpc64/userent.h \
570 linux/riscv/arch_regs.c \
571 linux/riscv/errnoent1.h \
572 linux/riscv/get_error.c \
573 linux/riscv/get_scno.c \
574 linux/riscv/get_syscall_args.c \
575 linux/riscv/ioctls_arch0.h \
576 linux/riscv/ioctls_arch1.h \
577 linux/riscv/ioctls_inc0.h \
578 linux/riscv/ioctls_inc1.h \
579 linux/riscv/set_error.c \
580 linux/riscv/set_scno.c \
581 linux/riscv/signalent1.h \
582 linux/riscv/syscallent.h \
583 linux/riscv/syscallent1.h \
584 linux/s390/arch_regs.c \
585 linux/s390/arch_regs.h \
586 linux/s390/arch_sigreturn.c \
587 linux/s390/get_error.c \
588 linux/s390/get_scno.c \
589 linux/s390/get_syscall_args.c \
590 linux/s390/ioctls_arch0.h \
591 linux/s390/ioctls_inc0.h \
592 linux/s390/set_error.c \
593 linux/s390/set_scno.c \
594 linux/s390/syscallent.h \
595 linux/s390/userent.h \
596 linux/s390/userent0.h \
597 linux/s390/userent1.h \
598 linux/s390x/arch_regs.c \
599 linux/s390x/arch_regs.h \
600 linux/s390x/arch_sigreturn.c \
601 linux/s390x/get_error.c \
602 linux/s390x/get_scno.c \
603 linux/s390x/get_syscall_args.c \
604 linux/s390x/ioctls_arch0.h \
605 linux/s390x/ioctls_inc0.h \
606 linux/s390x/set_error.c \
607 linux/s390x/set_scno.c \
608 linux/s390x/syscallent.h \
609 linux/s390x/userent.h \
610 linux/sh/arch_getrval2.c \
611 linux/sh/arch_regs.c \
612 linux/sh/get_error.c \
613 linux/sh/get_scno.c \
614 linux/sh/get_syscall_args.c \
615 linux/sh/get_syscall_result.c \
616 linux/sh/ioctls_arch0.h \
617 linux/sh/ioctls_inc0.h \
618 linux/sh/set_error.c \
619 linux/sh/set_scno.c \
620 linux/sh/syscallent.h \
622 linux/sh/userent0.h \
623 linux/sh64/arch_regs.c \
624 linux/sh64/arch_regs.h \
625 linux/sh64/get_error.c \
626 linux/sh64/get_scno.c \
627 linux/sh64/get_syscall_args.c \
628 linux/sh64/get_syscall_result.c \
629 linux/sh64/ioctls_arch0.h \
630 linux/sh64/ioctls_inc0.h \
631 linux/sh64/set_error.c \
632 linux/sh64/set_scno.c \
633 linux/sh64/syscallent.h \
634 linux/sh64/userent.h \
637 linux/sparc/arch_getrval2.c \
638 linux/sparc/arch_regs.c \
639 linux/sparc/arch_regs.h \
640 linux/sparc/arch_sigreturn.c \
641 linux/sparc/errnoent.h \
643 linux/sparc/get_error.c \
644 linux/sparc/get_scno.c \
645 linux/sparc/get_syscall_args.c \
646 linux/sparc/ioctls_arch0.h \
647 linux/sparc/ioctls_inc0.h \
648 linux/sparc/set_error.c \
649 linux/sparc/set_scno.c \
650 linux/sparc/signalent.h \
651 linux/sparc/syscallent.h \
652 linux/sparc/userent.h \
653 linux/sparc64/arch_getrval2.c \
654 linux/sparc64/arch_regs.c \
655 linux/sparc64/arch_regs.h \
656 linux/sparc64/arch_sigreturn.c \
657 linux/sparc64/errnoent.h \
658 linux/sparc64/errnoent1.h \
659 linux/sparc64/get_error.c \
660 linux/sparc64/get_scno.c \
661 linux/sparc64/get_syscall_args.c\
662 linux/sparc64/ioctls_arch0.h \
663 linux/sparc64/ioctls_arch1.h \
664 linux/sparc64/ioctls_inc0.h \
665 linux/sparc64/ioctls_inc1.h \
666 linux/sparc64/set_error.c \
667 linux/sparc64/set_scno.c \
668 linux/sparc64/signalent.h \
669 linux/sparc64/signalent1.h \
670 linux/sparc64/syscallent.h \
671 linux/sparc64/syscallent1.h \
672 linux/sparc64/userent.h \
675 linux/tile/arch_regs.c \
676 linux/tile/arch_regs.h \
677 linux/tile/arch_sigreturn.c \
678 linux/tile/errnoent1.h \
679 linux/tile/get_error.c \
680 linux/tile/get_scno.c \
681 linux/tile/get_syscall_args.c \
682 linux/tile/ioctls_arch0.h \
683 linux/tile/ioctls_arch1.h \
684 linux/tile/ioctls_inc0.h \
685 linux/tile/ioctls_inc1.h \
686 linux/tile/set_error.c \
687 linux/tile/set_scno.c \
688 linux/tile/signalent1.h \
689 linux/tile/syscallent.h \
690 linux/tile/syscallent1.h \
691 linux/tile/userent.h \
696 linux/x32/arch_regs.c \
697 linux/x32/arch_regs.h \
698 linux/x32/arch_sigreturn.c \
699 linux/x32/errnoent1.h \
700 linux/x32/get_error.c \
701 linux/x32/get_scno.c \
702 linux/x32/get_syscall_args.c \
703 linux/x32/ioctls_arch0.h \
704 linux/x32/ioctls_arch1.h \
705 linux/x32/ioctls_inc0.h \
706 linux/x32/ioctls_inc1.h \
707 linux/x32/set_error.c \
708 linux/x32/set_scno.c \
709 linux/x32/signalent1.h \
710 linux/x32/syscallent.h \
711 linux/x32/syscallent1.h \
712 linux/x32/userent.h \
713 linux/x86_64/arch_regs.c \
714 linux/x86_64/arch_regs.h \
715 linux/x86_64/arch_sigreturn.c \
716 linux/x86_64/errnoent1.h \
717 linux/x86_64/errnoent2.h \
718 linux/x86_64/gentab.pl \
719 linux/x86_64/get_error.c \
720 linux/x86_64/get_scno.c \
721 linux/x86_64/get_syscall_args.c \
722 linux/x86_64/getregs_old.c \
723 linux/x86_64/getregs_old.h \
724 linux/x86_64/ioctls_arch0.h \
725 linux/x86_64/ioctls_arch1.h \
726 linux/x86_64/ioctls_arch2.h \
727 linux/x86_64/ioctls_inc0.h \
728 linux/x86_64/ioctls_inc1.h \
729 linux/x86_64/ioctls_inc2.h \
730 linux/x86_64/set_error.c \
731 linux/x86_64/set_scno.c \
732 linux/x86_64/signalent1.h \
733 linux/x86_64/signalent2.h \
734 linux/x86_64/syscallent.h \
735 linux/x86_64/syscallent1.h \
736 linux/x86_64/syscallent2.h \
737 linux/x86_64/userent.h \
738 linux/xtensa/arch_regs.c \
739 linux/xtensa/get_error.c \
740 linux/xtensa/get_scno.c \
741 linux/xtensa/get_syscall_args.c \
742 linux/xtensa/get_syscall_result.c \
743 linux/xtensa/ioctls_arch0.h \
744 linux/xtensa/ioctls_inc0.h \
745 linux/xtensa/set_error.c \
746 linux/xtensa/set_scno.c \
747 linux/xtensa/syscallent.h \
748 linux/xtensa/userent.h \
749 maint/ioctls_gen.sh \
750 maint/ioctls_hex.sh \
751 maint/ioctls_sym.sh \
752 maint/print_ioctlent.c \
763 $(XLAT_INPUT_FILES) \
764 $(XLAT_HEADER_FILES) \
768 .PHONY: check-valgrind-local
769 check-valgrind-local:
773 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
776 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
779 $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES))
781 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
783 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
786 syscallent_names = subcall.h syscallent.h syscallent1.h \
787 syscallent-n32.h syscallent-n64.h syscallent-o32.h
788 syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
789 syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
791 sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
792 for f in $^; do cat -- $$f; done | \
793 $(srcdir)/generate_sen.sh > $@
796 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
798 today = $(shell date +%Y-%m-%d)
799 version_regexp = $(subst .,\.,$(VERSION))
800 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
803 $(AM_V_GEN)if head -1 $< | \
804 grep -x $(news_check_regexp) >/dev/null; then \
807 echo >&2 '$<: check failed'; \
811 ioctlsort_CC = $(CC_FOR_BUILD)
812 ioctlsort_DEFS = $(DEFS)
813 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
814 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
815 ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
816 ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
818 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
819 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
820 ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h)))
822 ioctl_redefs%.h: ioctlent%.h ioctlent0.h
824 sort ioctlent0.h | comm -23 $<-t - | \
825 sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
830 ioctlent%.h: ioctlsort%
833 # Need to pick up <linux/ioctl.h> definitions *for host* while compiling
834 # ioctlsort *for build*, hence this magic.
835 ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c
836 $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
837 $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@
839 ioctl_iocdef.h: ioctl_iocdef.i
840 sed -n 's/^DEFINE HOST/#define /p' $< > $@
842 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
843 $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
845 ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c
846 $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
848 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
851 BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
852 native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
853 CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
854 ioctl_iocdef.h ioctl_iocdef.i \
855 native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
856 DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
860 $(strace_OBJECTS): scno.h
862 # defines mpers_source_files
864 srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
865 mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i)
868 mpers_PREFIX = $(mpers_NAME)_
870 mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
871 mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
872 mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
873 libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS
874 libmpers_CFLAGS = $(strace_CFLAGS)
878 mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
880 CC="$(CC)" CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
881 CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
882 $(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
886 m%_type_defs.h: $(srcdir_mpers_source_files)
888 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; \
890 echo '#undef MPERS_PRINTER_NAME' >> $@-t
891 echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
892 echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
893 echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t
896 m%_funcs.h: $(srcdir_mpers_source_files)
898 sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
900 echo '#include "sys_func.h"' >> $@-t
905 %.c.mpers.i: $(srcdir)/%.c
906 $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@
908 mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$
910 printers.h: $(mpers_preproc_files)
911 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
912 echo 'typedef struct {' >> $@-t
914 sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
917 echo '} struct_printers;' >> $@-t
918 echo 'extern const struct_printers *printers;' >> $@-t
919 echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
922 %_printer_decls.h: $(mpers_preproc_files)
923 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
925 sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
930 %_printer_defs.h: $(mpers_preproc_files)
931 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
933 sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \
938 native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
942 strace_LDADD += libmpers-m32.a
943 noinst_LIBRARIES += libmpers-m32.a
944 libmpers_m32_a_SOURCES = $(mpers_source_files)
945 libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
946 libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS)
947 mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
949 BUILT_SOURCES += $(mpers_m32_targets)
950 CLEANFILES += $(mpers_m32_targets)
952 $(mpers_m32_targets): mpers_NAME = m32
954 endif # HAVE_M32_MPERS
958 strace_LDADD += libmpers-mx32.a
959 noinst_LIBRARIES += libmpers-mx32.a
960 libmpers_mx32_a_SOURCES = $(mpers_source_files)
961 libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
962 libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS)
963 mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
965 BUILT_SOURCES += $(mpers_mx32_targets)
966 CLEANFILES += $(mpers_mx32_targets)
968 $(mpers_mx32_targets): mpers_NAME = mx32
970 endif # HAVE_MX32_MPERS
973 -rm -rf mpers-m32 mpers-mx32
977 gen_changelog_start_date = 2009-07-08 20:00
978 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
982 ./gitlog-to-changelog --append-dot \
983 --since='$(gen_changelog_start_date)'; \
984 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
989 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
990 $(srcdir)/Makefile.in $(srcdir)/.version
994 sed '/^##/,$$d' CREDITS.in; \
995 { sed -n '1,/^##>/d; s/ */\t/; s/^./&/p' CREDITS.in; \
996 git log --pretty=format:'%aN %aE'; \
997 } | LC_ALL=C sort -u \
998 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
999 ) > $@-t && mv $@-t $@
1001 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX