From 02275a1d8e68c32173b45f5a0e3b27d97007c840 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 23 Mar 2021 14:20:21 -0400 Subject: [PATCH] fix: Group Targets requires GNU Make >= 4.3 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 Signed-off-by: Mathieu Desnoyers --- doc/man/Makefile.am | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index c9e3bee5..aed7835a 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -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) -- 2.34.1