blob: c37d513c4a01ae910a1715540090b5aac7772194 [file] [log] [blame]
Willy Tarreau8dd67252022-11-17 08:23:10 +01001# verbosity: pass V=1 for verbose shell invocation
2V = 0
3Q = @
4ifeq ($V,1)
5Q=
6endif
7
8# Some common commands such as CC/LD/AR are redefined with a cmd_ equivalent
9# and are either mapped to a silent rule just indicating what is being done,
10# or to themselves depending on the verbosity level.
11ifeq ($V,1)
12cmd_CC = $(CC)
13cmd_LD = $(LD)
14cmd_AR = $(AR)
Willy Tarreau8b5a9982022-11-17 08:34:37 +010015cmd_MAKE = +$(MAKE)
Willy Tarreau8dd67252022-11-17 08:23:10 +010016else
17ifeq (3.81,$(firstword $(sort $(MAKE_VERSION) 3.81)))
18# 3.81 or above
19cmd_CC = $(info $ CC $@) $(Q)$(CC)
20cmd_LD = $(info $ LD $@) $(Q)$(LD)
21cmd_AR = $(info $ AR $@) $(Q)$(AR)
Willy Tarreau8b5a9982022-11-17 08:34:37 +010022cmd_MAKE = $(info $ MAKE $@) $(Q)+$(MAKE)
Willy Tarreau8dd67252022-11-17 08:23:10 +010023else
24# 3.80 or older
25cmd_CC = $(Q)echo " CC $@";$(CC)
26cmd_LD = $(Q)echo " LD $@";$(LD)
27cmd_AR = $(Q)echo " AR $@";$(AR)
Willy Tarreau8b5a9982022-11-17 08:34:37 +010028cmd_MAKE = $(Q)echo " MAKE $@";$(MAKE)
Willy Tarreau8dd67252022-11-17 08:23:10 +010029endif
30endif