diff --git a/mps/Makefile.in b/mps/Makefile.in index c816e73efcc..180bf944083 100644 --- a/mps/Makefile.in +++ b/mps/Makefile.in @@ -9,6 +9,7 @@ # to build and integrate the MPS. # +MAKE=@MAKE@ MPS_TARGET_PF=@MPS_TARGET_PF@ MPS_TARGET_NAME=@MPS_TARGET_NAME@ @@ -16,7 +17,6 @@ BUILD_TARGET=@BUILD_TARGET@ CLEAN_TARGET=@CLEAN_TARGET@ all: @BUILD_TARGET@ - $(BUILD) build-via-make: $(MAKE) -C code -f $(MPS_TARGET_NAME).gmk diff --git a/mps/configure b/mps/configure index 787f690890b..3c6b094c176 100755 --- a/mps/configure +++ b/mps/configure @@ -591,6 +591,7 @@ CLEAN_TARGET BUILD_TARGET MPS_TARGET_NAME MPS_TARGET_PF +MAKE host_os host_vendor host_cpu @@ -2686,6 +2687,53 @@ $as_echo "FreeBSD x86_64" >&6; } as_fn_error $? "MPS does not support this platform out of the box. See manual/build.txt" "$LINENO" 5 esac +for ac_prog in gnumake gmake make +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MAKE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MAKE"; then + ac_cv_prog_MAKE="$MAKE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MAKE="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MAKE=$ac_cv_prog_MAKE +if test -n "$MAKE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 +$as_echo "$MAKE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MAKE" && break +done +test -n "$MAKE" || MAKE="as_fn_error $? "Unable to find a make program." "$LINENO" 5" + +if ! $MAKE --version | grep -q "GNU" 2> /dev/null; then + as_fn_error $? "MPS requires GNU make to build from configure, but see manual/build.txt" "$LINENO" 5 +fi + diff --git a/mps/configure.ac b/mps/configure.ac index abcddd82166..66f90ba17ca 100644 --- a/mps/configure.ac +++ b/mps/configure.ac @@ -69,6 +69,11 @@ case $host in AC_MSG_ERROR([MPS does not support this platform out of the box. See manual/build.txt]) esac +AC_CHECK_PROGS([MAKE],[gnumake gmake make],[AC_MSG_ERROR([Unable to find a make program.])]) +if ! $MAKE --version | grep -q "GNU" 2> /dev/null; then + AC_MSG_ERROR([MPS requires GNU make to build from configure, but see manual/build.txt]) +fi + AC_SUBST(MPS_TARGET_PF) AC_SUBST(MPS_TARGET_NAME) AC_SUBST(BUILD_TARGET)