doc: xmlto output to stdout on a verbose build
[lttng-ust.git] / doc / man / Makefile.am
index c9e3bee53881559830fc220f3adaad59c5504516..dfc319a42eab1c6a8856f62ada2b76b19a5308eb 100644 (file)
@@ -61,6 +61,10 @@ xmlto_verbose = $(xmlto_verbose_@AM_V@)
 xmlto_verbose_ = $(xmlto_verbose_@AM_DEFAULT_V@)
 xmlto_verbose_0 = @echo "  XMLTO     " $@;
 
+xmlto_verbose_out = $(xmlto_verbose_out_@AM_V@)
+xmlto_verbose_out_ = $(xmlto_verbose_out_@AM_DEFAULT_V@)
+xmlto_verbose_out_0 = 2>/dev/null
+
 # Tools to execute:
 ADOC = $(asciidoc_verbose)$(ASCIIDOC) -f $(ASCIIDOC_CONF) -d manpage \
        -a mansource="LTTng" \
@@ -75,19 +79,30 @@ XTO = $(xmlto_verbose)$(XMLTO) -m $(XSL_FILE) man
        $(ADOC_DOCBOOK) -o $@ $<
 
 %.1: %.1.xml $(XSL_FILE)
-       $(XTO) $< 2>/dev/null
+       $(XTO) $< $(xmlto_verbose_out)
 
 %.3.xml: $(srcdir)/%.3.txt $(COMMON_DEPS)
        $(ADOC_DOCBOOK) -o $@ $<
 
-tracef.3 vtracef.3 &: tracef.3.xml $(XSL_FILE)
-       $(XTO) $< 2>/dev/null
+# These pair of files are generated by a single invocation of xmlto, use an
+# empty rule that depends on a fake intermediate file to track the dependencies
+# without resorting to Group Targets which were only introduced in GNU Make 4.3.
+tracef.3 vtracef.3: tracef.3.alias
+       @# Empty recipe to mark tracef.3 and vtracef.3 as rebuilt
+
+tracelog.3 vtracelog.3: tracelog.3.alias
+       @# Empty recipe to mark tracelog.3 and vtracelog.3 as rebuilt
+
+.INTERMEDIATE: tracef.3.alias tracelog.3.alias
+
+tracef.3.alias: tracef.3.xml $(XSL_FILE)
+       $(XTO) $< $(xmlto_verbose_out)
 
-tracelog.3 vtracelog.3 &: tracelog.3.xml $(XSL_FILE)
-       $(XTO) $< 2>/dev/null
+tracelog.3.alias: tracelog.3.xml $(XSL_FILE)
+       $(XTO) $< $(xmlto_verbose_out)
 
 %.3: %.3.xml $(XSL_FILE)
-       $(XTO) $< 2>/dev/null
+       $(XTO) $< $(xmlto_verbose_out)
 
 # Only clean the generated files if we have the tools to generate them again.
 CLEANFILES = $(MAN_XML) $(MAN)
This page took 0.027677 seconds and 4 git commands to generate.