Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH RFC] perf docs: build only the declared manual section
@ 2026-11-12 20:24 ORTOLA Raphaël
  2026-11-12 20:34 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: ORTOLA Raphaël @ 2026-11-12 20:24 UTC (permalink / raw)
  To: linux-perf-users

Hello,

While building Ubuntu linux 7.3.0-9.9, GNU make 4.4.1 reports that the
perf manual rules do not update their .5 and .7 peer targets. The
implicit multi-target rules promise all three sections for each input,
whereas XMLto and Asciidoctor emit the section declared by that input.

The proposed change uses the existing DOC_MAN1/DOC_MAN5/DOC_MAN7 lists
with static pattern prerequisites and one recipe per backend. The
shared asciidoc.conf prerequisite is moved after those rules so that
$< remains the manual input rather than the configuration file.
USE_ASCIIDOCTOR selects the two alternative backends.

Checks on this downstream source:
- Before: the native XMLto build reports missing .5/.7 peer targets.
- After: all 41 native XMLto manuals build without warnings.
- Additional section 5 and 7 fixture manuals build with XMLto.
- Asciidoctor 2.0.26 with Ruby 3.3.8 generates section 1, 5 and 7
fixture manuals without warnings, using explicit ASCIIDOC_EXTRA
backend flags.

This is an RFC for the documentation rules; it is not a claim of a
completed kernel build or testing on current upstream master. Please
review the proposed fix below.

--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -174,7 +174,6 @@

 html: $(DOC_HTML)

-$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf

 man: man1 man5 man7
 man1: $(DOC_MAN1)
@@ -259,17 +258,26 @@
                     --date=short --no-show-signature $<)))

 ifdef USE_ASCIIDOCTOR
-$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : %.txt
+$(DOC_MAN1): $(OUTPUT)%.1: %.txt
+$(DOC_MAN5): $(OUTPUT)%.5: %.txt
+$(DOC_MAN7): $(OUTPUT)%.7: %.txt
+$(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7):
 	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
 	$(ASCIIDOC) -b manpage -d manpage \
 		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \
 		-adocdate=$(PERF_DATE) -o $@+ $< && \
 	mv $@+ $@
-endif
-
-$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml
+else
+
+$(DOC_MAN1): $(OUTPUT)%.1: $(OUTPUT)%.xml
+$(DOC_MAN5): $(OUTPUT)%.5: $(OUTPUT)%.xml
+$(DOC_MAN7): $(OUTPUT)%.7: $(OUTPUT)%.xml
+$(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7):
 	$(QUIET_XMLTO)$(RM) $@ && \
 	$(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
+endif
+
+$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf

 $(OUTPUT)%.xml : %.txt
 	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-12 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 20:24 [PATCH RFC] perf docs: build only the declared manual section ORTOLA Raphaël
2026-11-12 20:34 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox