blob: f623b9d9fe4918a41165d5f31d24170c45d3760f [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
Roland McGrathd97b2072002-12-30 10:45:58 +00007bin_SCRIPTS = strace-graph
Roland McGrath6d2b3492002-12-30 00:51:30 +00008
9# OS is one of `linux', `sunos4', `svr4', or `freebsd'.
10OS = @opsys@
11# ARCH is `i386', `m68k', `sparc', etc.
12ARCH = @arch@
Roland McGrath6d2b3492002-12-30 00:51:30 +000013
Dmitry V. Levin916aded2010-09-09 17:36:36 +000014ACLOCAL_AMFLAGS = -I m4
Dmitry V. Levin918e49b2010-09-09 17:41:15 +000015AM_CFLAGS = $(WARN_CFLAGS)
16AM_CPPFLAGS = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS)
Roland McGrath6d2b3492002-12-30 00:51:30 +000017
Dmitry V. Levin7d61ff12006-12-21 21:15:04 +000018strace_SOURCES = strace.c syscall.c count.c util.c desc.c file.c ipc.c \
Dmitry V. Levinef5c3d62006-10-16 00:26:47 +000019 io.c ioctl.c mem.c net.c process.c bjm.c quota.c \
Roland McGrath6d2b3492002-12-30 00:51:30 +000020 resource.c signal.c sock.c system.c term.c time.c \
Dmitry V. Levin4ef6db42011-01-15 20:15:31 +000021 proc.c scsi.c stream.c block.c
Roland McGrath2746edd2002-12-30 09:13:08 +000022noinst_HEADERS = defs.h
Roland McGrath6d2b3492002-12-30 00:51:30 +000023
Roland McGrath80964aa2002-12-30 01:11:08 +000024EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000025 debian/changelog debian/compat debian/control debian/copyright \
26 debian/rules debian/source/format debian/watch \
27 debian/strace64.install debian/strace64.manpages \
Roland McGrath09a007c2008-07-22 08:33:40 +000028 debian/strace.docs debian/strace.examples debian/strace.install \
29 debian/strace.manpages debian/strace-udeb.install \
Roland McGrath44f24c72003-01-09 06:53:25 +000030 strace.spec \
Roland McGratha478d742009-10-06 17:41:02 -070031 strace-graph ChangeLog ChangeLog-CVS COPYRIGHT CREDITS PORTING \
Dmitry V. Levin82f4cc62009-07-07 22:33:41 +000032 README-freebsd README-linux README-sunos4 README-svr4 \
Roland McGrathd97b2072002-12-30 10:45:58 +000033 linux/ioctlsort.c linux/ioctlent.sh \
Roland McGrath80964aa2002-12-30 01:11:08 +000034 linux/ioctlent.h linux/errnoent.h linux/signalent.h \
Dmitry V. Levinc94a7742010-04-07 10:17:24 +000035 linux/syscall.h linux/dummy.h \
36 linux/i386/syscallent.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000037 linux/alpha/errnoent.h linux/alpha/ioctlent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000038 linux/alpha/signalent.h linux/alpha/syscallent.h \
Roland McGrath1cdfb8f2008-08-01 01:15:24 +000039 linux/arm/syscallent.h linux/arm/syscallent1.h \
40 linux/arm/signalent1.h linux/arm/ioctlent1.h \
41 linux/arm/errnoent1.h \
Denys Vlasenko5ae2b7c2009-02-27 20:32:52 +000042 linux/avr32/syscallent.h \
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +000043 linux/bfin/ioctlent.h linux/bfin/syscallent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000044 linux/hppa/errnoent.h linux/hppa/ioctlent.h \
45 linux/hppa/signalent.h linux/hppa/syscallent.h \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000046 linux/ia64/ioctlent.h \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000047 linux/ia64/signalent.h \
48 linux/ia64/syscallent.h \
Roland McGrathcdb24732005-12-02 04:27:47 +000049 linux/m68k/syscallent.h \
Edgar E. Iglesias939caba2010-07-06 14:21:07 +020050 linux/microblaze/syscallent.h \
Denys Vlasenko185cce12009-02-20 16:00:41 +000051 linux/mips/ioctlent.sh linux/mips/errnoent.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000052 linux/mips/ioctlent.h linux/mips/signalent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000053 linux/mips/syscallent.h \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000054 linux/powerpc/ioctlent.h linux/powerpc/ioctlent1.h \
55 linux/powerpc/syscallent.h linux/powerpc/syscallent1.h \
56 linux/powerpc/errnoent1.h linux/powerpc/signalent1.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000057 linux/s390/ioctlent.h \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000058 linux/s390/syscallent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000059 linux/s390x/ioctlent.h \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000060 linux/s390x/syscallent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000061 linux/sh/syscallent.h \
Denys Vlasenko53560262009-02-20 16:24:39 +000062 linux/sh/ioctlent.h \
Roland McGrath66177292004-07-12 07:27:23 +000063 linux/sh64/syscallent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000064 linux/sparc/dummy2.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000065 linux/sparc/errnoent.h linux/sparc/errnoent1.h \
66 linux/sparc/ioctlent.h linux/sparc/ioctlent1.h \
67 linux/sparc/signalent.h linux/sparc/signalent1.h \
Mike Frysinger330a8952011-02-19 15:48:52 -050068 linux/sparc/syscall1.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000069 linux/sparc/syscallent.h linux/sparc/syscallent1.h \
Mike Frysinger71a78bc2011-02-19 15:13:05 -050070 linux/sparc/gen.pl \
Roland McGrath0165e772004-07-12 07:53:59 +000071 linux/sparc64/dummy2.h linux/sparc64/errnoent.h \
72 linux/sparc64/errnoent1.h linux/sparc64/errnoent2.h \
73 linux/sparc64/ioctlent.h linux/sparc64/ioctlent1.h \
74 linux/sparc64/ioctlent2.h linux/sparc64/signalent.h \
75 linux/sparc64/signalent1.h linux/sparc64/signalent2.h \
Mike Frysinger330a8952011-02-19 15:48:52 -050076 linux/sparc64/syscall1.h \
Roland McGrath0165e772004-07-12 07:53:59 +000077 linux/sparc64/syscallent.h linux/sparc64/syscallent1.h \
78 linux/sparc64/syscallent2.h \
Chris Metcalfc8c66982009-12-28 10:00:15 -050079 linux/tile/syscallent.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000080 linux/x86_64/syscallent.h linux/x86_64/gentab.pl \
Roland McGrath7daaace2002-12-30 09:33:20 +000081 linux/x86_64/errnoent1.h linux/x86_64/ioctlent1.h \
82 linux/x86_64/signalent1.h linux/x86_64/syscallent1.h \
Roland McGrath80964aa2002-12-30 01:11:08 +000083 freebsd/ioctlent.sh \
84 freebsd/syscalls.cat freebsd/syscalls.pl freebsd/syscalls.print \
Roland McGrath2746edd2002-12-30 09:13:08 +000085 freebsd/i386/errnoent.h freebsd/i386/ioctlent.h \
86 freebsd/i386/signalent.h \
87 freebsd/i386/syscall.h freebsd/i386/syscallent.h \
Roland McGrath80964aa2002-12-30 01:11:08 +000088 sunos4/dummy.h sunos4/errnoent.h \
89 sunos4/ioctlent.h sunos4/ioctlent.sh sunos4/signalent.h \
90 sunos4/syscall.h sunos4/syscallent.h \
91 svr4/dummy.h svr4/errnoent.h svr4/ioctlent.h svr4/ioctlent.sh \
Roland McGrath5a862ff2006-04-25 07:33:20 +000092 svr4/signalent.h svr4/syscall.h svr4/syscallent.h \
93 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +000094
Roland McGrath2b832df2009-10-06 17:46:56 -070095.PHONY: srpm
96srpm: dist-bzip2
97 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.bz2
98
Roland McGrathbc44e402004-07-12 05:45:08 +000099if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700100
101gen_changelog_start_date = 2009-07-08 20:00
102$(srcdir)/ChangeLog: $(top_srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
103 $(top_srcdir)/.git/refs/heads/*
104 @rm -f $@.new
105 (cd $(top_srcdir); \
106 ./gitlog-to-changelog --since='$(gen_changelog_start_date)'; \
107 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
108 ) > $@.new
109 chmod 444 $@.new
110 mv -f $@.new $@
111
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000112$(srcdir)/CREDITS: $(top_srcdir)/CREDITS.in $(top_srcdir)/.mailmap \
113 $(srcdir)/Makefile.in
114 $(AM_V_GEN) \
115 { \
116 cd $(top_srcdir); \
117 sed '/^##/,$$d' CREDITS.in; \
118 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
119 git log --pretty=format:'%aN %aE'; \
120 } | LC_ALL=C sort -u \
121 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
122 } > $@-t && mv $@-t $@
123
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000124export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
125
Roland McGrathbc44e402004-07-12 05:45:08 +0000126if LINUX
127
128IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000129IOCTLASM = asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000130
131if I386
132ioctlent_h = linux/ioctlent.h
133else
134ioctlent_h = linux/$(ARCH)/ioctlent.h
135endif
136
137BUILT_SOURCES = $(ioctlent_h)
138
139$(srcdir)/$(ioctlent_h): ioctlsort
140 $(<D)/$(<F) > $@
141ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Roland McGrathadc2b302004-07-12 06:11:03 +0000142 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLDIR) $(filter -I%,$(LINK.c)) \
143 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000144ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000145 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000146ioctldefs.h: ioctls.h ;
147
148endif
149endif