blob: 67e80aab1c0611b7b65dc4fafc812ad4d19a326d [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) \
52 COPYRIGHT \
53 CREDITS \
54 ChangeLog \
55 ChangeLog-CVS \
56 README-linux \
57 README-linux-ptrace \
58 debian/changelog \
59 debian/compat \
60 debian/control \
61 debian/copyright \
62 debian/rules \
63 debian/source/format \
64 debian/strace-udeb.install \
65 debian/strace.docs \
66 debian/strace.examples \
67 debian/strace.install \
68 debian/strace.manpages \
69 debian/strace64.install \
70 debian/strace64.manpages \
71 debian/watch \
72 errnoent.sh \
73 ioctlsort.c \
74 linux/alpha/errnoent.h \
75 linux/alpha/ioctlent.h.in \
76 linux/alpha/signalent.h \
77 linux/alpha/syscallent.h \
78 linux/arm/ioctlent.h.in \
79 linux/arm/syscallent.h \
80 linux/avr32/ioctlent.h.in \
81 linux/avr32/syscallent.h \
82 linux/bfin/ioctlent.h.in \
83 linux/bfin/syscallent.h \
84 linux/dummy.h \
85 linux/errnoent.h \
86 linux/hppa/errnoent.h \
87 linux/hppa/ioctlent.h.in \
88 linux/hppa/signalent.h \
89 linux/hppa/syscallent.h \
90 linux/i386/ioctlent.h.in \
91 linux/i386/syscallent.h \
92 linux/ia64/ioctlent.h.in \
93 linux/ia64/signalent.h \
94 linux/ia64/syscallent.h \
95 linux/ioctlent-filter.awk \
96 linux/ioctlent.h.in \
97 linux/ioctlent.sh \
98 linux/ioctlsort.c \
99 linux/m68k/ioctlent.h.in \
100 linux/m68k/syscallent.h \
101 linux/microblaze/ioctlent.h.in \
102 linux/microblaze/syscallent.h \
103 linux/mips/errnoent.h \
104 linux/mips/ioctlent.h.in \
105 linux/mips/ioctlent.sh \
106 linux/mips/signalent.h \
107 linux/mips/syscallent.h \
108 linux/mtd-abi.h \
109 linux/powerpc/errnoent1.h \
110 linux/powerpc/ioctlent.h.in \
111 linux/powerpc/ioctlent1.h \
112 linux/powerpc/signalent1.h \
113 linux/powerpc/syscallent.h \
114 linux/powerpc/syscallent1.h \
115 linux/s390/ioctlent.h.in \
116 linux/s390/syscallent.h \
117 linux/s390x/ioctlent.h.in \
118 linux/s390x/syscallent.h \
119 linux/sh/ioctlent.h.in \
120 linux/sh/syscallent.h \
121 linux/sh64/ioctlent.h.in \
122 linux/sh64/syscallent.h \
123 linux/signalent.h \
124 linux/sparc/dummy2.h \
125 linux/sparc/errnoent.h \
126 linux/sparc/errnoent1.h \
127 linux/sparc/gen.pl \
128 linux/sparc/ioctlent.h.in \
129 linux/sparc/ioctlent1.h \
130 linux/sparc/signalent.h \
131 linux/sparc/signalent1.h \
132 linux/sparc/syscall1.h \
133 linux/sparc/syscallent.h \
134 linux/sparc/syscallent1.h \
135 linux/sparc64/dummy2.h \
136 linux/sparc64/errnoent.h \
137 linux/sparc64/errnoent1.h \
138 linux/sparc64/errnoent2.h \
139 linux/sparc64/ioctlent.h.in \
140 linux/sparc64/ioctlent1.h \
141 linux/sparc64/ioctlent2.h \
142 linux/sparc64/signalent.h \
143 linux/sparc64/signalent1.h \
144 linux/sparc64/signalent2.h \
145 linux/sparc64/syscall1.h \
146 linux/sparc64/syscallent.h \
147 linux/sparc64/syscallent1.h \
148 linux/sparc64/syscallent2.h \
149 linux/syscall.h \
150 linux/tile/ioctlent.h.in \
151 linux/tile/syscallent.h \
152 linux/x32/errnoent.h \
153 linux/x32/errnoent1.h \
154 linux/x32/ioctlent.h.in \
155 linux/x32/ioctlent1.h \
156 linux/x32/signalent.h \
157 linux/x32/signalent1.h \
158 linux/x32/syscallent.h \
159 linux/x32/syscallent1.h \
160 linux/x86_64/errnoent1.h \
161 linux/x86_64/errnoent2.h \
162 linux/x86_64/gentab.pl \
163 linux/x86_64/ioctlent.h.in \
164 linux/x86_64/ioctlent1.h \
165 linux/x86_64/ioctlent2.h \
166 linux/x86_64/signalent1.h \
167 linux/x86_64/signalent2.h \
168 linux/x86_64/syscallent.h \
169 linux/x86_64/syscallent1.h \
170 linux/x86_64/syscallent2.h \
171 signalent.sh \
172 strace-graph \
173 strace-log-merge \
174 strace.spec \
175 syscallent.sh \
176 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000177
Roland McGrath2b832df2009-10-06 17:46:56 -0700178.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000179srpm: dist-xz
180 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700181
Mike Frysinger9004e122011-02-20 23:24:22 -0500182BUILT_SOURCES =
183
Roland McGrathbc44e402004-07-12 05:45:08 +0000184if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700185
186gen_changelog_start_date = 2009-07-08 20:00
187$(srcdir)/ChangeLog: $(top_srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
188 $(top_srcdir)/.git/refs/heads/*
189 @rm -f $@.new
190 (cd $(top_srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000191 ./gitlog-to-changelog --append-dot \
192 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700193 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
194 ) > $@.new
195 chmod 444 $@.new
196 mv -f $@.new $@
197
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000198$(srcdir)/CREDITS: $(top_srcdir)/CREDITS.in $(top_srcdir)/.mailmap \
Sebastian Pipping6c0e2fc2011-03-04 02:21:28 +0100199 $(srcdir)/Makefile.in $(top_srcdir)/.git/refs/heads/*
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000200 $(AM_V_GEN) \
201 { \
202 cd $(top_srcdir); \
203 sed '/^##/,$$d' CREDITS.in; \
204 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
205 git log --pretty=format:'%aN %aE'; \
206 } | LC_ALL=C sort -u \
207 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
208 } > $@-t && mv $@-t $@
209
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000210export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
211
Roland McGrathbc44e402004-07-12 05:45:08 +0000212IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000213IOCTLASM = asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000214
Mike Frysinger9004e122011-02-20 23:24:22 -0500215ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000216
Mike Frysinger9004e122011-02-20 23:24:22 -0500217BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000218
Mike Frysinger9004e122011-02-20 23:24:22 -0500219$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000220 $(<D)/$(<F) > $@
221ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Roland McGrathadc2b302004-07-12 06:11:03 +0000222 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLDIR) $(filter -I%,$(LINK.c)) \
223 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000224ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000225 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000226ioctldefs.h: ioctls.h ;
227
228endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500229
230ioctlent_h = $(builddir)/$(OS)/ioctlent.h
231BUILT_SOURCES += $(ioctlent_h)
232CLEANFILES = $(ioctlent_h)
233ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
234$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
235 $(MKDIR_P) $(builddir)/$(OS)
236 cat $(ioctlent_h_deps) | \
237 $(COMPILE) -E -P - | \
Dmitry V. Levin17e38602012-10-27 01:11:13 +0000238 LC_ALL=C sort -u -k3,3 -k2,2 | \
239 awk -f $(srcdir)/linux/ioctlent-filter.awk > $@