libstrace_a_CPPFLAGS = $(strace_CPPFLAGS)
libstrace_a_CFLAGS = $(strace_CFLAGS)
libstrace_a_SOURCES = \
+ fstatfs.c \
+ fstatfs64.c \
+ statfs.c \
+ statfs64.c \
+ sync_file_range.c \
+ sync_file_range2.c \
upeek.c \
# end of libstrace_a_SOURCES
bjm.c \
block.c \
bpf.c \
+ btrfs.c \
cacheflush.c \
capability.c \
caps0.h \
fcntl.c \
fetch_seccomp_fprog.c \
fetch_struct_flock.c \
+ fetch_struct_statfs.c \
file.c \
file_handle.c \
+ file_ioctl.c \
+ fs_x_ioctl.c \
flock.c \
flock.h \
futex.c \
getcpu.c \
getcwd.c \
getrandom.c \
+ hdio.c \
hostname.c \
inotify.c \
io.c \
mtd.c \
native_defs.h \
net.c \
+ numa.c \
open.c \
or1k_atomic.c \
pathtrace.c \
print_mq_attr.c \
print_msgbuf.c \
print_sigevent.c \
+ print_statfs.c \
print_time.c \
print_timex.c \
printmode.c \
socketutils.c \
sram_alloc.c \
statfs.c \
+ statfs.h \
strace.c \
swapon.c \
- sync_file_range.c \
syscall.c \
sysctl.c \
sysinfo.c \
time.c \
times.c \
truncate.c \
+ ubi.c \
uid.c \
uid16.c \
umask.c \
vsprintf.c \
wait.c \
xattr.c \
+ xlat.h \
xmalloc.c \
# end of strace_SOURCES
endif
@CODE_COVERAGE_RULES@
-CODE_COVERAGE_LCOV_OPTIONS = \
- $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) --rc lcov_branch_coverage=1
-CODE_COVERAGE_GENHTML_OPTIONS = --rc lcov_branch_coverage=1
+CODE_COVERAGE_BRANCH_COVERAGE = 1
+CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
+ --prefix $(shell realpath -Ls $(abs_top_srcdir)/..)
CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
linux/mips/syscallent.h \
linux/mips/userent.h \
linux/mtd-abi.h \
+ linux/netlink_diag.h \
linux/nios2/arch_regs.c \
linux/nios2/get_error.c \
linux/nios2/get_scno.c \
$(srcdir)/.version:
$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
-strace_SOURCES_c = $(filter %.c,$(strace_SOURCES))
+strace_SOURCES_c = \
+ $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES))
sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
for f in $^; do \
ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
+ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h)))
+
+ioctl_redefs%.h: ioctlent%.h ioctlent0.h
+ sort $< > $<-t
+ sort ioctlent0.h | comm -23 $<-t - | \
+ sed -n 's/^{ "\([^"]\+\)", \(0x[[:xdigit:]]\+\) },$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
+ > $@-t
+ rm -f $<-t
+ mv $@-t $@
ioctlent%.h: ioctlsort%
./$< > $@
ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
cat $^ > $@
-BUILT_SOURCES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
-CLEANFILES = $(ioctlent_h) native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.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) \
+ native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
# defines mpers_source_files
include mpers.am
srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
+mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i)
mpers_NAME =
mpers_PREFIX = $(mpers_NAME)_
echo '#undef MPERS_PRINTER_NAME' >> $@-t
echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
+ echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t
mv $@-t $@
m%_funcs.h: $(srcdir_mpers_source_files)
# printers
-printers.h: $(srcdir_mpers_source_files)
+%.c.mpers.i: $(srcdir)/%.c
+ $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@
+
+mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL(\([^,)]\+\),[[:space:]]*\([^,)]\+\),[[:space:]]*\([^)]\+\))$$
+
+printers.h: $(mpers_preproc_files)
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
echo 'typedef struct {' >> $@-t
for f in $^; do \
- sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/ \1 (*\2) \3;\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f || exit; \
+ sed -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
+ || exit; \
done >> $@-t
echo '} struct_printers;' >> $@-t
echo 'extern const struct_printers *printers;' >> $@-t
echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
mv $@-t $@
-%_printer_decls.h: $(srcdir_mpers_source_files)
+%_printer_decls.h: $(mpers_preproc_files)
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
for f in $^; do \
- sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/extern \1 $(mpers_PREFIX)\2\3;/p' $$f || exit; \
+ sed -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
+ || exit; \
done >> $@-t
mv $@-t $@
-%_printer_defs.h: $(srcdir_mpers_source_files)
+%_printer_defs.h: $(mpers_preproc_files)
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
for f in $^; do \
- sed -n 's/^MPERS_PRINTER_DECL(\([^,]\+\),[[:space:]]*\([^)]\+\))\(.*\)/\.\2 = $(mpers_PREFIX)\2,/p' $$f || exit; \
+ sed -n 's/$(mpers_printer_decl_pattern)/\.\2 = $(mpers_PREFIX)\2,/p' $$f \
+ || exit; \
done >> $@-t
mv $@-t $@