1#-*-makefile-*-   ; force emacs to enter makefile-mode
2# ----------------------------------------------------
3# Make include file for otp
4#
5# %CopyrightBegin%
6#
7# Copyright Ericsson AB 1997-2013. All Rights Reserved.
8#
9# Licensed under the Apache License, Version 2.0 (the "License");
10# you may not use this file except in compliance with the License.
11# You may obtain a copy of the License at
12#
13#     http://www.apache.org/licenses/LICENSE-2.0
14#
15# Unless required by applicable law or agreed to in writing, software
16# distributed under the License is distributed on an "AS IS" BASIS,
17# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18# See the License for the specific language governing permissions and
19# limitations under the License.
20#
21# %CopyrightEnd%
22#
23# Author: Anthony Ramine
24# ----------------------------------------------------
25
26# These variables are used to produce less output when running make with V=0 or
27# with the --enable-silent-rules flag.
28#
29# For each compiler kind of file generated by a command during the building of
30# Erlang/OTP, a variable named <command>_verbose should be defined and used as
31# a command prefix. The generic gen_verbose variable is offered for
32# miscellaneous operations like sed, cp or magical Perl incantations.
33#
34# A second variable V_<COMMAND> is also provided for major compilation tools
35# like CC, ERLC or JAVAC.
36
37# DEFAULT_VERBOSITY is set by the --enable-silent-rules configure flag.
38ifeq ($(V),)
39V = @DEFAULT_VERBOSITY@
40endif
41
42# v_p should be used with `test` to dynamically print things.
43ifeq ($(V),0)
44v_p = 0
45else
46v_p = 1
47endif
48
49# V_at is the @ prefix when silent rules are enabled.
50V_at_0 = @
51V_at = $(V_at_$(V))
52
53# V_colon makes the prefixed command into a no-op if silent rules are enabled,
54# useful to annihilate an `echo` command.
55V_colon_0 = @: ""
56V_colon = $(V_colon_$(V))
57
58ar_verbose_0 = @echo " AR	"$@;
59ar_verbose = $(ar_verbose_$(V))
60V_AR = $(ar_verbose)$(AR)
61
62asn_verbose_0 = @echo " ASN	"$@;
63asn_verbose = $(asn_verbose_$(V))
64
65cc_verbose_0 = @echo " CC	"$@;
66cc_verbose = $(cc_verbose_$(V))
67V_CC = $(cc_verbose)$(CC)
68
69cxx_verbose_0 = @echo " CXX	"$@;
70cxx_verbose = $(cxx_verbose_$(V))
71V_CXX = $(cxx_verbose)$(CXX)
72
73# For the diameter compiler.
74dia_verbose_0 = @echo " DIA	"$@;
75dia_verbose = $(dia_verbose_$(V))
76
77dtrace_verbose_0 = @echo " DTRACE	"$@;
78dtrace_verbose = $(dtrace_verbose_$(V))
79
80emacs_verbose_0 = @echo " EMACS	"$@;
81emacs_verbose = $(emacs_verbose_$(V))
82
83emu_cc_verbose_0 = @echo " EMU_CC	"$@;
84emu_cc_verbose = $(emu_cc_verbose_$(V))
85V_EMU_CC = $(emu_cc_verbose)$(EMU_CC)
86
87erlc_verbose_0 = @echo " ERLC	"$@;
88erlc_verbose = $(erlc_verbose_$(V))
89V_ERLC = $(erlc_verbose)$(ERLC)
90
91gen_verbose_0 = @echo " GEN	"$@;
92gen_verbose = $(gen_verbose_$(V))
93
94javac_verbose_0 = @echo " JAVAC	"$@;
95javac_verbose = $(javac_verbose_$(V))
96V_JAVAC = $(javac_verbose)$(JAVAC)
97
98ld_verbose_0 = @echo " LD	"$@;
99ld_verbose = $(ld_verbose_$(V))
100V_LD = $(ld_verbose)$(LD)
101
102leex_verbose_0 = @echo " LEEX	"$@;
103leex_verbose = $(leex_verbose_$(V))
104
105lex_verbose_0 = @echo " LEX	"$@;
106lex_verbose = $(lex_verbose_$(V))
107V_LEX = $(lex_verbose)$(LEX)
108
109m4_verbose_0 = @echo " M4	"$@;
110m4_verbose = $(m4_verbose_$(V))
111
112# V_MAKE isn't defined and shouldn't be to avoid breaking parallel building and
113# the following warning:
114#
115#     warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
116#
117make_verbose_0 = @echo " MAKE	"$@;
118make_verbose = $(make_verbose_$(V))
119
120mc_verbose_0 = @echo " MC	"$@;
121mc_verbose = $(mc_verbose_$(V))
122V_MC = $(mc_verbose)$(MC)
123
124ranlib_verbose_0 = @echo " RANLIB	"$@;
125ranlib_verbose = $(ranlib_verbose_$(V))
126V_RANLIB = $(ranlib_verbose)$(RANLIB)
127
128rc_verbose_0 = @echo " RC	"$@;
129rc_verbose = $(rc_verbose_$(V))
130V_RC = $(rc_verbose)$(RC)
131
132snmp_verbose_0 = @echo " SNMP	"$@;
133snmp_verbose = $(snmp_verbose_$(V))
134
135# vsn_verbose should be used instead of gen_verbose when sed or another tool
136# is used to insert a version number into a file.
137vsn_verbose_0 = @echo " VSN	"$@;
138vsn_verbose = $(vsn_verbose_$(V))
139
140yecc_verbose_0 = @echo " YECC	"$@;
141yecc_verbose = $(yecc_verbose_$(V))
142
143llvm_profdata_verbose_0 = @echo " LLVM_PROFDATA	"$@;
144llvm_profdata_verbose = $(llvm_profdata_verbose_$(V))
145V_LLVM_PROFDATA = $(llvm_profdata_verbose)$(LLVM_PROFDATA)
146