blob: 63249138a83a5a9b4dd5561f23bc6c151793f997 [file] [log] [blame]
Roland McGrath6d2b3492002-12-30 00:51:30 +00001# Automake input for strace.
2
Dmitry V. Levin4e4b5ad2011-02-27 00:28:50 +00003SUBDIRS = tests
4
Roland McGrath6d2b3492002-12-30 00:51:30 +00005bin_PROGRAMS = strace
6man_MANS = strace.1
Denys Vlasenko796f6e82012-03-09 14:21:59 +01007bin_SCRIPTS = strace-graph strace-log-merge
Roland McGrath6d2b3492002-12-30 00:51:30 +00008
Dmitry V. Levinee245d82012-02-25 15:34:10 +01009OS = linux
Roland McGrath6d2b3492002-12-30 00:51:30 +000010# ARCH is `i386', `m68k', `sparc', etc.
11ARCH = @arch@
Roland McGrath6d2b3492002-12-30 00:51:30 +000012
Dmitry V. Levin916aded2010-09-09 17:36:36 +000013ACLOCAL_AMFLAGS = -I m4
Dmitry V. Levin918e49b2010-09-09 17:41:15 +000014AM_CFLAGS = $(WARN_CFLAGS)
Mike Frysinger9004e122011-02-20 23:24:22 -050015AM_CPPFLAGS = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS) -I$(builddir)/$(OS)
Roland McGrath6d2b3492002-12-30 00:51:30 +000016
Dmitry V. Levin7d61ff12006-12-21 21:15:04 +000017strace_SOURCES = strace.c syscall.c count.c util.c desc.c file.c ipc.c \
Dmitry V. Levinef5c3d62006-10-16 00:26:47 +000018 io.c ioctl.c mem.c net.c process.c bjm.c quota.c \
Roland McGrath6d2b3492002-12-30 00:51:30 +000019 resource.c signal.c sock.c system.c term.c time.c \
Mike Frysingerebee04c2012-04-17 22:19:31 -040020 scsi.c stream.c block.c pathtrace.c mtd.c vsprintf.c \
21 loop.c
Roland McGrath2746edd2002-12-30 09:13:08 +000022noinst_HEADERS = defs.h
Denys Vlasenko76f61be2013-03-06 18:59:09 +010023# Enable this to get link map generated
24#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
Roland McGrath6d2b3492002-12-30 00:51:30 +000025
Roland McGrath80964aa2002-12-30 01:11:08 +000026EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000027 debian/changelog debian/compat debian/control debian/copyright \
28 debian/rules debian/source/format debian/watch \
29 debian/strace64.install debian/strace64.manpages \
Roland McGrath09a007c2008-07-22 08:33:40 +000030 debian/strace.docs debian/strace.examples debian/strace.install \
31 debian/strace.manpages debian/strace-udeb.install \
Roland McGrath44f24c72003-01-09 06:53:25 +000032 strace.spec \
Denys Vlasenko796f6e82012-03-09 14:21:59 +010033 strace-graph strace-log-merge \
34 ChangeLog ChangeLog-CVS COPYRIGHT CREDITS \
Dmitry V. Levinee245d82012-02-25 15:34:10 +010035 README-linux README-linux-ptrace \
Roland McGrathd97b2072002-12-30 10:45:58 +000036 linux/ioctlsort.c linux/ioctlent.sh \
Mike Frysinger9004e122011-02-20 23:24:22 -050037 linux/ioctlent.h.in linux/errnoent.h linux/signalent.h \
Mike Frysinger0cbed352012-04-04 22:22:01 -040038 linux/syscall.h linux/dummy.h linux/mtd-abi.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050039 linux/i386/ioctlent.h.in linux/i386/syscallent.h \
40 linux/alpha/errnoent.h linux/alpha/ioctlent.h.in \
Roland McGrathd97b2072002-12-30 10:45:58 +000041 linux/alpha/signalent.h linux/alpha/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050042 linux/arm/ioctlent.h.in linux/arm/syscallent.h \
43 linux/arm/syscallent1.h \
Roland McGrath1cdfb8f2008-08-01 01:15:24 +000044 linux/arm/signalent1.h linux/arm/ioctlent1.h \
45 linux/arm/errnoent1.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050046 linux/avr32/ioctlent.h.in linux/avr32/syscallent.h \
47 linux/bfin/ioctlent.h.in linux/bfin/syscallent.h \
48 linux/hppa/errnoent.h linux/hppa/ioctlent.h.in \
Roland McGrathd97b2072002-12-30 10:45:58 +000049 linux/hppa/signalent.h linux/hppa/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050050 linux/ia64/ioctlent.h.in \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000051 linux/ia64/signalent.h \
52 linux/ia64/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050053 linux/m68k/ioctlent.h.in linux/m68k/syscallent.h \
54 linux/microblaze/ioctlent.h.in linux/microblaze/syscallent.h \
Denys Vlasenko185cce12009-02-20 16:00:41 +000055 linux/mips/ioctlent.sh linux/mips/errnoent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050056 linux/mips/ioctlent.h.in linux/mips/signalent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000057 linux/mips/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050058 linux/powerpc/ioctlent.h.in linux/powerpc/ioctlent1.h \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000059 linux/powerpc/syscallent.h linux/powerpc/syscallent1.h \
60 linux/powerpc/errnoent1.h linux/powerpc/signalent1.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050061 linux/s390/ioctlent.h.in \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000062 linux/s390/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050063 linux/s390x/ioctlent.h.in \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000064 linux/s390x/syscallent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000065 linux/sh/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050066 linux/sh/ioctlent.h.in \
67 linux/sh64/ioctlent.h.in linux/sh64/syscallent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000068 linux/sparc/dummy2.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000069 linux/sparc/errnoent.h linux/sparc/errnoent1.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050070 linux/sparc/ioctlent.h.in linux/sparc/ioctlent1.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000071 linux/sparc/signalent.h linux/sparc/signalent1.h \
Mike Frysinger330a8952011-02-19 15:48:52 -050072 linux/sparc/syscall1.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000073 linux/sparc/syscallent.h linux/sparc/syscallent1.h \
Mike Frysinger71a78bc2011-02-19 15:13:05 -050074 linux/sparc/gen.pl \
Roland McGrath0165e772004-07-12 07:53:59 +000075 linux/sparc64/dummy2.h linux/sparc64/errnoent.h \
76 linux/sparc64/errnoent1.h linux/sparc64/errnoent2.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050077 linux/sparc64/ioctlent.h.in linux/sparc64/ioctlent1.h \
Roland McGrath0165e772004-07-12 07:53:59 +000078 linux/sparc64/ioctlent2.h linux/sparc64/signalent.h \
79 linux/sparc64/signalent1.h linux/sparc64/signalent2.h \
Mike Frysinger330a8952011-02-19 15:48:52 -050080 linux/sparc64/syscall1.h \
Roland McGrath0165e772004-07-12 07:53:59 +000081 linux/sparc64/syscallent.h linux/sparc64/syscallent1.h \
82 linux/sparc64/syscallent2.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050083 linux/tile/ioctlent.h.in linux/tile/syscallent.h \
H.J. Lu35be5812012-04-16 13:00:01 +020084 linux/x32/errnoent.h linux/x32/ioctlent.h.in \
85 linux/x32/signalent.h linux/x32/syscallent.h \
H.J. Lu085e4282012-04-17 11:05:04 -070086 linux/x32/errnoent1.h linux/x32/ioctlent1.h \
87 linux/x32/signalent1.h linux/x32/syscallent1.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050088 linux/x86_64/ioctlent.h.in linux/x86_64/syscallent.h \
89 linux/x86_64/gentab.pl \
Roland McGrath7daaace2002-12-30 09:33:20 +000090 linux/x86_64/errnoent1.h linux/x86_64/ioctlent1.h \
91 linux/x86_64/signalent1.h linux/x86_64/syscallent1.h \
H.J. Lu35be5812012-04-16 13:00:01 +020092 linux/x86_64/errnoent2.h linux/x86_64/ioctlent2.h \
93 linux/x86_64/signalent2.h linux/x86_64/syscallent2.h \
Roland McGrath5a862ff2006-04-25 07:33:20 +000094 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +000095
Roland McGrath2b832df2009-10-06 17:46:56 -070096.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +000097srpm: dist-xz
98 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -070099
Mike Frysinger9004e122011-02-20 23:24:22 -0500100BUILT_SOURCES =
101
Roland McGrathbc44e402004-07-12 05:45:08 +0000102if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700103
104gen_changelog_start_date = 2009-07-08 20:00
105$(srcdir)/ChangeLog: $(top_srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
106 $(top_srcdir)/.git/refs/heads/*
107 @rm -f $@.new
108 (cd $(top_srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000109 ./gitlog-to-changelog --append-dot \
110 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700111 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
112 ) > $@.new
113 chmod 444 $@.new
114 mv -f $@.new $@
115
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000116$(srcdir)/CREDITS: $(top_srcdir)/CREDITS.in $(top_srcdir)/.mailmap \
Sebastian Pipping6c0e2fc2011-03-04 02:21:28 +0100117 $(srcdir)/Makefile.in $(top_srcdir)/.git/refs/heads/*
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000118 $(AM_V_GEN) \
119 { \
120 cd $(top_srcdir); \
121 sed '/^##/,$$d' CREDITS.in; \
122 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
123 git log --pretty=format:'%aN %aE'; \
124 } | LC_ALL=C sort -u \
125 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
126 } > $@-t && mv $@-t $@
127
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000128export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
129
Roland McGrathbc44e402004-07-12 05:45:08 +0000130IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000131IOCTLASM = asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000132
Mike Frysinger9004e122011-02-20 23:24:22 -0500133ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000134
Mike Frysinger9004e122011-02-20 23:24:22 -0500135BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000136
Mike Frysinger9004e122011-02-20 23:24:22 -0500137$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000138 $(<D)/$(<F) > $@
139ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Roland McGrathadc2b302004-07-12 06:11:03 +0000140 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLDIR) $(filter -I%,$(LINK.c)) \
141 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000142ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000143 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000144ioctldefs.h: ioctls.h ;
145
146endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500147
148ioctlent_h = $(builddir)/$(OS)/ioctlent.h
149BUILT_SOURCES += $(ioctlent_h)
150CLEANFILES = $(ioctlent_h)
151ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
152$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
153 $(MKDIR_P) $(builddir)/$(OS)
154 cat $(ioctlent_h_deps) | \
155 $(COMPILE) -E -P - | \
Dmitry V. Levin17e38602012-10-27 01:11:13 +0000156 LC_ALL=C sort -u -k3,3 -k2,2 | \
157 awk -f $(srcdir)/linux/ioctlent-filter.awk > $@