-I$(builddir) \
-I$(srcdir)
+AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD)
+AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS)
+
include xlat/Makemodule.am
strace_CPPFLAGS = $(AM_CPPFLAGS)
native_defs.h \
net.c \
netlink.c \
+ nsig.h \
numa.c \
oldstat.c \
open.c \
pkeys.c \
poll.c \
prctl.c \
+ print_dev_t.c \
print_mq_attr.c \
print_msgbuf.c \
+ print_sg_req_info.c \
print_sigevent.c \
print_statfs.c \
print_struct_stat.c \
seccomp.c \
seccomp_fprog.h \
sendfile.c \
+ sg_io_v3.c \
+ sg_io_v4.c \
sigaltstack.c \
sigevent.h \
signal.c \
swapon.c \
syscall.c \
sysctl.c \
+ sysent.h \
sysinfo.c \
syslog.c \
sysmips.c \
umount.c \
uname.c \
userfaultfd.c \
+ ustat.c \
util.c \
utime.c \
utimes.c \
v4l2.c \
- vsprintf.c \
wait.c \
xattr.c \
xlat.h \
debian/watch \
errnoent.sh \
generate_sen.sh \
+ ioctl_iocdef.c \
ioctlsort.c \
linux/32/ioctls_inc.h \
linux/32/ioctls_inc_align16.h \
mpers.sh \
mpers_test.sh \
mpers_xlat.h \
+ scno.head \
signalent.sh \
strace-graph \
strace-log-merge \
xlat/gen.sh \
xlate.el
+.PHONY: check-valgrind-local
+check-valgrind-local:
+
.PHONY: srpm
srpm: dist-xz
rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
ioctlsort_CC = $(CC_FOR_BUILD)
ioctlsort_DEFS = $(DEFS)
ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
-ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
-ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
-ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
+ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
+ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
+ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
ioctlent%.h: ioctlsort%
./$< > $@
+# Need to pick up <linux/ioctl.h> definitions *for host* while compiling
+# ioctlsort *for build*, hence this magic.
+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c
+ $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@
+
+ioctl_iocdef.h: ioctl_iocdef.i
+ sed -n 's/^DEFINE HOST/#define /p' $< > $@
+
ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
$(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
-ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c
$(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
+ ioctl_iocdef.h ioctl_iocdef.i \
native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
+include scno.am
+
+$(strace_OBJECTS): scno.h
+
# defines mpers_source_files
include mpers.am
srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
m%_type_defs.h: $(srcdir_mpers_source_files)
for f in $^; do \
- sed -r -n 's/^#include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
+ sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
done > $@-t
echo '#undef MPERS_PRINTER_NAME' >> $@-t
echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t