From: Huang Hang Date: Thu, 9 Aug 2012 03:22:08 +0000 (+0800) Subject: build-sys: use more generic regular expression to generate syscall-list.txt correctly X-Git-Tag: v189~108 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=af18d7ca4b0a56e5051abf41bc3fdd2e3d8dc5b5 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. --- diff --git a/Makefile.am b/Makefile.am index da0b6f50b..ad8f71d82 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 $@)