blob: 9d611f396537620ab86775e1e2d694ad75d6c8ff [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 = \
18 bjm.c \
19 block.c \
20 count.c \
21 desc.c \
22 file.c \
23 io.c \
24 ioctl.c \
25 ipc.c \
26 loop.c \
27 mem.c \
28 mtd.c \
29 net.c \
30 pathtrace.c \
31 process.c \
32 quota.c \
33 resource.c \
34 scsi.c \
35 signal.c \
36 sock.c \
37 strace.c \
38 stream.c \
39 syscall.c \
40 system.c \
41 term.c \
42 time.c \
43 util.c \
44 vsprintf.c
45
Roland McGrath2746edd2002-12-30 09:13:08 +000046noinst_HEADERS = defs.h
Denys Vlasenko76f61be2013-03-06 18:59:09 +010047# Enable this to get link map generated
48#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
Roland McGrath6d2b3492002-12-30 00:51:30 +000049
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000050EXTRA_DIST = \
51 $(man_MANS) \
Dmitry V. Levindce75932013-04-30 23:52:12 +000052 .version \
Mike Frysinger6c191362013-05-15 16:33:09 -040053 COPYING \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000054 CREDITS \
55 ChangeLog \
56 ChangeLog-CVS \
57 README-linux \
58 README-linux-ptrace \
59 debian/changelog \
60 debian/compat \
61 debian/control \
62 debian/copyright \
63 debian/rules \
64 debian/source/format \
65 debian/strace-udeb.install \
66 debian/strace.docs \
67 debian/strace.examples \
68 debian/strace.install \
69 debian/strace.manpages \
70 debian/strace64.install \
71 debian/strace64.manpages \
72 debian/watch \
73 errnoent.sh \
74 ioctlsort.c \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +000075 linux/aarch64/errnoent1.h \
76 linux/aarch64/ioctlent.h.in \
77 linux/aarch64/ioctlent1.h \
78 linux/aarch64/signalent1.h \
79 linux/aarch64/syscallent.h \
80 linux/aarch64/syscallent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000081 linux/alpha/errnoent.h \
82 linux/alpha/ioctlent.h.in \
83 linux/alpha/signalent.h \
84 linux/alpha/syscallent.h \
85 linux/arm/ioctlent.h.in \
86 linux/arm/syscallent.h \
87 linux/avr32/ioctlent.h.in \
88 linux/avr32/syscallent.h \
89 linux/bfin/ioctlent.h.in \
90 linux/bfin/syscallent.h \
91 linux/dummy.h \
92 linux/errnoent.h \
93 linux/hppa/errnoent.h \
94 linux/hppa/ioctlent.h.in \
95 linux/hppa/signalent.h \
96 linux/hppa/syscallent.h \
97 linux/i386/ioctlent.h.in \
98 linux/i386/syscallent.h \
99 linux/ia64/ioctlent.h.in \
100 linux/ia64/signalent.h \
101 linux/ia64/syscallent.h \
102 linux/ioctlent-filter.awk \
103 linux/ioctlent.h.in \
104 linux/ioctlent.sh \
105 linux/ioctlsort.c \
106 linux/m68k/ioctlent.h.in \
107 linux/m68k/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000108 linux/metag/ioctlent.h.in \
109 linux/metag/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000110 linux/microblaze/ioctlent.h.in \
111 linux/microblaze/syscallent.h \
112 linux/mips/errnoent.h \
113 linux/mips/ioctlent.h.in \
114 linux/mips/ioctlent.sh \
115 linux/mips/signalent.h \
Dmitry V. Levin34c445b2013-05-07 02:46:46 +0000116 linux/mips/syscallent-compat.h \
117 linux/mips/syscallent-n32.h \
118 linux/mips/syscallent-n64.h \
119 linux/mips/syscallent-o32.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000120 linux/mips/syscallent.h \
121 linux/mtd-abi.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000122 linux/or1k/ioctlent.h.in \
123 linux/or1k/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000124 linux/powerpc/errnoent1.h \
125 linux/powerpc/ioctlent.h.in \
126 linux/powerpc/ioctlent1.h \
127 linux/powerpc/signalent1.h \
128 linux/powerpc/syscallent.h \
129 linux/powerpc/syscallent1.h \
130 linux/s390/ioctlent.h.in \
131 linux/s390/syscallent.h \
132 linux/s390x/ioctlent.h.in \
133 linux/s390x/syscallent.h \
134 linux/sh/ioctlent.h.in \
135 linux/sh/syscallent.h \
136 linux/sh64/ioctlent.h.in \
137 linux/sh64/syscallent.h \
138 linux/signalent.h \
139 linux/sparc/dummy2.h \
140 linux/sparc/errnoent.h \
141 linux/sparc/errnoent1.h \
142 linux/sparc/gen.pl \
143 linux/sparc/ioctlent.h.in \
144 linux/sparc/ioctlent1.h \
145 linux/sparc/signalent.h \
146 linux/sparc/signalent1.h \
147 linux/sparc/syscall1.h \
148 linux/sparc/syscallent.h \
149 linux/sparc/syscallent1.h \
150 linux/sparc64/dummy2.h \
151 linux/sparc64/errnoent.h \
152 linux/sparc64/errnoent1.h \
153 linux/sparc64/errnoent2.h \
154 linux/sparc64/ioctlent.h.in \
155 linux/sparc64/ioctlent1.h \
156 linux/sparc64/ioctlent2.h \
157 linux/sparc64/signalent.h \
158 linux/sparc64/signalent1.h \
159 linux/sparc64/signalent2.h \
160 linux/sparc64/syscall1.h \
161 linux/sparc64/syscallent.h \
162 linux/sparc64/syscallent1.h \
163 linux/sparc64/syscallent2.h \
Dmitry V. Levinde462cf2013-05-07 18:38:01 +0400164 linux/subcall.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000165 linux/syscall.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000166 linux/tile/errnoent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000167 linux/tile/ioctlent.h.in \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000168 linux/tile/ioctlent1.h \
169 linux/tile/signalent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000170 linux/tile/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000171 linux/tile/syscallent1.h \
Dmitry V. Levin8e0b8be2013-06-02 18:09:44 +0000172 linux/ubi-user.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000173 linux/x32/errnoent.h \
174 linux/x32/errnoent1.h \
175 linux/x32/ioctlent.h.in \
176 linux/x32/ioctlent1.h \
177 linux/x32/signalent.h \
178 linux/x32/signalent1.h \
179 linux/x32/syscallent.h \
180 linux/x32/syscallent1.h \
181 linux/x86_64/errnoent1.h \
182 linux/x86_64/errnoent2.h \
183 linux/x86_64/gentab.pl \
184 linux/x86_64/ioctlent.h.in \
185 linux/x86_64/ioctlent1.h \
186 linux/x86_64/ioctlent2.h \
187 linux/x86_64/signalent1.h \
188 linux/x86_64/signalent2.h \
189 linux/x86_64/syscallent.h \
190 linux/x86_64/syscallent1.h \
191 linux/x86_64/syscallent2.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000192 linux/xtensa/ioctlent.h.in \
193 linux/xtensa/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000194 signalent.sh \
195 strace-graph \
196 strace-log-merge \
197 strace.spec \
198 syscallent.sh \
199 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000200
Roland McGrath2b832df2009-10-06 17:46:56 -0700201.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000202srpm: dist-xz
203 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700204
Dmitry V. Levindce75932013-04-30 23:52:12 +0000205BUILT_SOURCES = .version
206
207$(srcdir)/.version:
208 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
209
210dist-hook:
211 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
212
213today = $(shell date +%Y-%m-%d)
214version_regexp = $(subst .,\.,$(VERSION))
215news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
216
217news-check: NEWS
218 $(AM_V_GEN)if head -1 $< | \
219 grep -x $(news_check_regexp) >/dev/null; then \
220 :; \
221 else \
222 echo >&2 '$<: check failed'; \
223 exit 1; \
224 fi
Mike Frysinger9004e122011-02-20 23:24:22 -0500225
Roland McGrathbc44e402004-07-12 05:45:08 +0000226if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700227
228gen_changelog_start_date = 2009-07-08 20:00
Dmitry V. Levindce75932013-04-30 23:52:12 +0000229$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
230 $(srcdir)/.version
Roland McGratha478d742009-10-06 17:41:02 -0700231 @rm -f $@.new
Dmitry V. Levindce75932013-04-30 23:52:12 +0000232 (cd $(srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000233 ./gitlog-to-changelog --append-dot \
234 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700235 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
236 ) > $@.new
237 chmod 444 $@.new
238 mv -f $@.new $@
239
Dmitry V. Levindce75932013-04-30 23:52:12 +0000240$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
241 $(srcdir)/Makefile.in $(srcdir)/.version
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000242 $(AM_V_GEN) \
243 { \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000244 cd $(srcdir); \
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000245 sed '/^##/,$$d' CREDITS.in; \
246 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
247 git log --pretty=format:'%aN %aE'; \
248 } | LC_ALL=C sort -u \
249 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
250 } > $@-t && mv $@-t $@
251
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000252export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
253
Roland McGrathbc44e402004-07-12 05:45:08 +0000254IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000255IOCTLASM = asm
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000256IOCTLSORT_INCLUDEDIR = $(IOCTLDIR)
Roland McGrathbc44e402004-07-12 05:45:08 +0000257
Mike Frysinger9004e122011-02-20 23:24:22 -0500258ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000259
Mike Frysinger9004e122011-02-20 23:24:22 -0500260BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000261
Mike Frysinger9004e122011-02-20 23:24:22 -0500262$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000263 $(<D)/$(<F) > $@
264ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Dmitry V. Levin1cd3f5f2013-06-03 16:24:53 +0000265 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLSORT_INCLUDEDIR) \
266 $(filter -I%,$(LINK.c)) \
Roland McGrathadc2b302004-07-12 06:11:03 +0000267 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000268ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000269 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000270ioctldefs.h: ioctls.h ;
271
272endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500273
274ioctlent_h = $(builddir)/$(OS)/ioctlent.h
275BUILT_SOURCES += $(ioctlent_h)
276CLEANFILES = $(ioctlent_h)
277ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
278$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
279 $(MKDIR_P) $(builddir)/$(OS)
280 cat $(ioctlent_h_deps) | \
281 $(COMPILE) -E -P - | \
Dmitry V. Levin17e38602012-10-27 01:11:13 +0000282 LC_ALL=C sort -u -k3,3 -k2,2 | \
283 awk -f $(srcdir)/linux/ioctlent-filter.awk > $@