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)
95 fetch_seccomp_fprog.c \
96 fetch_struct_flock.c \
127 linux/x32/asm_stat.h \
210 # end of strace_SOURCES
213 strace_SOURCES += unwind.c
214 strace_CPPFLAGS += $(libunwind_CPPFLAGS)
215 strace_LDFLAGS += $(libunwind_LDFLAGS)
216 strace_LDADD += $(libunwind_LIBS)
219 @CODE_COVERAGE_RULES@
220 CODE_COVERAGE_LCOV_OPTIONS = \
221 $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) --rc lcov_branch_coverage=1
222 CODE_COVERAGE_GENHTML_OPTIONS = --rc lcov_branch_coverage=1
223 CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
224 strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
225 strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
226 strace_LDADD += $(CODE_COVERAGE_LDFLAGS)
228 # Enable this to get link map generated
229 #strace_LDFLAGS += -Wl,-Map=strace.mapfile
238 README-linux-ptrace \
244 debian/source/format \
245 debian/strace-udeb.install \
247 debian/strace.examples \
248 debian/strace.install \
249 debian/strace.manpages \
250 debian/strace64.install \
251 debian/strace64.manpages \
256 linux/32/ioctls_inc.h \
257 linux/32/ioctls_inc_align32.h \
258 linux/32/ioctls_inc_align64.h \
259 linux/32/syscallent.h \
260 linux/64/ioctls_inc.h \
261 linux/64/syscallent.h \
262 linux/aarch64/arch_regs.c \
263 linux/aarch64/arch_regs.h \
264 linux/aarch64/arch_sigreturn.c \
265 linux/aarch64/errnoent1.h \
266 linux/aarch64/get_error.c \
267 linux/aarch64/get_scno.c \
268 linux/aarch64/get_syscall_args.c\
269 linux/aarch64/ioctls_arch0.h \
270 linux/aarch64/ioctls_arch1.h \
271 linux/aarch64/ioctls_inc0.h \
272 linux/aarch64/ioctls_inc1.h \
273 linux/aarch64/signalent1.h \
274 linux/aarch64/syscallent.h \
275 linux/aarch64/syscallent1.h \
276 linux/alpha/arch_getrval2.c \
277 linux/alpha/arch_regs.c \
278 linux/alpha/arch_regs.h \
279 linux/alpha/arch_sigreturn.c \
280 linux/alpha/errnoent.h \
281 linux/alpha/get_error.c \
282 linux/alpha/get_scno.c \
283 linux/alpha/get_syscall_args.c \
284 linux/alpha/get_syscall_result.c\
285 linux/alpha/ioctls_arch0.h \
286 linux/alpha/ioctls_inc0.h \
287 linux/alpha/signalent.h \
288 linux/alpha/syscallent.h \
289 linux/alpha/userent.h \
290 linux/arc/arch_regs.c \
291 linux/arc/get_error.c \
292 linux/arc/get_scno.c \
293 linux/arc/get_syscall_args.c \
294 linux/arc/ioctls_arch0.h \
295 linux/arc/ioctls_inc0.h \
296 linux/arc/syscallent.h \
298 linux/arch_sigreturn.c \
299 linux/arm/arch_regs.c \
300 linux/arm/arch_regs.h \
301 linux/arm/arch_sigreturn.c \
302 linux/arm/get_error.c \
303 linux/arm/get_scno.c \
304 linux/arm/get_syscall_args.c \
305 linux/arm/ioctls_arch0.h \
306 linux/arm/ioctls_inc0.h \
307 linux/arm/syscallent.h \
308 linux/arm/userent.h \
309 linux/avr32/arch_regs.c \
310 linux/avr32/get_error.c \
311 linux/avr32/get_scno.c \
312 linux/avr32/get_syscall_args.c \
313 linux/avr32/ioctls_arch0.h \
314 linux/avr32/ioctls_inc0.h \
315 linux/avr32/syscallent.h \
316 linux/avr32/userent.h \
317 linux/bfin/arch_regs.c \
318 linux/bfin/get_error.c \
319 linux/bfin/get_scno.c \
320 linux/bfin/get_syscall_args.c \
321 linux/bfin/get_syscall_result.c \
322 linux/bfin/ioctls_arch0.h \
323 linux/bfin/ioctls_inc0.h \
324 linux/bfin/syscallent.h \
325 linux/bfin/userent.h \
326 linux/crisv10/arch_regs.c \
327 linux/crisv10/arch_sigreturn.c \
328 linux/crisv10/get_error.c \
329 linux/crisv10/get_scno.c \
330 linux/crisv10/get_syscall_args.c \
331 linux/crisv10/get_syscall_result.c \
332 linux/crisv10/userent.h \
333 linux/crisv32/arch_regs.c \
334 linux/crisv32/arch_sigreturn.c \
335 linux/crisv32/get_error.c \
336 linux/crisv32/get_scno.c \
337 linux/crisv32/get_syscall_args.c \
338 linux/crisv32/get_syscall_result.c \
339 linux/crisv32/userent.h \
342 linux/hppa/arch_regs.c \
343 linux/hppa/arch_regs.h \
344 linux/hppa/errnoent.h \
345 linux/hppa/get_error.c \
346 linux/hppa/get_scno.c \
347 linux/hppa/get_syscall_args.c \
348 linux/hppa/get_syscall_result.c \
349 linux/hppa/ioctls_arch0.h \
350 linux/hppa/ioctls_inc0.h \
351 linux/hppa/signalent.h \
352 linux/hppa/syscallent.h \
353 linux/i386/arch_regs.c \
354 linux/i386/arch_regs.h \
355 linux/i386/arch_sigreturn.c \
356 linux/i386/get_error.c \
357 linux/i386/get_scno.c \
358 linux/i386/get_syscall_args.c \
359 linux/i386/ioctls_arch0.h \
360 linux/i386/ioctls_inc0.h \
361 linux/i386/syscallent.h \
362 linux/i386/userent.h \
363 linux/i386/userent0.h \
364 linux/ia64/arch_getrval2.c \
365 linux/ia64/arch_regs.c \
366 linux/ia64/arch_regs.h \
367 linux/ia64/arch_sigreturn.c \
368 linux/ia64/get_error.c \
369 linux/ia64/get_scno.c \
370 linux/ia64/get_syscall_args.c \
371 linux/ia64/ioctls_arch0.h \
372 linux/ia64/ioctls_inc0.h \
373 linux/ia64/syscallent.h \
374 linux/ia64/userent.h \
376 linux/m68k/arch_regs.c \
377 linux/m68k/arch_sigreturn.c \
378 linux/m68k/get_error.c \
379 linux/m68k/get_scno.c \
380 linux/m68k/get_syscall_args.c \
381 linux/m68k/get_syscall_result.c \
382 linux/m68k/ioctls_arch0.h \
383 linux/m68k/ioctls_inc0.h \
384 linux/m68k/syscallent.h \
385 linux/m68k/userent.h \
386 linux/metag/arch_regs.c \
387 linux/metag/get_error.c \
388 linux/metag/get_scno.c \
389 linux/metag/get_syscall_args.c \
390 linux/metag/ioctls_arch0.h \
391 linux/metag/ioctls_inc0.h \
392 linux/metag/syscallent.h \
393 linux/microblaze/arch_regs.c \
394 linux/microblaze/arch_sigreturn.c \
395 linux/microblaze/get_error.c \
396 linux/microblaze/get_scno.c \
397 linux/microblaze/get_syscall_args.c \
398 linux/microblaze/get_syscall_result.c \
399 linux/microblaze/ioctls_arch0.h \
400 linux/microblaze/ioctls_inc0.h \
401 linux/microblaze/syscallent.h \
402 linux/microblaze/userent.h \
403 linux/mips/arch_getrval2.c \
404 linux/mips/arch_regs.c \
405 linux/mips/arch_regs.h \
406 linux/mips/arch_sigreturn.c \
407 linux/mips/errnoent.h \
408 linux/mips/genstub.sh \
409 linux/mips/get_error.c \
410 linux/mips/get_scno.c \
411 linux/mips/get_syscall_args.c \
412 linux/mips/ioctls_arch0.h \
413 linux/mips/ioctls_inc0.h \
414 linux/mips/signalent.h \
415 linux/mips/syscallent-compat.h \
416 linux/mips/syscallent-n32.h \
417 linux/mips/syscallent-n64.h \
418 linux/mips/syscallent-o32.h \
419 linux/mips/syscallent.h \
420 linux/mips/userent.h \
422 linux/nios2/arch_regs.c \
423 linux/nios2/get_error.c \
424 linux/nios2/get_scno.c \
425 linux/nios2/get_syscall_args.c \
426 linux/nios2/ioctls_arch0.h \
427 linux/nios2/ioctls_inc0.h \
428 linux/nios2/syscallent.h \
429 linux/or1k/arch_regs.c \
430 linux/or1k/get_error.c \
431 linux/or1k/get_scno.c \
432 linux/or1k/get_syscall_args.c \
433 linux/or1k/ioctls_arch0.h \
434 linux/or1k/ioctls_inc0.h \
435 linux/or1k/syscallent.h \
436 linux/or1k/userent.h \
437 linux/personality.h \
438 linux/powerpc/arch_regs.c \
439 linux/powerpc/arch_regs.h \
440 linux/powerpc/arch_sigreturn.c \
441 linux/powerpc/errnoent.h \
442 linux/powerpc/get_error.c \
443 linux/powerpc/get_scno.c \
444 linux/powerpc/get_syscall_args.c \
445 linux/powerpc/getregs_old.c \
446 linux/powerpc/ioctls_arch0.h \
447 linux/powerpc/ioctls_inc0.h \
448 linux/powerpc/syscallent.h \
449 linux/powerpc/userent.h \
450 linux/powerpc64/arch_regs.c \
451 linux/powerpc64/arch_regs.h \
452 linux/powerpc64/arch_sigreturn.c \
453 linux/powerpc64/errnoent.h \
454 linux/powerpc64/errnoent1.h \
455 linux/powerpc64/get_error.c \
456 linux/powerpc64/get_scno.c \
457 linux/powerpc64/get_syscall_args.c \
458 linux/powerpc64/getregs_old.c \
459 linux/powerpc64/ioctls_arch0.h \
460 linux/powerpc64/ioctls_arch1.h \
461 linux/powerpc64/ioctls_inc0.h \
462 linux/powerpc64/ioctls_inc1.h \
463 linux/powerpc64/signalent1.h \
464 linux/powerpc64/syscallent.h \
465 linux/powerpc64/syscallent1.h \
466 linux/powerpc64/userent.h \
468 linux/s390/arch_regs.c \
469 linux/s390/arch_regs.h \
470 linux/s390/arch_sigreturn.c \
471 linux/s390/get_error.c \
472 linux/s390/get_scno.c \
473 linux/s390/get_syscall_args.c \
474 linux/s390/ioctls_arch0.h \
475 linux/s390/ioctls_inc0.h \
476 linux/s390/syscallent.h \
477 linux/s390/userent.h \
478 linux/s390/userent0.h \
479 linux/s390/userent1.h \
480 linux/s390x/arch_regs.c \
481 linux/s390x/arch_regs.h \
482 linux/s390x/arch_sigreturn.c \
483 linux/s390x/get_error.c \
484 linux/s390x/get_scno.c \
485 linux/s390x/get_syscall_args.c \
486 linux/s390x/ioctls_arch0.h \
487 linux/s390x/ioctls_inc0.h \
488 linux/s390x/syscallent.h \
489 linux/s390x/userent.h \
490 linux/sh/arch_getrval2.c \
491 linux/sh/arch_regs.c \
492 linux/sh/get_error.c \
493 linux/sh/get_scno.c \
494 linux/sh/get_syscall_args.c \
495 linux/sh/get_syscall_result.c \
496 linux/sh/ioctls_arch0.h \
497 linux/sh/ioctls_inc0.h \
498 linux/sh/syscallent.h \
500 linux/sh/userent0.h \
501 linux/sh64/arch_regs.c \
502 linux/sh64/arch_regs.h \
503 linux/sh64/get_error.c \
504 linux/sh64/get_scno.c \
505 linux/sh64/get_syscall_args.c \
506 linux/sh64/get_syscall_result.c \
507 linux/sh64/ioctls_arch0.h \
508 linux/sh64/ioctls_inc0.h \
509 linux/sh64/syscallent.h \
510 linux/sh64/userent.h \
513 linux/sparc/arch_getrval2.c \
514 linux/sparc/arch_regs.c \
515 linux/sparc/arch_regs.h \
516 linux/sparc/arch_sigreturn.c \
517 linux/sparc/errnoent.h \
519 linux/sparc/get_error.c \
520 linux/sparc/get_scno.c \
521 linux/sparc/get_syscall_args.c \
522 linux/sparc/ioctls_arch0.h \
523 linux/sparc/ioctls_inc0.h \
524 linux/sparc/signalent.h \
525 linux/sparc/syscallent.h \
526 linux/sparc/userent.h \
527 linux/sparc64/arch_getrval2.c \
528 linux/sparc64/arch_regs.c \
529 linux/sparc64/arch_regs.h \
530 linux/sparc64/arch_sigreturn.c \
531 linux/sparc64/errnoent.h \
532 linux/sparc64/errnoent1.h \
533 linux/sparc64/get_error.c \
534 linux/sparc64/get_scno.c \
535 linux/sparc64/get_syscall_args.c\
536 linux/sparc64/ioctls_arch0.h \
537 linux/sparc64/ioctls_arch1.h \
538 linux/sparc64/ioctls_inc0.h \
539 linux/sparc64/ioctls_inc1.h \
540 linux/sparc64/signalent.h \
541 linux/sparc64/signalent1.h \
542 linux/sparc64/syscallent.h \
543 linux/sparc64/syscallent1.h \
544 linux/sparc64/userent.h \
547 linux/tile/arch_regs.c \
548 linux/tile/arch_regs.h \
549 linux/tile/arch_sigreturn.c \
550 linux/tile/errnoent1.h \
551 linux/tile/get_error.c \
552 linux/tile/get_scno.c \
553 linux/tile/get_syscall_args.c \
554 linux/tile/ioctls_arch0.h \
555 linux/tile/ioctls_arch1.h \
556 linux/tile/ioctls_inc0.h \
557 linux/tile/ioctls_inc1.h \
558 linux/tile/signalent1.h \
559 linux/tile/syscallent.h \
560 linux/tile/syscallent1.h \
561 linux/tile/userent.h \
566 linux/x32/arch_regs.c \
567 linux/x32/arch_regs.h \
568 linux/x32/arch_sigreturn.c \
569 linux/x32/errnoent1.h \
570 linux/x32/get_error.c \
571 linux/x32/get_scno.c \
572 linux/x32/get_syscall_args.c \
573 linux/x32/ioctls_arch0.h \
574 linux/x32/ioctls_arch1.h \
575 linux/x32/ioctls_inc0.h \
576 linux/x32/ioctls_inc1.h \
577 linux/x32/signalent1.h \
578 linux/x32/syscallent.h \
579 linux/x32/syscallent1.h \
580 linux/x32/userent.h \
581 linux/x86_64/arch_regs.c \
582 linux/x86_64/arch_regs.h \
583 linux/x86_64/arch_sigreturn.c \
584 linux/x86_64/errnoent1.h \
585 linux/x86_64/errnoent2.h \
586 linux/x86_64/gentab.pl \
587 linux/x86_64/get_error.c \
588 linux/x86_64/get_scno.c \
589 linux/x86_64/get_syscall_args.c \
590 linux/x86_64/getregs_old.c \
591 linux/x86_64/ioctls_arch0.h \
592 linux/x86_64/ioctls_arch1.h \
593 linux/x86_64/ioctls_arch2.h \
594 linux/x86_64/ioctls_inc0.h \
595 linux/x86_64/ioctls_inc1.h \
596 linux/x86_64/ioctls_inc2.h \
597 linux/x86_64/signalent1.h \
598 linux/x86_64/signalent2.h \
599 linux/x86_64/syscallent.h \
600 linux/x86_64/syscallent1.h \
601 linux/x86_64/syscallent2.h \
602 linux/x86_64/userent.h \
603 linux/xtensa/arch_regs.c \
604 linux/xtensa/get_error.c \
605 linux/xtensa/get_scno.c \
606 linux/xtensa/get_syscall_args.c \
607 linux/xtensa/get_syscall_result.c \
608 linux/xtensa/ioctls_arch0.h \
609 linux/xtensa/ioctls_inc0.h \
610 linux/xtensa/syscallent.h \
611 linux/xtensa/userent.h \
612 maint/ioctls_gen.sh \
613 maint/ioctls_hex.sh \
614 maint/ioctls_sym.sh \
615 maint/print_ioctlent.c \
625 $(XLAT_INPUT_FILES) \
626 $(XLAT_HEADER_FILES) \
632 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
635 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
637 strace_SOURCES_c = $(filter %.c,$(strace_SOURCES))
639 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
641 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
644 syscallent_names = subcall.h syscallent.h syscallent1.h \
645 syscallent-n32.h syscallent-n64.h syscallent-o32.h
646 syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
647 syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
649 sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
650 for f in $^; do cat -- $$f; done | \
651 $(srcdir)/generate_sen.sh > $@
654 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
656 today = $(shell date +%Y-%m-%d)
657 version_regexp = $(subst .,\.,$(VERSION))
658 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
661 $(AM_V_GEN)if head -1 $< | \
662 grep -x $(news_check_regexp) >/dev/null; then \
665 echo >&2 '$<: check failed'; \
669 ioctlsort_CC = $(CC_FOR_BUILD)
670 ioctlsort_DEFS = $(DEFS)
671 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
672 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
673 ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
674 ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
676 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
677 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
679 ioctlent%.h: ioctlsort%
682 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
683 $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
685 ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
686 $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
688 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
691 BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
692 CLEANFILES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
693 DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
695 # defines mpers_source_files
697 srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
700 mpers_PREFIX = $(mpers_NAME)_
702 mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
703 mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
704 mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
705 libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS
706 libmpers_CFLAGS = $(strace_CFLAGS)
710 mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
712 CC="$(CC)" CFLAGS="$(mpers_sh_opts)" \
713 CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
714 $(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
718 m%_type_defs.h: $(srcdir_mpers_source_files)
720 sed -n 's/^#include DEF_MPERS_TYPE(\([^)]\+\))/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
722 echo '#undef MPERS_PRINTER_NAME' >> $@-t
723 echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
724 echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
727 m%_funcs.h: $(srcdir_mpers_source_files)
729 sed -n 's/^SYS_FUNC(\([^)]\+\))/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
731 echo '#include "sys_func.h"' >> $@-t
736 printers.h: $(srcdir_mpers_source_files)
737 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
738 echo 'typedef struct {' >> $@-t
740 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/ \1 (*\2) \3;\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f || exit; \
742 echo '} struct_printers;' >> $@-t
743 echo 'extern const struct_printers *printers;' >> $@-t
744 echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
747 %_printer_decls.h: $(srcdir_mpers_source_files)
748 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
750 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/extern \1 $(mpers_PREFIX)\2\3;/p' $$f || exit; \
754 %_printer_defs.h: $(srcdir_mpers_source_files)
755 echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
757 sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/\.\2 = $(mpers_PREFIX)\2,/p' $$f || exit; \
761 native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
765 strace_LDADD += libmpers-m32.a
766 noinst_LIBRARIES += libmpers-m32.a
767 libmpers_m32_a_SOURCES = $(mpers_source_files)
768 libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
769 libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS)
770 mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
772 BUILT_SOURCES += $(mpers_m32_targets)
773 CLEANFILES += $(mpers_m32_targets)
775 $(mpers_m32_targets): mpers_NAME = m32
777 endif # HAVE_M32_MPERS
781 strace_LDADD += libmpers-mx32.a
782 noinst_LIBRARIES += libmpers-mx32.a
783 libmpers_mx32_a_SOURCES = $(mpers_source_files)
784 libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
785 libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS)
786 mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
788 BUILT_SOURCES += $(mpers_mx32_targets)
789 CLEANFILES += $(mpers_mx32_targets)
791 $(mpers_mx32_targets): mpers_NAME = mx32
793 endif # HAVE_MX32_MPERS
796 -rm -rf mpers-m32 mpers-mx32
800 gen_changelog_start_date = 2009-07-08 20:00
801 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
805 ./gitlog-to-changelog --append-dot \
806 --since='$(gen_changelog_start_date)'; \
807 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
812 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
813 $(srcdir)/Makefile.in $(srcdir)/.version
817 sed '/^##/,$$d' CREDITS.in; \
818 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
819 git log --pretty=format:'%aN %aE'; \
820 } | LC_ALL=C sort -u \
821 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
822 ) > $@-t && mv $@-t $@
824 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX