blob: a9d2ff0cb0002f007c936c1392de9add916f7211 [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 \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +000023 fanotify.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000024 file.c \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +000025 inotify.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000026 io.c \
27 ioctl.c \
Dmitry V. Levinfc4727d2014-02-05 17:27:43 +000028 ioprio.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000029 ipc.c \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +000030 kexec.c \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +000031 keyctl.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000032 loop.c \
33 mem.c \
34 mtd.c \
35 net.c \
36 pathtrace.c \
37 process.c \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +010038 ptp.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000039 quota.c \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000040 reboot.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000041 resource.c \
42 scsi.c \
43 signal.c \
44 sock.c \
45 strace.c \
46 stream.c \
47 syscall.c \
48 system.c \
49 term.c \
50 time.c \
51 util.c \
52 vsprintf.c
53
Roland McGrath2746edd2002-12-30 09:13:08 +000054noinst_HEADERS = defs.h
Denys Vlasenko76f61be2013-03-06 18:59:09 +010055# Enable this to get link map generated
56#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
Roland McGrath6d2b3492002-12-30 00:51:30 +000057
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000058EXTRA_DIST = \
59 $(man_MANS) \
Dmitry V. Levindce75932013-04-30 23:52:12 +000060 .version \
Mike Frysinger6c191362013-05-15 16:33:09 -040061 COPYING \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000062 CREDITS \
63 ChangeLog \
64 ChangeLog-CVS \
65 README-linux \
66 README-linux-ptrace \
67 debian/changelog \
68 debian/compat \
69 debian/control \
70 debian/copyright \
71 debian/rules \
72 debian/source/format \
73 debian/strace-udeb.install \
74 debian/strace.docs \
75 debian/strace.examples \
76 debian/strace.install \
77 debian/strace.manpages \
78 debian/strace64.install \
79 debian/strace64.manpages \
80 debian/watch \
81 errnoent.sh \
82 ioctlsort.c \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +000083 linux/aarch64/errnoent1.h \
84 linux/aarch64/ioctlent.h.in \
85 linux/aarch64/ioctlent1.h \
86 linux/aarch64/signalent1.h \
87 linux/aarch64/syscallent.h \
88 linux/aarch64/syscallent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000089 linux/alpha/errnoent.h \
90 linux/alpha/ioctlent.h.in \
91 linux/alpha/signalent.h \
92 linux/alpha/syscallent.h \
Vineet Gupta7daacbb2013-08-16 12:47:06 +053093 linux/arc/ioctlent.h.in \
94 linux/arc/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000095 linux/arm/ioctlent.h.in \
96 linux/arm/syscallent.h \
97 linux/avr32/ioctlent.h.in \
98 linux/avr32/syscallent.h \
99 linux/bfin/ioctlent.h.in \
100 linux/bfin/syscallent.h \
101 linux/dummy.h \
102 linux/errnoent.h \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +0000103 linux/fanotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000104 linux/hppa/errnoent.h \
105 linux/hppa/ioctlent.h.in \
106 linux/hppa/signalent.h \
107 linux/hppa/syscallent.h \
108 linux/i386/ioctlent.h.in \
109 linux/i386/syscallent.h \
110 linux/ia64/ioctlent.h.in \
111 linux/ia64/signalent.h \
112 linux/ia64/syscallent.h \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +0000113 linux/inotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000114 linux/ioctlent-filter.awk \
115 linux/ioctlent.h.in \
116 linux/ioctlent.sh \
117 linux/ioctlsort.c \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +0000118 linux/kexec.h \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +0000119 linux/keyctl.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000120 linux/m68k/ioctlent.h.in \
121 linux/m68k/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000122 linux/metag/ioctlent.h.in \
123 linux/metag/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000124 linux/microblaze/ioctlent.h.in \
125 linux/microblaze/syscallent.h \
126 linux/mips/errnoent.h \
127 linux/mips/ioctlent.h.in \
128 linux/mips/ioctlent.sh \
129 linux/mips/signalent.h \
Dmitry V. Levin34c445b2013-05-07 02:46:46 +0000130 linux/mips/syscallent-compat.h \
131 linux/mips/syscallent-n32.h \
132 linux/mips/syscallent-n64.h \
133 linux/mips/syscallent-o32.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000134 linux/mips/syscallent.h \
135 linux/mtd-abi.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000136 linux/or1k/ioctlent.h.in \
137 linux/or1k/syscallent.h \
Dmitry V. Levin2a32eaa2014-02-05 02:09:49 +0000138 linux/personality.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000139 linux/powerpc/errnoent1.h \
140 linux/powerpc/ioctlent.h.in \
141 linux/powerpc/ioctlent1.h \
142 linux/powerpc/signalent1.h \
143 linux/powerpc/syscallent.h \
144 linux/powerpc/syscallent1.h \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +0100145 linux/ptp_clock.h \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +0000146 linux/reboot.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000147 linux/s390/ioctlent.h.in \
148 linux/s390/syscallent.h \
149 linux/s390x/ioctlent.h.in \
150 linux/s390x/syscallent.h \
151 linux/sh/ioctlent.h.in \
152 linux/sh/syscallent.h \
153 linux/sh64/ioctlent.h.in \
154 linux/sh64/syscallent.h \
155 linux/signalent.h \
156 linux/sparc/dummy2.h \
157 linux/sparc/errnoent.h \
158 linux/sparc/errnoent1.h \
159 linux/sparc/gen.pl \
160 linux/sparc/ioctlent.h.in \
161 linux/sparc/ioctlent1.h \
162 linux/sparc/signalent.h \
163 linux/sparc/signalent1.h \
164 linux/sparc/syscall1.h \
165 linux/sparc/syscallent.h \
166 linux/sparc/syscallent1.h \
167 linux/sparc64/dummy2.h \
168 linux/sparc64/errnoent.h \
169 linux/sparc64/errnoent1.h \
170 linux/sparc64/errnoent2.h \
171 linux/sparc64/ioctlent.h.in \
172 linux/sparc64/ioctlent1.h \
173 linux/sparc64/ioctlent2.h \
174 linux/sparc64/signalent.h \
175 linux/sparc64/signalent1.h \
176 linux/sparc64/signalent2.h \
177 linux/sparc64/syscall1.h \
178 linux/sparc64/syscallent.h \
179 linux/sparc64/syscallent1.h \
180 linux/sparc64/syscallent2.h \
Dmitry V. Levinde462cf2013-05-07 18:38:01 +0400181 linux/subcall.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000182 linux/syscall.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000183 linux/tile/errnoent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000184 linux/tile/ioctlent.h.in \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000185 linux/tile/ioctlent1.h \
186 linux/tile/signalent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000187 linux/tile/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000188 linux/tile/syscallent1.h \
Dmitry V. Levin8e0b8be2013-06-02 18:09:44 +0000189 linux/ubi-user.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000190 linux/x32/errnoent.h \
191 linux/x32/errnoent1.h \
192 linux/x32/ioctlent.h.in \
193 linux/x32/ioctlent1.h \
194 linux/x32/signalent.h \
195 linux/x32/signalent1.h \
196 linux/x32/syscallent.h \
197 linux/x32/syscallent1.h \
198 linux/x86_64/errnoent1.h \
199 linux/x86_64/errnoent2.h \
200 linux/x86_64/gentab.pl \
201 linux/x86_64/ioctlent.h.in \
202 linux/x86_64/ioctlent1.h \
203 linux/x86_64/ioctlent2.h \
204 linux/x86_64/signalent1.h \
205 linux/x86_64/signalent2.h \
206 linux/x86_64/syscallent.h \
207 linux/x86_64/syscallent1.h \
208 linux/x86_64/syscallent2.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000209 linux/xtensa/ioctlent.h.in \
210 linux/xtensa/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000211 signalent.sh \
212 strace-graph \
213 strace-log-merge \
214 strace.spec \
215 syscallent.sh \
216 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000217
Roland McGrath2b832df2009-10-06 17:46:56 -0700218.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000219srpm: dist-xz
220 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700221
Dmitry V. Levindce75932013-04-30 23:52:12 +0000222BUILT_SOURCES = .version
223
224$(srcdir)/.version:
225 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
226
227dist-hook:
228 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
229
230today = $(shell date +%Y-%m-%d)
231version_regexp = $(subst .,\.,$(VERSION))
232news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
233
234news-check: NEWS
235 $(AM_V_GEN)if head -1 $< | \
236 grep -x $(news_check_regexp) >/dev/null; then \
237 :; \
238 else \
239 echo >&2 '$<: check failed'; \
240 exit 1; \
241 fi
Mike Frysinger9004e122011-02-20 23:24:22 -0500242
Roland McGrathbc44e402004-07-12 05:45:08 +0000243if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700244
245gen_changelog_start_date = 2009-07-08 20:00
Dmitry V. Levindce75932013-04-30 23:52:12 +0000246$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
247 $(srcdir)/.version
Roland McGratha478d742009-10-06 17:41:02 -0700248 @rm -f $@.new
Dmitry V. Levindce75932013-04-30 23:52:12 +0000249 (cd $(srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000250 ./gitlog-to-changelog --append-dot \
251 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700252 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
253 ) > $@.new
254 chmod 444 $@.new
255 mv -f $@.new $@
256
Dmitry V. Levindce75932013-04-30 23:52:12 +0000257$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
258 $(srcdir)/Makefile.in $(srcdir)/.version
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000259 $(AM_V_GEN) \
260 { \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000261 cd $(srcdir); \
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000262 sed '/^##/,$$d' CREDITS.in; \
263 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
264 git log --pretty=format:'%aN %aE'; \
265 } | LC_ALL=C sort -u \
266 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
267 } > $@-t && mv $@-t $@
268
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000269export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
270
Roland McGrathbc44e402004-07-12 05:45:08 +0000271IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000272IOCTLASM = asm
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000273IOCTLSORT_INCLUDEDIR = $(IOCTLDIR)
Roland McGrathbc44e402004-07-12 05:45:08 +0000274
Mike Frysinger9004e122011-02-20 23:24:22 -0500275ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000276
Mike Frysinger9004e122011-02-20 23:24:22 -0500277BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000278
Mike Frysinger9004e122011-02-20 23:24:22 -0500279$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000280 $(<D)/$(<F) > $@
281ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000282 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLSORT_INCLUDEDIR) \
283 $(filter -I%,$(LINK.c)) \
Roland McGrathadc2b302004-07-12 06:11:03 +0000284 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000285ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000286 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000287ioctldefs.h: ioctls.h ;
288
289endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500290
291ioctlent_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 - | \
Dmitry V. Levin17e38602012-10-27 01:11:13 +0000299 LC_ALL=C sort -u -k3,3 -k2,2 | \
300 awk -f $(srcdir)/linux/ioctlent-filter.awk > $@