fix: Group Targets requires GNU Make >= 4.3
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 23 Mar 2021 18:20:21 +0000 (14:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Mar 2021 19:28:42 +0000 (15:28 -0400)
Group Targets requires GNU Make >= 4.3 released in 2020, with older Make
release the syntax only results in a warning and most of the time it
will work fine since the rule is called and generates both files.
However it breaks the dependencies across files and makes the man pages
generation racy.

Use a less elegant workaround that is compatible with all Make
implementations.

Change-Id: I46a0488c6ff61082f641d8ee55ad2802c0bfa046
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/man/Makefile.am

index c9e3bee53881559830fc220f3adaad59c5504516..aed7835a34a6239bf5b73f00b4096a935180b2b8 100644 (file)
@@ -80,10 +80,21 @@ XTO = $(xmlto_verbose)$(XMLTO) -m $(XSL_FILE) man
 %.3.xml: $(srcdir)/%.3.txt $(COMMON_DEPS)
        $(ADOC_DOCBOOK) -o $@ $<
 
-tracef.3 vtracef.3 &: tracef.3.xml $(XSL_FILE)
+# 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) $< 2>/dev/null
 
-tracelog.3 vtracelog.3 &: tracelog.3.xml $(XSL_FILE)
+tracelog.3.alias: tracelog.3.xml $(XSL_FILE)
        $(XTO) $< 2>/dev/null
 
 %.3: %.3.xml $(XSL_FILE)
This page took 0.024919 seconds and 4 git commands to generate.