]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - make.sh
make.sh: Calculate MAKETUNING depending on available memory
[ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index d9f779a81d6297cbe590c0b75fb56858bb07d3fd..f4d474d364c2c19a8f5fe87ded8561f01251bd6a 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -62,16 +62,17 @@ export BASEDIR LOGFILE
 DIR_CHK=$BASEDIR/cache/check
 mkdir $BASEDIR/log/ 2>/dev/null
 
+# Load configuration file
+if [ -f .config ]; then
+       . .config
+fi
+
 # Include funtions
 . tools/make-functions
 
 # Get the amount of memory in this build system
 HOST_MEM=$(system_memory)
 
-if [ -f .config ]; then
-       . .config
-fi
-
 if [ -n "${BUILD_ARCH}" ]; then
        configure_build "${BUILD_ARCH}"
 elif [ -n "${TARGET_ARCH}" ]; then
@@ -81,18 +82,6 @@ else
        configure_build "default"
 fi
 
-if [ -z $EDITOR ]; then
-       for i in nano emacs vi; do
-               EDITOR=$(which $i 2>/dev/null)
-               if ! [ -z $EDITOR ]; then
-                       export EDITOR=$EDITOR
-                       break
-               fi
-       done
-       [ -z $EDITOR ] && exiterror "You should have installed an editor."
-fi
-
-
 prepareenv() {
     ############################################################################
     #                                                                          #
@@ -188,11 +177,6 @@ prepareenv() {
     # Setup environment
     set +h
     LC_ALL=POSIX
-    if [ -z $MAKETUNING ]; then
-       CPU_COUNT="$(system_processors)"
-
-       MAKETUNING="-j$(( ${CPU_COUNT} * 2 + 1 ))"
-    fi
     export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
     unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD