]> granicus.if.org Git - strace/blob - Makefile.am
tests/uid16: skip if real uid is larger than 16bit
[strace] / Makefile.am
1 # Automake input for strace.
2
3 if HAVE_M32_RUNTIME
4 TESTS_M32 = tests-m32
5 endif
6 if HAVE_MX32_RUNTIME
7 TESTS_MX32 = tests-mx32
8 endif
9 SUBDIRS = tests $(TESTS_M32) $(TESTS_MX32)
10
11 bin_PROGRAMS = strace
12 man_MANS = strace.1
13 bin_SCRIPTS = strace-graph strace-log-merge
14
15 OS              = linux
16 # ARCH is `i386', `m68k', `sparc', etc.
17 ARCH            = @arch@
18
19 ACLOCAL_AMFLAGS = -I m4
20 AM_CFLAGS = $(WARN_CFLAGS)
21 AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
22               -I$(srcdir)/$(OS)/$(ARCH) \
23               -I$(builddir)/$(OS) \
24               -I$(srcdir)/$(OS)
25
26 include xlat/Makemodule.am
27
28 strace_SOURCES =        \
29         access.c        \
30         affinity.c      \
31         aio.c           \
32         bjm.c           \
33         block.c         \
34         cacheflush.c    \
35         capability.c    \
36         caps0.h         \
37         caps1.h         \
38         chdir.c         \
39         chmod.c         \
40         clone.c         \
41         count.c         \
42         desc.c          \
43         dirent.c        \
44         evdev.c         \
45         execve.c        \
46         exit.c          \
47         fadvise.c       \
48         fallocate.c     \
49         fanotify.c      \
50         fchownat.c      \
51         file.c          \
52         futex.c         \
53         get_robust_list.c \
54         getcpu.c        \
55         getcwd.c        \
56         getrandom.c     \
57         hostname.c      \
58         inotify.c       \
59         io.c            \
60         ioctl.c         \
61         ioprio.c        \
62         ipc.c           \
63         kexec.c         \
64         keyctl.c        \
65         ldt.c           \
66         link.c          \
67         loop.c          \
68         lseek.c         \
69         mem.c           \
70         mknod.c         \
71         mount.c         \
72         mtd.c           \
73         net.c           \
74         open.c          \
75         or1k_atomic.c   \
76         pathtrace.c     \
77         personality.c   \
78         prctl.c         \
79         printmode.c     \
80         printstat.h     \
81         process.c       \
82         process_vm.c    \
83         ptp.c           \
84         ptrace.h        \
85         quota.c         \
86         readahead.c     \
87         readlink.c      \
88         reboot.c        \
89         regs.h          \
90         renameat.c      \
91         resource.c      \
92         sched.c         \
93         scsi.c          \
94         seccomp.c       \
95         signal.c        \
96         sock.c          \
97         socketutils.c   \
98         sram_alloc.c    \
99         statfs.c        \
100         strace.c        \
101         stream.c        \
102         swapon.c        \
103         sync_file_range.c \
104         syscall.c       \
105         sysctl.c        \
106         sysinfo.c       \
107         syslog.c        \
108         sysmips.c       \
109         term.c          \
110         time.c          \
111         truncate.c      \
112         uid.c           \
113         uid16.c         \
114         umask.c         \
115         umount.c        \
116         uname.c         \
117         util.c          \
118         utime.c         \
119         utimes.c        \
120         v4l2.c          \
121         vsprintf.c      \
122         wait.c          \
123         xattr.c
124
125 if USE_LIBUNWIND
126 strace_SOURCES += unwind.c
127 strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
128 strace_LDFLAGS = $(libunwind_LDFLAGS)
129 strace_LDADD = $(libunwind_LIBS)
130 else
131 strace_CPPFLAGS = $(AM_CPPFLAGS)
132 endif
133
134 noinst_HEADERS = defs.h
135 # Enable this to get link map generated
136 #strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
137
138 EXTRA_DIST =                            \
139         $(man_MANS)                     \
140         .version                        \
141         COPYING                         \
142         CREDITS                         \
143         ChangeLog                       \
144         ChangeLog-CVS                   \
145         README-linux-ptrace             \
146         debian/changelog                \
147         debian/compat                   \
148         debian/control                  \
149         debian/copyright                \
150         debian/rules                    \
151         debian/source/format            \
152         debian/strace-udeb.install      \
153         debian/strace.docs              \
154         debian/strace.examples          \
155         debian/strace.install           \
156         debian/strace.manpages          \
157         debian/strace64.install         \
158         debian/strace64.manpages        \
159         debian/watch                    \
160         errnoent.sh                     \
161         ioctlsort.c                     \
162         linux/32/ioctls_inc.h           \
163         linux/32/syscallent.h           \
164         linux/64/ioctls_inc.h           \
165         linux/64/syscallent.h           \
166         linux/aarch64/errnoent1.h       \
167         linux/aarch64/ioctls_arch0.h    \
168         linux/aarch64/ioctls_arch1.h    \
169         linux/aarch64/ioctls_inc0.h     \
170         linux/aarch64/ioctls_inc1.h     \
171         linux/aarch64/signalent1.h      \
172         linux/aarch64/syscallent.h      \
173         linux/aarch64/syscallent1.h     \
174         linux/alpha/arch_regs.h         \
175         linux/alpha/errnoent.h          \
176         linux/alpha/ioctls_arch0.h      \
177         linux/alpha/ioctls_inc0.h       \
178         linux/alpha/signalent.h         \
179         linux/alpha/syscallent.h        \
180         linux/alpha/userent.h           \
181         linux/arc/ioctls_arch0.h        \
182         linux/arc/ioctls_inc0.h         \
183         linux/arc/syscallent.h          \
184         linux/arch_regs.h               \
185         linux/arm/arch_regs.h           \
186         linux/arm/ioctls_arch0.h        \
187         linux/arm/ioctls_inc0.h         \
188         linux/arm/syscallent.h          \
189         linux/arm/userent.h             \
190         linux/avr32/ioctls_arch0.h      \
191         linux/avr32/ioctls_inc0.h       \
192         linux/avr32/syscallent.h        \
193         linux/avr32/userent.h           \
194         linux/bfin/ioctls_arch0.h       \
195         linux/bfin/ioctls_inc0.h        \
196         linux/bfin/syscallent.h         \
197         linux/bfin/userent.h            \
198         linux/crisv10/userent.h         \
199         linux/crisv32/userent.h         \
200         linux/dummy.h                   \
201         linux/errnoent.h                \
202         linux/hppa/arch_regs.h          \
203         linux/hppa/errnoent.h           \
204         linux/hppa/ioctls_arch0.h       \
205         linux/hppa/ioctls_inc0.h        \
206         linux/hppa/signalent.h          \
207         linux/hppa/syscallent.h         \
208         linux/i386/arch_regs.h          \
209         linux/i386/ioctls_arch0.h       \
210         linux/i386/ioctls_inc0.h        \
211         linux/i386/syscallent.h         \
212         linux/i386/userent.h            \
213         linux/i386/userent0.h           \
214         linux/ia64/arch_regs.h          \
215         linux/ia64/ioctls_arch0.h       \
216         linux/ia64/ioctls_inc0.h        \
217         linux/ia64/signalent.h          \
218         linux/ia64/syscallent.h         \
219         linux/ia64/userent.h            \
220         linux/inet_diag.h               \
221         linux/m68k/ioctls_arch0.h       \
222         linux/m68k/ioctls_inc0.h        \
223         linux/m68k/syscallent.h         \
224         linux/m68k/userent.h            \
225         linux/metag/ioctls_arch0.h      \
226         linux/metag/ioctls_inc0.h       \
227         linux/metag/syscallent.h        \
228         linux/microblaze/ioctls_arch0.h \
229         linux/microblaze/ioctls_inc0.h  \
230         linux/microblaze/syscallent.h   \
231         linux/microblaze/userent.h      \
232         linux/mips/arch_regs.h          \
233         linux/mips/errnoent.h           \
234         linux/mips/genstub.sh           \
235         linux/mips/ioctls_arch0.h       \
236         linux/mips/ioctls_inc0.h        \
237         linux/mips/signalent.h          \
238         linux/mips/syscallent-compat.h  \
239         linux/mips/syscallent-n32.h     \
240         linux/mips/syscallent-n64.h     \
241         linux/mips/syscallent-o32.h     \
242         linux/mips/syscallent.h         \
243         linux/mips/userent.h            \
244         linux/mtd-abi.h                 \
245         linux/or1k/ioctls_arch0.h       \
246         linux/or1k/ioctls_inc0.h        \
247         linux/or1k/syscallent.h         \
248         linux/or1k/userent.h            \
249         linux/personality.h             \
250         linux/powerpc/arch_regs.h       \
251         linux/powerpc/errnoent.h        \
252         linux/powerpc/ioctls_arch0.h    \
253         linux/powerpc/ioctls_inc0.h     \
254         linux/powerpc/syscallent.h      \
255         linux/powerpc/userent.h         \
256         linux/powerpc64/arch_regs.h     \
257         linux/powerpc64/errnoent.h      \
258         linux/powerpc64/errnoent1.h     \
259         linux/powerpc64/ioctls_arch0.h  \
260         linux/powerpc64/ioctls_arch1.h  \
261         linux/powerpc64/ioctls_inc0.h   \
262         linux/powerpc64/ioctls_inc1.h   \
263         linux/powerpc64/signalent1.h    \
264         linux/powerpc64/syscallent.h    \
265         linux/powerpc64/syscallent1.h   \
266         linux/powerpc64/userent.h       \
267         linux/ptp_clock.h               \
268         linux/s390/ioctls_arch0.h       \
269         linux/s390/ioctls_inc0.h        \
270         linux/s390/syscallent.h         \
271         linux/s390/userent.h            \
272         linux/s390/userent0.h           \
273         linux/s390/userent1.h           \
274         linux/s390x/ioctls_arch0.h      \
275         linux/s390x/ioctls_inc0.h       \
276         linux/s390x/syscallent.h        \
277         linux/s390x/userent.h           \
278         linux/sh/ioctls_arch0.h         \
279         linux/sh/ioctls_inc0.h          \
280         linux/sh/syscallent.h           \
281         linux/sh/userent.h              \
282         linux/sh/userent0.h             \
283         linux/sh64/arch_regs.h          \
284         linux/sh64/ioctls_arch0.h       \
285         linux/sh64/ioctls_inc0.h        \
286         linux/sh64/syscallent.h         \
287         linux/sh64/userent.h            \
288         linux/signalent.h               \
289         linux/sock_diag.h               \
290         linux/sparc/arch_regs.h         \
291         linux/sparc/dummy2.h            \
292         linux/sparc/errnoent.h          \
293         linux/sparc/errnoent1.h         \
294         linux/sparc/gen.pl              \
295         linux/sparc/ioctlent1.h         \
296         linux/sparc/ioctls_arch0.h      \
297         linux/sparc/ioctls_inc0.h       \
298         linux/sparc/signalent.h         \
299         linux/sparc/signalent1.h        \
300         linux/sparc/syscall1.h          \
301         linux/sparc/syscallent.h        \
302         linux/sparc/syscallent1.h       \
303         linux/sparc/userent.h           \
304         linux/sparc64/arch_regs.h       \
305         linux/sparc64/dummy2.h          \
306         linux/sparc64/errnoent.h        \
307         linux/sparc64/errnoent1.h       \
308         linux/sparc64/errnoent2.h       \
309         linux/sparc64/ioctlent1.h       \
310         linux/sparc64/ioctls_arch0.h    \
311         linux/sparc64/ioctls_arch2.h    \
312         linux/sparc64/ioctls_inc0.h     \
313         linux/sparc64/ioctls_inc2.h     \
314         linux/sparc64/signalent.h       \
315         linux/sparc64/signalent1.h      \
316         linux/sparc64/signalent2.h      \
317         linux/sparc64/syscall1.h        \
318         linux/sparc64/syscallent.h      \
319         linux/sparc64/syscallent1.h     \
320         linux/sparc64/syscallent2.h     \
321         linux/sparc64/userent.h         \
322         linux/subcall.h                 \
323         linux/syscall.h                 \
324         linux/tile/arch_regs.h          \
325         linux/tile/errnoent1.h          \
326         linux/tile/ioctls_arch0.h       \
327         linux/tile/ioctls_arch1.h       \
328         linux/tile/ioctls_inc0.h        \
329         linux/tile/ioctls_inc1.h        \
330         linux/tile/signalent1.h         \
331         linux/tile/syscallent.h         \
332         linux/tile/syscallent1.h        \
333         linux/tile/userent.h            \
334         linux/ubi-user.h                \
335         linux/unix_diag.h               \
336         linux/userent.h                 \
337         linux/userent0.h                \
338         linux/x32/arch_regs.h           \
339         linux/x32/errnoent1.h           \
340         linux/x32/ioctls_arch0.h        \
341         linux/x32/ioctls_arch1.h        \
342         linux/x32/ioctls_inc0.h         \
343         linux/x32/ioctls_inc1.h         \
344         linux/x32/signalent1.h          \
345         linux/x32/syscallent.h          \
346         linux/x32/syscallent1.h         \
347         linux/x32/userent.h             \
348         linux/x86_64/arch_regs.h        \
349         linux/x86_64/errnoent1.h        \
350         linux/x86_64/errnoent2.h        \
351         linux/x86_64/gentab.pl          \
352         linux/x86_64/ioctlent2.h        \
353         linux/x86_64/ioctls_arch0.h     \
354         linux/x86_64/ioctls_arch1.h     \
355         linux/x86_64/ioctls_inc0.h      \
356         linux/x86_64/ioctls_inc1.h      \
357         linux/x86_64/signalent1.h       \
358         linux/x86_64/signalent2.h       \
359         linux/x86_64/syscallent.h       \
360         linux/x86_64/syscallent1.h      \
361         linux/x86_64/syscallent2.h      \
362         linux/x86_64/userent.h          \
363         linux/xtensa/ioctls_arch0.h     \
364         linux/xtensa/ioctls_inc0.h      \
365         linux/xtensa/syscallent.h       \
366         linux/xtensa/userent.h          \
367         maint/ioctls_gen.sh             \
368         maint/ioctls_hex.sh             \
369         maint/ioctls_sym.sh             \
370         maint/print_ioctlent.c          \
371         signalent.sh                    \
372         strace-graph                    \
373         strace-log-merge                \
374         strace.spec                     \
375         syscallent.sh                   \
376         $(XLAT_INPUT_FILES)             \
377         $(XLAT_HEADER_FILES)            \
378         xlat/gen.sh                     \
379         xlate.el
380
381 .PHONY: srpm
382 srpm: dist-xz
383         rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
384
385 BUILT_SOURCES = .version
386
387 $(srcdir)/.version:
388         $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
389
390 dist-hook:
391         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
392
393 today = $(shell date +%Y-%m-%d)
394 version_regexp = $(subst .,\.,$(VERSION))
395 news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
396
397 news-check: NEWS
398         $(AM_V_GEN)if head -1 $< |                              \
399           grep -x $(news_check_regexp) >/dev/null; then         \
400                 :;                                              \
401         else                                                    \
402                 echo >&2 '$<: check failed';                    \
403                 exit 1;                                         \
404         fi
405
406 ioctlsort_CC = $(CC_FOR_BUILD)
407 ioctlsort_DEFS = $(DEFS)
408 ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
409 ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
410 ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
411 ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
412
413 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
414 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
415 BUILT_SOURCES += $(ioctlent_h)
416 CLEANFILES = $(ioctlent_h)
417
418 ioctlent%.h: ioctlsort%
419         ./$< > $@
420
421 ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
422         $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
423
424 ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
425         $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
426
427 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
428         cat $^ > $@
429
430 if MAINTAINER_MODE
431
432 gen_changelog_start_date = 2009-07-08 20:00
433 $(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
434                      $(srcdir)/.version
435         @rm -f $@.new
436         (cd $(srcdir); \
437          ./gitlog-to-changelog --append-dot \
438            --since='$(gen_changelog_start_date)'; \
439          echo; echo; echo 'See ChangeLog-CVS for older changes.' \
440         ) > $@.new
441         chmod 444 $@.new
442         mv -f $@.new $@
443
444 $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
445                    $(srcdir)/Makefile.in $(srcdir)/.version
446         $(AM_V_GEN)                                                     \
447         (                                                               \
448           cd $(srcdir);                                                 \
449           sed '/^##/,$$d' CREDITS.in;                                   \
450           { sed -n '1,/^##>/d; s/  \+/\t/; s/^./&/p' CREDITS.in;        \
451             git log --pretty=format:'%aN        %aE';                   \
452           } | LC_ALL=C sort -u                                          \
453             | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}';             \
454         ) > $@-t && mv $@-t $@
455
456 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
457
458 endif