Willy Tarreau | 8dd6725 | 2022-11-17 08:23:10 +0100 | [diff] [blame] | 1 | # verbosity: pass V=1 for verbose shell invocation |
| 2 | V = 0 |
| 3 | Q = @ |
| 4 | ifeq ($V,1) |
| 5 | Q= |
| 6 | endif |
| 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. |
| 11 | ifeq ($V,1) |
| 12 | cmd_CC = $(CC) |
| 13 | cmd_LD = $(LD) |
| 14 | cmd_AR = $(AR) |
Willy Tarreau | 8b5a998 | 2022-11-17 08:34:37 +0100 | [diff] [blame] | 15 | cmd_MAKE = +$(MAKE) |
Willy Tarreau | 8dd6725 | 2022-11-17 08:23:10 +0100 | [diff] [blame] | 16 | else |
| 17 | ifeq (3.81,$(firstword $(sort $(MAKE_VERSION) 3.81))) |
| 18 | # 3.81 or above |
| 19 | cmd_CC = $(info $ CC $@) $(Q)$(CC) |
| 20 | cmd_LD = $(info $ LD $@) $(Q)$(LD) |
| 21 | cmd_AR = $(info $ AR $@) $(Q)$(AR) |
Willy Tarreau | 8b5a998 | 2022-11-17 08:34:37 +0100 | [diff] [blame] | 22 | cmd_MAKE = $(info $ MAKE $@) $(Q)+$(MAKE) |
Willy Tarreau | 8dd6725 | 2022-11-17 08:23:10 +0100 | [diff] [blame] | 23 | else |
| 24 | # 3.80 or older |
| 25 | cmd_CC = $(Q)echo " CC $@";$(CC) |
| 26 | cmd_LD = $(Q)echo " LD $@";$(LD) |
| 27 | cmd_AR = $(Q)echo " AR $@";$(AR) |
Willy Tarreau | 8b5a998 | 2022-11-17 08:34:37 +0100 | [diff] [blame] | 28 | cmd_MAKE = $(Q)echo " MAKE $@";$(MAKE) |
Willy Tarreau | 8dd6725 | 2022-11-17 08:23:10 +0100 | [diff] [blame] | 29 | endif |
| 30 | endif |