]> granicus.if.org Git - strace/blob - scno.am
Update debian/watch
[strace] / scno.am
1 # scno.h make rules for strace.
2 #
3 # Copyright (c) 2017-2019 Dmitry V. Levin <ldv@altlinux.org>
4 # All rights reserved.
5 #
6 # SPDX-License-Identifier: LGPL-2.1-or-later
7
8 SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
9                 $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
10
11 syscallent.i: $(top_builddir)/config.h $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
12         $(CPP) -P $(SCNO_CPPFLAGS) -include $^ -o $@
13
14 digits = [[:digit:]][[:digit:]]*
15 al_nums = [[:alnum:]_][[:alnum:]_]*
16 SCNO_SED = /TRACE_INDIRECT_SUBCALL/d; s/^\[[[:space:]]*\($(digits)\([[:space:]]*+[[:space:]]*$(digits)\)\?\)\][[:space:]]*=[[:space:]]*{[^,]*,[^,]*,[^,]*,[[:space:]]*"\($(al_nums)\)"[[:space:]]*},.*/\#ifndef __NR_\3\n\# define __NR_\3 (SYSCALL_BIT | (\1))\n\#endif/p
17
18 scno.h: $(top_srcdir)/scno.head syscallent.i
19         echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
20         cat $< >> $@-t
21         LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t
22         mv $@-t $@
23
24 BUILT_SOURCES += scno.h
25 CLEANFILES += syscallent.i scno.h