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

ruby-changes:26343

From: nobu <ko1@a...>
Date: Sat, 15 Dec 2012 10:40:27 +0900 (JST)
Subject: [ruby-changes:26343] nobu:r38394 (trunk): * configure.in (NULLCMD): check in loop.

nobu	2012-12-15 10:39:49 +0900 (Sat, 15 Dec 2012)

  New Revision: 38394

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38394

  Log:
    * configure.in (NULLCMD): check in loop.

  Modified files:
    trunk/configure.in

Index: configure.in
===================================================================
--- configure.in	(revision 38393)
+++ configure.in	(revision 38394)
@@ -2957,22 +2957,20 @@ AS_CASE(["$FIRSTMAKEFILE"], [*GNUmakefil https://github.com/ruby/ruby/blob/trunk/configure.in#L2957
 AS_IF([test "$gnumake" = yes], [ NULLCMD=: ], [
     AC_MSG_CHECKING([for safe null command for ${MAKE-make}])
     mkdir conftest.dir
-    echo 'A=1' > conftest.dir/Makefile
-    echo 'B=$(A:1=@:)' >> conftest.dir/Makefile
-    echo 'all:; $B 1 2 3 4 5 6 7 8 9' >> conftest.dir/Makefile
-    if (cd conftest.dir; ${MAKE-make} >/dev/null 2>/dev/null); then
-	NULLCMD=:
-    else
+    NULLCMD=
+    for cmd in : true; do
 	echo 'A=1' > conftest.dir/Makefile
-	echo 'B=$(A:1=@true)' >> conftest.dir/Makefile
+	echo 'B=$(A:1=@'$cmd')' >> conftest.dir/Makefile
 	echo 'all:; $B 1 2 3 4 5 6 7 8 9' >> conftest.dir/Makefile
 	if (cd conftest.dir; ${MAKE-make} >/dev/null 2>/dev/null); then
-	    NULLCMD=true
-	else
-	    AC_MSG_ERROR(no candidate for safe null command)
+	    NULLCMD=$cmd
+	    break
 	fi
-    fi
+    done
     rm -fr conftest.dir
+    if test -z "$NULLCMD"; then
+	AC_MSG_ERROR(no candidate for safe null command)
+    fi
     AC_MSG_RESULT($NULLCMD)
 ])
 AC_SUBST(NULLCMD)

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

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