|
|
|
@ -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))))
|
|
|
|
|