blob: a89817cdc745e6ad200cdfc3581b5c7915fcc935 [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
Mike Frysinger761ed9b2014-02-16 01:59:20 -050017include xlat/Makemodule.am
18
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000019strace_SOURCES = \
Dmitry V. Levin304cd812014-12-06 03:53:16 +000020 access.c \
Dmitry V. Levinb94b9832014-12-11 19:25:02 +000021 affinity.c \
Dmitry V. Levin2b640342013-11-11 15:06:18 +000022 aio.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000023 bjm.c \
24 block.c \
Dmitry V. Levin95edb8b2014-12-03 20:50:08 +000025 cacheflush.c \
Dmitry V. Levin5e7987b2014-12-03 20:30:15 +000026 capability.c \
Dmitry V. Levin9b2f6742014-12-06 03:53:16 +000027 chdir.c \
Dmitry V. Levinad5cf1e2014-12-06 03:53:16 +000028 chmod.c \
Dmitry V. Levin265903a2014-12-11 19:25:02 +000029 clone.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000030 count.c \
31 desc.c \
Dmitry V. Levin2ed2cc72014-09-11 22:40:37 +000032 dirent.c \
Dmitry V. Levin7be23182014-12-11 19:25:02 +000033 execve.c \
Dmitry V. Levin91759092014-12-11 19:25:02 +000034 exit.c \
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +000035 fadvise.c \
Dmitry V. Levin2795a5f2014-12-06 03:53:16 +000036 fallocate.c \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +000037 fanotify.c \
Dmitry V. Levin2f7d0202014-12-13 16:20:44 +000038 fchownat.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000039 file.c \
Dmitry V. Levine314f802014-12-11 19:25:02 +000040 futex.c \
Dmitry V. Levin83576382014-12-11 19:25:02 +000041 get_robust_list.c \
Dmitry V. Levin665f10c2014-12-11 19:21:54 +000042 getcpu.c \
Dmitry V. Levina8364302014-12-06 03:53:16 +000043 getcwd.c \
Dmitry V. Levin72114802014-12-11 19:25:02 +000044 groups.c \
Dmitry V. Levin03c06ea2014-12-11 19:25:02 +000045 hostname.c \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +000046 inotify.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000047 io.c \
48 ioctl.c \
Dmitry V. Levinfc4727d2014-02-05 17:27:43 +000049 ioprio.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000050 ipc.c \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +000051 kexec.c \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +000052 keyctl.c \
Dmitry V. Levin99a05442014-04-10 14:10:17 +000053 ldt.c \
Dmitry V. Levin231b19f2014-12-06 03:53:16 +000054 link.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000055 loop.c \
Dmitry V. Levinb5d25ec2014-12-06 03:53:16 +000056 lseek.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000057 mem.c \
Dmitry V. Levindb23b342014-12-06 03:53:16 +000058 mknod.c \
Dmitry V. Levin6da7ca32014-12-03 21:12:07 +000059 mount.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000060 mtd.c \
61 net.c \
Dmitry V. Levin964d80a2014-12-06 03:53:16 +000062 open.c \
Dmitry V. Levinf6eb0d62014-12-03 20:00:42 +000063 or1k_atomic.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000064 pathtrace.c \
Dmitry V. Levind28b6a02014-12-03 21:06:11 +000065 personality.c \
Dmitry V. Levin53c993d2014-12-11 19:25:02 +000066 prctl.c \
Dmitry V. Levin9514ac72014-12-06 03:53:16 +000067 printmode.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000068 process.c \
Dmitry V. Levindb16c522014-12-11 19:21:54 +000069 process_vm.c \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +010070 ptp.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000071 quota.c \
Dmitry V. Levin9e9ceab2014-12-06 03:53:16 +000072 readahead.c \
Dmitry V. Levin46245b32014-12-06 03:53:16 +000073 readlink.c \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +000074 reboot.c \
Dmitry V. Levin6d20a0b2014-12-06 03:53:16 +000075 renameat.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000076 resource.c \
Dmitry V. Levinfff2f312014-12-11 19:25:02 +000077 sched.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000078 scsi.c \
79 signal.c \
80 sock.c \
Dmitry V. Levin2f6510c2014-08-21 03:17:48 +000081 socketutils.c \
Dmitry V. Levine36c72c2014-12-03 20:56:36 +000082 sram_alloc.c \
Dmitry V. Levin9a0dd742014-09-22 00:17:42 +000083 statfs.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000084 strace.c \
85 stream.c \
Dmitry V. Levin85a364a2014-12-06 03:53:16 +000086 swapon.c \
Dmitry V. Levin710b3ae2014-12-06 03:53:16 +000087 sync_file_range.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000088 syscall.c \
Dmitry V. Levin172241b2014-12-03 20:20:52 +000089 sysctl.c \
Dmitry V. Levin57d45a22014-09-29 23:13:05 +000090 sysinfo.c \
Dmitry V. Levinb21e2fb2014-12-03 21:01:35 +000091 syslog.c \
Dmitry V. Levin600e33c2014-12-03 20:08:44 +000092 sysmips.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +000093 term.c \
94 time.c \
Dmitry V. Levin69341822014-12-06 03:53:16 +000095 truncate.c \
Dmitry V. Levine93ef1e2014-12-11 19:25:02 +000096 uid.c \
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000097 uid16.c \
Dmitry V. Levind590f3c2014-12-06 03:53:16 +000098 umask.c \
Dmitry V. Levin542ca1e2014-12-03 21:09:26 +000099 umount.c \
Dmitry V. Levin58dd2cf2014-12-11 19:25:02 +0000100 uname.c \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000101 util.c \
Dmitry V. Levinfb470f32014-12-06 03:53:16 +0000102 utime.c \
Dmitry V. Levin481e0672014-12-06 03:53:16 +0000103 utimes.c \
Philippe De Muyter0cc96142014-11-03 21:27:40 +0100104 v4l2.c \
Dmitry V. Levin769ffe92014-12-06 03:53:16 +0000105 vsprintf.c \
Dmitry V. Levin7ccc1442014-12-11 19:25:02 +0000106 wait.c \
Dmitry V. Levin769ffe92014-12-06 03:53:16 +0000107 xattr.c
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000108
Luca Clementi327064b2013-07-23 00:11:35 -0700109if USE_LIBUNWIND
110strace_SOURCES += unwind.c
111strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
112strace_LDFLAGS = $(libunwind_LDFLAGS)
113strace_LDADD = $(libunwind_LIBS)
114else
115strace_CPPFLAGS = $(AM_CPPFLAGS)
116endif
117
Roland McGrath2746edd2002-12-30 09:13:08 +0000118noinst_HEADERS = defs.h
Denys Vlasenko76f61be2013-03-06 18:59:09 +0100119# Enable this to get link map generated
120#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
Roland McGrath6d2b3492002-12-30 00:51:30 +0000121
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000122EXTRA_DIST = \
123 $(man_MANS) \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000124 .version \
Mike Frysinger6c191362013-05-15 16:33:09 -0400125 COPYING \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000126 CREDITS \
127 ChangeLog \
128 ChangeLog-CVS \
129 README-linux \
130 README-linux-ptrace \
131 debian/changelog \
132 debian/compat \
133 debian/control \
134 debian/copyright \
135 debian/rules \
136 debian/source/format \
137 debian/strace-udeb.install \
138 debian/strace.docs \
139 debian/strace.examples \
140 debian/strace.install \
141 debian/strace.manpages \
142 debian/strace64.install \
143 debian/strace64.manpages \
144 debian/watch \
145 errnoent.sh \
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000146 ioctlsort.c \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000147 linux/aarch64/errnoent1.h \
148 linux/aarch64/ioctlent.h.in \
149 linux/aarch64/ioctlent1.h \
150 linux/aarch64/signalent1.h \
151 linux/aarch64/syscallent.h \
152 linux/aarch64/syscallent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000153 linux/alpha/errnoent.h \
154 linux/alpha/ioctlent.h.in \
155 linux/alpha/signalent.h \
156 linux/alpha/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000157 linux/alpha/userent.h \
Vineet Gupta7daacbb2013-08-16 12:47:06 +0530158 linux/arc/ioctlent.h.in \
159 linux/arc/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000160 linux/arm/ioctlent.h.in \
161 linux/arm/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000162 linux/arm/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000163 linux/avr32/ioctlent.h.in \
164 linux/avr32/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000165 linux/avr32/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000166 linux/bfin/ioctlent.h.in \
167 linux/bfin/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000168 linux/bfin/userent.h \
169 linux/crisv10/userent.h \
170 linux/crisv32/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000171 linux/dummy.h \
172 linux/errnoent.h \
Dmitry V. Levin99db95d2014-02-05 04:13:18 +0000173 linux/fanotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000174 linux/hppa/errnoent.h \
175 linux/hppa/ioctlent.h.in \
176 linux/hppa/signalent.h \
177 linux/hppa/syscallent.h \
178 linux/i386/ioctlent.h.in \
179 linux/i386/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000180 linux/i386/userent.h \
181 linux/i386/userent0.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000182 linux/ia64/ioctlent.h.in \
183 linux/ia64/signalent.h \
184 linux/ia64/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000185 linux/ia64/userent.h \
Dmitry V. Levin2f6510c2014-08-21 03:17:48 +0000186 linux/inet_diag.h \
Dmitry V. Levin2f332e92014-02-05 15:43:04 +0000187 linux/inotify.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000188 linux/ioctlent.h.in \
189 linux/ioctlent.sh \
Dmitry V. Levin90aa9f42014-02-05 13:48:26 +0000190 linux/kexec.h \
Dmitry V. Levin3acf4032014-02-05 22:41:45 +0000191 linux/keyctl.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000192 linux/m68k/ioctlent.h.in \
193 linux/m68k/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000194 linux/m68k/userent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000195 linux/metag/ioctlent.h.in \
196 linux/metag/syscallent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000197 linux/microblaze/ioctlent.h.in \
198 linux/microblaze/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000199 linux/microblaze/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000200 linux/mips/errnoent.h \
201 linux/mips/ioctlent.h.in \
202 linux/mips/ioctlent.sh \
203 linux/mips/signalent.h \
Dmitry V. Levin34c445b2013-05-07 02:46:46 +0000204 linux/mips/syscallent-compat.h \
205 linux/mips/syscallent-n32.h \
206 linux/mips/syscallent-n64.h \
207 linux/mips/syscallent-o32.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000208 linux/mips/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000209 linux/mips/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000210 linux/mtd-abi.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000211 linux/or1k/ioctlent.h.in \
212 linux/or1k/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000213 linux/or1k/userent.h \
Dmitry V. Levin2a32eaa2014-02-05 02:09:49 +0000214 linux/personality.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000215 linux/powerpc/errnoent1.h \
216 linux/powerpc/ioctlent.h.in \
217 linux/powerpc/ioctlent1.h \
218 linux/powerpc/signalent1.h \
219 linux/powerpc/syscallent.h \
220 linux/powerpc/syscallent1.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000221 linux/powerpc/userent.h \
Stefan Sørensenb88a6f82014-01-31 12:01:01 +0100222 linux/ptp_clock.h \
Dmitry V. Levin9aaf88c2014-02-05 14:51:19 +0000223 linux/reboot.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000224 linux/s390/ioctlent.h.in \
225 linux/s390/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000226 linux/s390/userent.h \
227 linux/s390/userent0.h \
228 linux/s390/userent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000229 linux/s390x/ioctlent.h.in \
230 linux/s390x/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000231 linux/s390x/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000232 linux/sh/ioctlent.h.in \
233 linux/sh/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000234 linux/sh/userent.h \
235 linux/sh/userent0.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000236 linux/sh64/ioctlent.h.in \
237 linux/sh64/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000238 linux/sh64/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000239 linux/signalent.h \
Dmitry V. Levin2f6510c2014-08-21 03:17:48 +0000240 linux/sock_diag.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000241 linux/sparc/dummy2.h \
242 linux/sparc/errnoent.h \
243 linux/sparc/errnoent1.h \
244 linux/sparc/gen.pl \
245 linux/sparc/ioctlent.h.in \
246 linux/sparc/ioctlent1.h \
247 linux/sparc/signalent.h \
248 linux/sparc/signalent1.h \
249 linux/sparc/syscall1.h \
250 linux/sparc/syscallent.h \
251 linux/sparc/syscallent1.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000252 linux/sparc/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000253 linux/sparc64/dummy2.h \
254 linux/sparc64/errnoent.h \
255 linux/sparc64/errnoent1.h \
256 linux/sparc64/errnoent2.h \
257 linux/sparc64/ioctlent.h.in \
258 linux/sparc64/ioctlent1.h \
259 linux/sparc64/ioctlent2.h \
260 linux/sparc64/signalent.h \
261 linux/sparc64/signalent1.h \
262 linux/sparc64/signalent2.h \
263 linux/sparc64/syscall1.h \
264 linux/sparc64/syscallent.h \
265 linux/sparc64/syscallent1.h \
266 linux/sparc64/syscallent2.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000267 linux/sparc64/userent.h \
Dmitry V. Levinde462cf2013-05-07 18:38:01 +0400268 linux/subcall.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000269 linux/syscall.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000270 linux/tile/errnoent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000271 linux/tile/ioctlent.h.in \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000272 linux/tile/ioctlent1.h \
273 linux/tile/signalent1.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000274 linux/tile/syscallent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000275 linux/tile/syscallent1.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000276 linux/tile/userent.h \
Dmitry V. Levin8e0b8be2013-06-02 18:09:44 +0000277 linux/ubi-user.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000278 linux/userent.h \
279 linux/userent0.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000280 linux/x32/errnoent.h \
281 linux/x32/errnoent1.h \
282 linux/x32/ioctlent.h.in \
283 linux/x32/ioctlent1.h \
284 linux/x32/signalent.h \
285 linux/x32/signalent1.h \
286 linux/x32/syscallent.h \
287 linux/x32/syscallent1.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000288 linux/x32/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000289 linux/x86_64/errnoent1.h \
290 linux/x86_64/errnoent2.h \
291 linux/x86_64/gentab.pl \
292 linux/x86_64/ioctlent.h.in \
293 linux/x86_64/ioctlent1.h \
294 linux/x86_64/ioctlent2.h \
295 linux/x86_64/signalent1.h \
296 linux/x86_64/signalent2.h \
297 linux/x86_64/syscallent.h \
298 linux/x86_64/syscallent1.h \
299 linux/x86_64/syscallent2.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000300 linux/x86_64/userent.h \
Dmitry V. Levin0db34e72013-06-02 18:12:44 +0000301 linux/xtensa/ioctlent.h.in \
302 linux/xtensa/syscallent.h \
Dmitry V. Levinfced7b02014-12-11 19:25:02 +0000303 linux/xtensa/userent.h \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000304 signalent.sh \
305 strace-graph \
306 strace-log-merge \
307 strace.spec \
308 syscallent.sh \
Mike Frysinger761ed9b2014-02-16 01:59:20 -0500309 $(XLAT_INPUT_FILES) \
310 $(XLAT_HEADER_FILES) \
311 xlat/gen.sh \
Dmitry V. Levin7ae73a92013-04-30 23:34:51 +0000312 xlate.el
Roland McGrathbc44e402004-07-12 05:45:08 +0000313
Roland McGrath2b832df2009-10-06 17:46:56 -0700314.PHONY: srpm
Dmitry V. Levin525a39a2011-02-27 14:05:58 +0000315srpm: dist-xz
316 rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
Roland McGrath2b832df2009-10-06 17:46:56 -0700317
Dmitry V. Levindce75932013-04-30 23:52:12 +0000318BUILT_SOURCES = .version
319
320$(srcdir)/.version:
321 $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
322
323dist-hook:
324 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
325
326today = $(shell date +%Y-%m-%d)
327version_regexp = $(subst .,\.,$(VERSION))
328news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
329
330news-check: NEWS
331 $(AM_V_GEN)if head -1 $< | \
332 grep -x $(news_check_regexp) >/dev/null; then \
333 :; \
334 else \
335 echo >&2 '$<: check failed'; \
336 exit 1; \
337 fi
Mike Frysinger9004e122011-02-20 23:24:22 -0500338
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000339ioctlent_h = $(builddir)/$(OS)/ioctlent.h
340BUILT_SOURCES += $(ioctlent_h)
341CLEANFILES = $(ioctlent_h)
342ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
343$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
344 $(MKDIR_P) $(builddir)/$(OS)
345 cat $(ioctlent_h_deps) | \
346 $(COMPILE) -E -P - | \
347 sed 's/^\([[:space:]]*{\)"[^"]\+",[[:space:]]*/\1/' | \
348 LC_ALL=C sort -u -k2,2 -k1,1 > $@
349
Roland McGrathbc44e402004-07-12 05:45:08 +0000350if MAINTAINER_MODE
Roland McGratha478d742009-10-06 17:41:02 -0700351
352gen_changelog_start_date = 2009-07-08 20:00
Dmitry V. Levindce75932013-04-30 23:52:12 +0000353$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
354 $(srcdir)/.version
Roland McGratha478d742009-10-06 17:41:02 -0700355 @rm -f $@.new
Dmitry V. Levindce75932013-04-30 23:52:12 +0000356 (cd $(srcdir); \
Dmitry V. Levin594399d2011-11-05 13:32:27 +0000357 ./gitlog-to-changelog --append-dot \
358 --since='$(gen_changelog_start_date)'; \
Roland McGratha478d742009-10-06 17:41:02 -0700359 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
360 ) > $@.new
361 chmod 444 $@.new
362 mv -f $@.new $@
363
Dmitry V. Levindce75932013-04-30 23:52:12 +0000364$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
365 $(srcdir)/Makefile.in $(srcdir)/.version
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000366 $(AM_V_GEN) \
Mike Frysinger67c4d432014-08-14 04:05:37 -0400367 ( \
Dmitry V. Levindce75932013-04-30 23:52:12 +0000368 cd $(srcdir); \
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000369 sed '/^##/,$$d' CREDITS.in; \
370 { sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
371 git log --pretty=format:'%aN %aE'; \
372 } | LC_ALL=C sort -u \
373 | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
Mike Frysinger67c4d432014-08-14 04:05:37 -0400374 ) > $@-t && mv $@-t $@
Dmitry V. Levin59138a22011-02-24 01:51:15 +0000375
Dmitry V. Levin76ac37d2009-10-09 22:10:09 +0000376export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
377
Lubomir Rintel544a8102014-10-16 12:05:43 +0200378INCLUDEDIR = /usr/include
379KERNEL_RELEASE = $(shell uname -r)
380# Candidates for the kernel headers tree.
381KERNEL_INCLUDE = \
382 /lib/modules/$(KERNEL_RELEASE)/build/include \
383 /usr/src/linux-$(KERNEL_RELEASE)/include \
384 $(INCLUDEDIR)
385IOCTLDIR = $(shell find $(KERNEL_INCLUDE) -maxdepth 0 -type d -print -quit 2>/dev/null)
386IOCTLASM = $(INCLUDEDIR)/asm
Roland McGrathbc44e402004-07-12 05:45:08 +0000387
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000388noinst_PROGRAMS = ioctlsort
389ioctlsort_SOURCES = ioctlsort.c
390nodist_ioctlsort_SOURCES = ioctls.h ioctldefs.h
391CLEANFILES += $(nodist_ioctlsort_SOURCES)
392ioctlsort.$(OBJEXT): $(nodist_ioctlsort_SOURCES)
Roland McGrathbc44e402004-07-12 05:45:08 +0000393ioctls.h: $(srcdir)/linux/ioctlent.sh
Roland McGrathadc2b302004-07-12 06:11:03 +0000394 $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
Roland McGrathbc44e402004-07-12 05:45:08 +0000395ioctldefs.h: ioctls.h ;
396
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000397ioctlent_h_in = linux/ioctlent.h.in
398BUILT_SOURCES += $(ioctlent_h_in)
399$(srcdir)/$(ioctlent_h_in): ioctlsort
400 $(<D)/$(<F) > $@
Mike Frysinger9004e122011-02-20 23:24:22 -0500401
Dmitry V. Levin00119f62014-11-04 01:40:42 +0000402endif