my $var = verbose_var ($name);
my $pvar = verbose_private_var ($name);
my $silent_var = $pvar . '_0';
- # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
- # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
- # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
- # See AM_SILENT_RULES in m4/silent.m4.
- define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
- define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)',
- INTERNAL);
+ my $verbose_var = $pvar . '_1';
- if (! vardef ($silent_var, TRUE))
- {
- Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
- $val, '', INTERNAL);
- }
+ define_variable ($var, INTERNAL,
+ '$(' . $pvar . '_$(V))');
+ define_variable ($pvar . '_', INTERNAL,
+ '$(' . $pvar . '_$(AM_DEFAULT_VERBOSITY))');
- $silent_val, '', INTERNAL, VAR_ASIS)
+ Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
- $verbose_val, '', INTERNAL, VAR_ASIS)
++ $silent_val, '', INTERNAL)
+ if (! vardef ($silent_var, TRUE));
+ Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
++ $verbose_val, '', INTERNAL)
+ if (! vardef ($verbose_var, TRUE));
}
# Above should not be needed in the general automake code.
@vindex @code{AM_V_GEN}
@vindex @code{AM_V_at}
@vindex @code{AM_DEFAULT_VERBOSITY}
- To extend the silent mode to your own rules, you have two choices:
-@vindex @code{AM_V}
-@vindex @code{AM_DEFAULT_V}
+ To extend the silent mode to your own rules, you have few choices:
@itemize @bullet
+
@item
You can use the predefined variable @code{AM_V_GEN} as a prefix to
commands that should output a status line in silent mode, and
AC_OUTPUT
EOF
- cat > Makefile.am <<'EOF'
+ # We delegate all the work to the subdir makefile. This is done
+ # to ensure any command-line setting of $(V) gets correctly passed
+ # down to recursive make invocations.
+ echo SUBDIRS = sub > Makefile.am
+
+ mkdir sub
+ cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = -Wno-portability-recursive
my_verbose = $(my_verbose_$(V))
my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
- my_verbose_0 = @echo GEN $@;
+ my_verbose_0 = @echo " XGEN $@";
+
+ all-local: foo gen-headers
- all-local: foo
+ list = 0 1 2
+ .PHONY: gen-headers
+ gen-headers:
+ @headers=`for i in $(list); do echo sub/$$i.h; done`; \
+ if $(AM_V_P); then set -x; else \
+ echo " GEN [headers]"; \
+ fi; \
+ rm -f $$headers || exit 1; \
+ ## Only fake header generation.
+ : generate-header --flags $$headers
foo: foo.in
$(my_verbose)cp $(srcdir)/foo.in $@