[前][次][番号順一覧][スレッド一覧]

ruby-changes:53522

From: nobu <ko1@a...>
Date: Thu, 15 Nov 2018 15:22:22 +0900 (JST)
Subject: [ruby-changes:53522] nobu:r65738 (trunk): . command in some sh cannot take arguments

nobu	2018-11-15 15:22:17 +0900 (Thu, 15 Nov 2018)

  New Revision: 65738

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65738

  Log:
    . command in some sh cannot take arguments

  Modified files:
    trunk/Makefile.in
    trunk/tool/mjit_archflag.sh
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 65737)
+++ Makefile.in	(revision 65738)
@@ -583,7 +583,8 @@ un-runnable: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L583
 mjit_config.h:
 	$(ECHO) making $@
 	@{ \
-	. $(srcdir)/tool/mjit_archflag.sh "$(UNIVERSAL_ARCHNAMES)" $(ARCH_FLAG); \
+	. $(srcdir)/tool/mjit_archflag.sh; \
+	parse_arch_flags "$(UNIVERSAL_ARCHNAMES)" $(ARCH_FLAG); \
 	test "$(Q)" = @ || set -x; \
 	echo '#ifndef RUBY_MJIT_CONFIG_H'; \
 	echo '#define RUBY_MJIT_CONFIG_H 1'; \
Index: tool/mjit_archflag.sh
===================================================================
--- tool/mjit_archflag.sh	(revision 65737)
+++ tool/mjit_archflag.sh	(revision 65738)
@@ -10,21 +10,23 @@ quote() { https://github.com/ruby/ruby/blob/trunk/tool/mjit_archflag.sh#L10
 archs=""
 arch_flag=""
 
-for arch in $1; do
-    archs="${archs:+$archs }${arch%=*}"
-done
+parse_arch_flags() {
+    for arch in $1; do
+	archs="${archs:+$archs }${arch%=*}"
+    done
 
-while shift && [ "$#" -gt 0 ]; do
-    case "$1" in
-	-arch)
-	    shift
-	    archs="${archs:+$archs }$1"
-	    ;;
-	*)
-	    arch_flag="${arch_flag:+${arch_flag} }$1"
-	    ;;
-    esac
-done
+    while shift && [ "$#" -gt 0 ]; do
+	case "$1" in
+	    -arch)
+		shift
+		archs="${archs:+$archs }$1"
+		;;
+	    *)
+		arch_flag="${arch_flag:+${arch_flag} }$1"
+		;;
+	esac
+    done
+}
 
 define_arch_flags() {
     local indent=${archs:+  }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]