1 # Automake input for strace.
7 TESTS_MX32 = tests-mx32
9 SUBDIRS = tests $(TESTS_M32) $(TESTS_MX32)
13 bin_SCRIPTS = strace-graph strace-log-merge
16 # ARCH is `i386', `m68k', `sparc', etc.
19 ACLOCAL_AMFLAGS = -I m4
20 AM_CFLAGS = $(WARN_CFLAGS)
21 AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
22 -I$(srcdir)/$(OS)/$(ARCH) \
26 include xlat/Makemodule.am
130 strace_SOURCES += unwind.c
131 strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
132 strace_LDFLAGS = $(libunwind_LDFLAGS)
133 strace_LDADD = $(libunwind_LIBS)
135 strace_CPPFLAGS = $(AM_CPPFLAGS)
138 noinst_HEADERS = defs.h
139 # Enable this to get link map generated
140 #strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
149 README-linux-ptrace \
155 debian/source/format \
156 debian/strace-udeb.install \
158 debian/strace.examples \
159 debian/strace.install \
160 debian/strace.manpages \
161 debian/strace64.install \
162 debian/strace64.manpages \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
560 $(XLAT_INPUT_FILES) \
561 $(XLAT_HEADER_FILES) \
567 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
569 BUILT_SOURCES = .version sys_func.h
572 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
574 strace_SOURCES_c = $(filter %.c,$(strace_SOURCES))
576 sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
578 sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
582 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
584 today = $(shell date +%Y-%m-%d)
585 version_regexp = $(subst .,\.,$(VERSION))
586 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
589 $(AM_V_GEN)if head -1 $< | \
590 grep -x $(news_check_regexp) >/dev/null; then \
593 echo >&2 '$<: check failed'; \
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)
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)
609 ioctlent%.h: ioctlsort%
612 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
613 $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
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
618 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
623 gen_changelog_start_date = 2009-07-08 20:00
624 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
628 ./gitlog-to-changelog --append-dot \
629 --since='$(gen_changelog_start_date)'; \
630 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
635 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
636 $(srcdir)/Makefile.in $(srcdir)/.version
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 $@
647 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX