summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-09-23 07:53:42 -0400
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-09-23 07:53:42 -0400
commit47c82a381ad0b1a608ae855924c548b1f84ba9c0 (patch)
tree2fee68ab2b751e3f0858e5a401b6369e2ad6c927 /bootstrap
parent8cb20b7052f753dbf4025366bd50e9df4b7d0635 (diff)
downloadcmake-47c82a381ad0b1a608ae855924c548b1f84ba9c0.tar.gz
ENH: Attempt to detect a non-parallel make
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap19
1 files changed, 18 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index b95b147e15..0f8225b9dc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -473,6 +473,7 @@ cat>"test.c"<<EOF
#include <stdio.h>
int main(){ printf("1\n"); return 0; }
EOF
+cmake_original_make_flags="${cmake_make_flags}"
if [ "x${cmake_parallel_make}" != "x" ]; then
cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
fi
@@ -481,6 +482,17 @@ for a in ${cmake_make_processors}; do
cmake_make_processor="${a}"
fi
done
+cmake_full_make_flags="${cmake_make_flags}"
+if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then
+ if [ -z "${cmake_make_processor}" ]; then
+ cmake_make_flags="${cmake_original_make_flags}"
+ for a in ${cmake_make_processors}; do
+ if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> cmake_bootstrap.log 2>&1; then
+ cmake_make_processor="${a}"
+ fi
+ done
+ fi
+fi
cd "${cmake_bootstrap_dir}"
rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
@@ -488,7 +500,12 @@ if [ -z "${cmake_make_processor}" ]; then
cmake_error 8 "Cannot find appropriate Makefile processor on this system.
Please specify one using environment variable MAKE."
fi
-echo "Make processor on this system is: ${cmake_make_processor}"
+echo "Makefile processor on this system is: ${cmake_make_processor}"
+if [ "x${cmake_full_make_flags}" != "x${cmake_make_flags}" ]; then
+ echo "---------------------------------------------"
+ echo "Makefile processor ${cmake_make_processor} does not support parallel build"
+ echo "---------------------------------------------"
+fi
# Ok, we have CC, CXX, and MAKE.