blob: 99d9eaf5fd9f8d7652e98d0d3c31921495f0bee9 [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 \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000053 COPYRIGHT \
54 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 \
75 linux/alpha/errnoent.h \
76 linux/alpha/ioctlent.h.in \
77 linux/alpha/signalent.h \
78 linux/alpha/syscallent.h \
79 linux/arm/ioctlent.h.in \
80 linux/arm/syscallent.h \
81 linux/avr32/ioctlent.h.in \
82 linux/avr32/syscallent.h \
83 linux/bfin/ioctlent.h.in \
84 linux/bfin/syscallent.h \
85 linux/dummy.h \
86 linux/errnoent.h \
87 linux/hppa/errnoent.h \
88 linux/hppa/ioctlent.h.in \
89 linux/hppa/signalent.h \
90 linux/hppa/syscallent.h \
91 linux/i386/ioctlent.h.in \
92 linux/i386/syscallent.h \
93 linux/ia64/ioctlent.h.in \
94 linux/ia64/signalent.h \
95 linux/ia64/syscallent.h \
96 linux/ioctlent-filter.awk \
97 linux/ioctlent.h.in \
98 linux/ioctlent.sh \
99 linux/ioctlsort.c \
100 linux/m68k/ioctlent.h.in \
101 linux/m68k/syscallent.h \
102 linux/microblaze/ioctlent.h.in \
103 linux/microblaze/syscallent.h \
104 linux/mips/errnoent.h \
105 linux/mips/ioctlent.h.in \
106 linux/mips/ioctlent.sh \
107 linux/mips/signalent.h \
Dmitry V. Levin34c445b2013-05-07 02:46:46 +0000108 linux/mips/syscallent-compat.h \
109 linux/mips/syscallent-n32.h \
110 linux/mips/syscallent-n64.h \
111 linux/mips/syscallent-o32.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000112 linux/mips/syscallent.h \
113 linux/mtd-abi.h \
114 linux/powerpc/errnoent1.h \
115 linux/powerpc/ioctlent.h.in \
116 linux/powerpc/ioctlent1.h \
117 linux/powerpc/signalent1.h \
118 linux/powerpc/syscallent.h \
119 linux/powerpc/syscallent1.h \
120 linux/s390/ioctlent.h.in \
121 linux/s390/syscallent.h \
122 linux/s390x/ioctlent.h.in \
123 linux/s390x/syscallent.h \
124 linux/sh/ioctlent.h.in \
125 linux/sh/syscallent.h \
126 linux/sh64/ioctlent.h.in \
127 linux/sh64/syscallent.h \
128 linux/signalent.h \
129 linux/sparc/dummy2.h \
130 linux/sparc/errnoent.h \
131 linux/sparc/errnoent1.h \
132 linux/sparc/gen.pl \
133 linux/sparc/ioctlent.h.in \
134 linux/sparc/ioctlent1.h \
135 linux/sparc/signalent.h \
136 linux/sparc/signalent1.h \
137 linux/sparc/syscall1.h \
138 linux/sparc/syscallent.h \
139 linux/sparc/syscallent1.h \
140 linux/sparc64/dummy2.h \
141 linux/sparc64/errnoent.h \
142 linux/sparc64/errnoent1.h \
143 linux/sparc64/errnoent2.h \
144 linux/sparc64/ioctlent.h.in \
145 linux/sparc64/ioctlent1.h \
146 linux/sparc64/ioctlent2.h \
147 linux/sparc64/signalent.h \
148 linux/sparc64/signalent1.h \
149 linux/sparc64/signalent2.h \
150 linux/sparc64/syscall1.h \
151 linux/sparc64/syscallent.h \
152 linux/sparc64/syscallent1.h \
153 linux/sparc64/syscallent2.h \
Dmitry V. Levinde462cf2013-05-07 18:38:01 +0400154 linux/subcall.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000155 linux/syscall.h \
156 linux/tile/ioctlent.h.in \
157 linux/tile/syscallent.h \
158 linux/x32/errnoent.h \
159 linux/x32/errnoent1.h \
160 linux/x32/ioctlent.h.in \
161 linux/x32/ioctlent1.h \
162 linux/x32/signalent.h \
163 linux/x32/signalent1.h \
164 linux/x32/syscallent.h \
165 linux/x32/syscallent1.h \
166 linux/x86_64/errnoent1.h \
167 linux/x86_64/errnoent2.h \
168 linux/x86_64/gentab.pl \
169 linux/x86_64/ioctlent.h.in \
170 linux/x86_64/ioctlent1.h \
171 linux/x86_64/ioctlent2.h \
172 linux/x86_64/signalent1.h \
173 linux/x86_64/signalent2.h \
174 linux/x86_64/syscallent.h \
175 linux/x86_64/syscallent1.h \
176 linux/x86_64/syscallent2.h \
177 signalent.sh \
178 strace-graph \
179 strace-log-merge \
180 strace.spec \
181 syscallent.sh \
182 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000183
Roland McGrath2b832df2009-10-06 17:46:56 -0700184.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000185srpm: dist-xz
186 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700187
Dmitry V. Levindce75932013-04-30 23:52:12 +0000188BUILT_SOURCES = .version
189
190$(srcdir)/.version:
191 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
192
193dist-hook:
194 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
195
196today = $(shell date +%Y-%m-%d)
197version_regexp = $(subst .,\.,$(VERSION))
198news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
199
200news-check: NEWS
201 $(AM_V_GEN)if head -1 $< | \
202 grep -x $(news_check_regexp) >/dev/null; then \
203 :; \
204 else \
205 echo >&2 '$<: check failed'; \
206 exit 1; \
207 fi
Mike Frysinger9004e122011-02-20 23:24:22 -0500208
Roland McGrathbc44e402004-07-12 05:45:08 +0000209if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700210
211gen_changelog_start_date = 2009-07-08 20:00
Dmitry V. Levindce75932013-04-30 23:52:12 +0000212$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
213 $(srcdir)/.version
Roland McGratha478d742009-10-06 17:41:02 -0700214 @rm -f $@.new
Dmitry V. Levindce75932013-04-30 23:52:12 +0000215 (cd $(srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000216 ./gitlog-to-changelog --append-dot \
217 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700218 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
219 ) > $@.new
220 chmod 444 $@.new
221 mv -f $@.new $@
222
Dmitry V. Levindce75932013-04-30 23:52:12 +0000223$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
224 $(srcdir)/Makefile.in $(srcdir)/.version
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000225 $(AM_V_GEN) \
226 { \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000227 cd $(srcdir); \
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000228 sed '/^##/,$$d' CREDITS.in; \
229 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
230 git log --pretty=format:'%aN %aE'; \
231 } | LC_ALL=C sort -u \
232 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
233 } > $@-t && mv $@-t $@
234
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000235export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
236
Roland McGrathbc44e402004-07-12 05:45:08 +0000237IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000238IOCTLASM = asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000239
Mike Frysinger9004e122011-02-20 23:24:22 -0500240ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000241
Mike Frysinger9004e122011-02-20 23:24:22 -0500242BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000243
Mike Frysinger9004e122011-02-20 23:24:22 -0500244$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000245 $(<D)/$(<F) > $@
246ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Roland McGrathadc2b302004-07-12 06:11:03 +0000247 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLDIR) $(filter -I%,$(LINK.c)) \
248 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000249ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000250 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000251ioctldefs.h: ioctls.h ;
252
253endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500254
255ioctlent_h = $(builddir)/$(OS)/ioctlent.h
256BUILT_SOURCES += $(ioctlent_h)
257CLEANFILES = $(ioctlent_h)
258ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
259$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
260 $(MKDIR_P) $(builddir)/$(OS)
261 cat $(ioctlent_h_deps) | \
262 $(COMPILE) -E -P - | \
Dmitry V. Levin17e38602012-10-27 01:11:13 +0000263 LC_ALL=C sort -u -k3,3 -k2,2 | \
264 awk -f $(srcdir)/linux/ioctlent-filter.awk > $@