blob: dcbe29612727bb981e716564c1c3986d2cbddd19 [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. Levin7d61ff12006-12-21 21:15:04 +000017strace_SOURCES = strace.c syscall.c count.c util.c desc.c file.c ipc.c \
Dmitry V. Levinef5c3d62006-10-16 00:26:47 +000018 io.c ioctl.c mem.c net.c process.c bjm.c quota.c \
Roland McGrath6d2b3492002-12-30 00:51:30 +000019 resource.c signal.c sock.c system.c term.c time.c \
Denys Vlasenko1a3cf102012-02-25 02:54:34 +010020 scsi.c stream.c block.c pathtrace.c
Roland McGrath2746edd2002-12-30 09:13:08 +000021noinst_HEADERS = defs.h
Roland McGrath6d2b3492002-12-30 00:51:30 +000022
Roland McGrath80964aa2002-12-30 01:11:08 +000023EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000024 debian/changelog debian/compat debian/control debian/copyright \
25 debian/rules debian/source/format debian/watch \
26 debian/strace64.install debian/strace64.manpages \
Roland McGrath09a007c2008-07-22 08:33:40 +000027 debian/strace.docs debian/strace.examples debian/strace.install \
28 debian/strace.manpages debian/strace-udeb.install \
Roland McGrath44f24c72003-01-09 06:53:25 +000029 strace.spec \
Denys Vlasenko796f6e82012-03-09 14:21:59 +010030 strace-graph strace-log-merge \
31 ChangeLog ChangeLog-CVS COPYRIGHT CREDITS \
Dmitry V. Levinee245d82012-02-25 15:34:10 +010032 README-linux README-linux-ptrace \
Roland McGrathd97b2072002-12-30 10:45:58 +000033 linux/ioctlsort.c linux/ioctlent.sh \
Mike Frysinger9004e122011-02-20 23:24:22 -050034 linux/ioctlent.h.in linux/errnoent.h linux/signalent.h \
Dmitry V. Levinc94a7742010-04-07 10:17:24 +000035 linux/syscall.h linux/dummy.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050036 linux/i386/ioctlent.h.in linux/i386/syscallent.h \
37 linux/alpha/errnoent.h linux/alpha/ioctlent.h.in \
Roland McGrathd97b2072002-12-30 10:45:58 +000038 linux/alpha/signalent.h linux/alpha/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050039 linux/arm/ioctlent.h.in linux/arm/syscallent.h \
40 linux/arm/syscallent1.h \
Roland McGrath1cdfb8f2008-08-01 01:15:24 +000041 linux/arm/signalent1.h linux/arm/ioctlent1.h \
42 linux/arm/errnoent1.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050043 linux/avr32/ioctlent.h.in linux/avr32/syscallent.h \
44 linux/bfin/ioctlent.h.in linux/bfin/syscallent.h \
45 linux/hppa/errnoent.h linux/hppa/ioctlent.h.in \
Roland McGrathd97b2072002-12-30 10:45:58 +000046 linux/hppa/signalent.h linux/hppa/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050047 linux/ia64/ioctlent.h.in \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000048 linux/ia64/signalent.h \
49 linux/ia64/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050050 linux/m68k/ioctlent.h.in linux/m68k/syscallent.h \
51 linux/microblaze/ioctlent.h.in linux/microblaze/syscallent.h \
Denys Vlasenko185cce12009-02-20 16:00:41 +000052 linux/mips/ioctlent.sh linux/mips/errnoent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050053 linux/mips/ioctlent.h.in linux/mips/signalent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000054 linux/mips/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050055 linux/powerpc/ioctlent.h.in linux/powerpc/ioctlent1.h \
Dmitry V. Levin0afbf852011-02-23 12:43:46 +000056 linux/powerpc/syscallent.h linux/powerpc/syscallent1.h \
57 linux/powerpc/errnoent1.h linux/powerpc/signalent1.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050058 linux/s390/ioctlent.h.in \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000059 linux/s390/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050060 linux/s390x/ioctlent.h.in \
Denys Vlasenkof3c9ed42009-02-20 17:38:47 +000061 linux/s390x/syscallent.h \
Denys Vlasenkod8df3712009-02-20 15:51:51 +000062 linux/sh/syscallent.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050063 linux/sh/ioctlent.h.in \
64 linux/sh64/ioctlent.h.in linux/sh64/syscallent.h \
Roland McGrathd97b2072002-12-30 10:45:58 +000065 linux/sparc/dummy2.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000066 linux/sparc/errnoent.h linux/sparc/errnoent1.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050067 linux/sparc/ioctlent.h.in linux/sparc/ioctlent1.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000068 linux/sparc/signalent.h linux/sparc/signalent1.h \
Mike Frysinger330a8952011-02-19 15:48:52 -050069 linux/sparc/syscall1.h \
Roland McGrath2746edd2002-12-30 09:13:08 +000070 linux/sparc/syscallent.h linux/sparc/syscallent1.h \
Mike Frysinger71a78bc2011-02-19 15:13:05 -050071 linux/sparc/gen.pl \
Roland McGrath0165e772004-07-12 07:53:59 +000072 linux/sparc64/dummy2.h linux/sparc64/errnoent.h \
73 linux/sparc64/errnoent1.h linux/sparc64/errnoent2.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050074 linux/sparc64/ioctlent.h.in linux/sparc64/ioctlent1.h \
Roland McGrath0165e772004-07-12 07:53:59 +000075 linux/sparc64/ioctlent2.h linux/sparc64/signalent.h \
76 linux/sparc64/signalent1.h linux/sparc64/signalent2.h \
Mike Frysinger330a8952011-02-19 15:48:52 -050077 linux/sparc64/syscall1.h \
Roland McGrath0165e772004-07-12 07:53:59 +000078 linux/sparc64/syscallent.h linux/sparc64/syscallent1.h \
79 linux/sparc64/syscallent2.h \
Mike Frysinger9004e122011-02-20 23:24:22 -050080 linux/tile/ioctlent.h.in linux/tile/syscallent.h \
81 linux/x86_64/ioctlent.h.in linux/x86_64/syscallent.h \
82 linux/x86_64/gentab.pl \
Roland McGrath7daaace2002-12-30 09:33:20 +000083 linux/x86_64/errnoent1.h linux/x86_64/ioctlent1.h \
84 linux/x86_64/signalent1.h linux/x86_64/syscallent1.h \
Roland McGrath5a862ff2006-04-25 07:33:20 +000085 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +000086
Roland McGrath2b832df2009-10-06 17:46:56 -070087.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +000088srpm: dist-xz
89 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -070090
Mike Frysinger9004e122011-02-20 23:24:22 -050091BUILT_SOURCES =
92
Roland McGrathbc44e402004-07-12 05:45:08 +000093if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -070094
95gen_changelog_start_date = 2009-07-08 20:00
96$(srcdir)/ChangeLog: $(top_srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
97 $(top_srcdir)/.git/refs/heads/*
98 @rm -f $@.new
99 (cd $(top_srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000100 ./gitlog-to-changelog --append-dot \
101 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700102 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
103 ) > $@.new
104 chmod 444 $@.new
105 mv -f $@.new $@
106
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000107$(srcdir)/CREDITS: $(top_srcdir)/CREDITS.in $(top_srcdir)/.mailmap \
Sebastian Pipping6c0e2fc2011-03-04 02:21:28 +0100108 $(srcdir)/Makefile.in $(top_srcdir)/.git/refs/heads/*
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000109 $(AM_V_GEN) \
110 { \
111 cd $(top_srcdir); \
112 sed '/^##/,$$d' CREDITS.in; \
113 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
114 git log --pretty=format:'%aN %aE'; \
115 } | LC_ALL=C sort -u \
116 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
117 } > $@-t && mv $@-t $@
118
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000119export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
120
Roland McGrathbc44e402004-07-12 05:45:08 +0000121IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000122IOCTLASM = asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000123
Mike Frysinger9004e122011-02-20 23:24:22 -0500124ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000125
Mike Frysinger9004e122011-02-20 23:24:22 -0500126BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000127
Mike Frysinger9004e122011-02-20 23:24:22 -0500128$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000129 $(<D)/$(<F) > $@
130ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
Roland McGrathadc2b302004-07-12 06:11:03 +0000131 $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLDIR) $(filter -I%,$(LINK.c)) \
132 -o $@ $<
Roland McGrathbc44e402004-07-12 05:45:08 +0000133ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000134 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000135ioctldefs.h: ioctls.h ;
136
137endif
Mike Frysinger9004e122011-02-20 23:24:22 -0500138
139ioctlent_h = $(builddir)/$(OS)/ioctlent.h
140BUILT_SOURCES += $(ioctlent_h)
141CLEANFILES = $(ioctlent_h)
142ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
143$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
144 $(MKDIR_P) $(builddir)/$(OS)
145 cat $(ioctlent_h_deps) | \
146 $(COMPILE) -E -P - | \
147 LC_ALL=C sort -u -k3,3 -k2,2 > $@