blob: c44762eeb260e10d9db701ca8c6effba1ced0d4b [file] [log] [blame]
Roland McGrath6d2b3492002-12-30 00:51:30 +00001# Automake input for strace.
2
3bin_PROGRAMS = strace
4man_MANS = strace.1
Roland McGrathd97b2072002-12-30 10:45:58 +00005bin_SCRIPTS = strace-graph
Roland McGrath6d2b3492002-12-30 00:51:30 +00006
7# OS is one of `linux', `sunos4', `svr4', or `freebsd'.
8OS = @opsys@
9# ARCH is `i386', `m68k', `sparc', etc.
10ARCH = @arch@
Roland McGrath6d2b3492002-12-30 00:51:30 +000011
Roland McGrath44f24c72003-01-09 06:53:25 +000012AM_CFLAGS = $(WARNFLAGS)
Dmitry V. Levin27bb9ee2010-01-25 12:21:07 +000013INCLUDES = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS)
Roland McGrath6d2b3492002-12-30 00:51:30 +000014
Dmitry V. Levin7d61ff12006-12-21 21:15:04 +000015strace_SOURCES = strace.c syscall.c count.c util.c desc.c file.c ipc.c \
Dmitry V. Levinef5c3d62006-10-16 00:26:47 +000016 io.c ioctl.c mem.c net.c process.c bjm.c quota.c \
Roland McGrath6d2b3492002-12-30 00:51:30 +000017 resource.c signal.c sock.c system.c term.c time.c \
Dmitry V. Levinb011af52007-06-30 11:37:09 +000018 proc.c scsi.c stream.c
Roland McGrath2746edd2002-12-30 09:13:08 +000019noinst_HEADERS = defs.h
Roland McGrath6d2b3492002-12-30 00:51:30 +000020
Roland McGrath80964aa2002-12-30 01:11:08 +000021EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
Denys Vlasenko185cce12009-02-20 16:00:41 +000022 debian/changelog debian/control debian/copyright debian/rules \
Roland McGrath09a007c2008-07-22 08:33:40 +000023 debian/compat debian/strace64.install debian/strace64.manpages \
24 debian/strace.docs debian/strace.examples debian/strace.install \
25 debian/strace.manpages debian/strace-udeb.install \
Roland McGrath44f24c72003-01-09 06:53:25 +000026 strace.spec \
Roland McGratha478d742009-10-06 17:41:02 -070027 strace-graph ChangeLog ChangeLog-CVS COPYRIGHT CREDITS PORTING \
Dmitry V. Levin82f4cc62009-07-07 22:33:41 +000028 README-freebsd README-linux README-sunos4 README-svr4 \
Roland McGrathd97b2072002-12-30 10:45:58 +000029 linux/ioctlsort.c linux/ioctlent.sh \
Roland McGrath80964aa2002-12-30 01:11:08 +000030 linux/ioctlent.h linux/errnoent.h linux/signalent.h \
Dmitry V. Levinc94a7742010-04-07 10:17:24 +000031 linux/syscall.h linux/dummy.h \
32 linux/i386/syscallent.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000033 linux/alpha/errnoent.h linux/alpha/ioctlent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000034 linux/alpha/signalent.h linux/alpha/syscallent.h \
Roland McGrath1cdfb8f2008-08-01 01:15:24 +000035 linux/arm/syscallent.h linux/arm/syscallent1.h \
36 linux/arm/signalent1.h linux/arm/ioctlent1.h \
37 linux/arm/errnoent1.h \
Denys Vlasenko5ae2b7c2009-02-27 20:32:52 +000038 linux/avr32/syscallent.h \
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +000039 linux/bfin/ioctlent.h linux/bfin/syscallent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000040 linux/hppa/errnoent.h linux/hppa/ioctlent.h \
41 linux/hppa/signalent.h linux/hppa/syscallent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000042 linux/ia64/syscallent.h \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000043 linux/ia64/ioctlent.h \
Roland McGrathcdb24732005-12-02 04:27:47 +000044 linux/m68k/syscallent.h \
Denys Vlasenko185cce12009-02-20 16:00:41 +000045 linux/mips/ioctlent.sh linux/mips/errnoent.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000046 linux/mips/ioctlent.h linux/mips/signalent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000047 linux/mips/syscallent.h \
48 linux/powerpc/syscallent.h \
Denys Vlasenko185cce12009-02-20 16:00:41 +000049 linux/powerpc/ioctlent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000050 linux/s390/ioctlent.h \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000051 linux/s390/syscallent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000052 linux/s390x/ioctlent.h \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000053 linux/s390x/syscallent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000054 linux/sh/syscallent.h \
Denys Vlasenko53560262009-02-20 16:24:39 +000055 linux/sh/ioctlent.h \
Roland McGrath66177292004-07-12 07:27:23 +000056 linux/sh64/syscallent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000057 linux/sparc/dummy2.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000058 linux/sparc/errnoent.h linux/sparc/errnoent1.h \
59 linux/sparc/ioctlent.h linux/sparc/ioctlent1.h \
60 linux/sparc/signalent.h linux/sparc/signalent1.h \
61 linux/sparc/syscall.h linux/sparc/syscall1.h \
62 linux/sparc/syscallent.h linux/sparc/syscallent1.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000063 linux/sparc/gen.pl linux/sparc/syscall.h.2 \
Roland McGrath0165e772004-07-12 07:53:59 +000064 linux/sparc64/dummy2.h linux/sparc64/errnoent.h \
65 linux/sparc64/errnoent1.h linux/sparc64/errnoent2.h \
66 linux/sparc64/ioctlent.h linux/sparc64/ioctlent1.h \
67 linux/sparc64/ioctlent2.h linux/sparc64/signalent.h \
68 linux/sparc64/signalent1.h linux/sparc64/signalent2.h \
69 linux/sparc64/syscall.h linux/sparc64/syscall1.h \
70 linux/sparc64/syscallent.h linux/sparc64/syscallent1.h \
71 linux/sparc64/syscallent2.h \
Chris Metcalfc8c66982009-12-28 10:00:15 -050072 linux/tile/syscallent.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000073 linux/x86_64/syscallent.h linux/x86_64/gentab.pl \
Roland McGrath7daaace2002-12-30 09:33:20 +000074 linux/x86_64/errnoent1.h linux/x86_64/ioctlent1.h \
75 linux/x86_64/signalent1.h linux/x86_64/syscallent1.h \
Roland McGrath80964aa2002-12-30 01:11:08 +000076 freebsd/ioctlent.sh \
77 freebsd/syscalls.cat freebsd/syscalls.pl freebsd/syscalls.print \
Roland McGrath2746edd2002-12-30 09:13:08 +000078 freebsd/i386/errnoent.h freebsd/i386/ioctlent.h \
79 freebsd/i386/signalent.h \
80 freebsd/i386/syscall.h freebsd/i386/syscallent.h \
Roland McGrath80964aa2002-12-30 01:11:08 +000081 sunos4/dummy.h sunos4/errnoent.h \
82 sunos4/ioctlent.h sunos4/ioctlent.sh sunos4/signalent.h \
83 sunos4/syscall.h sunos4/syscallent.h \
84 svr4/dummy.h svr4/errnoent.h svr4/ioctlent.h svr4/ioctlent.sh \
Roland McGrath5a862ff2006-04-25 07:33:20 +000085 svr4/signalent.h svr4/syscall.h svr4/syscallent.h \
86 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +000087
Roland McGrath2b832df2009-10-06 17:46:56 -070088.PHONY: srpm
89srpm: dist-bzip2
90 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.bz2
91
Roland McGrathbc44e402004-07-12 05:45:08 +000092if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -070093
94gen_changelog_start_date = 2009-07-08 20:00
95$(srcdir)/ChangeLog: $(top_srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
96 $(top_srcdir)/.git/refs/heads/*
97 @rm -f $@.new
98 (cd $(top_srcdir); \
99 ./gitlog-to-changelog --since='$(gen_changelog_start_date)'; \
100 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
101 ) > $@.new
102 chmod 444 $@.new
103 mv -f $@.new $@
104
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000105export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
106
Roland McGrathbc44e402004-07-12 05:45:08 +0000107if LINUX
108
109IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000110IOCTLASM = asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000111
112if I386
113ioctlent_h = linux/ioctlent.h
114else
115ioctlent_h = linux/$(ARCH)/ioctlent.h
116endif
117
118BUILT_SOURCES = $(ioctlent_h)
119
120$(srcdir)/$(ioctlent_h): ioctlsort
121 $(<D)/$(<F) > $@
122ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Roland McGrathadc2b302004-07-12 06:11:03 +0000123 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLDIR) $(filter -I%,$(LINK.c)) \
124 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000125ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000126 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000127ioctldefs.h: ioctls.h ;
128
129endif
130endif