blob: be059462d293e3fe359ecc1505b462c72565535d [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 \
23 count.c \
24 desc.c \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +000025 fanotify.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000026 file.c \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +000027 inotify.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000028 io.c \
29 ioctl.c \
Dmitry V. Levinfc4727d2014-02-05 17:27:43 +000030 ioprio.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000031 ipc.c \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +000032 kexec.c \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +000033 keyctl.c \
Dmitry V. Levin99a05442014-04-10 14:10:17 +000034 ldt.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000035 loop.c \
36 mem.c \
37 mtd.c \
38 net.c \
39 pathtrace.c \
40 process.c \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +010041 ptp.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000042 quota.c \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000043 reboot.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000044 resource.c \
45 scsi.c \
46 signal.c \
47 sock.c \
48 strace.c \
49 stream.c \
50 syscall.c \
51 system.c \
52 term.c \
53 time.c \
54 util.c \
55 vsprintf.c
56
Luca Clementi327064b2013-07-23 00:11:35 -070057if USE_LIBUNWIND
58strace_SOURCES += unwind.c
59strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
60strace_LDFLAGS = $(libunwind_LDFLAGS)
61strace_LDADD = $(libunwind_LIBS)
62else
63strace_CPPFLAGS = $(AM_CPPFLAGS)
64endif
65
Roland McGrath2746edd2002-12-30 09:13:08 +000066noinst_HEADERS = defs.h
Denys Vlasenko76f61be2013-03-06 18:59:09 +010067# Enable this to get link map generated
68#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
Roland McGrath6d2b3492002-12-30 00:51:30 +000069
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000070EXTRA_DIST = \
71 $(man_MANS) \
Dmitry V. Levindce75932013-04-30 23:52:12 +000072 .version \
Mike Frysinger6c191362013-05-15 16:33:09 -040073 COPYING \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000074 CREDITS \
75 ChangeLog \
76 ChangeLog-CVS \
77 README-linux \
78 README-linux-ptrace \
79 debian/changelog \
80 debian/compat \
81 debian/control \
82 debian/copyright \
83 debian/rules \
84 debian/source/format \
85 debian/strace-udeb.install \
86 debian/strace.docs \
87 debian/strace.examples \
88 debian/strace.install \
89 debian/strace.manpages \
90 debian/strace64.install \
91 debian/strace64.manpages \
92 debian/watch \
93 errnoent.sh \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +000094 linux/aarch64/errnoent1.h \
95 linux/aarch64/ioctlent.h.in \
96 linux/aarch64/ioctlent1.h \
97 linux/aarch64/signalent1.h \
98 linux/aarch64/syscallent.h \
99 linux/aarch64/syscallent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000100 linux/alpha/errnoent.h \
101 linux/alpha/ioctlent.h.in \
102 linux/alpha/signalent.h \
103 linux/alpha/syscallent.h \
Vineet Gupta7daacbb2013-08-16 12:47:06 +0530104 linux/arc/ioctlent.h.in \
105 linux/arc/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000106 linux/arm/ioctlent.h.in \
107 linux/arm/syscallent.h \
108 linux/avr32/ioctlent.h.in \
109 linux/avr32/syscallent.h \
110 linux/bfin/ioctlent.h.in \
111 linux/bfin/syscallent.h \
112 linux/dummy.h \
113 linux/errnoent.h \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +0000114 linux/fanotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000115 linux/hppa/errnoent.h \
116 linux/hppa/ioctlent.h.in \
117 linux/hppa/signalent.h \
118 linux/hppa/syscallent.h \
119 linux/i386/ioctlent.h.in \
120 linux/i386/syscallent.h \
121 linux/ia64/ioctlent.h.in \
122 linux/ia64/signalent.h \
123 linux/ia64/syscallent.h \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +0000124 linux/inotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000125 linux/ioctlent-filter.awk \
126 linux/ioctlent.h.in \
127 linux/ioctlent.sh \
128 linux/ioctlsort.c \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +0000129 linux/kexec.h \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +0000130 linux/keyctl.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000131 linux/m68k/ioctlent.h.in \
132 linux/m68k/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000133 linux/metag/ioctlent.h.in \
134 linux/metag/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000135 linux/microblaze/ioctlent.h.in \
136 linux/microblaze/syscallent.h \
137 linux/mips/errnoent.h \
138 linux/mips/ioctlent.h.in \
139 linux/mips/ioctlent.sh \
140 linux/mips/signalent.h \
Dmitry V. Levin34c445b2013-05-07 02:46:46 +0000141 linux/mips/syscallent-compat.h \
142 linux/mips/syscallent-n32.h \
143 linux/mips/syscallent-n64.h \
144 linux/mips/syscallent-o32.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000145 linux/mips/syscallent.h \
146 linux/mtd-abi.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000147 linux/or1k/ioctlent.h.in \
148 linux/or1k/syscallent.h \
Dmitry V. Levin2a32eaa2014-02-05 02:09:49 +0000149 linux/personality.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000150 linux/powerpc/errnoent1.h \
151 linux/powerpc/ioctlent.h.in \
152 linux/powerpc/ioctlent1.h \
153 linux/powerpc/signalent1.h \
154 linux/powerpc/syscallent.h \
155 linux/powerpc/syscallent1.h \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +0100156 linux/ptp_clock.h \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +0000157 linux/reboot.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000158 linux/s390/ioctlent.h.in \
159 linux/s390/syscallent.h \
160 linux/s390x/ioctlent.h.in \
161 linux/s390x/syscallent.h \
162 linux/sh/ioctlent.h.in \
163 linux/sh/syscallent.h \
164 linux/sh64/ioctlent.h.in \
165 linux/sh64/syscallent.h \
166 linux/signalent.h \
167 linux/sparc/dummy2.h \
168 linux/sparc/errnoent.h \
169 linux/sparc/errnoent1.h \
170 linux/sparc/gen.pl \
171 linux/sparc/ioctlent.h.in \
172 linux/sparc/ioctlent1.h \
173 linux/sparc/signalent.h \
174 linux/sparc/signalent1.h \
175 linux/sparc/syscall1.h \
176 linux/sparc/syscallent.h \
177 linux/sparc/syscallent1.h \
178 linux/sparc64/dummy2.h \
179 linux/sparc64/errnoent.h \
180 linux/sparc64/errnoent1.h \
181 linux/sparc64/errnoent2.h \
182 linux/sparc64/ioctlent.h.in \
183 linux/sparc64/ioctlent1.h \
184 linux/sparc64/ioctlent2.h \
185 linux/sparc64/signalent.h \
186 linux/sparc64/signalent1.h \
187 linux/sparc64/signalent2.h \
188 linux/sparc64/syscall1.h \
189 linux/sparc64/syscallent.h \
190 linux/sparc64/syscallent1.h \
191 linux/sparc64/syscallent2.h \
Dmitry V. Levinde462cf2013-05-07 18:38:01 +0400192 linux/subcall.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000193 linux/syscall.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000194 linux/tile/errnoent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000195 linux/tile/ioctlent.h.in \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000196 linux/tile/ioctlent1.h \
197 linux/tile/signalent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000198 linux/tile/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000199 linux/tile/syscallent1.h \
Dmitry V. Levin8e0b8be2013-06-02 18:09:44 +0000200 linux/ubi-user.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000201 linux/x32/errnoent.h \
202 linux/x32/errnoent1.h \
203 linux/x32/ioctlent.h.in \
204 linux/x32/ioctlent1.h \
205 linux/x32/signalent.h \
206 linux/x32/signalent1.h \
207 linux/x32/syscallent.h \
208 linux/x32/syscallent1.h \
209 linux/x86_64/errnoent1.h \
210 linux/x86_64/errnoent2.h \
211 linux/x86_64/gentab.pl \
212 linux/x86_64/ioctlent.h.in \
213 linux/x86_64/ioctlent1.h \
214 linux/x86_64/ioctlent2.h \
215 linux/x86_64/signalent1.h \
216 linux/x86_64/signalent2.h \
217 linux/x86_64/syscallent.h \
218 linux/x86_64/syscallent1.h \
219 linux/x86_64/syscallent2.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000220 linux/xtensa/ioctlent.h.in \
221 linux/xtensa/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000222 signalent.sh \
223 strace-graph \
224 strace-log-merge \
225 strace.spec \
226 syscallent.sh \
Mike Frysinger761ed9b2014-02-16 01:59:20 -0500227 $(XLAT_INPUT_FILES) \
228 $(XLAT_HEADER_FILES) \
229 xlat/gen.sh \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000230 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000231
Roland McGrath2b832df2009-10-06 17:46:56 -0700232.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000233srpm: dist-xz
234 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700235
Dmitry V. Levindce75932013-04-30 23:52:12 +0000236BUILT_SOURCES = .version
237
238$(srcdir)/.version:
239 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
240
241dist-hook:
242 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
243
244today = $(shell date +%Y-%m-%d)
245version_regexp = $(subst .,\.,$(VERSION))
246news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
247
248news-check: NEWS
249 $(AM_V_GEN)if head -1 $< | \
250 grep -x $(news_check_regexp) >/dev/null; then \
251 :; \
252 else \
253 echo >&2 '$<: check failed'; \
254 exit 1; \
255 fi
Mike Frysinger9004e122011-02-20 23:24:22 -0500256
Roland McGrathbc44e402004-07-12 05:45:08 +0000257if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700258
259gen_changelog_start_date = 2009-07-08 20:00
Dmitry V. Levindce75932013-04-30 23:52:12 +0000260$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
261 $(srcdir)/.version
Roland McGratha478d742009-10-06 17:41:02 -0700262 @rm -f $@.new
Dmitry V. Levindce75932013-04-30 23:52:12 +0000263 (cd $(srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000264 ./gitlog-to-changelog --append-dot \
265 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700266 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
267 ) > $@.new
268 chmod 444 $@.new
269 mv -f $@.new $@
270
Dmitry V. Levindce75932013-04-30 23:52:12 +0000271$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
272 $(srcdir)/Makefile.in $(srcdir)/.version
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000273 $(AM_V_GEN) \
274 { \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000275 cd $(srcdir); \
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000276 sed '/^##/,$$d' CREDITS.in; \
277 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
278 git log --pretty=format:'%aN %aE'; \
279 } | LC_ALL=C sort -u \
280 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
281 } > $@-t && mv $@-t $@
282
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000283export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
284
Roland McGrathbc44e402004-07-12 05:45:08 +0000285IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000286IOCTLASM = asm
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000287IOCTLSORT_INCLUDEDIR = $(IOCTLDIR)
Roland McGrathbc44e402004-07-12 05:45:08 +0000288
Mike Frysinger9004e122011-02-20 23:24:22 -0500289ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000290
Mike Frysinger9004e122011-02-20 23:24:22 -0500291BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000292
Mike Frysinger9004e122011-02-20 23:24:22 -0500293$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000294 $(<D)/$(<F) > $@
295ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000296 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLSORT_INCLUDEDIR) \
297 $(filter -I%,$(LINK.c)) \
Roland McGrathadc2b302004-07-12 06:11:03 +0000298 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000299ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000300 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000301ioctldefs.h: ioctls.h ;
302
303endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500304
305ioctlent_h = $(builddir)/$(OS)/ioctlent.h
306BUILT_SOURCES += $(ioctlent_h)
307CLEANFILES = $(ioctlent_h)
308ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
309$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
310 $(MKDIR_P) $(builddir)/$(OS)
311 cat $(ioctlent_h_deps) | \
312 $(COMPILE) -E -P - | \
Dmitry V. Levin17e38602012-10-27 01:11:13 +0000313 LC_ALL=C sort -u -k3,3 -k2,2 | \
314 awk -f $(srcdir)/linux/ioctlent-filter.awk > $@