summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 6888087964..7844bc68c0 100644
--- a/configure.in
+++ b/configure.in
@@ -2609,6 +2609,28 @@ AS_CASE(["$FIRSTMAKEFILE"], [*GNUmakefile:*], [gnumake=yes], [
gnumake=no])
AC_MSG_RESULT($gnumake)
])
+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
+ echo 'A=1' > conftest.dir/Makefile
+ echo 'B=$(A:1=@true)' >> 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)
+ fi
+ fi
+ rm -fr conftest.dir
+ AC_MSG_RESULT($NULLCMD)
+])
+AC_SUBST(NULLCMD)
if test "${universal_binary-no}" = yes ; then
AC_CACHE_CHECK([for architecture macros], rb_cv_architecture_macros, [