docs: replace @xxx@ markers at build time

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>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Juergen Gross authored and Andrew Cooper committed 2025-11-21 15:51:49 +00:00
1 parent 82b9cc04a7
commit 5fe0b99d7b
3 files changed
+12 -15

No files matched your search

+10 -1
View File
@@ -8,8 +8,14 @@ DATE := $(call date,"+%Y-%m-%d")
DOC_ARCHES := arm ppc riscv x86_32 x86_64
MAN_SECTIONS := 1 5 7 8
IN_TARGETS := man/xl-disk-configuration.5.pod
IN_TARGETS += man/xl-network-configuration.5.pod
IN_TARGETS += man/xl.1.pod
IN_TARGETS += man/xl.cfg.5.pod
IN_TARGETS += 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_TARGETS)))
RST-SRC-y := $(sort $(filter-out %index.rst,$(shell find * -type f -name '*.rst' -print)))
@@ -77,11 +83,14 @@ clean: clean-man-pages
distclean: clean
rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache \
autom4te.cache
$(RM) $(IN_TARGETS)
# Top level install targets
.PHONY: man-pages install-man-pages clean-man-pages uninstall-man-pages
$(foreach file,$(IN_TARGETS),$(eval $(call apply-build-vars,$(file))))
# Metarules for generating manpages. Run with $(1) substitued for section
define GENERATE_MANPAGE_RULES
+1 -6
View File
@@ -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
+1 -8
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.