Dmitry V. Levin
b93d52fe3d
strace is now provided under the terms of the GNU Lesser General Public License version 2.1 or later, see COPYING for more details. strace test suite is now provided under the terms of the GNU General Public License version 2 or later, see tests/COPYING for more details.
26 lines
942 B
Plaintext
26 lines
942 B
Plaintext
# scno.h make rules for strace.
|
|
#
|
|
# Copyright (c) 2017 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
|