From b1ad07bd1aefb14fa0a2c6ae38c0a212328f3121 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 26 Nov 2018 03:47:47 +0000 Subject: common.mk: simplify for ruby.imp * common.mk (ruby.imp): extract the first word on the next lines of MJIT_FUNC_EXPORTED, regardless the prefix. duplicate symbols will be removed by `sort -u`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 2ff2de058c..8758eb6ff3 100644 --- a/common.mk +++ b/common.mk @@ -347,8 +347,8 @@ ruby.imp: $(COMMONOBJS) $(Q){ \ $(NM) -Pgp $(COMMONOBJS) | \ awk 'BEGIN{print "#!"}; $$2~/^[BDT]$$/&&$$1!~/^$(SYMBOL_PREFIX)(Init_|InitVM_|ruby_static_id_|.*_threadptr_|rb_ec_)|^\./{print $$1}'; \ - ($(CHDIR) $(srcdir) && for filename in cont.c gc.c thread*c vm*.c; do for linenum in `grep -n -h ^MJIT_FUNC_EXPORTED $${filename} | cut -f 1 -d :`; do sed -n "$${linenum},`expr $${linenum} + 1` p" $${filename}; done; done) | \ - grep -e ^rb_ec_ -e ^rb_threadptr_ | sed 's/^\(rb_[a-zA-Z_0-9]*\).*/$(SYMBOL_PREFIX)\1/'; \ + ($(CHDIR) $(srcdir) && \ + exec sed -n '/^MJIT_FUNC_EXPORTED/!d;N;s/.*\n\(rb_[a-zA-Z_0-9]*\).*/$(SYMBOL_PREFIX)\1/p' cont.c gc.c thread*c vm*.c) \ } | \ sort -u -o $@ -- cgit v1.2.3