26 lines
947 B
Plaintext
26 lines
947 B
Plaintext
# scno.h make rules for strace.
|
|
#
|
|
# Copyright (c) 2017-2018 Dmitry V. Levin <ldv@altlinux.org>
|
|
# All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
|
$(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
|
|
|
|
syscallent.i: $(top_builddir)/config.h $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
|
|
$(CPP) -P $(SCNO_CPPFLAGS) -include $^ -o $@
|
|
|
|
digits = [[:digit:]][[:digit:]]*
|
|
al_nums = [[:alnum:]_][[:alnum:]_]*
|
|
SCNO_SED = /TRACE_INDIRECT_SUBCALL/d; s/^\[[[:space:]]*\($(digits)\)\][[:space:]]*=[[:space:]]*{[^,]*,[^,]*,[^,]*,[[:space:]]*"\($(al_nums)\)"[[:space:]]*},.*/\#ifndef __NR_\2\n\# define __NR_\2 (SYSCALL_BIT | \1)\n\#endif/p
|
|
|
|
scno.h: $(top_srcdir)/scno.head syscallent.i
|
|
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
|
|
cat $< >> $@-t
|
|
LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t
|
|
mv $@-t $@
|
|
|
|
BUILT_SOURCES += scno.h
|
|
CLEANFILES += syscallent.i scno.h
|