blob: c98d8b98f2e110241507ae75bee9493f8a8ae03b [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. Levin7ae73a92013-04-30 23:34:51 +000017strace_SOURCES = \
Dmitry V. Levin2b640342013-11-11 15:06:18 +000018 aio.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000019 bjm.c \
20 block.c \
21 count.c \
22 desc.c \
23 file.c \
24 io.c \
25 ioctl.c \
26 ipc.c \
27 loop.c \
28 mem.c \
29 mtd.c \
30 net.c \
31 pathtrace.c \
32 process.c \
33 quota.c \
34 resource.c \
35 scsi.c \
36 signal.c \
37 sock.c \
38 strace.c \
39 stream.c \
40 syscall.c \
41 system.c \
42 term.c \
43 time.c \
44 util.c \
45 vsprintf.c
46
Roland McGrath2746edd2002-12-30 09:13:08 +000047noinst_HEADERS = defs.h
Denys Vlasenko76f61be2013-03-06 18:59:09 +010048# Enable this to get link map generated
49#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
Roland McGrath6d2b3492002-12-30 00:51:30 +000050
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000051EXTRA_DIST = \
52 $(man_MANS) \
Dmitry V. Levindce75932013-04-30 23:52:12 +000053 .version \
Mike Frysinger6c191362013-05-15 16:33:09 -040054 COPYING \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000055 CREDITS \
56 ChangeLog \
57 ChangeLog-CVS \
58 README-linux \
59 README-linux-ptrace \
60 debian/changelog \
61 debian/compat \
62 debian/control \
63 debian/copyright \
64 debian/rules \
65 debian/source/format \
66 debian/strace-udeb.install \
67 debian/strace.docs \
68 debian/strace.examples \
69 debian/strace.install \
70 debian/strace.manpages \
71 debian/strace64.install \
72 debian/strace64.manpages \
73 debian/watch \
74 errnoent.sh \
75 ioctlsort.c \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +000076 linux/aarch64/errnoent1.h \
77 linux/aarch64/ioctlent.h.in \
78 linux/aarch64/ioctlent1.h \
79 linux/aarch64/signalent1.h \
80 linux/aarch64/syscallent.h \
81 linux/aarch64/syscallent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000082 linux/alpha/errnoent.h \
83 linux/alpha/ioctlent.h.in \
84 linux/alpha/signalent.h \
85 linux/alpha/syscallent.h \
Vineet Gupta7daacbb2013-08-16 12:47:06 +053086 linux/arc/ioctlent.h.in \
87 linux/arc/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000088 linux/arm/ioctlent.h.in \
89 linux/arm/syscallent.h \
90 linux/avr32/ioctlent.h.in \
91 linux/avr32/syscallent.h \
92 linux/bfin/ioctlent.h.in \
93 linux/bfin/syscallent.h \
94 linux/dummy.h \
95 linux/errnoent.h \
96 linux/hppa/errnoent.h \
97 linux/hppa/ioctlent.h.in \
98 linux/hppa/signalent.h \
99 linux/hppa/syscallent.h \
100 linux/i386/ioctlent.h.in \
101 linux/i386/syscallent.h \
102 linux/ia64/ioctlent.h.in \
103 linux/ia64/signalent.h \
104 linux/ia64/syscallent.h \
105 linux/ioctlent-filter.awk \
106 linux/ioctlent.h.in \
107 linux/ioctlent.sh \
108 linux/ioctlsort.c \
109 linux/m68k/ioctlent.h.in \
110 linux/m68k/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000111 linux/metag/ioctlent.h.in \
112 linux/metag/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000113 linux/microblaze/ioctlent.h.in \
114 linux/microblaze/syscallent.h \
115 linux/mips/errnoent.h \
116 linux/mips/ioctlent.h.in \
117 linux/mips/ioctlent.sh \
118 linux/mips/signalent.h \
Dmitry V. Levin34c445b2013-05-07 02:46:46 +0000119 linux/mips/syscallent-compat.h \
120 linux/mips/syscallent-n32.h \
121 linux/mips/syscallent-n64.h \
122 linux/mips/syscallent-o32.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000123 linux/mips/syscallent.h \
124 linux/mtd-abi.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000125 linux/or1k/ioctlent.h.in \
126 linux/or1k/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000127 linux/powerpc/errnoent1.h \
128 linux/powerpc/ioctlent.h.in \
129 linux/powerpc/ioctlent1.h \
130 linux/powerpc/signalent1.h \
131 linux/powerpc/syscallent.h \
132 linux/powerpc/syscallent1.h \
133 linux/s390/ioctlent.h.in \
134 linux/s390/syscallent.h \
135 linux/s390x/ioctlent.h.in \
136 linux/s390x/syscallent.h \
137 linux/sh/ioctlent.h.in \
138 linux/sh/syscallent.h \
139 linux/sh64/ioctlent.h.in \
140 linux/sh64/syscallent.h \
141 linux/signalent.h \
142 linux/sparc/dummy2.h \
143 linux/sparc/errnoent.h \
144 linux/sparc/errnoent1.h \
145 linux/sparc/gen.pl \
146 linux/sparc/ioctlent.h.in \
147 linux/sparc/ioctlent1.h \
148 linux/sparc/signalent.h \
149 linux/sparc/signalent1.h \
150 linux/sparc/syscall1.h \
151 linux/sparc/syscallent.h \
152 linux/sparc/syscallent1.h \
153 linux/sparc64/dummy2.h \
154 linux/sparc64/errnoent.h \
155 linux/sparc64/errnoent1.h \
156 linux/sparc64/errnoent2.h \
157 linux/sparc64/ioctlent.h.in \
158 linux/sparc64/ioctlent1.h \
159 linux/sparc64/ioctlent2.h \
160 linux/sparc64/signalent.h \
161 linux/sparc64/signalent1.h \
162 linux/sparc64/signalent2.h \
163 linux/sparc64/syscall1.h \
164 linux/sparc64/syscallent.h \
165 linux/sparc64/syscallent1.h \
166 linux/sparc64/syscallent2.h \
Dmitry V. Levinde462cf2013-05-07 18:38:01 +0400167 linux/subcall.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000168 linux/syscall.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000169 linux/tile/errnoent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000170 linux/tile/ioctlent.h.in \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000171 linux/tile/ioctlent1.h \
172 linux/tile/signalent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000173 linux/tile/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000174 linux/tile/syscallent1.h \
Dmitry V. Levin8e0b8be2013-06-02 18:09:44 +0000175 linux/ubi-user.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000176 linux/x32/errnoent.h \
177 linux/x32/errnoent1.h \
178 linux/x32/ioctlent.h.in \
179 linux/x32/ioctlent1.h \
180 linux/x32/signalent.h \
181 linux/x32/signalent1.h \
182 linux/x32/syscallent.h \
183 linux/x32/syscallent1.h \
184 linux/x86_64/errnoent1.h \
185 linux/x86_64/errnoent2.h \
186 linux/x86_64/gentab.pl \
187 linux/x86_64/ioctlent.h.in \
188 linux/x86_64/ioctlent1.h \
189 linux/x86_64/ioctlent2.h \
190 linux/x86_64/signalent1.h \
191 linux/x86_64/signalent2.h \
192 linux/x86_64/syscallent.h \
193 linux/x86_64/syscallent1.h \
194 linux/x86_64/syscallent2.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000195 linux/xtensa/ioctlent.h.in \
196 linux/xtensa/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000197 signalent.sh \
198 strace-graph \
199 strace-log-merge \
200 strace.spec \
201 syscallent.sh \
202 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000203
Roland McGrath2b832df2009-10-06 17:46:56 -0700204.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000205srpm: dist-xz
206 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700207
Dmitry V. Levindce75932013-04-30 23:52:12 +0000208BUILT_SOURCES = .version
209
210$(srcdir)/.version:
211 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
212
213dist-hook:
214 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
215
216today = $(shell date +%Y-%m-%d)
217version_regexp = $(subst .,\.,$(VERSION))
218news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
219
220news-check: NEWS
221 $(AM_V_GEN)if head -1 $< | \
222 grep -x $(news_check_regexp) >/dev/null; then \
223 :; \
224 else \
225 echo >&2 '$<: check failed'; \
226 exit 1; \
227 fi
Mike Frysinger9004e122011-02-20 23:24:22 -0500228
Roland McGrathbc44e402004-07-12 05:45:08 +0000229if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700230
231gen_changelog_start_date = 2009-07-08 20:00
Dmitry V. Levindce75932013-04-30 23:52:12 +0000232$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
233 $(srcdir)/.version
Roland McGratha478d742009-10-06 17:41:02 -0700234 @rm -f $@.new
Dmitry V. Levindce75932013-04-30 23:52:12 +0000235 (cd $(srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000236 ./gitlog-to-changelog --append-dot \
237 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700238 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
239 ) > $@.new
240 chmod 444 $@.new
241 mv -f $@.new $@
242
Dmitry V. Levindce75932013-04-30 23:52:12 +0000243$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
244 $(srcdir)/Makefile.in $(srcdir)/.version
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000245 $(AM_V_GEN) \
246 { \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000247 cd $(srcdir); \
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000248 sed '/^##/,$$d' CREDITS.in; \
249 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
250 git log --pretty=format:'%aN %aE'; \
251 } | LC_ALL=C sort -u \
252 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
253 } > $@-t && mv $@-t $@
254
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000255export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
256
Roland McGrathbc44e402004-07-12 05:45:08 +0000257IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000258IOCTLASM = asm
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000259IOCTLSORT_INCLUDEDIR = $(IOCTLDIR)
Roland McGrathbc44e402004-07-12 05:45:08 +0000260
Mike Frysinger9004e122011-02-20 23:24:22 -0500261ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000262
Mike Frysinger9004e122011-02-20 23:24:22 -0500263BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000264
Mike Frysinger9004e122011-02-20 23:24:22 -0500265$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000266 $(<D)/$(<F) > $@
267ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000268 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLSORT_INCLUDEDIR) \
269 $(filter -I%,$(LINK.c)) \
Roland McGrathadc2b302004-07-12 06:11:03 +0000270 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000271ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000272 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000273ioctldefs.h: ioctls.h ;
274
275endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500276
277ioctlent_h = $(builddir)/$(OS)/ioctlent.h
278BUILT_SOURCES += $(ioctlent_h)
279CLEANFILES = $(ioctlent_h)
280ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
281$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
282 $(MKDIR_P) $(builddir)/$(OS)
283 cat $(ioctlent_h_deps) | \
284 $(COMPILE) -E -P - | \
Dmitry V. Levin17e38602012-10-27 01:11:13 +0000285 LC_ALL=C sort -u -k3,3 -k2,2 | \
286 awk -f $(srcdir)/linux/ioctlent-filter.awk > $@