Squashed 'build/dobuild/' changes from f2f5f7f..0614105

0614105 fixes default extdir
6c336fe fix usage of default job slots vs nproc

git-subtree-dir: build/dobuild
git-subtree-split: 0614105caa1bf9a6f44ebce333436ccebc7f5a9c
pull/72/head
nosamad 4 years ago
parent 0f8846a314
commit cc789d18b1

@ -552,7 +552,7 @@ HOST_CONTAINER = $(call memorize,HOST_CONTAINER,$(DOBUILD_HOSTCONTAINER))
SOURCE_DATE_EPOCH ?= $(call memorize,SOURCE_DATE_EPOCH,$(shell $(DOBUILDDIR)/bin/get_source_date_epoch $(TOPDIR)))
BUILDTIME = $(call memorize,BUILDTIME,$(shell date -u -d '@$(SOURCE_DATE_EPOCH)' --rfc-3339 ns 2>/dev/null))
JOBSLOTS_DEFAULT = $(if $(findstring --jobserver-,$(make_cmdline)),2,$(shell nproc 2>/dev/null || echo '2'))
JOBSLOTS_DEFAULT = $(if $(findstring --jobserver-,$(make_cmdline)),2,$(nproc))
JOBSLOTS = $(call memorize,JOBSLOTS,$(or $(DOBUILD_JOBSLOTS),$(JOBSLOTS_DEFAULT)))
SKIP_MD5SUM = $(call memorize,SKIP_MD5SUM,$(DOBUILD_SKIPMD5SUM))
@ -590,6 +590,7 @@ $(VERBOSE)SILENT := @
make_pid = $(call memorize,make_pid,$(shell echo "$$PPID"))
make_cmdline = $(call memorize,make_cmdline,$(shell set -- $$(ps T 2>/dev/null | sed -n -e 's!^\s*$(make_pid)\s\+.*\($(call escape,$(MAKE),!)\s\+.*\)!\1!p') && echo "$$@"))
nproc = $(call memorize,nproc,$(shell nproc || echo '1'))
machine = $(call memorize,machine,$(shell uname -m 2>/dev/null))
make_version = $(MAKE_VERSION)

@ -344,7 +344,7 @@ ifeq ($(docker_portable_workspace),)
container_destdir = $(abspath $(DESTDIR))
endif
container_cpus = $(call min,$(INTERNPARALLEL) $(JOBSLOTS_DEFAULT))
container_cpus = $(call min,$(INTERNPARALLEL) $(nproc))
container_cpuperiod = 100000
container_quota = $(call bc,($(container_cpus)*$(container_cpuperiod)))
container_nproc = $(INTERNPARALLEL)

@ -105,7 +105,7 @@ generic_default_prerequisites = \
# retrieves the target generic default extension directory
# $(call generic_default_extdir,target-name)
generic_default_extdir = $(addprefix $(PROJECTDIR)/dobuild-extensions/,$(cache.$1.adapter))
generic_default_extdir = $(addprefix $(addsuffix /,$(EXTDIR)),$(cache.$1.adapter))
# creates a generic run rule command
# $(call generic_run_cmd,target-name,command[,args],alternative-command[,output-command])

Loading…
Cancel
Save