blob: 47b90a20c5103f8fea11774697aef0f3173a7deb [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
Mike Frysinger761ed9b2014-02-16 01:59:20 -050017include xlat/Makemodule.am
18
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000019strace_SOURCES = \
Dmitry V. Levin2b640342013-11-11 15:06:18 +000020 aio.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000021 bjm.c \
22 block.c \
Dmitry V. Levin95edb8b2014-12-03 20:50:08 +000023 cacheflush.c \
Dmitry V. Levin5e7987b2014-12-03 20:30:15 +000024 capability.c \
Dmitry V. Levin9b2f6742014-12-06 03:53:16 +000025 chdir.c \
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000026 chmod.c \
Dmitry V. Levin2b7a53b2014-12-06 03:53:16 +000027 chown.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000028 count.c \
29 desc.c \
Dmitry V. Levin2ed2cc72014-09-11 22:40:37 +000030 dirent.c \
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +000031 fadvise.c \
Dmitry V. Levin2795a5f2014-12-06 03:53:16 +000032 fallocate.c \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +000033 fanotify.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000034 file.c \
Dmitry V. Levina8364302014-12-06 03:53:16 +000035 getcwd.c \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +000036 inotify.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000037 io.c \
38 ioctl.c \
Dmitry V. Levinfc4727d2014-02-05 17:27:43 +000039 ioprio.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000040 ipc.c \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +000041 kexec.c \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +000042 keyctl.c \
Dmitry V. Levin99a05442014-04-10 14:10:17 +000043 ldt.c \
Dmitry V. Levin231b19f2014-12-06 03:53:16 +000044 link.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000045 loop.c \
Dmitry V. Levinb5d25ec2014-12-06 03:53:16 +000046 lseek.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000047 mem.c \
Dmitry V. Levindb23b342014-12-06 03:53:16 +000048 mknod.c \
Dmitry V. Levin6da7ca32014-12-03 21:12:07 +000049 mount.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000050 mtd.c \
51 net.c \
Dmitry V. Levinf6eb0d62014-12-03 20:00:42 +000052 or1k_atomic.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000053 pathtrace.c \
Dmitry V. Levind28b6a02014-12-03 21:06:11 +000054 personality.c \
Dmitry V. Levin9514ac72014-12-06 03:53:16 +000055 printmode.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000056 process.c \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +010057 ptp.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000058 quota.c \
Dmitry V. Levin9e9ceab2014-12-06 03:53:16 +000059 readahead.c \
Dmitry V. Levin46245b32014-12-06 03:53:16 +000060 readlink.c \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000061 reboot.c \
Dmitry V. Levin6d20a0b2014-12-06 03:53:16 +000062 renameat.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000063 resource.c \
64 scsi.c \
65 signal.c \
66 sock.c \
Dmitry V. Levin2f6510c2014-08-21 03:17:48 +000067 socketutils.c \
Dmitry V. Levine36c72c2014-12-03 20:56:36 +000068 sram_alloc.c \
Dmitry V. Levin9a0dd742014-09-22 00:17:42 +000069 statfs.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000070 strace.c \
71 stream.c \
Dmitry V. Levin85a364a2014-12-06 03:53:16 +000072 swapon.c \
Dmitry V. Levin710b3ae2014-12-06 03:53:16 +000073 sync_file_range.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000074 syscall.c \
Dmitry V. Levin172241b2014-12-03 20:20:52 +000075 sysctl.c \
Dmitry V. Levin57d45a22014-09-29 23:13:05 +000076 sysinfo.c \
Dmitry V. Levinb21e2fb2014-12-03 21:01:35 +000077 syslog.c \
Dmitry V. Levin600e33c2014-12-03 20:08:44 +000078 sysmips.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000079 term.c \
80 time.c \
Dmitry V. Levin69341822014-12-06 03:53:16 +000081 truncate.c \
Dmitry V. Levin542ca1e2014-12-03 21:09:26 +000082 umount.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000083 util.c \
Dmitry V. Levinfb470f32014-12-06 03:53:16 +000084 utime.c \
Dmitry V. Levin481e0672014-12-06 03:53:16 +000085 utimes.c \
Philippe De Muyter0cc96142014-11-03 21:27:40 +010086 v4l2.c \
Dmitry V. Levin769ffe92014-12-06 03:53:16 +000087 vsprintf.c \
88 xattr.c
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000089
Luca Clementi327064b2013-07-23 00:11:35 -070090if USE_LIBUNWIND
91strace_SOURCES += unwind.c
92strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
93strace_LDFLAGS = $(libunwind_LDFLAGS)
94strace_LDADD = $(libunwind_LIBS)
95else
96strace_CPPFLAGS = $(AM_CPPFLAGS)
97endif
98
Roland McGrath2746edd2002-12-30 09:13:08 +000099noinst_HEADERS = defs.h
Denys Vlasenko76f61be2013-03-06 18:59:09 +0100100# Enable this to get link map generated
101#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
Roland McGrath6d2b3492002-12-30 00:51:30 +0000102
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000103EXTRA_DIST = \
104 $(man_MANS) \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000105 .version \
Mike Frysinger6c191362013-05-15 16:33:09 -0400106 COPYING \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000107 CREDITS \
108 ChangeLog \
109 ChangeLog-CVS \
110 README-linux \
111 README-linux-ptrace \
112 debian/changelog \
113 debian/compat \
114 debian/control \
115 debian/copyright \
116 debian/rules \
117 debian/source/format \
118 debian/strace-udeb.install \
119 debian/strace.docs \
120 debian/strace.examples \
121 debian/strace.install \
122 debian/strace.manpages \
123 debian/strace64.install \
124 debian/strace64.manpages \
125 debian/watch \
126 errnoent.sh \
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000127 ioctlsort.c \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000128 linux/aarch64/errnoent1.h \
129 linux/aarch64/ioctlent.h.in \
130 linux/aarch64/ioctlent1.h \
131 linux/aarch64/signalent1.h \
132 linux/aarch64/syscallent.h \
133 linux/aarch64/syscallent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000134 linux/alpha/errnoent.h \
135 linux/alpha/ioctlent.h.in \
136 linux/alpha/signalent.h \
137 linux/alpha/syscallent.h \
Vineet Gupta7daacbb2013-08-16 12:47:06 +0530138 linux/arc/ioctlent.h.in \
139 linux/arc/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000140 linux/arm/ioctlent.h.in \
141 linux/arm/syscallent.h \
142 linux/avr32/ioctlent.h.in \
143 linux/avr32/syscallent.h \
144 linux/bfin/ioctlent.h.in \
145 linux/bfin/syscallent.h \
146 linux/dummy.h \
147 linux/errnoent.h \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +0000148 linux/fanotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000149 linux/hppa/errnoent.h \
150 linux/hppa/ioctlent.h.in \
151 linux/hppa/signalent.h \
152 linux/hppa/syscallent.h \
153 linux/i386/ioctlent.h.in \
154 linux/i386/syscallent.h \
155 linux/ia64/ioctlent.h.in \
156 linux/ia64/signalent.h \
157 linux/ia64/syscallent.h \
Dmitry V. Levin2f6510c2014-08-21 03:17:48 +0000158 linux/inet_diag.h \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +0000159 linux/inotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000160 linux/ioctlent.h.in \
161 linux/ioctlent.sh \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +0000162 linux/kexec.h \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +0000163 linux/keyctl.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000164 linux/m68k/ioctlent.h.in \
165 linux/m68k/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000166 linux/metag/ioctlent.h.in \
167 linux/metag/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000168 linux/microblaze/ioctlent.h.in \
169 linux/microblaze/syscallent.h \
170 linux/mips/errnoent.h \
171 linux/mips/ioctlent.h.in \
172 linux/mips/ioctlent.sh \
173 linux/mips/signalent.h \
Dmitry V. Levin34c445b2013-05-07 02:46:46 +0000174 linux/mips/syscallent-compat.h \
175 linux/mips/syscallent-n32.h \
176 linux/mips/syscallent-n64.h \
177 linux/mips/syscallent-o32.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000178 linux/mips/syscallent.h \
179 linux/mtd-abi.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000180 linux/or1k/ioctlent.h.in \
181 linux/or1k/syscallent.h \
Dmitry V. Levin2a32eaa2014-02-05 02:09:49 +0000182 linux/personality.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000183 linux/powerpc/errnoent1.h \
184 linux/powerpc/ioctlent.h.in \
185 linux/powerpc/ioctlent1.h \
186 linux/powerpc/signalent1.h \
187 linux/powerpc/syscallent.h \
188 linux/powerpc/syscallent1.h \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +0100189 linux/ptp_clock.h \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +0000190 linux/reboot.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000191 linux/s390/ioctlent.h.in \
192 linux/s390/syscallent.h \
193 linux/s390x/ioctlent.h.in \
194 linux/s390x/syscallent.h \
195 linux/sh/ioctlent.h.in \
196 linux/sh/syscallent.h \
197 linux/sh64/ioctlent.h.in \
198 linux/sh64/syscallent.h \
199 linux/signalent.h \
Dmitry V. Levin2f6510c2014-08-21 03:17:48 +0000200 linux/sock_diag.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000201 linux/sparc/dummy2.h \
202 linux/sparc/errnoent.h \
203 linux/sparc/errnoent1.h \
204 linux/sparc/gen.pl \
205 linux/sparc/ioctlent.h.in \
206 linux/sparc/ioctlent1.h \
207 linux/sparc/signalent.h \
208 linux/sparc/signalent1.h \
209 linux/sparc/syscall1.h \
210 linux/sparc/syscallent.h \
211 linux/sparc/syscallent1.h \
212 linux/sparc64/dummy2.h \
213 linux/sparc64/errnoent.h \
214 linux/sparc64/errnoent1.h \
215 linux/sparc64/errnoent2.h \
216 linux/sparc64/ioctlent.h.in \
217 linux/sparc64/ioctlent1.h \
218 linux/sparc64/ioctlent2.h \
219 linux/sparc64/signalent.h \
220 linux/sparc64/signalent1.h \
221 linux/sparc64/signalent2.h \
222 linux/sparc64/syscall1.h \
223 linux/sparc64/syscallent.h \
224 linux/sparc64/syscallent1.h \
225 linux/sparc64/syscallent2.h \
Dmitry V. Levinde462cf2013-05-07 18:38:01 +0400226 linux/subcall.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000227 linux/syscall.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000228 linux/tile/errnoent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000229 linux/tile/ioctlent.h.in \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000230 linux/tile/ioctlent1.h \
231 linux/tile/signalent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000232 linux/tile/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000233 linux/tile/syscallent1.h \
Dmitry V. Levin8e0b8be2013-06-02 18:09:44 +0000234 linux/ubi-user.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000235 linux/x32/errnoent.h \
236 linux/x32/errnoent1.h \
237 linux/x32/ioctlent.h.in \
238 linux/x32/ioctlent1.h \
239 linux/x32/signalent.h \
240 linux/x32/signalent1.h \
241 linux/x32/syscallent.h \
242 linux/x32/syscallent1.h \
243 linux/x86_64/errnoent1.h \
244 linux/x86_64/errnoent2.h \
245 linux/x86_64/gentab.pl \
246 linux/x86_64/ioctlent.h.in \
247 linux/x86_64/ioctlent1.h \
248 linux/x86_64/ioctlent2.h \
249 linux/x86_64/signalent1.h \
250 linux/x86_64/signalent2.h \
251 linux/x86_64/syscallent.h \
252 linux/x86_64/syscallent1.h \
253 linux/x86_64/syscallent2.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000254 linux/xtensa/ioctlent.h.in \
255 linux/xtensa/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000256 signalent.sh \
257 strace-graph \
258 strace-log-merge \
259 strace.spec \
260 syscallent.sh \
Mike Frysinger761ed9b2014-02-16 01:59:20 -0500261 $(XLAT_INPUT_FILES) \
262 $(XLAT_HEADER_FILES) \
263 xlat/gen.sh \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000264 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000265
Roland McGrath2b832df2009-10-06 17:46:56 -0700266.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000267srpm: dist-xz
268 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700269
Dmitry V. Levindce75932013-04-30 23:52:12 +0000270BUILT_SOURCES = .version
271
272$(srcdir)/.version:
273 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
274
275dist-hook:
276 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
277
278today = $(shell date +%Y-%m-%d)
279version_regexp = $(subst .,\.,$(VERSION))
280news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
281
282news-check: NEWS
283 $(AM_V_GEN)if head -1 $< | \
284 grep -x $(news_check_regexp) >/dev/null; then \
285 :; \
286 else \
287 echo >&2 '$<: check failed'; \
288 exit 1; \
289 fi
Mike Frysinger9004e122011-02-20 23:24:22 -0500290
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000291ioctlent_h = $(builddir)/$(OS)/ioctlent.h
292BUILT_SOURCES += $(ioctlent_h)
293CLEANFILES = $(ioctlent_h)
294ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
295$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
296 $(MKDIR_P) $(builddir)/$(OS)
297 cat $(ioctlent_h_deps) | \
298 $(COMPILE) -E -P - | \
299 sed 's/^\([[:space:]]*{\)"[^"]\+",[[:space:]]*/\1/' | \
300 LC_ALL=C sort -u -k2,2 -k1,1 > $@
301
Roland McGrathbc44e402004-07-12 05:45:08 +0000302if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700303
304gen_changelog_start_date = 2009-07-08 20:00
Dmitry V. Levindce75932013-04-30 23:52:12 +0000305$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
306 $(srcdir)/.version
Roland McGratha478d742009-10-06 17:41:02 -0700307 @rm -f $@.new
Dmitry V. Levindce75932013-04-30 23:52:12 +0000308 (cd $(srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000309 ./gitlog-to-changelog --append-dot \
310 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700311 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
312 ) > $@.new
313 chmod 444 $@.new
314 mv -f $@.new $@
315
Dmitry V. Levindce75932013-04-30 23:52:12 +0000316$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
317 $(srcdir)/Makefile.in $(srcdir)/.version
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000318 $(AM_V_GEN) \
Mike Frysinger67c4d432014-08-14 04:05:37 -0400319 ( \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000320 cd $(srcdir); \
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000321 sed '/^##/,$$d' CREDITS.in; \
322 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
323 git log --pretty=format:'%aN %aE'; \
324 } | LC_ALL=C sort -u \
325 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
Mike Frysinger67c4d432014-08-14 04:05:37 -0400326 ) > $@-t && mv $@-t $@
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000327
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000328export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
329
Lubomir Rintel544a8102014-10-16 12:05:43 +0200330INCLUDEDIR = /usr/include
331KERNEL_RELEASE = $(shell uname -r)
332# Candidates for the kernel headers tree.
333KERNEL_INCLUDE = \
334 /lib/modules/$(KERNEL_RELEASE)/build/include \
335 /usr/src/linux-$(KERNEL_RELEASE)/include \
336 $(INCLUDEDIR)
337IOCTLDIR = $(shell find $(KERNEL_INCLUDE) -maxdepth 0 -type d -print -quit 2>/dev/null)
338IOCTLASM = $(INCLUDEDIR)/asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000339
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000340noinst_PROGRAMS = ioctlsort
341ioctlsort_SOURCES = ioctlsort.c
342nodist_ioctlsort_SOURCES = ioctls.h ioctldefs.h
343CLEANFILES += $(nodist_ioctlsort_SOURCES)
344ioctlsort.$(OBJEXT): $(nodist_ioctlsort_SOURCES)
Roland McGrathbc44e402004-07-12 05:45:08 +0000345ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000346 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000347ioctldefs.h: ioctls.h ;
348
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000349ioctlent_h_in = linux/ioctlent.h.in
350BUILT_SOURCES += $(ioctlent_h_in)
351$(srcdir)/$(ioctlent_h_in): ioctlsort
352 $(<D)/$(<F) > $@
Mike Frysinger9004e122011-02-20 23:24:22 -0500353
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000354endif