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 include xlat/Makemodule.am
58 strace_CPPFLAGS = $(AM_CPPFLAGS)
59 strace_CFLAGS = $(AM_CFLAGS)
61 strace_LDADD = libstrace.a
62 noinst_LIBRARIES = libstrace.a
64 libstrace_a_CPPFLAGS = $(strace_CPPFLAGS)
65 libstrace_a_CFLAGS = $(strace_CFLAGS)
66 libstrace_a_SOURCES = \
68 # end of libstrace_a_SOURCES
101 fetch_seccomp_fprog.c \
102 fetch_struct_flock.c \
133 linux/x32/asm_stat.h \
216 # end of strace_SOURCES
219 strace_SOURCES += unwind.c
220 strace_CPPFLAGS += $(libunwind_CPPFLAGS)
221 strace_LDFLAGS += $(libunwind_LDFLAGS)
222 strace_LDADD += $(libunwind_LIBS)
225 @CODE_COVERAGE_RULES@
226 CODE_COVERAGE_LCOV_OPTIONS = \
227 $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) --rc lcov_branch_coverage=1
228 CODE_COVERAGE_GENHTML_OPTIONS = --rc lcov_branch_coverage=1
229 CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
230 strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
231 strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
232 strace_LDADD += $(CODE_COVERAGE_LDFLAGS)
234 # Enable this to get link map generated
235 #strace_LDFLAGS += -Wl,-Map=strace.mapfile
244 README-linux-ptrace \
250 debian/source/format \
251 debian/strace-udeb.install \
253 debian/strace.examples \
254 debian/strace.install \
255 debian/strace.manpages \
256 debian/strace64.install \
257 debian/strace64.manpages \
262 linux/32/ioctls_inc.h \
263 linux/32/ioctls_inc_align32.h \
264 linux/32/ioctls_inc_align64.h \
265 linux/32/syscallent.h \
266 linux/64/ioctls_inc.h \
267 linux/64/syscallent.h \
268 linux/aarch64/arch_regs.c \
269 linux/aarch64/arch_regs.h \
270 linux/aarch64/arch_sigreturn.c \
271 linux/aarch64/errnoent1.h \
272 linux/aarch64/get_error.c \
273 linux/aarch64/get_scno.c \
274 linux/aarch64/get_syscall_args.c\
275 linux/aarch64/ioctls_arch0.h \
276 linux/aarch64/ioctls_arch1.h \
277 linux/aarch64/ioctls_inc0.h \
278 linux/aarch64/ioctls_inc1.h \
279 linux/aarch64/signalent1.h \
280 linux/aarch64/syscallent.h \
281 linux/aarch64/syscallent1.h \
282 linux/alpha/arch_getrval2.c \
283 linux/alpha/arch_regs.c \
284 linux/alpha/arch_regs.h \
285 linux/alpha/arch_sigreturn.c \
286 linux/alpha/errnoent.h \
287 linux/alpha/get_error.c \
288 linux/alpha/get_scno.c \
289 linux/alpha/get_syscall_args.c \
290 linux/alpha/get_syscall_result.c\
291 linux/alpha/ioctls_arch0.h \
292 linux/alpha/ioctls_inc0.h \
293 linux/alpha/signalent.h \
294 linux/alpha/syscallent.h \
295 linux/alpha/userent.h \
296 linux/arc/arch_regs.c \
297 linux/arc/get_error.c \
298 linux/arc/get_scno.c \
299 linux/arc/get_syscall_args.c \
300 linux/arc/ioctls_arch0.h \
301 linux/arc/ioctls_inc0.h \
302 linux/arc/syscallent.h \
304 linux/arch_sigreturn.c \
305 linux/arm/arch_regs.c \
306 linux/arm/arch_regs.h \
307 linux/arm/arch_sigreturn.c \
308 linux/arm/get_error.c \
309 linux/arm/get_scno.c \
310 linux/arm/get_syscall_args.c \
311 linux/arm/ioctls_arch0.h \
312 linux/arm/ioctls_inc0.h \
313 linux/arm/syscallent.h \
314 linux/arm/userent.h \
315 linux/avr32/arch_regs.c \
316 linux/avr32/get_error.c \
317 linux/avr32/get_scno.c \
318 linux/avr32/get_syscall_args.c \
319 linux/avr32/ioctls_arch0.h \
320 linux/avr32/ioctls_inc0.h \
321 linux/avr32/syscallent.h \
322 linux/avr32/userent.h \
323 linux/bfin/arch_regs.c \
324 linux/bfin/get_error.c \
325 linux/bfin/get_scno.c \
326 linux/bfin/get_syscall_args.c \
327 linux/bfin/get_syscall_result.c \
328 linux/bfin/ioctls_arch0.h \
329 linux/bfin/ioctls_inc0.h \
330 linux/bfin/syscallent.h \
331 linux/bfin/userent.h \
332 linux/crisv10/arch_regs.c \
333 linux/crisv10/arch_sigreturn.c \
334 linux/crisv10/get_error.c \
335 linux/crisv10/get_scno.c \
336 linux/crisv10/get_syscall_args.c \
337 linux/crisv10/get_syscall_result.c \
338 linux/crisv10/userent.h \
339 linux/crisv32/arch_regs.c \
340 linux/crisv32/arch_sigreturn.c \
341 linux/crisv32/get_error.c \
342 linux/crisv32/get_scno.c \
343 linux/crisv32/get_syscall_args.c \
344 linux/crisv32/get_syscall_result.c \
345 linux/crisv32/userent.h \
348 linux/hppa/arch_regs.c \
349 linux/hppa/arch_regs.h \
350 linux/hppa/errnoent.h \
351 linux/hppa/get_error.c \
352 linux/hppa/get_scno.c \
353 linux/hppa/get_syscall_args.c \
354 linux/hppa/get_syscall_result.c \
355 linux/hppa/ioctls_arch0.h \
356 linux/hppa/ioctls_inc0.h \
357 linux/hppa/signalent.h \
358 linux/hppa/syscallent.h \
359 linux/i386/arch_regs.c \
360 linux/i386/arch_regs.h \
361 linux/i386/arch_sigreturn.c \
362 linux/i386/get_error.c \
363 linux/i386/get_scno.c \
364 linux/i386/get_syscall_args.c \
365 linux/i386/ioctls_arch0.h \
366 linux/i386/ioctls_inc0.h \
367 linux/i386/syscallent.h \
368 linux/i386/userent.h \
369 linux/i386/userent0.h \
370 linux/ia64/arch_getrval2.c \
371 linux/ia64/arch_regs.c \
372 linux/ia64/arch_regs.h \
373 linux/ia64/arch_sigreturn.c \
374 linux/ia64/get_error.c \
375 linux/ia64/get_scno.c \
376 linux/ia64/get_syscall_args.c \
377 linux/ia64/ioctls_arch0.h \
378 linux/ia64/ioctls_inc0.h \
379 linux/ia64/syscallent.h \
380 linux/ia64/userent.h \
382 linux/m68k/arch_regs.c \
383 linux/m68k/arch_sigreturn.c \
384 linux/m68k/get_error.c \
385 linux/m68k/get_scno.c \
386 linux/m68k/get_syscall_args.c \
387 linux/m68k/get_syscall_result.c \
388 linux/m68k/ioctls_arch0.h \
389 linux/m68k/ioctls_inc0.h \
390 linux/m68k/syscallent.h \
391 linux/m68k/userent.h \
392 linux/metag/arch_regs.c \
393 linux/metag/get_error.c \
394 linux/metag/get_scno.c \
395 linux/metag/get_syscall_args.c \
396 linux/metag/ioctls_arch0.h \
397 linux/metag/ioctls_inc0.h \
398 linux/metag/syscallent.h \
399 linux/microblaze/arch_regs.c \
400 linux/microblaze/arch_sigreturn.c \
401 linux/microblaze/get_error.c \
402 linux/microblaze/get_scno.c \
403 linux/microblaze/get_syscall_args.c \
404 linux/microblaze/get_syscall_result.c \
405 linux/microblaze/ioctls_arch0.h \
406 linux/microblaze/ioctls_inc0.h \
407 linux/microblaze/syscallent.h \
408 linux/microblaze/userent.h \
409 linux/mips/arch_getrval2.c \
410 linux/mips/arch_regs.c \
411 linux/mips/arch_regs.h \
412 linux/mips/arch_sigreturn.c \
413 linux/mips/errnoent.h \
414 linux/mips/genstub.sh \
415 linux/mips/get_error.c \
416 linux/mips/get_scno.c \
417 linux/mips/get_syscall_args.c \
418 linux/mips/ioctls_arch0.h \
419 linux/mips/ioctls_inc0.h \
420 linux/mips/signalent.h \
421 linux/mips/syscallent-compat.h \
422 linux/mips/syscallent-n32.h \
423 linux/mips/syscallent-n64.h \
424 linux/mips/syscallent-o32.h \
425 linux/mips/syscallent.h \
426 linux/mips/userent.h \
428 linux/nios2/arch_regs.c \
429 linux/nios2/get_error.c \
430 linux/nios2/get_scno.c \
431 linux/nios2/get_syscall_args.c \
432 linux/nios2/ioctls_arch0.h \
433 linux/nios2/ioctls_inc0.h \
434 linux/nios2/syscallent.h \
435 linux/or1k/arch_regs.c \
436 linux/or1k/get_error.c \
437 linux/or1k/get_scno.c \
438 linux/or1k/get_syscall_args.c \
439 linux/or1k/ioctls_arch0.h \
440 linux/or1k/ioctls_inc0.h \
441 linux/or1k/syscallent.h \
442 linux/or1k/userent.h \
443 linux/personality.h \
444 linux/powerpc/arch_regs.c \
445 linux/powerpc/arch_regs.h \
446 linux/powerpc/arch_sigreturn.c \
447 linux/powerpc/errnoent.h \
448 linux/powerpc/get_error.c \
449 linux/powerpc/get_scno.c \
450 linux/powerpc/get_syscall_args.c \
451 linux/powerpc/getregs_old.c \
452 linux/powerpc/ioctls_arch0.h \
453 linux/powerpc/ioctls_inc0.h \
454 linux/powerpc/syscallent.h \
455 linux/powerpc/userent.h \
456 linux/powerpc64/arch_regs.c \
457 linux/powerpc64/arch_regs.h \
458 linux/powerpc64/arch_sigreturn.c \
459 linux/powerpc64/errnoent.h \
460 linux/powerpc64/errnoent1.h \
461 linux/powerpc64/get_error.c \
462 linux/powerpc64/get_scno.c \
463 linux/powerpc64/get_syscall_args.c \
464 linux/powerpc64/getregs_old.c \
465 linux/powerpc64/ioctls_arch0.h \
466 linux/powerpc64/ioctls_arch1.h \
467 linux/powerpc64/ioctls_inc0.h \
468 linux/powerpc64/ioctls_inc1.h \
469 linux/powerpc64/signalent1.h \
470 linux/powerpc64/syscallent.h \
471 linux/powerpc64/syscallent1.h \
472 linux/powerpc64/userent.h \
474 linux/s390/arch_regs.c \
475 linux/s390/arch_regs.h \
476 linux/s390/arch_sigreturn.c \
477 linux/s390/get_error.c \
478 linux/s390/get_scno.c \
479 linux/s390/get_syscall_args.c \
480 linux/s390/ioctls_arch0.h \
481 linux/s390/ioctls_inc0.h \
482 linux/s390/syscallent.h \
483 linux/s390/userent.h \
484 linux/s390/userent0.h \
485 linux/s390/userent1.h \
486 linux/s390x/arch_regs.c \
487 linux/s390x/arch_regs.h \
488 linux/s390x/arch_sigreturn.c \
489 linux/s390x/get_error.c \
490 linux/s390x/get_scno.c \
491 linux/s390x/get_syscall_args.c \
492 linux/s390x/ioctls_arch0.h \
493 linux/s390x/ioctls_inc0.h \
494 linux/s390x/syscallent.h \
495 linux/s390x/userent.h \
496 linux/sh/arch_getrval2.c \
497 linux/sh/arch_regs.c \
498 linux/sh/get_error.c \
499 linux/sh/get_scno.c \
500 linux/sh/get_syscall_args.c \
501 linux/sh/get_syscall_result.c \
502 linux/sh/ioctls_arch0.h \
503 linux/sh/ioctls_inc0.h \
504 linux/sh/syscallent.h \
506 linux/sh/userent0.h \
507 linux/sh64/arch_regs.c \
508 linux/sh64/arch_regs.h \
509 linux/sh64/get_error.c \
510 linux/sh64/get_scno.c \
511 linux/sh64/get_syscall_args.c \
512 linux/sh64/get_syscall_result.c \
513 linux/sh64/ioctls_arch0.h \
514 linux/sh64/ioctls_inc0.h \
515 linux/sh64/syscallent.h \
516 linux/sh64/userent.h \
519 linux/sparc/arch_getrval2.c \
520 linux/sparc/arch_regs.c \
521 linux/sparc/arch_regs.h \
522 linux/sparc/arch_sigreturn.c \
523 linux/sparc/errnoent.h \
525 linux/sparc/get_error.c \
526 linux/sparc/get_scno.c \
527 linux/sparc/get_syscall_args.c \
528 linux/sparc/ioctls_arch0.h \
529 linux/sparc/ioctls_inc0.h \
530 linux/sparc/signalent.h \
531 linux/sparc/syscallent.h \
532 linux/sparc/userent.h \
533 linux/sparc64/arch_getrval2.c \
534 linux/sparc64/arch_regs.c \
535 linux/sparc64/arch_regs.h \
536 linux/sparc64/arch_sigreturn.c \
537 linux/sparc64/errnoent.h \
538 linux/sparc64/errnoent1.h \
539 linux/sparc64/get_error.c \
540 linux/sparc64/get_scno.c \
541 linux/sparc64/get_syscall_args.c\
542 linux/sparc64/ioctls_arch0.h \
543 linux/sparc64/ioctls_arch1.h \
544 linux/sparc64/ioctls_inc0.h \
545 linux/sparc64/ioctls_inc1.h \
546 linux/sparc64/signalent.h \
547 linux/sparc64/signalent1.h \
548 linux/sparc64/syscallent.h \
549 linux/sparc64/syscallent1.h \
550 linux/sparc64/userent.h \
553 linux/tile/arch_regs.c \
554 linux/tile/arch_regs.h \
555 linux/tile/arch_sigreturn.c \
556 linux/tile/errnoent1.h \
557 linux/tile/get_error.c \
558 linux/tile/get_scno.c \
559 linux/tile/get_syscall_args.c \
560 linux/tile/ioctls_arch0.h \
561 linux/tile/ioctls_arch1.h \
562 linux/tile/ioctls_inc0.h \
563 linux/tile/ioctls_inc1.h \
564 linux/tile/signalent1.h \
565 linux/tile/syscallent.h \
566 linux/tile/syscallent1.h \
567 linux/tile/userent.h \
572 linux/x32/arch_regs.c \
573 linux/x32/arch_regs.h \
574 linux/x32/arch_sigreturn.c \
575 linux/x32/errnoent1.h \
576 linux/x32/get_error.c \
577 linux/x32/get_scno.c \
578 linux/x32/get_syscall_args.c \
579 linux/x32/ioctls_arch0.h \
580 linux/x32/ioctls_arch1.h \
581 linux/x32/ioctls_inc0.h \
582 linux/x32/ioctls_inc1.h \
583 linux/x32/signalent1.h \
584 linux/x32/syscallent.h \
585 linux/x32/syscallent1.h \
586 linux/x32/userent.h \
587 linux/x86_64/arch_regs.c \
588 linux/x86_64/arch_regs.h \
589 linux/x86_64/arch_sigreturn.c \
590 linux/x86_64/errnoent1.h \
591 linux/x86_64/errnoent2.h \
592 linux/x86_64/gentab.pl \
593 linux/x86_64/get_error.c \
594 linux/x86_64/get_scno.c \
595 linux/x86_64/get_syscall_args.c \
596 linux/x86_64/getregs_old.c \
597 linux/x86_64/ioctls_arch0.h \
598 linux/x86_64/ioctls_arch1.h \
599 linux/x86_64/ioctls_arch2.h \
600 linux/x86_64/ioctls_inc0.h \
601 linux/x86_64/ioctls_inc1.h \
602 linux/x86_64/ioctls_inc2.h \
603 linux/x86_64/signalent1.h \
604 linux/x86_64/signalent2.h \
605 linux/x86_64/syscallent.h \
606 linux/x86_64/syscallent1.h \
607 linux/x86_64/syscallent2.h \
608 linux/x86_64/userent.h \
609 linux/xtensa/arch_regs.c \
610 linux/xtensa/get_error.c \
611 linux/xtensa/get_scno.c \
612 linux/xtensa/get_syscall_args.c \
613 linux/xtensa/get_syscall_result.c \
614 linux/xtensa/ioctls_arch0.h \
615 linux/xtensa/ioctls_inc0.h \
616 linux/xtensa/syscallent.h \
617 linux/xtensa/userent.h \
618 maint/ioctls_gen.sh \
619 maint/ioctls_hex.sh \
620 maint/ioctls_sym.sh \
621 maint/print_ioctlent.c \
631 $(XLAT_INPUT_FILES) \
632 $(XLAT_HEADER_FILES) \
638 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
641 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
643 strace_SOURCES_c = $(filter %.c,$(strace_SOURCES))
645 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
647 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
650 syscallent_names = subcall.h syscallent.h syscallent1.h \
651 syscallent-n32.h syscallent-n64.h syscallent-o32.h
652 syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
653 syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
655 sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
656 for f in $^; do cat -- $$f; done | \
657 $(srcdir)/generate_sen.sh > $@
660 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
662 today = $(shell date +%Y-%m-%d)
663 version_regexp = $(subst .,\.,$(VERSION))
664 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
667 $(AM_V_GEN)if head -1 $< | \
668 grep -x $(news_check_regexp) >/dev/null; then \
671 echo >&2 '$<: check failed'; \
675 ioctlsort_CC = $(CC_FOR_BUILD)
676 ioctlsort_DEFS = $(DEFS)
677 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
678 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
679 ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
680 ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
682 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
683 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
685 ioctlent%.h: ioctlsort%
688 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
689 $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
691 ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
692 $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
694 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
697 BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
698 CLEANFILES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
699 DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
701 # defines mpers_source_files
703 srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
706 mpers_PREFIX = $(mpers_NAME)_
708 mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
709 mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
710 mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
711 libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS
712 libmpers_CFLAGS = $(strace_CFLAGS)
716 mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
718 CC="$(CC)" CFLAGS="$(mpers_sh_opts)" \
719 CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
720 $(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
724 m%_type_defs.h: $(srcdir_mpers_source_files)
726 sed -n 's/^#include DEF_MPERS_TYPE(\([^)]\+\))/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
728 echo '#undef MPERS_PRINTER_NAME' >> $@-t
729 echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
730 echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
733 m%_funcs.h: $(srcdir_mpers_source_files)
735 sed -n 's/^SYS_FUNC(\([^)]\+\))/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
737 echo '#include "sys_func.h"' >> $@-t
742 printers.h: $(srcdir_mpers_source_files)
743 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
744 echo 'typedef struct {' >> $@-t
746 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/ \1 (*\2) \3;\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f || exit; \
748 echo '} struct_printers;' >> $@-t
749 echo 'extern const struct_printers *printers;' >> $@-t
750 echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
753 %_printer_decls.h: $(srcdir_mpers_source_files)
754 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
756 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/extern \1 $(mpers_PREFIX)\2\3;/p' $$f || exit; \
760 %_printer_defs.h: $(srcdir_mpers_source_files)
761 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
763 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/\.\2 = $(mpers_PREFIX)\2,/p' $$f || exit; \
767 native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
771 strace_LDADD += libmpers-m32.a
772 noinst_LIBRARIES += libmpers-m32.a
773 libmpers_m32_a_SOURCES = $(mpers_source_files)
774 libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
775 libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS)
776 mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
778 BUILT_SOURCES += $(mpers_m32_targets)
779 CLEANFILES += $(mpers_m32_targets)
781 $(mpers_m32_targets): mpers_NAME = m32
783 endif # HAVE_M32_MPERS
787 strace_LDADD += libmpers-mx32.a
788 noinst_LIBRARIES += libmpers-mx32.a
789 libmpers_mx32_a_SOURCES = $(mpers_source_files)
790 libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
791 libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS)
792 mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
794 BUILT_SOURCES += $(mpers_mx32_targets)
795 CLEANFILES += $(mpers_mx32_targets)
797 $(mpers_mx32_targets): mpers_NAME = mx32
799 endif # HAVE_MX32_MPERS
802 -rm -rf mpers-m32 mpers-mx32
806 gen_changelog_start_date = 2009-07-08 20:00
807 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
811 ./gitlog-to-changelog --append-dot \
812 --since='$(gen_changelog_start_date)'; \
813 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
818 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
819 $(srcdir)/Makefile.in $(srcdir)/.version
823 sed '/^##/,$$d' CREDITS.in; \
824 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
825 git log --pretty=format:'%aN %aE'; \
826 } | LC_ALL=C sort -u \
827 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
828 ) > $@-t && mv $@-t $@
830 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX