Bug 1292066 - Move GNU make detection to python configure. r?chmanchester
Nothing is using MAKE in old-configure, and it was not AC_SUBST'ed, so
we don't need to set it when it's not set in the environment already.
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -372,43 +372,16 @@ tools are selected during the Xcode/Deve
AC_LANG_RESTORE
AC_MSG_RESULT($result)
if test "$result" = "no" ; then
AC_MSG_ERROR([The selected compiler and Mac OS X SDK are incompatible.])
fi
fi
-fi # COMPILE_ENVIRONMENT
-
-if test -n "$MAKE"; then
- if test `echo $MAKE | grep -c make.py` != 1; then
- NOT_PYMAKE=$MAKE
- fi
-fi
-
-case "$host_os" in
-mingw*)
- MOZ_PATH_PROGS(GMAKE, $GMAKE mingw32-make $NOT_PYMAKE make gmake, :)
- ;;
-*)
- MOZ_PATH_PROGS(GMAKE, $GMAKE $NOT_PYMAKE gmake make, :)
- ;;
-esac
-if test "$GMAKE" = ":"; then
- AC_MSG_ERROR([GNU make not found])
-fi
-
-# MAKE will be set by client.mk, but still need this for standalone js builds
-if test -z "$MAKE"; then
- MAKE=$GMAKE
-fi
-
-if test "$COMPILE_ENVIRONMENT"; then
-
AC_PATH_XTRA
XCFLAGS="$X_CFLAGS"
fi # COMPILE_ENVIRONMENT
dnl ==============================================================
dnl Get mozilla version from central milestone file
--- a/moz.configure
+++ b/moz.configure
@@ -189,16 +189,35 @@ def perl_version_check(min_version):
def require_full_perl_installation(has_full_perl_installation):
if not has_full_perl_installation:
die('Cannot find Config.pm or $Config{archlib}. '
'A full perl installation is required.')
perl_version_check('5.006')
+# GNU make detection
+# ==============================================================
+option(env='MAKE', nargs=1, help='Path to GNU make')
+
+@depends('MAKE', host)
+def possible_makes(make, host):
+ candidates = []
+ if host.kernel == 'WINNT':
+ candidates.append('mingw32-make')
+ if make:
+ candidates.append(make[0])
+ if host.kernel == 'WINNT':
+ candidates.extend(('make', 'gmake'))
+ else:
+ candidates.extend(('gmake', 'make'))
+ return candidates
+
+check_prog('GMAKE', possible_makes)
+
# Miscellaneous programs
# ==============================================================
check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
check_prog('XARGS', ('xargs',))
@depends(target)
def extra_programs(target):
if target.kernel == 'Darwin':
--- a/old-configure.in
+++ b/old-configure.in
@@ -562,43 +562,16 @@ tools are selected during the Xcode/Deve
AC_LANG_RESTORE
AC_MSG_RESULT($result)
if test "$result" = "no" ; then
AC_MSG_ERROR([The selected compiler and Mac OS X SDK are incompatible.])
fi
fi
-fi # COMPILE_ENVIRONMENT
-
-if test -n "$MAKE"; then
- if test `echo $MAKE | grep -c make.py` != 1; then
- NOT_PYMAKE=$MAKE
- fi
-fi
-
-case "$host_os" in
-mingw*)
- MOZ_PATH_PROGS(GMAKE, $GMAKE mingw32-make $NOT_PYMAKE make gmake, :)
- ;;
-*)
- MOZ_PATH_PROGS(GMAKE, $GMAKE $NOT_PYMAKE gmake make, :)
- ;;
-esac
-if test "$GMAKE" = ":"; then
- AC_MSG_ERROR([GNU make not found])
-fi
-AC_SUBST(GMAKE)
-
-if test -z "$MAKE"; then
- MAKE=$GMAKE
-fi
-
-if test "$COMPILE_ENVIRONMENT"; then
-
AC_PATH_XTRA
XCFLAGS="$X_CFLAGS"
fi # COMPILE_ENVIRONMENT
dnl ========================================================
dnl set the defaults first