summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-10-21 05:22:00 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-10-21 05:22:00 (GMT)
commitbcdc828e1c0224b5c5e787765a1a0b5ff1912331 (patch)
tree7327bb16510d417c3e31fb37ac9d15e4eda373a3
parent545880bdf39b170b020cc4d26ec56505f75a7f70 (diff)
downloadmxe-bcdc828e1c0224b5c5e787765a1a0b5ff1912331.zip
mxe-bcdc828e1c0224b5c5e787765a1a0b5ff1912331.tar.gz
mxe-bcdc828e1c0224b5c5e787765a1a0b5ff1912331.tar.bz2
Fix display of "autodetected jobs" when $(JOBS) is set in settings.mk
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
-rw-r--r--Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 439459e..8419626 100644
--- a/Makefile
+++ b/Makefile
@@ -22,13 +22,6 @@ PKG_CDN := d1yihgixbnrglp.cloudfront.net
PWD := $(shell pwd)
SHELL := bash
-NPROCS := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1)
-JOBS_AUTO := $(shell printf "$(DEFAULT_MAX_JOBS)\n$(NPROCS)" | sort -n | head -1)
-JOBS := $(strip $(if $(findstring undefined,$(origin JOBS)),\
- $(info [using autodetected $(JOBS_AUTO) job(s)]) \
- $(JOBS_AUTO)\
- ,\
- $(JOBS)))
DATE := $(shell gdate --help >/dev/null 2>&1 && echo g)date
INSTALL := $(shell ginstall --help >/dev/null 2>&1 && echo g)install
@@ -214,6 +207,14 @@ else
} >'$(PWD)/settings.mk')
endif
+NPROCS := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1)
+JOBS_AUTO := $(shell printf "$(DEFAULT_MAX_JOBS)\n$(NPROCS)" | sort -n | head -1)
+JOBS := $(strip $(if $(findstring undefined,$(origin JOBS)),\
+ $(info [using autodetected $(JOBS_AUTO) job(s)]) \
+ $(JOBS_AUTO)\
+ ,\
+ $(JOBS)))
+
# cache some target string manipulation functions
# `memoize` and `uc` from gmsl
_CHOP_TARGET = $(call merge,.,$(call chop,$(call split,.,$(1))))