Bug 485405 - Use gmake to build NSS, even when using pymake everywhere else; (Bv2-CC) On comm-central, Copy the useful part of this, Remove the rest.
authorSerge Gautherie <sgautherie.bz@free.fr>
Wed, 17 Feb 2010 00:54:41 +0100
changeset 4923 ce2c7c200aa9ac0eac346b08c6ee571f14fa8e54
parent 4922 903c24461dd51d4b754c0798f1b2342b99ee162d
child 4924 a15ce07c0a8971e853f236b17de1567709b51994
push idunknown
push userunknown
push dateunknown
bugs485405
Bug 485405 - Use gmake to build NSS, even when using pymake everywhere else; (Bv2-CC) On comm-central, Copy the useful part of this, Remove the rest. r=Callek.
Makefile.in
configure.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,16 +34,25 @@
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= .
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
+ifndef .PYMAKE
+ifeq (,$(MAKE_VERSION))
+$(error GNU Make is required)
+endif
+ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
+$(error GNU Make 3.80 or higher is required)
+endif
+endif
+
 include $(DEPTH)/config/autoconf.mk
 
 default::
 
 ifdef COMPILE_ENVIRONMENT
 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
 endif
 
--- a/configure.in
+++ b/configure.in
@@ -154,17 +154,16 @@ NSS_VERSION=3
 
 dnl Set the minimum version of toolkit libs used by mozilla
 dnl ========================================================
 GLIB_VERSION=1.2.0
 PERL_VERSION=5.006
 CAIRO_VERSION=1.8.8
 PANGO_VERSION=1.14.0
 GTK2_VERSION=2.10.0
-MAKE_VERSION=3.78
 WINDRES_VERSION=2.14.90
 W32API_VERSION=3.8
 GNOMEVFS_VERSION=2.0
 GCONF_VERSION=1.2.1
 if test "$MOZILLA_1_9_2_BRANCH" != "1"; then
 GIO_VERSION=2.0
 fi
 STARTUP_NOTIFICATION_VERSION=0.8
@@ -222,17 +221,16 @@ then
 fi
 MOZ_BUILD_ROOT=`pwd`
 
 dnl Default to MSVC for win32 and gcc-4.2 for darwin (on !MOZILLA_1_9_2_BRANCH)
 dnl ==============================================================
 if test -z "$CROSS_COMPILE"; then
 case "$target" in
 *-cygwin*|*-mingw*|*-msvc*|*-mks*)
-    MAKE_VERSION=3.79
     if test -z "$CC"; then CC=cl; fi
     if test -z "$CXX"; then CXX=cl; fi
     if test -z "$CPP"; then CPP="cl -E -nologo"; fi
     if test -z "$CXXCPP"; then CXXCPP="cl -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
     if test -z "$LD"; then LD=link; fi
     if test -z "$AS"; then
         case "${target_cpu}" in
         i*86)
@@ -1040,50 +1038,16 @@ tools are selected during the Xcode/Deve
 
   if test "$result" = "no" ; then
     AC_MSG_ERROR([The selected compiler and Mac OS X SDK are incompatible.])
   fi
 fi
 
 fi # COMPILE_ENVIRONMENT
 
-dnl Be sure the make we use is GNU make.
-dnl on win32, gmake.exe is the generally the wrong version
-case "$host_os" in
-cygwin*|mingw*|mks*|msvc*)
-    AC_PATH_PROGS(MAKE, $MAKE make gmake, :)
-    ;;
-*)
-    AC_PATH_PROGS(MAKE, $MAKE gmake make, :)
-    ;;
-esac
-_make_try=`$MAKE --version 2>/dev/null | grep GNU`
-if test ! "$_make_try"
-then
-	echo
-	echo "*** $MAKE is not GNU Make.  You will not be able to build Mozilla without GNU Make."
-	echo
-	exit 1
-fi
-dnl Now exit if version if < MAKE_VERSION
-rm -f dummy.mk
-echo 'all: ; @echo $(MAKE_VERSION)' > dummy.mk
-_make_vers=`$MAKE --no-print-directory -f dummy.mk all 2>/dev/null`
-rm -f dummy.mk
-_MAKE_MAJOR_VERSION=`echo $_make_vers | $AWK -F\. '{ print $1 }'`
-_MAKE_MINOR_VERSION=`echo $_make_vers | $AWK -F\. '{ print $2 }'`
-MAKE_MAJOR_VERSION=`echo $MAKE_VERSION | $AWK -F\. '{ print $1 }'`
-MAKE_MINOR_VERSION=`echo $MAKE_VERSION | $AWK -F\. '{ print $2 }'`
-if test "$_MAKE_MAJOR_VERSION" -lt "$MAKE_MAJOR_VERSION" || \
-   test "$_MAKE_MAJOR_VERSION" = "$MAKE_MAJOR_VERSION" -a \
-        "$_MAKE_MINOR_VERSION" -lt "$MAKE_MINOR_VERSION"; then
-   AC_MSG_ERROR([GNU Make $MAKE_VERSION or higher is required to build Mozilla.])
-fi
-AC_SUBST(MAKE)
-
 if test "$COMPILE_ENVIRONMENT"; then
 
 AC_PATH_XTRA
 
 dnl Check in X11 include directory too.
 if test "$no_x" != "yes"; then
     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
 fi