From 110370b105bd397f1c70ab119d0ec5eb605f8a23 Mon Sep 17 00:00:00 2001
From: kibruh <268704792+KIBruh@users.noreply.github.com>
Date: Wed, 22 Apr 2026 20:29:54 +0200
Subject: [PATCH] docs: autodetect docbook-xsl path and document dependencies
Auto-detect DocBook XSL stylesheet locations in the doc makefile so the
build works across distro-specific install paths without manual symlinks.
Document required Debian/Ubuntu packages in doc/README and refresh
copyright year text in the XML guidelines document.
---
doc/README | 9 +++++++++
doc/developer-guidelines.xml | 4 ++--
doc/makefile | 14 +++++++++++++-
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/doc/README b/doc/README
index 388bc1d7..38921abd 100644
--- a/doc/README
+++ b/doc/README
@@ -1,3 +1,12 @@
The developer documentation here is generated from the DocBook format.
+On Debian/Ubuntu, install these packages to build the guidelines:
+
+ make
+ xsltproc
+ docbook-xsl
+ docbook-xml
+
+The makefile auto-detects the DocBook XSL stylesheet path used by
+different distributions.
diff --git a/doc/developer-guidelines.xml b/doc/developer-guidelines.xml
index f81a833f..c9068cc2 100644
--- a/doc/developer-guidelines.xml
+++ b/doc/developer-guidelines.xml
@@ -13,7 +13,7 @@
2013
Monitoring Plugins Development Guidelines
- 2000 - 2024
+ 2000 - 2026
Monitoring Plugins Development Team
@@ -22,7 +22,7 @@
The purpose of these guidelines is to provide a reference for
the plugin developers and encourage the standardization of the
different kinds of plugins: C, shell, perl, python, etc.
- Monitoring Plugins Development Guidelines Copyright (C) 2000-2024
+ Monitoring Plugins Development Guidelines Copyright (C) 2000-2026
(Monitoring Plugins Team)
Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and this
diff --git a/doc/makefile b/doc/makefile
index 3b91958f..554b8a1c 100644
--- a/doc/makefile
+++ b/doc/makefile
@@ -1,7 +1,19 @@
# Quick makefile to create developer-guidelines.html
+DOCBOOK_XSL := $(firstword $(wildcard \
+ /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl \
+ /usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl))
+
+ifeq ($(DOCBOOK_XSL),)
+$(error Could not find DocBook XSL stylesheet; install docbook-xsl)
+endif
+
developer-guidelines.html: developer-guidelines.xml developer-guidelines.css
- xsltproc --nonet --stringparam html.stylesheet developer-guidelines.css -o developer-guidelines.html /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl developer-guidelines.xml
+ xsltproc --nonet \
+ --stringparam html.stylesheet developer-guidelines.css \
+ -o developer-guidelines.html \
+ $(DOCBOOK_XSL) \
+ developer-guidelines.xml
clean:
rm -f developer-guidelines.html developer-guidelines.html.last jade-out.fot