Skip to content

Commit 3d36d55

Browse files
author
Maxim Egorushkin
committed
env target to log ulimit.
1 parent 6551389 commit 3d36d55

1 file changed

Lines changed: 19 additions & 16 deletions

File tree

Makefile

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,17 @@ TAG := results
5858
N := 1
5959

6060
################################################################################################################################
61-
# Enables GNU Make to enable the jobserver protocol for the toolset programs to request allocating more threads.
61+
# Boiler-plate begin.
62+
63+
################################################################################################################################
64+
# Enable GNU Make jobserver protocol for the recipe programs to request allocating more threads.
6265
JOBSERVER := 1
6366
J.0 :=
6467
J.1 := +
6568
J := ${J.${JOBSERVER}}
6669

70+
n_cpus := $(or $(subst -j,,$(filter -j%,${MAKEFLAGS})),1)
71+
6772
################################################################################################################################
6873

6974
ifneq (,$(findstring clean,${MAKECMDGOALS}))
@@ -77,19 +82,6 @@ endif
7782

7883
################################################################################################################################
7984

80-
colors := $(shell echo "\033[97m \033[0m")
81-
c7 := $(word 1,${colors})
82-
c0 := $(word 2,${colors})
83-
84-
log_src := $(firstword ${MAKEFILE_LIST})
85-
log = $(info ${log_src}: ${c7}${1}${c0})
86-
log_kv = $(let head tail,${1},$(call log,$(head)=$(value $(head)))$(and $(tail),$(call log_kv,$(tail))))
87-
88-
n_cpus := $(or $(subst -j,,$(filter -j%,${MAKEFLAGS})),1)
89-
90-
################################################################################################################################
91-
# Boiler-plate begin.
92-
9385
SHELL := /bin/bash
9486
.SHELLFLAGS := --norc -o pipefail -e -c
9587

@@ -115,6 +107,16 @@ mutli_toolset := $(intcmp $(words ${toolsets}),2,,1)
115107
all :
116108
.SECONDEXPANSION :
117109

110+
################################################################################################################################
111+
112+
colors := $(shell echo "\033[97m \033[0m")
113+
c7 := $(word 1,${colors})
114+
c0 := $(word 2,${colors})
115+
116+
log_src := $(firstword ${MAKEFILE_LIST})
117+
log = $(info ${log_src}: ${c7}${1}${c0})
118+
log_kv = $(let head tail,${1},$(call log,$(head)=$(value $(head)))$(and $(tail),$(call log_kv,$(tail))))
119+
118120
################################################################################################################################
119121
ifeq (,${mutli_toolset}) # Build with a single toolset.
120122
build_dir := ${BUILD_ROOT}/${BUILD}/${TOOLSET}
@@ -340,8 +342,9 @@ distclean :
340342
rm -rf ${BUILD_ROOT}
341343

342344
env :
343-
uname --all
344-
env | sort --ignore-case
345+
uname --all; echo
346+
ulimit -a; echo
347+
env | sort --ignore-case; echo
345348

346349
# Prerequisites of .PHONY are always interpreted as literal target names, never as patterns (even if they contain ‘%’ characters). To always rebuild a pattern rule consider using a "force target".
347350
# If a rule has no prerequisites or recipe, and the target of the rule is a nonexistent file, then make imagines this target to have been updated whenever its rule is run. This implies that all targets depending on this one will always have their recipe run.

0 commit comments

Comments
 (0)