Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / nlfaultinjection / repo / third_party / nlbuild-autotools / repo / make / pre / macros / verbosity.mak
1 #
2 #    Copyright 2019 Google LLC. All Rights Reserved.
3 #    Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
4 #
5 #    Licensed under the Apache License, Version 2.0 (the "License");
6 #    you may not use this file except in compliance with the License.
7 #    You may obtain a copy of the License at
8 #
9 #    http://www.apache.org/licenses/LICENSE-2.0
10 #
11 #    Unless required by applicable law or agreed to in writing, software
12 #    distributed under the License is distributed on an "AS IS" BASIS,
13 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #    See the License for the specific language governing permissions and
15 #    limitations under the License.
16 #
17
18 #
19 #    Description:
20 #      This file is a make "header" or pre make header that defines
21 #      make macros for controlling build verbosity.
22 #
23
24 #
25 # Verbosity
26 #
27
28 # The default build verbosity is 0 or none. Invoking 'make V=0' is
29 # equivalent to 'make' with this default.
30
31 NL_DEFAULT_VERBOSITY             ?= 0
32
33 # Alias for the command echo suppression marker.
34
35 NL_AT                            := @
36
37 # Alias for a conditional command echo suppression marker, conditioned
38 # on the build verbosity.
39
40 NL_V_AT                           = $(NL_V_AT_$(V))
41 NL_V_AT_                          = $(NL_V_AT_$(NL_DEFAULT_VERBOSITY))
42 NL_V_AT_0                         = $(NL_AT)
43 NL_V_AT_1                         = 
44
45 #
46 # Verbosity Build Progress Macros
47 #
48
49 # Macro for emitting "<ACTION> <target | output>" oneline, succinct
50 # build progress messages.
51
52 _NL_PROGRESS                     := printf "  %-13s %s\n"
53 NL_PROGRESS                      := $(NL_AT)$(_NL_PROGRESS)
54
55 # Macro for emitting "<ACTION> <target | output>" oneline, succinct
56 # build progress messages, conditioned on build verbosity.
57
58 NL_V_PROGRESS                     = $(NL_V_PROGRESS_$(V))
59 NL_V_PROGRESS_                    = $(NL_V_PROGRESS_$(NL_DEFAULT_VERBOSITY))
60 NL_V_PROGRESS_0                   = $(NL_PROGRESS)
61 NL_V_PROGRESS_1                   = $(NL_AT)true
62
63 # Common convenience progress message macros, conditioned on build
64 # verbosity.
65
66 NL_V_PROGRESS_BOOTSTRAP           = $(NL_V_PROGRESS) "BOOTSTRAP"   "$(1)";
67 NL_V_PROGRESS_BOOTSTRAP_ALL       = $(NL_V_BOOTSTRAP) "all";
68 NL_V_PROGRESS_BOOTSTRAP_CONFIG    = $(NL_V_BOOTSTRAP) "config";
69 NL_V_PROGRESS_BOOTSTRAP_MAKE      = $(NL_V_BOOTSTRAP) "make";
70
71 NL_V_PROGRESS_CONFIGURE           = $(NL_V_PROGRESS) "CONFIGURE"
72
73 NL_V_PROGRESS_GIT_INIT            = $(NL_V_PROGRESS) "GIT INIT"    "$(@)";
74
75 NL_V_PROGRESS_MAKE                = $(NL_V_PROGRESS) "MAKE"        "$(@)";
76
77 NL_V_PROGRESS_LN_S                = $(NL_V_PROGRESS) "LN"          "$(@)";
78
79 NL_V_PROGRESS_MKDIR               = $(NL_V_PROGRESS) "MKDIR"       "$(1)";
80 NL_V_PROGRESS_MKDIR_P             = $(NL_V_MKDIR)
81 NL_V_PROGRESS_RMDIR               = $(NL_V_PROGRESS) "RMDIR"       "$(1)";
82
83 NL_V_PROGRESS_GZIP                = $(NL_V_PROGRESS) "GZIP"        "$(@)";
84 NL_V_PROGRESS_TAR                 = $(NL_V_PROGRESS) "TAR"         "$(@)";
85 NL_V_PROGRESS_TGZ                 = $(NL_V_PROGRESS) "TGZ"         "$(@)";
86 NL_V_PROGRESS_TXZ                 = $(NL_V_PROGRESS) "TXZ"         "$(@)";
87 NL_V_PROGRESS_XZ                  = $(NL_V_PROGRESS) "XZ"          "$(@)";
88
89 #
90 # Verbosity Commands and Flags
91 #
92
93 # This is useful when we do not want submake to be chatty about what
94 # it doing when verbosity is suppressed. However, when verbosity is
95 # requested, -s (silent) would otherwise suppress all make verbose
96 # output. Consequently, suppress -s when verbosity is requested.
97
98 NL_V_MAKE_S                       = $(NL_V_MAKE_S_$(V))                   
99 NL_V_MAKE_S_                      = $(NL_V_MAKE_S_$(NL_DEFAULT_VERBOSITY))
100 NL_V_MAKE_S_0                     = $(MAKE) -s
101 NL_V_MAKE_S_1                     = $(MAKE)