]> granicus.if.org Git - strace/blob - Makefile.am
process.c: move sched_* parsers to a separate file
[strace] / Makefile.am
1 # Automake input for strace.
2
3 SUBDIRS = tests
4
5 bin_PROGRAMS = strace
6 man_MANS = strace.1
7 bin_SCRIPTS = strace-graph strace-log-merge
8
9 OS              = linux
10 # ARCH is `i386', `m68k', `sparc', etc.
11 ARCH            = @arch@
12
13 ACLOCAL_AMFLAGS = -I m4
14 AM_CFLAGS = $(WARN_CFLAGS)
15 AM_CPPFLAGS = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS) -I$(builddir)/$(OS)
16
17 include xlat/Makemodule.am
18
19 strace_SOURCES =        \
20         access.c        \
21         affinity.c      \
22         aio.c           \
23         bjm.c           \
24         block.c         \
25         cacheflush.c    \
26         capability.c    \
27         chdir.c         \
28         chmod.c         \
29         chown.c         \
30         count.c         \
31         desc.c          \
32         dirent.c        \
33         fadvise.c       \
34         fallocate.c     \
35         fanotify.c      \
36         file.c          \
37         getcpu.c        \
38         getcwd.c        \
39         inotify.c       \
40         io.c            \
41         ioctl.c         \
42         ioprio.c        \
43         ipc.c           \
44         kexec.c         \
45         keyctl.c        \
46         ldt.c           \
47         link.c          \
48         loop.c          \
49         lseek.c         \
50         mem.c           \
51         mknod.c         \
52         mount.c         \
53         mtd.c           \
54         net.c           \
55         open.c          \
56         or1k_atomic.c   \
57         pathtrace.c     \
58         personality.c   \
59         prctl.c         \
60         printmode.c     \
61         process.c       \
62         process_vm.c    \
63         ptp.c           \
64         quota.c         \
65         readahead.c     \
66         readlink.c      \
67         reboot.c        \
68         renameat.c      \
69         resource.c      \
70         sched.c         \
71         scsi.c          \
72         signal.c        \
73         sock.c          \
74         socketutils.c   \
75         sram_alloc.c    \
76         statfs.c        \
77         strace.c        \
78         stream.c        \
79         swapon.c        \
80         sync_file_range.c \
81         syscall.c       \
82         sysctl.c        \
83         sysinfo.c       \
84         syslog.c        \
85         sysmips.c       \
86         term.c          \
87         time.c          \
88         truncate.c      \
89         umask.c         \
90         umount.c        \
91         util.c          \
92         utime.c         \
93         utimes.c        \
94         v4l2.c          \
95         vsprintf.c      \
96         xattr.c
97
98 if USE_LIBUNWIND
99 strace_SOURCES += unwind.c
100 strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
101 strace_LDFLAGS = $(libunwind_LDFLAGS)
102 strace_LDADD = $(libunwind_LIBS)
103 else
104 strace_CPPFLAGS = $(AM_CPPFLAGS)
105 endif
106
107 noinst_HEADERS = defs.h
108 # Enable this to get link map generated
109 #strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
110
111 EXTRA_DIST =                            \
112         $(man_MANS)                     \
113         .version                        \
114         COPYING                         \
115         CREDITS                         \
116         ChangeLog                       \
117         ChangeLog-CVS                   \
118         README-linux                    \
119         README-linux-ptrace             \
120         debian/changelog                \
121         debian/compat                   \
122         debian/control                  \
123         debian/copyright                \
124         debian/rules                    \
125         debian/source/format            \
126         debian/strace-udeb.install      \
127         debian/strace.docs              \
128         debian/strace.examples          \
129         debian/strace.install           \
130         debian/strace.manpages          \
131         debian/strace64.install         \
132         debian/strace64.manpages        \
133         debian/watch                    \
134         errnoent.sh                     \
135         ioctlsort.c                     \
136         linux/aarch64/errnoent1.h       \
137         linux/aarch64/ioctlent.h.in     \
138         linux/aarch64/ioctlent1.h       \
139         linux/aarch64/signalent1.h      \
140         linux/aarch64/syscallent.h      \
141         linux/aarch64/syscallent1.h     \
142         linux/alpha/errnoent.h          \
143         linux/alpha/ioctlent.h.in       \
144         linux/alpha/signalent.h         \
145         linux/alpha/syscallent.h        \
146         linux/arc/ioctlent.h.in         \
147         linux/arc/syscallent.h          \
148         linux/arm/ioctlent.h.in         \
149         linux/arm/syscallent.h          \
150         linux/avr32/ioctlent.h.in       \
151         linux/avr32/syscallent.h        \
152         linux/bfin/ioctlent.h.in        \
153         linux/bfin/syscallent.h         \
154         linux/dummy.h                   \
155         linux/errnoent.h                \
156         linux/fanotify.h                \
157         linux/hppa/errnoent.h           \
158         linux/hppa/ioctlent.h.in        \
159         linux/hppa/signalent.h          \
160         linux/hppa/syscallent.h         \
161         linux/i386/ioctlent.h.in        \
162         linux/i386/syscallent.h         \
163         linux/ia64/ioctlent.h.in        \
164         linux/ia64/signalent.h          \
165         linux/ia64/syscallent.h         \
166         linux/inet_diag.h               \
167         linux/inotify.h                 \
168         linux/ioctlent.h.in             \
169         linux/ioctlent.sh               \
170         linux/kexec.h                   \
171         linux/keyctl.h                  \
172         linux/m68k/ioctlent.h.in        \
173         linux/m68k/syscallent.h         \
174         linux/metag/ioctlent.h.in       \
175         linux/metag/syscallent.h        \
176         linux/microblaze/ioctlent.h.in  \
177         linux/microblaze/syscallent.h   \
178         linux/mips/errnoent.h           \
179         linux/mips/ioctlent.h.in        \
180         linux/mips/ioctlent.sh          \
181         linux/mips/signalent.h          \
182         linux/mips/syscallent-compat.h  \
183         linux/mips/syscallent-n32.h     \
184         linux/mips/syscallent-n64.h     \
185         linux/mips/syscallent-o32.h     \
186         linux/mips/syscallent.h         \
187         linux/mtd-abi.h                 \
188         linux/or1k/ioctlent.h.in        \
189         linux/or1k/syscallent.h         \
190         linux/personality.h             \
191         linux/powerpc/errnoent1.h       \
192         linux/powerpc/ioctlent.h.in     \
193         linux/powerpc/ioctlent1.h       \
194         linux/powerpc/signalent1.h      \
195         linux/powerpc/syscallent.h      \
196         linux/powerpc/syscallent1.h     \
197         linux/ptp_clock.h               \
198         linux/reboot.h                  \
199         linux/s390/ioctlent.h.in        \
200         linux/s390/syscallent.h         \
201         linux/s390x/ioctlent.h.in       \
202         linux/s390x/syscallent.h        \
203         linux/sh/ioctlent.h.in          \
204         linux/sh/syscallent.h           \
205         linux/sh64/ioctlent.h.in        \
206         linux/sh64/syscallent.h         \
207         linux/signalent.h               \
208         linux/sock_diag.h               \
209         linux/sparc/dummy2.h            \
210         linux/sparc/errnoent.h          \
211         linux/sparc/errnoent1.h         \
212         linux/sparc/gen.pl              \
213         linux/sparc/ioctlent.h.in       \
214         linux/sparc/ioctlent1.h         \
215         linux/sparc/signalent.h         \
216         linux/sparc/signalent1.h        \
217         linux/sparc/syscall1.h          \
218         linux/sparc/syscallent.h        \
219         linux/sparc/syscallent1.h       \
220         linux/sparc64/dummy2.h          \
221         linux/sparc64/errnoent.h        \
222         linux/sparc64/errnoent1.h       \
223         linux/sparc64/errnoent2.h       \
224         linux/sparc64/ioctlent.h.in     \
225         linux/sparc64/ioctlent1.h       \
226         linux/sparc64/ioctlent2.h       \
227         linux/sparc64/signalent.h       \
228         linux/sparc64/signalent1.h      \
229         linux/sparc64/signalent2.h      \
230         linux/sparc64/syscall1.h        \
231         linux/sparc64/syscallent.h      \
232         linux/sparc64/syscallent1.h     \
233         linux/sparc64/syscallent2.h     \
234         linux/subcall.h                 \
235         linux/syscall.h                 \
236         linux/tile/errnoent1.h          \
237         linux/tile/ioctlent.h.in        \
238         linux/tile/ioctlent1.h          \
239         linux/tile/signalent1.h         \
240         linux/tile/syscallent.h         \
241         linux/tile/syscallent1.h        \
242         linux/ubi-user.h                \
243         linux/x32/errnoent.h            \
244         linux/x32/errnoent1.h           \
245         linux/x32/ioctlent.h.in         \
246         linux/x32/ioctlent1.h           \
247         linux/x32/signalent.h           \
248         linux/x32/signalent1.h          \
249         linux/x32/syscallent.h          \
250         linux/x32/syscallent1.h         \
251         linux/x86_64/errnoent1.h        \
252         linux/x86_64/errnoent2.h        \
253         linux/x86_64/gentab.pl          \
254         linux/x86_64/ioctlent.h.in      \
255         linux/x86_64/ioctlent1.h        \
256         linux/x86_64/ioctlent2.h        \
257         linux/x86_64/signalent1.h       \
258         linux/x86_64/signalent2.h       \
259         linux/x86_64/syscallent.h       \
260         linux/x86_64/syscallent1.h      \
261         linux/x86_64/syscallent2.h      \
262         linux/xtensa/ioctlent.h.in      \
263         linux/xtensa/syscallent.h       \
264         signalent.sh                    \
265         strace-graph                    \
266         strace-log-merge                \
267         strace.spec                     \
268         syscallent.sh                   \
269         $(XLAT_INPUT_FILES)             \
270         $(XLAT_HEADER_FILES)            \
271         xlat/gen.sh                     \
272         xlate.el
273
274 .PHONY: srpm
275 srpm: dist-xz
276         rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
277
278 BUILT_SOURCES = .version
279
280 $(srcdir)/.version:
281         $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
282
283 dist-hook:
284         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
285
286 today = $(shell date +%Y-%m-%d)
287 version_regexp = $(subst .,\.,$(VERSION))
288 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
289
290 news-check: NEWS
291         $(AM_V_GEN)if head -1 $< |                              \
292           grep -x $(news_check_regexp) >/dev/null; then         \
293                 :;                                              \
294         else                                                    \
295                 echo >&2 '$<: check failed';                    \
296                 exit 1;                                         \
297         fi
298
299 ioctlent_h = $(builddir)/$(OS)/ioctlent.h
300 BUILT_SOURCES += $(ioctlent_h)
301 CLEANFILES = $(ioctlent_h)
302 ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
303 $(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
304         $(MKDIR_P) $(builddir)/$(OS)
305         cat $(ioctlent_h_deps) | \
306                 $(COMPILE) -E -P - | \
307                 sed 's/^\([[:space:]]*{\)"[^"]\+",[[:space:]]*/\1/' | \
308                 LC_ALL=C sort -u -k2,2 -k1,1 > $@
309
310 if MAINTAINER_MODE
311
312 gen_changelog_start_date = 2009-07-08 20:00
313 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
314                      $(srcdir)/.version
315         @rm -f $@.new
316         (cd $(srcdir); \
317          ./gitlog-to-changelog --append-dot \
318            --since='$(gen_changelog_start_date)'; \
319          echo; echo; echo 'See ChangeLog-CVS for older changes.' \
320         ) > $@.new
321         chmod 444 $@.new
322         mv -f $@.new $@
323
324 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
325                    $(srcdir)/Makefile.in $(srcdir)/.version
326         $(AM_V_GEN)                                                     \
327         (                                                               \
328           cd $(srcdir);                                                 \
329           sed '/^##/,$$d' CREDITS.in;                                   \
330           { sed -n '1,/^##>/d; s/  \+/\t/; s/^./&/p' CREDITS.in;        \
331             git log --pretty=format:'%aN        %aE';                   \
332           } | LC_ALL=C sort -u                                          \
333             | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}';             \
334         ) > $@-t && mv $@-t $@
335
336 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
337
338 INCLUDEDIR = /usr/include
339 KERNEL_RELEASE = $(shell uname -r)
340 # Candidates for the kernel headers tree.
341 KERNEL_INCLUDE = \
342         /lib/modules/$(KERNEL_RELEASE)/build/include \
343         /usr/src/linux-$(KERNEL_RELEASE)/include \
344         $(INCLUDEDIR)
345 IOCTLDIR = $(shell find $(KERNEL_INCLUDE) -maxdepth 0 -type d -print -quit 2>/dev/null)
346 IOCTLASM = $(INCLUDEDIR)/asm
347
348 noinst_PROGRAMS = ioctlsort
349 ioctlsort_SOURCES = ioctlsort.c
350 nodist_ioctlsort_SOURCES = ioctls.h ioctldefs.h
351 CLEANFILES += $(nodist_ioctlsort_SOURCES)
352 ioctlsort.$(OBJEXT): $(nodist_ioctlsort_SOURCES)
353 ioctls.h: $(srcdir)/linux/ioctlent.sh
354         $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
355 ioctldefs.h: ioctls.h ;
356
357 ioctlent_h_in = linux/ioctlent.h.in
358 BUILT_SOURCES += $(ioctlent_h_in)
359 $(srcdir)/$(ioctlent_h_in): ioctlsort
360         $(<D)/$(<F) > $@
361
362 endif