From af18d7ca4b0a56e5051abf41bc3fdd2e3d8dc5b5 Mon Sep 17 00:00:00 2001 From: Huang Hang Date: Thu, 9 Aug 2012 11:22:08 +0800 Subject: [PATCH] build-sys: use more generic regular expression to generate syscall-list.txt correctly Currently MIPS and ARM define syscall numbers for multiple ABI in one . The #define statments for each syscall are formated as: #define __NR_scname (BASE_OFFSET + sc_number) Thus we need a more generic regular expression to match these in awk. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index da0b6f50b0..ad8f71d821 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1030,7 +1030,7 @@ BUILT_SOURCES += \ src/core/syscall-list.txt: Makefile $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9]/ { sub(/__NR_/, "", $$2); print $$2; }' > $@ + $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+\(?.*[0-9]+.*\)?/ { sub(/__NR_/, "", $$2); print $$2; }' > $@ src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile $(AM_V_at)$(MKDIR_P) $(dir $@)