From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
Anthony PERARD <anthony.perard@vates.tech>
Subject: [PATCH v2 2/4] docs: replace @xxx@ markers at build time
Date: Fri, 14 Nov 2025 12:32:36 +0100 [thread overview]
Message-ID: <20251114113238.9279-3-jgross@suse.com> (raw)
In-Reply-To: <20251114113238.9279-1-jgross@suse.com>
Use the apply-build-vars make macro to replace the @xxx@ markers in
*.in files only at build time.
This allows to change the affected document files without having to
run "configure" for making the change effective.
While at it add the generated files to the distclean make target.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
V2:
- don't rename source files
---
docs/Makefile | 8 +++++++-
docs/configure | 7 +------
docs/configure.ac | 9 +--------
3 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/docs/Makefile b/docs/Makefile
index 37776d303c..e5f4a8ca86 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -8,8 +8,11 @@ DATE := $(call date,"+%Y-%m-%d")
DOC_ARCHES := arm ppc riscv x86_32 x86_64
MAN_SECTIONS := 1 5 7 8
+IN_FILES := man/xl-disk-configuration.5.pod man/xl-network-configuration.5.pod
+IN_FILES += man/xl.1.pod man/xl.cfg.5.pod man/xl.conf.5.pod
+
# Documentation sources to build
-MAN-SRC-y := $(sort $(basename $(wildcard man/*.pod man/*.pandoc)))
+MAN-SRC-y := $(sort $(basename $(wildcard man/*.pod man/*.pandoc) $(IN_FILES)))
RST-SRC-y := $(sort $(filter-out %index.rst,$(shell find * -type f -name '*.rst' -print)))
@@ -77,11 +80,14 @@ clean: clean-man-pages
distclean: clean
rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache \
autom4te.cache
+ rm -f $(IN_FILES)
# Top level install targets
.PHONY: man-pages install-man-pages clean-man-pages uninstall-man-pages
+$(foreach file,$(IN_FILES),$(eval $(call apply-build-vars,$(file))))
+
# Metarules for generating manpages. Run with $(1) substitued for section
define GENERATE_MANPAGE_RULES
diff --git a/docs/configure b/docs/configure
index 98dda3cd0f..8871914dcb 100755
--- a/docs/configure
+++ b/docs/configure
@@ -1794,7 +1794,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_config_files="$ac_config_files ../config/Docs.mk man/xl.cfg.5.pod man/xl.1.pod man/xl-disk-configuration.5.pod man/xl-network-configuration.5.pod man/xl.conf.5.pod"
+ac_config_files="$ac_config_files ../config/Docs.mk"
@@ -3063,11 +3063,6 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"../config/Docs.mk") CONFIG_FILES="$CONFIG_FILES ../config/Docs.mk" ;;
- "man/xl.cfg.5.pod") CONFIG_FILES="$CONFIG_FILES man/xl.cfg.5.pod" ;;
- "man/xl.1.pod") CONFIG_FILES="$CONFIG_FILES man/xl.1.pod" ;;
- "man/xl-disk-configuration.5.pod") CONFIG_FILES="$CONFIG_FILES man/xl-disk-configuration.5.pod" ;;
- "man/xl-network-configuration.5.pod") CONFIG_FILES="$CONFIG_FILES man/xl-network-configuration.5.pod" ;;
- "man/xl.conf.5.pod") CONFIG_FILES="$CONFIG_FILES man/xl.conf.5.pod" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
diff --git a/docs/configure.ac b/docs/configure.ac
index c2e5edd3b3..43dc516056 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -5,14 +5,7 @@ AC_PREREQ([2.67])
AC_INIT([Xen Hypervisor Documentation], m4_esyscmd([../version.sh ../xen/Makefile]),
[xen-devel@lists.xen.org], [xen], [https://www.xen.org/])
AC_CONFIG_SRCDIR([misc/xen-command-line.pandoc])
-AC_CONFIG_FILES([
-../config/Docs.mk
-man/xl.cfg.5.pod
-man/xl.1.pod
-man/xl-disk-configuration.5.pod
-man/xl-network-configuration.5.pod
-man/xl.conf.5.pod
-])
+AC_CONFIG_FILES([../config/Docs.mk])
AC_CONFIG_AUX_DIR([../])
# M4 Macro includes
--
2.51.0
next prev parent reply other threads:[~2025-11-14 11:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 11:32 [PATCH v2 0/4] configure: reduce number of files created Juergen Gross
2025-11-14 11:32 ` [PATCH v2 1/4] build: add make macro for making file from file.in Juergen Gross
2025-11-14 11:42 ` Andrew Cooper
2025-11-14 12:54 ` Jürgen Groß
2025-11-17 12:24 ` Jan Beulich
2025-11-17 12:30 ` Andrew Cooper
2025-11-17 12:51 ` Jürgen Groß
2025-11-17 12:37 ` Jürgen Groß
2025-11-17 12:51 ` Jan Beulich
2025-11-17 13:03 ` Jürgen Groß
2025-11-17 12:29 ` Jan Beulich
2025-11-17 12:48 ` Jürgen Groß
2025-11-17 12:54 ` Jan Beulich
2025-11-17 13:10 ` Jürgen Groß
2025-11-17 14:05 ` Jan Beulich
2025-11-14 11:32 ` Juergen Gross [this message]
2025-11-14 11:40 ` [PATCH v2 2/4] docs: replace @xxx@ markers at build time Andrew Cooper
2025-11-14 13:00 ` Jürgen Groß
2025-11-17 12:33 ` Jan Beulich
2025-11-17 12:55 ` Jürgen Groß
2025-11-17 13:00 ` Jan Beulich
2025-11-17 13:17 ` Jürgen Groß
2025-11-17 14:06 ` Jan Beulich
2025-11-14 11:32 ` [PATCH v2 3/4] config: remove unused paths from config/Paths.mk.in Juergen Gross
2025-11-14 11:47 ` Andrew Cooper
2025-11-14 13:00 ` Jürgen Groß
2025-11-14 11:32 ` [PATCH v2 4/4] tools: replace @xxx@ markers at build time Juergen Gross
2025-11-14 11:54 ` Andrew Cooper
2025-11-14 13:03 ` Jürgen Groß
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251114113238.9279-3-jgross@suse.com \
--to=jgross@suse.com \
--cc=anthony.perard@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.