blob: 8134b0d68dad705a3095eaf2165f1820e45e6829 [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)
Mike Frysinger9004e122011-02-20 23:24:22 -050016AM_CPPFLAGS = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS) -I$(builddir)/$(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 \
Grant Edwards8a082772011-04-07 20:25:40 +000021 proc.c scsi.c stream.c block.c pathtrace.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 \
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 McGrath80964aa2002-12-30 01:11:08 +000085 freebsd/ioctlent.sh \
86 freebsd/syscalls.cat freebsd/syscalls.pl freebsd/syscalls.print \
Roland McGrath2746edd2002-12-30 09:13:08 +000087 freebsd/i386/errnoent.h freebsd/i386/ioctlent.h \
88 freebsd/i386/signalent.h \
89 freebsd/i386/syscall.h freebsd/i386/syscallent.h \
Roland McGrath80964aa2002-12-30 01:11:08 +000090 sunos4/dummy.h sunos4/errnoent.h \
91 sunos4/ioctlent.h sunos4/ioctlent.sh sunos4/signalent.h \
92 sunos4/syscall.h sunos4/syscallent.h \
93 svr4/dummy.h svr4/errnoent.h svr4/ioctlent.h svr4/ioctlent.sh \
Roland McGrath5a862ff2006-04-25 07:33:20 +000094 svr4/signalent.h svr4/syscall.h svr4/syscallent.h \
95 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +000096
Roland McGrath2b832df2009-10-06 17:46:56 -070097.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +000098srpm: dist-xz
99 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700100
Mike Frysinger9004e122011-02-20 23:24:22 -0500101BUILT_SOURCES =
102
Roland McGrathbc44e402004-07-12 05:45:08 +0000103if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700104
105gen_changelog_start_date = 2009-07-08 20:00
106$(srcdir)/ChangeLog: $(top_srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
107 $(top_srcdir)/.git/refs/heads/*
108 @rm -f $@.new
109 (cd $(top_srcdir); \
110 ./gitlog-to-changelog --since='$(gen_changelog_start_date)'; \
111 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
112 ) > $@.new
113 chmod 444 $@.new
114 mv -f $@.new $@
115
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000116$(srcdir)/CREDITS: $(top_srcdir)/CREDITS.in $(top_srcdir)/.mailmap \
Sebastian Pipping6c0e2fc2011-03-04 02:21:28 +0100117 $(srcdir)/Makefile.in $(top_srcdir)/.git/refs/heads/*
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000118 $(AM_V_GEN) \
119 { \
120 cd $(top_srcdir); \
121 sed '/^##/,$$d' CREDITS.in; \
122 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
123 git log --pretty=format:'%aN %aE'; \
124 } | LC_ALL=C sort -u \
125 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
126 } > $@-t && mv $@-t $@
127
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000128export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
129
Roland McGrathbc44e402004-07-12 05:45:08 +0000130if LINUX
131
132IOCTLDIR = /usr/include
Roland McGrathadc2b302004-07-12 06:11:03 +0000133IOCTLASM = asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000134
Mike Frysinger9004e122011-02-20 23:24:22 -0500135ioctlent_h_in = linux/ioctlent.h.in
Roland McGrathbc44e402004-07-12 05:45:08 +0000136
Mike Frysinger9004e122011-02-20 23:24:22 -0500137BUILT_SOURCES += $(ioctlent_h_in)
Roland McGrathbc44e402004-07-12 05:45:08 +0000138
Mike Frysinger9004e122011-02-20 23:24:22 -0500139$(srcdir)/$(ioctlent_h_in): ioctlsort
Roland McGrathbc44e402004-07-12 05:45:08 +0000140 $(<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
Mike Frysinger9004e122011-02-20 23:24:22 -0500150
151if LINUX
152
153ioctlent_h = $(builddir)/$(OS)/ioctlent.h
154BUILT_SOURCES += $(ioctlent_h)
155CLEANFILES = $(ioctlent_h)
156ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
157$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
158 $(MKDIR_P) $(builddir)/$(OS)
159 cat $(ioctlent_h_deps) | \
160 $(COMPILE) -E -P - | \
161 LC_ALL=C sort -u -k3,3 -k2,2 > $@
162
163endif